From f671966b223a7dcd033a3647b9cddb9f07c6ccce Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Fri, 23 Sep 2022 12:46:20 +0200 Subject: [PATCH] Backport patch to restore equality between cmake and autotools generated pkgconfig file --- aee19fcf8eb832.patch | 11 +++++++++++ tesseract.spec | 8 +++++++- tesseract_cmake.patch | 4 ++-- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 aee19fcf8eb832.patch diff --git a/aee19fcf8eb832.patch b/aee19fcf8eb832.patch new file mode 100644 index 0000000..2ba3ecd --- /dev/null +++ b/aee19fcf8eb832.patch @@ -0,0 +1,11 @@ +diff -rupN --no-dereference tesseract-5.2.0/tesseract.pc.cmake tesseract-5.2.0-new/tesseract.pc.cmake +--- tesseract-5.2.0/tesseract.pc.cmake 2022-07-06 22:15:49.000000000 +0200 ++++ tesseract-5.2.0-new/tesseract.pc.cmake 2022-09-23 12:46:10.892721057 +0200 +@@ -7,6 +7,7 @@ Name: @tesseract_NAME@ + Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. + URL: https://github.com/tesseract-ocr/tesseract + Version: @tesseract_VERSION@ ++Requires.private: lept + Libs: -L${libdir} -l@tesseract_OUTPUT_NAME@ @libarchive_LIBS@ @libcurl_LIBS@ @TENSORFLOW_LIBS@ + Libs.private: + Cflags: -I${includedir} diff --git a/tesseract.spec b/tesseract.spec index 55db4da..5739927 100644 --- a/tesseract.spec +++ b/tesseract.spec @@ -2,7 +2,7 @@ Name: tesseract Version: 5.2.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Raw OCR Engine License: ASL 2.0 @@ -14,6 +14,8 @@ Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}%{?p # Honour TESSDATA_PREFIX # Build training libs statically Patch0: tesseract_cmake.patch +# Backport patch to restore equality between cmake and autotools generated pkgconfig file +Patch1: https://github.com/tesseract-ocr/tesseract/commit/aee19fcf8eb832.patch BuildRequires: cmake @@ -224,6 +226,10 @@ cp -a doc/*.5 %{buildroot}%{_mandir}/man5/ %changelog +* Fri Sep 23 2022 Sandro Mani - 5.2.0-5 +- Backport patch to restore equality between cmake and autotools generated + pkgconfig file + * Fri Aug 05 2022 Sandro Mani - 5.2.0-4 - Rebuild (icu) diff --git a/tesseract_cmake.patch b/tesseract_cmake.patch index 0360939..57ed36b 100644 --- a/tesseract_cmake.patch +++ b/tesseract_cmake.patch @@ -1,6 +1,6 @@ diff -rupN --no-dereference tesseract-5.2.0/CMakeLists.txt tesseract-5.2.0-new/CMakeLists.txt --- tesseract-5.2.0/CMakeLists.txt 2022-07-06 22:15:49.000000000 +0200 -+++ tesseract-5.2.0-new/CMakeLists.txt 2022-07-07 09:35:17.943005144 +0200 ++++ tesseract-5.2.0-new/CMakeLists.txt 2022-09-23 12:46:10.843721046 +0200 @@ -336,7 +336,7 @@ elseif(UNIX) set(LIB_pthread pthread) endif() @@ -40,7 +40,7 @@ diff -rupN --no-dereference tesseract-5.2.0/CMakeLists.txt tesseract-5.2.0-new/C # ############################################################################## diff -rupN --no-dereference tesseract-5.2.0/src/training/CMakeLists.txt tesseract-5.2.0-new/src/training/CMakeLists.txt --- tesseract-5.2.0/src/training/CMakeLists.txt 2022-07-06 22:15:49.000000000 +0200 -+++ tesseract-5.2.0-new/src/training/CMakeLists.txt 2022-07-07 09:35:17.943005144 +0200 ++++ tesseract-5.2.0-new/src/training/CMakeLists.txt 2022-09-23 12:46:10.843721046 +0200 @@ -108,7 +108,7 @@ if(NOT DISABLED_LEGACY_ENGINE) common/trainingsampleset.h) endif()