summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorIsmael Luceno2021-07-07 21:06:12 +0200
committerIsmael Luceno2021-07-07 21:06:12 +0200
commita33b84625a084aeace26063b2fd2a25a7dd6cb92 (patch)
tree5530d74adf04ec4bd2f78dd89bacde8b07940c75 /graphics
parent249ee16a7e6d77dc241c5b45c0de9140b60b3add (diff)
tesseract: Fix build against musl
Diffstat (limited to 'graphics')
-rw-r--r--graphics/tesseract/HISTORY1
-rwxr-xr-xgraphics/tesseract/PRE_BUILD1
-rw-r--r--graphics/tesseract/patches/fix-missing-includes.patch14
3 files changed, 16 insertions, 0 deletions
diff --git a/graphics/tesseract/HISTORY b/graphics/tesseract/HISTORY
index 1e070cddde..d82e1617d9 100644
--- a/graphics/tesseract/HISTORY
+++ b/graphics/tesseract/HISTORY
@@ -1,5 +1,6 @@
2021-07-07 Ismael Luceno <ismael@iodev.co.uk>
* DETAILS: fixed checksum for traineddata files (fra, ita, spa)
+ * PRE_BUILD, patches/fix-missing-includes.patch: fixed build against musl
2019-12-30 Florian Franzmann <bwlf@bandrate.org>
* DETAILS: version 4.1.1
diff --git a/graphics/tesseract/PRE_BUILD b/graphics/tesseract/PRE_BUILD
index 2b0e433d0c..d5a08d871c 100755
--- a/graphics/tesseract/PRE_BUILD
+++ b/graphics/tesseract/PRE_BUILD
@@ -1,5 +1,6 @@
default_pre_build &&
cd $SOURCE_DIRECTORY &&
+apply_patch_dir patches &&
mkdir -p tess-trained &&
cd tess-trained &&
diff --git a/graphics/tesseract/patches/fix-missing-includes.patch b/graphics/tesseract/patches/fix-missing-includes.patch
new file mode 100644
index 0000000000..daa82b618d
--- /dev/null
+++ b/graphics/tesseract/patches/fix-missing-includes.patch
@@ -0,0 +1,14 @@
+Explicitly include sys/time.h for timeval on UNIX. Required on non-glibc
+systems.
+
+--- a/src/ccutil/ocrclass.h
++++ b/src/ccutil/ocrclass.h
+@@ -31,6 +31,8 @@
+ #ifdef _WIN32
+ #include <winsock2.h> // for timeval
++#else
++#include <sys/time.h> // for timeval
+ #endif
+
+ /**********************************************************************
+ * EANYCODE_CHAR