The diff below fixes the pkg-config file installed by tesseract.

Before:
x1$ pkg-config --cflags tesseract
-I/usr/local/include/tesseract -I/usr/local/include/leptonica

After:
x1$ pkg-config --cflags tesseract
-I/usr/local/include -I/usr/local/include/tesseract 
-I/usr/local/include/leptonica

The fix is inspired by tesseract.pc.cmake (which we do not use):
https://github.com/tesseract-ocr/tesseract/blob/3.05/tesseract.pc.cmake

(The issue is already fixed in upstream version 4.0.0)



Index: tesseract/patches/patch-tesseract_pc_in
===================================================================
RCS file: tesseract/patches/patch-tesseract_pc_in
diff -N tesseract/patches/patch-tesseract_pc_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tesseract/patches/patch-tesseract_pc_in     7 Jan 2019 13:56:00 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+Index: tesseract.pc.in
+--- tesseract.pc.in.orig
++++ tesseract.pc.in
+@@ -4,7 +4,7 @@ bindir=@bindir@
+ datarootdir = @datarootdir@
+ datadir=@datadir@
+ libdir=@libdir@
+-includedir=@includedir@
++includedir=@prefix@/include
+
+ Name: @PACKAGE_NAME@
+ Description: An OCR Engine that was developed at HP Labs between 1985 and 
1995... and now at Google.
+@@ -13,4 +13,4 @@ Version: @VERSION@
+ Requires.private: lept
+ Libs: -L${libdir} -ltesseract
+ Libs.private: -lpthread @OPENCL_LDFLAGS@
+-Cflags: -I${includedir}
++Cflags: -I${includedir} -I${includedir}/tesseract


Reply via email to