diff --git a/5.3.0.tar.gz b/5.3.0.tar.gz deleted file mode 100644 index bdd10e12e9471b1d6633e1f12bc25ce3292a0e9f..0000000000000000000000000000000000000000 Binary files a/5.3.0.tar.gz and /dev/null differ diff --git a/5.3.4.tar.gz b/5.3.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6667ce77f5983a72947ff03add4c10980e287906 Binary files /dev/null and b/5.3.4.tar.gz differ diff --git a/tesseract.spec b/tesseract.spec index 9bf609c3aeb566d9b01964186ad5222340126593..7dfef54da7b69ca8e80fafb50f19da14e840eba5 100644 --- a/tesseract.spec +++ b/tesseract.spec @@ -3,7 +3,7 @@ %bcond_with mingw Name: tesseract -Version: 5.3.0 +Version: 5.3.4 Release: %{anolis_release}%{?dist} Summary: Raw OCR Engine @@ -16,10 +16,6 @@ Source0: https://github.com/tesseract-ocr/tesseract/archive/refs/tags/%{ve # Honour TESSDATA_PREFIX # Build training libs statically Patch0: tesseract_cmake.patch -# Generate correct libdir path in /usr/lib64/pkgconfig/tesseract.pc -# Already merged upstream, can be dropped at next release -# https://github.com/tesseract-ocr/tesseract/commit/5e116fa5cad249b8a08d22af652cf52f44fbb8cd -Patch1: tesseract_libdir.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -170,7 +166,7 @@ cp -a doc/*.5 %{buildroot}%{_mandir}/man5/ %files %license LICENSE %{_bindir}/%{name} -%{_libdir}/lib%{name}.so.5.3.0 +%{_libdir}/lib%{name}.so.5.3.* %{_datadir}/%{name}/ %{_mandir}/man1/tesseract.1* %dir %{abidir} @@ -264,5 +260,8 @@ cp -a doc/*.5 %{buildroot}%{_mandir}/man5/ %doc README.md INSTALL ChangeLog CONTRIBUTING.md AUTHORS %changelog +* Thu Feb 27 2025 Weisson - 5.3.4-1 +- Refer to CentOS Stream tesseract-5.3.4-6(tdawson@redhat.com). + * Fri Mar 17 2023 happy_orange - 5.3.0-1 - package init from upstream diff --git a/tesseract_cmake.patch b/tesseract_cmake.patch index 8cacfd648b1cd747ba2ebdef09ec0a10fc63204b..44d04da37b66fabbf6b3a37eb996f4fb90403f33 100644 --- a/tesseract_cmake.patch +++ b/tesseract_cmake.patch @@ -1,7 +1,7 @@ -diff -rupN --no-dereference tesseract-5.3.0/CMakeLists.txt tesseract-5.3.0-new/CMakeLists.txt ---- tesseract-5.3.0/CMakeLists.txt 2022-12-22 14:57:57.000000000 +0100 -+++ tesseract-5.3.0-new/CMakeLists.txt 2022-12-23 10:33:09.303707322 +0100 -@@ -345,7 +345,7 @@ elseif(UNIX) +diff -rupN --no-dereference tesseract-5.3.4/CMakeLists.txt tesseract-5.3.4-new/CMakeLists.txt +--- tesseract-5.3.4/CMakeLists.txt 2024-01-18 08:48:04.000000000 +0100 ++++ tesseract-5.3.4-new/CMakeLists.txt 2024-01-21 09:25:25.006991375 +0100 +@@ -365,7 +365,7 @@ elseif(UNIX) set(LIB_pthread pthread) endif() elseif(WIN32) @@ -10,37 +10,45 @@ diff -rupN --no-dereference tesseract-5.3.0/CMakeLists.txt tesseract-5.3.0-new/C endif() add_definitions("-DCMAKE_BUILD") -@@ -812,11 +812,14 @@ set_target_properties(libtesseract - set_target_properties(libtesseract - PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +@@ -853,12 +853,17 @@ 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 +- OUTPUT_NAME +- tesseract$<$:${VERSION_MAJOR}${VERSION_MINOR}$<$:d>> +-) ++if(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() -@@ -931,9 +934,9 @@ install( ++else() ++ set_target_properties( ++ libtesseract ++ PROPERTIES ++ OUTPUT_NAME ++ tesseract$<$:${VERSION_MAJOR}${VERSION_MINOR}$<$:d>> ++ ) ++endif() + + if(SW_BUILD) + target_link_libraries(libtesseract PUBLIC org.sw.demo.danbloomberg.leptonica +@@ -980,9 +985,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) + 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() # ############################################################################## -diff -rupN --no-dereference tesseract-5.3.0/src/training/CMakeLists.txt tesseract-5.3.0-new/src/training/CMakeLists.txt ---- tesseract-5.3.0/src/training/CMakeLists.txt 2022-12-22 14:57:57.000000000 +0100 -+++ tesseract-5.3.0-new/src/training/CMakeLists.txt 2022-12-23 10:33:09.303707322 +0100 +diff -rupN --no-dereference tesseract-5.3.4/src/training/CMakeLists.txt tesseract-5.3.4-new/src/training/CMakeLists.txt +--- tesseract-5.3.4/src/training/CMakeLists.txt 2024-01-18 08:48:04.000000000 +0100 ++++ tesseract-5.3.4-new/src/training/CMakeLists.txt 2024-01-21 09:25:25.010991182 +0100 @@ -115,7 +115,7 @@ if(NOT DISABLED_LEGACY_ENGINE) common/trainingsampleset.h) endif() @@ -59,7 +67,7 @@ diff -rupN --no-dereference tesseract-5.3.0/src/training/CMakeLists.txt tesserac if(SW_BUILD) target_link_libraries(unicharset_training PUBLIC common_training org.sw.demo.unicode.icu.i18n) -@@ -378,7 +378,7 @@ if(ICU_FOUND) +@@ -377,7 +377,7 @@ if(ICU_FOUND) file(GLOB pango_training_src pango/*) diff --git a/tesseract_libdir.patch b/tesseract_libdir.patch deleted file mode 100644 index b3565d4a2b991c61dcc4a12bc760e0c14cba7da2..0000000000000000000000000000000000000000 --- a/tesseract_libdir.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5e116fa5cad249b8a08d22af652cf52f44fbb8cd Mon Sep 17 00:00:00 2001 -From: Frank Dana -Date: Thu, 2 Feb 2023 19:57:59 -0500 -Subject: [PATCH] Fix libdir in tesseract.pc from CMake - -tesseract.pc.cmake was hardcoding libdir to -`{prefix}/lib`, which is wrong for systems that use -`/usr/lib64/` on 64-bit. `CMAKE_INSTALL_LIBDIR` -is already expected to contain the libdir path -relative to the install prefix. ---- - tesseract.pc.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tesseract.pc.cmake b/tesseract.pc.cmake -index 7f36ce19..5469a398 100644 ---- a/tesseract.pc.cmake -+++ b/tesseract.pc.cmake -@@ -1,6 +1,6 @@ - prefix=@CMAKE_INSTALL_PREFIX@ - exec_prefix=${prefix}/bin --libdir=${prefix}/lib -+libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ - includedir=${prefix}/include - - Name: @tesseract_NAME@ --- -2.39.1 -