1 |
commit: 4e1b8e325f0e834e270d0be5643e281dcaeae5b1 |
2 |
Author: Thomas Kahle <tomka <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 2 14:31:08 2016 +0000 |
4 |
Commit: Thomas Kahle <tomka <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 2 14:31:23 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e1b8e32 |
7 |
|
8 |
app-text/tesseract: leptonica-1.73 compatibility |
9 |
|
10 |
Fixes bug 573382. Thanks Dennis Schridde. |
11 |
|
12 |
Package-Manager: portage-2.2.26 |
13 |
|
14 |
.../tesseract-3.04.00-leptonica-1.73-compat.patch | 24 ++++++++++++++++++++++ |
15 |
app-text/tesseract/tesseract-3.04.00-r4.ebuild | 1 + |
16 |
2 files changed, 25 insertions(+) |
17 |
|
18 |
diff --git a/app-text/tesseract/files/tesseract-3.04.00-leptonica-1.73-compat.patch b/app-text/tesseract/files/tesseract-3.04.00-leptonica-1.73-compat.patch |
19 |
new file mode 100644 |
20 |
index 0000000..50d342c |
21 |
--- /dev/null |
22 |
+++ b/app-text/tesseract/files/tesseract-3.04.00-leptonica-1.73-compat.patch |
23 |
@@ -0,0 +1,24 @@ |
24 |
+--- tesseract-3.04.00/opencl/openclwrapper.cpp.orig 2016-01-31 11:55:02.535154846 +0100 |
25 |
++++ tesseract-3.04.00/opencl/openclwrapper.cpp 2016-01-31 12:04:23.727809089 +0100 |
26 |
+@@ -14,6 +14,21 @@ |
27 |
+ #include "otsuthr.h" |
28 |
+ #include "thresholder.h" |
29 |
+ |
30 |
++/* |
31 |
++ Convenience macro to test the version of Leptonica. |
32 |
++*/ |
33 |
++#if defined(LIBLEPT_MAJOR_VERSION) && defined(LIBLEPT_MINOR_VERSION) |
34 |
++# define TESSERACT_LIBLEPT_PREREQ(maj, min) \ |
35 |
++ ((LIBLEPT_MAJOR_VERSION) > (maj) || ((LIBLEPT_MAJOR_VERSION) == (maj) && (LIBLEPT_MINOR_VERSION) >= (min))) |
36 |
++#else |
37 |
++# define TESSERACT_LIBLEPT_PREREQ(maj, min) 0 |
38 |
++#endif |
39 |
++ |
40 |
++#if TESSERACT_LIBLEPT_PREREQ(1,73) |
41 |
++# define CALLOC LEPT_CALLOC |
42 |
++# define FREE LEPT_FREE |
43 |
++#endif |
44 |
++ |
45 |
+ #ifdef USE_OPENCL |
46 |
+ |
47 |
+ #if ON_APPLE |
48 |
|
49 |
diff --git a/app-text/tesseract/tesseract-3.04.00-r4.ebuild b/app-text/tesseract/tesseract-3.04.00-r4.ebuild |
50 |
index 8fce6ae..3c43d7b 100644 |
51 |
--- a/app-text/tesseract/tesseract-3.04.00-r4.ebuild |
52 |
+++ b/app-text/tesseract/tesseract-3.04.00-r4.ebuild |
53 |
@@ -94,6 +94,7 @@ PATCHES=( |
54 |
"${FILESDIR}/tesseract-2.04-gcc47.patch" |
55 |
"${FILESDIR}/${P}-fix-scrollview-disabled.patch" |
56 |
"${FILESDIR}/${P}-use-system-piccolo2d.patch" |
57 |
+ "${FILESDIR}/${P}-leptonica-1.73-compat.patch" |
58 |
) |
59 |
|
60 |
src_unpack() { |