diff --git a/tesseract.spec b/tesseract.spec index 89f6da4..98b6154 100644 --- a/tesseract.spec +++ b/tesseract.spec @@ -8,7 +8,7 @@ Name: tesseract Version: 5.3.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Raw OCR Engine License: Apache-2.0 @@ -24,6 +24,9 @@ Patch0: tesseract_cmake.patch # Already merged upstream, can be dropped at next release # https://github.com/tesseract-ocr/tesseract/commit/5e116fa5cad249b8a08d22af652cf52f44fbb8cd Patch1: tesseract_libdir.patch +# Fixed FTBFS under GCC 13: +# https://github.com/tesseract-ocr/tesseract/commit/2025b53de6b3d97285d7c5f80497493007c586c3 +Patch2: tesseract_gcc13.patch BuildRequires: cmake @@ -246,6 +249,9 @@ cp -a doc/*.5 %{buildroot}%{_mandir}/man5/ %changelog +* Mon Mar 20 2023 Vitaly Zaitsev - 5.3.0-6 +- Backported GCC 13 build fix. Fixed FTBFS on Fedora 38+. + * Fri Feb 03 2023 FeRD (Frank Dana) - 5.3.0-5 - Add patch from upstream to fix pkg-config libdir value diff --git a/tesseract_gcc13.patch b/tesseract_gcc13.patch new file mode 100644 index 0000000..f630727 --- /dev/null +++ b/tesseract_gcc13.patch @@ -0,0 +1,28 @@ +From 2025b53de6b3d97285d7c5f80497493007c586c3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 30 Jan 2023 11:27:07 -0800 +Subject: [PATCH] Fix build with gcc 13 by including + +gcc 13 moved some includes around and as a result is +no longer transitively included [1]. Explicitly include it for +int32_t. + +[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes + +Signed-off-by: Khem Raj +--- + src/ccutil/params.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ccutil/params.h b/src/ccutil/params.h +index f514d8709c..0f3f874357 100644 +--- a/src/ccutil/params.h ++++ b/src/ccutil/params.h +@@ -21,6 +21,7 @@ + + #include // for TESS_API + ++#include + #include + #include + #include