diff --git a/tesseract.spec b/tesseract.spec index 5a90220..89f6da4 100644 --- a/tesseract.spec +++ b/tesseract.spec @@ -8,7 +8,7 @@ Name: tesseract Version: 5.3.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Raw OCR Engine License: Apache-2.0 @@ -20,6 +20,10 @@ Source0: https://github.com/tesseract-ocr/tesseract/archive/%{version}%{?p # 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 @@ -242,6 +246,9 @@ cp -a doc/*.5 %{buildroot}%{_mandir}/man5/ %changelog +* Fri Feb 03 2023 FeRD (Frank Dana) - 5.3.0-5 +- Add patch from upstream to fix pkg-config libdir value + * Sat Jan 21 2023 Fedora Release Engineering - 5.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild diff --git a/tesseract_libdir.patch b/tesseract_libdir.patch new file mode 100644 index 0000000..b3565d4 --- /dev/null +++ b/tesseract_libdir.patch @@ -0,0 +1,29 @@ +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 +