Update to 5.1.0
This commit is contained in:
parent
169b89268f
commit
622725d184
|
@ -21,3 +21,4 @@ tesseract-2.00.eng.tar.gz
|
|||
/tesseract-4.1.3.tar.gz
|
||||
/tesseract-5.0.0.tar.gz
|
||||
/tesseract-5.0.1.tar.gz
|
||||
/tesseract-5.1.0.tar.gz
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (tesseract-5.0.1.tar.gz) = 0a4824f71eb76ab022f3b9258d12b9a059adcf2f37fac6442ae1096d0efc80404ba1bfd9c90e8263178c1af606c2aad2b277ceb93efc3b9e93c125f931ff08c1
|
||||
SHA512 (tesseract-5.1.0.tar.gz) = d874fc995182c2c7ce210ebd79ad36414fa73afc53063505bc0b0aa0f090dc48db09c650c86a727778584f34a421b7d64c129cefe282ea112560cd7ca24e7f59
|
||||
|
|
|
@ -1,46 +1,55 @@
|
|||
#global pre beta.4
|
||||
|
||||
Name: tesseract
|
||||
Version: 5.0.1
|
||||
Release: 5%{?pre:.%pre}%{?dist}
|
||||
Version: 5.1.0
|
||||
Release: 1%{?pre:.%pre}%{?dist}
|
||||
Summary: Raw OCR Engine
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/tesseract-ocr/%{name}
|
||||
Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}%{?pre:-%pre}/%{name}-%{version}%{?pre:-%pre}.tar.gz
|
||||
|
||||
# Place tessdata below /usr/share/tesseract
|
||||
Patch0: tesseract_tessdata_prefix.patch
|
||||
# Fix library name case
|
||||
# Fix shared library version suffix
|
||||
# Honour TESSDATA_PREFIX
|
||||
Patch0: tesseract_cmake.patch
|
||||
|
||||
|
||||
BuildRequires: automake autoconf libtool
|
||||
BuildRequires: make
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: giflib-devel
|
||||
BuildRequires: leptonica-devel
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: libjpeg-turbo-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: leptonica-devel
|
||||
BuildRequires: cairo-devel
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: libwebp-devel
|
||||
BuildRequires: pango-devel
|
||||
BuildRequires: /usr/bin/asciidoc
|
||||
BuildRequires: /usr/bin/xsltproc
|
||||
|
||||
BuildRequires: mingw32-filesystem >= 95
|
||||
BuildRequires: mingw32-gcc
|
||||
BuildRequires: mingw32-giflib
|
||||
BuildRequires: mingw32-binutils
|
||||
BuildRequires: mingw32-icu
|
||||
BuildRequires: mingw32-libtiff
|
||||
BuildRequires: mingw32-leptonica
|
||||
BuildRequires: mingw32-libgomp
|
||||
BuildRequires: mingw32-libjpeg-turbo
|
||||
BuildRequires: mingw32-libtiff
|
||||
BuildRequires: mingw32-libwebp
|
||||
BuildRequires: mingw32-pango
|
||||
|
||||
BuildRequires: mingw64-filesystem >= 95
|
||||
BuildRequires: mingw64-gcc
|
||||
BuildRequires: mingw64-giflib
|
||||
BuildRequires: mingw64-binutils
|
||||
BuildRequires: mingw64-icu
|
||||
BuildRequires: mingw64-libtiff
|
||||
BuildRequires: mingw64-leptonica
|
||||
BuildRequires: mingw64-libgomp
|
||||
BuildRequires: mingw64-libjpeg-turbo
|
||||
BuildRequires: mingw64-libtiff
|
||||
BuildRequires: mingw64-libwebp
|
||||
BuildRequires: mingw64-pango
|
||||
|
||||
Requires: tesseract-langpack-eng
|
||||
|
@ -111,37 +120,30 @@ MinGW Windows tesseract-ocr library tools.
|
|||
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
|
||||
# Native build
|
||||
mkdir build_native
|
||||
pushd build_native
|
||||
%global _configure ../configure
|
||||
%ifarch armv7hl
|
||||
export CFLAGS="`echo %{optflags} | sed 's|-mfpu=vfpv3-d16||'`"
|
||||
export CXXFLAGS="`echo %{optflags} | sed 's|-mfpu=vfpv3-d16||'`"
|
||||
%endif
|
||||
%configure --disable-static
|
||||
%make_build
|
||||
%make_build training
|
||||
popd
|
||||
%cmake -DCMAKE_INSTALL_LIBDIR=%{_lib} -DTESSDATA_PREFIX=%{_datadir}/%{name}
|
||||
%cmake_build
|
||||
|
||||
# Manually build manfiles, cmake does not build them
|
||||
man_xslt=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
|
||||
for file in doc/*.asc; do
|
||||
asciidoc -b docbook -d manpage -o - $file | XML_CATALOG_FILES=%{_sysconfdir}/xml/catalog xsltproc --nonet -o ${file/.asc/} $man_xslt -
|
||||
done
|
||||
|
||||
# MinGW build
|
||||
# Fix error: unable to find numeric literal operator 'operator""Q'
|
||||
MINGW32_CXXFLAGS="%{mingw32_cflags} -fext-numeric-literals" \
|
||||
MINGW64_CXXFLAGS="%{mingw32_cflags} -fext-numeric-literals" \
|
||||
%mingw_configure --disable-static
|
||||
MINGW32_CMAKE_ARGS=-DTESSDATA_PREFIX=%{mingw32_datadir}/%{name} \
|
||||
MINGW64_CMAKE_ARGS=-DTESSDATA_PREFIX=%{mingw64_datadir}/%{name}
|
||||
%mingw_cmake -DSW_BUILD=OFF
|
||||
%mingw_make_build
|
||||
%mingw_make_build training
|
||||
|
||||
|
||||
%install
|
||||
%make_install training-install -C build_native
|
||||
%mingw_make_install training-install
|
||||
rm -rf %{buildroot}%{mingw32_mandir}/
|
||||
rm -rf %{buildroot}%{mingw64_mandir}/
|
||||
%cmake_install
|
||||
mkdir -p %{buildroot}%{_mandir}/{man1,man5}/
|
||||
cp -a doc/*.1 %{buildroot}%{_mandir}/man1/
|
||||
cp -a doc/*.5 %{buildroot}%{_mandir}/man5/
|
||||
|
||||
find %{buildroot} -name '*.la' -delete
|
||||
%mingw_make_install
|
||||
|
||||
|
||||
%mingw_debug_install_post
|
||||
|
@ -151,13 +153,14 @@ find %{buildroot} -name '*.la' -delete
|
|||
%license LICENSE
|
||||
%doc AUTHORS ChangeLog README.md
|
||||
%{_bindir}/%{name}
|
||||
%{_libdir}/lib%{name}.so.5*
|
||||
%{_libdir}/lib%{name}.so.5.1.0
|
||||
%{_datadir}/%{name}/
|
||||
%{_mandir}/man1/tesseract.1*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/%{name}
|
||||
%{_libdir}/lib%{name}.so
|
||||
%{_libdir}/cmake/%{name}/
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
%files tools
|
||||
|
@ -196,10 +199,11 @@ find %{buildroot} -name '*.la' -delete
|
|||
|
||||
%files -n mingw32-%{name}
|
||||
%license LICENSE
|
||||
%{mingw32_bindir}/libtesseract-5.dll
|
||||
%{mingw32_bindir}/libtesseract-51.dll
|
||||
%{mingw32_includedir}/tesseract/
|
||||
%{mingw32_libdir}/libtesseract.dll.a
|
||||
%{mingw32_libdir}/pkgconfig/tesseract.pc
|
||||
%{mingw32_libdir}/cmake/%{name}/
|
||||
%{mingw32_datadir}/%{name}/
|
||||
|
||||
%files -n mingw32-%{name}-tools
|
||||
|
@ -207,10 +211,11 @@ find %{buildroot} -name '*.la' -delete
|
|||
|
||||
%files -n mingw64-%{name}
|
||||
%license LICENSE
|
||||
%{mingw64_bindir}/libtesseract-5.dll
|
||||
%{mingw64_bindir}/libtesseract-51.dll
|
||||
%{mingw64_includedir}/tesseract/
|
||||
%{mingw64_libdir}/libtesseract.dll.a
|
||||
%{mingw64_libdir}/pkgconfig/tesseract.pc
|
||||
%{mingw64_libdir}/cmake/%{name}/
|
||||
%{mingw64_datadir}/%{name}/
|
||||
|
||||
%files -n mingw64-%{name}-tools
|
||||
|
@ -218,6 +223,9 @@ find %{buildroot} -name '*.la' -delete
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 02 2022 Sandro Mani <manisandro@gmail.com> - 5.1.0-1
|
||||
- Update to 5.1.0
|
||||
|
||||
* Fri Feb 25 2022 Sandro Mani <manisandro@gmail.com> - 5.0.1-5
|
||||
- Bump as F36 needs another rebuild
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
diff -rupN --no-dereference tesseract-5.1.0/CMakeLists.txt tesseract-5.1.0-new/CMakeLists.txt
|
||||
--- tesseract-5.1.0/CMakeLists.txt 2022-03-01 17:25:45.000000000 +0100
|
||||
+++ tesseract-5.1.0-new/CMakeLists.txt 2022-03-02 15:47:55.575671906 +0100
|
||||
@@ -328,7 +328,7 @@ elseif(UNIX)
|
||||
set(LIB_pthread pthread)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
- set(LIB_Ws2_32 Ws2_32)
|
||||
+ set(LIB_Ws2_32 ws2_32)
|
||||
endif()
|
||||
|
||||
add_definitions("-DCMAKE_BUILD")
|
||||
@@ -770,11 +770,14 @@ set_target_properties(libtesseract
|
||||
set_target_properties(libtesseract
|
||||
PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
|
||||
-if(WIN32)
|
||||
+if(MSVC)
|
||||
set_target_properties(libtesseract
|
||||
PROPERTIES OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR})
|
||||
set_target_properties(libtesseract
|
||||
PROPERTIES DEBUG_OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR}d)
|
||||
+elseif(MINGW)
|
||||
+ set_target_properties(libtesseract PROPERTIES SUFFIX "-${VERSION_MAJOR}${VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
+ set_target_properties(libtesseract PROPERTIES OUTPUT_NAME tesseract)
|
||||
else()
|
||||
set_target_properties(libtesseract PROPERTIES OUTPUT_NAME tesseract)
|
||||
endif()
|
||||
@@ -882,9 +885,9 @@ install(
|
||||
|
||||
if(INSTALL_CONFIGS)
|
||||
install(FILES ${TESSERACT_CONFIGS}
|
||||
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/tessdata/configs)
|
||||
+ DESTINATION ${TESSDATA_PREFIX}/tessdata/configs)
|
||||
install(FILES ${TESSERACT_TESSCONFIGS}
|
||||
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/tessdata/tessconfigs)
|
||||
+ DESTINATION ${TESSDATA_PREFIX}/tessdata/tessconfigs)
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
|
@ -1,47 +0,0 @@
|
|||
diff -rupN --no-dereference tesseract-5.0.1/Makefile.am tesseract-5.0.1-new/Makefile.am
|
||||
--- tesseract-5.0.1/Makefile.am 2022-01-07 13:43:52.000000000 +0100
|
||||
+++ tesseract-5.0.1-new/Makefile.am 2022-01-08 09:29:40.505363003 +0100
|
||||
@@ -338,7 +338,7 @@ endif
|
||||
libtesseract_ccutil_la_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
libtesseract_ccutil_la_CPPFLAGS += $(libarchive_CFLAGS)
|
||||
if !NO_TESSDATA_PREFIX
|
||||
-libtesseract_ccutil_la_CPPFLAGS += -DTESSDATA_PREFIX='"@datadir@"'
|
||||
+libtesseract_ccutil_la_CPPFLAGS += -DTESSDATA_PREFIX='"@datadir@/tesseract"'
|
||||
endif
|
||||
|
||||
noinst_HEADERS += src/ccutil/ccutil.h
|
||||
@@ -504,7 +504,7 @@ libtesseract_lstm_la_CPPFLAGS += -DINCLU
|
||||
libtesseract_lstm_la_CPPFLAGS += -I/usr/include/tensorflow
|
||||
endif
|
||||
if !NO_TESSDATA_PREFIX
|
||||
-libtesseract_lstm_la_CPPFLAGS += -DTESSDATA_PREFIX='"@datadir@"'
|
||||
+libtesseract_lstm_la_CPPFLAGS += -DTESSDATA_PREFIX='"@datadir@/tessdata"'
|
||||
endif
|
||||
|
||||
noinst_HEADERS += src/lstm/convolve.h
|
||||
diff -rupN --no-dereference tesseract-5.0.1/tessdata/configs/Makefile.am tesseract-5.0.1-new/tessdata/configs/Makefile.am
|
||||
--- tesseract-5.0.1/tessdata/configs/Makefile.am 2022-01-07 13:43:52.000000000 +0100
|
||||
+++ tesseract-5.0.1-new/tessdata/configs/Makefile.am 2022-01-08 09:29:40.505363003 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-datadir = @datadir@/tessdata/configs
|
||||
+datadir = @datadir@/tesseract/tessdata/configs
|
||||
data_DATA = inter makebox box.train unlv ambigs.train lstm.train lstmdebug
|
||||
data_DATA += api_config kannada box.train.stderr quiet logfile digits get.images
|
||||
data_DATA += lstmbox wordstrbox
|
||||
diff -rupN --no-dereference tesseract-5.0.1/tessdata/Makefile.am tesseract-5.0.1-new/tessdata/Makefile.am
|
||||
--- tesseract-5.0.1/tessdata/Makefile.am 2022-01-07 13:43:52.000000000 +0100
|
||||
+++ tesseract-5.0.1-new/tessdata/Makefile.am 2022-01-08 09:29:40.506363004 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-datadir = @datadir@/tessdata
|
||||
+datadir = @datadir@/tesseract/tessdata
|
||||
|
||||
data_DATA = pdf.ttf
|
||||
EXTRA_DIST = $(data_DATA)
|
||||
diff -rupN --no-dereference tesseract-5.0.1/tessdata/tessconfigs/Makefile.am tesseract-5.0.1-new/tessdata/tessconfigs/Makefile.am
|
||||
--- tesseract-5.0.1/tessdata/tessconfigs/Makefile.am 2022-01-07 13:43:52.000000000 +0100
|
||||
+++ tesseract-5.0.1-new/tessdata/tessconfigs/Makefile.am 2022-01-08 09:29:40.506363004 +0100
|
||||
@@ -1,3 +1,3 @@
|
||||
-datadir = @datadir@/tessdata/tessconfigs
|
||||
+datadir = @datadir@/tesseract/tessdata/tessconfigs
|
||||
data_DATA = batch batch.nochop nobatch matdemo segdemo msdemo
|
||||
EXTRA_DIST = batch batch.nochop nobatch matdemo segdemo msdemo
|
Loading…
Reference in New Issue