summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-02 07:01:31 +0000
committerSam James <sam@gentoo.org>2023-02-02 07:01:31 +0000
commitac4738fca722ddc0e5c57ba852154c7e12b1b1c9 (patch)
tree2bbd6b5e45ed9242ec49889df0d28dc62222f85b /app-text/tesseract
parentnet-libs/zeromq: fix build w/ gcc 13 (diff)
downloadgentoo-ac4738fca722ddc0e5c57ba852154c7e12b1b1c9.tar.gz
gentoo-ac4738fca722ddc0e5c57ba852154c7e12b1b1c9.tar.bz2
gentoo-ac4738fca722ddc0e5c57ba852154c7e12b1b1c9.zip
app-text/tesseract: fix build w/ gcc 13
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/tesseract')
-rw-r--r--app-text/tesseract/files/tesseract-5.3.0-gcc-13.patch25
-rw-r--r--app-text/tesseract/tesseract-5.3.0.ebuild4
2 files changed, 29 insertions, 0 deletions
diff --git a/app-text/tesseract/files/tesseract-5.3.0-gcc-13.patch b/app-text/tesseract/files/tesseract-5.3.0-gcc-13.patch
new file mode 100644
index 000000000000..959948aa677c
--- /dev/null
+++ b/app-text/tesseract/files/tesseract-5.3.0-gcc-13.patch
@@ -0,0 +1,25 @@
+https://github.com/tesseract-ocr/tesseract/commit/2025b53de6b3d97285d7c5f80497493007c586c3
+
+From 2025b53de6b3d97285d7c5f80497493007c586c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 30 Jan 2023 11:27:07 -0800
+Subject: [PATCH] Fix build with gcc 13 by including <cstdint>
+
+gcc 13 moved some includes around and as a result <cstdint> 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 <raj.khem@gmail.com>
+--- a/src/ccutil/params.h
++++ b/src/ccutil/params.h
+@@ -21,6 +21,7 @@
+
+ #include <tesseract/export.h> // for TESS_API
+
++#include <cstdint>
+ #include <cstdio>
+ #include <cstring>
+ #include <string>
+
diff --git a/app-text/tesseract/tesseract-5.3.0.ebuild b/app-text/tesseract/tesseract-5.3.0.ebuild
index 7c7753b1ecf2..cb7040d39bc6 100644
--- a/app-text/tesseract/tesseract-5.3.0.ebuild
+++ b/app-text/tesseract/tesseract-5.3.0.ebuild
@@ -37,6 +37,10 @@ DEPEND="${COMMON_DEPEND}
dev-libs/libxslt
doc? ( app-doc/doxygen )"
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-13.patch
+)
+
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
}