commit: 4e1b8e325f0e834e270d0be5643e281dcaeae5b1 Author: Thomas Kahle <tomka <AT> gentoo <DOT> org> AuthorDate: Tue Feb 2 14:31:08 2016 +0000 Commit: Thomas Kahle <tomka <AT> gentoo <DOT> org> CommitDate: Tue Feb 2 14:31:23 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e1b8e32
app-text/tesseract: leptonica-1.73 compatibility Fixes bug 573382. Thanks Dennis Schridde. Package-Manager: portage-2.2.26 .../tesseract-3.04.00-leptonica-1.73-compat.patch | 24 ++++++++++++++++++++++ app-text/tesseract/tesseract-3.04.00-r4.ebuild | 1 + 2 files changed, 25 insertions(+) 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 new file mode 100644 index 0000000..50d342c --- /dev/null +++ b/app-text/tesseract/files/tesseract-3.04.00-leptonica-1.73-compat.patch @@ -0,0 +1,24 @@ +--- tesseract-3.04.00/opencl/openclwrapper.cpp.orig 2016-01-31 11:55:02.535154846 +0100 ++++ tesseract-3.04.00/opencl/openclwrapper.cpp 2016-01-31 12:04:23.727809089 +0100 +@@ -14,6 +14,21 @@ + #include "otsuthr.h" + #include "thresholder.h" + ++/* ++ Convenience macro to test the version of Leptonica. ++*/ ++#if defined(LIBLEPT_MAJOR_VERSION) && defined(LIBLEPT_MINOR_VERSION) ++# define TESSERACT_LIBLEPT_PREREQ(maj, min) \ ++ ((LIBLEPT_MAJOR_VERSION) > (maj) || ((LIBLEPT_MAJOR_VERSION) == (maj) && (LIBLEPT_MINOR_VERSION) >= (min))) ++#else ++# define TESSERACT_LIBLEPT_PREREQ(maj, min) 0 ++#endif ++ ++#if TESSERACT_LIBLEPT_PREREQ(1,73) ++# define CALLOC LEPT_CALLOC ++# define FREE LEPT_FREE ++#endif ++ + #ifdef USE_OPENCL + + #if ON_APPLE diff --git a/app-text/tesseract/tesseract-3.04.00-r4.ebuild b/app-text/tesseract/tesseract-3.04.00-r4.ebuild index 8fce6ae..3c43d7b 100644 --- a/app-text/tesseract/tesseract-3.04.00-r4.ebuild +++ b/app-text/tesseract/tesseract-3.04.00-r4.ebuild @@ -94,6 +94,7 @@ PATCHES=( "${FILESDIR}/tesseract-2.04-gcc47.patch" "${FILESDIR}/${P}-fix-scrollview-disabled.patch" "${FILESDIR}/${P}-use-system-piccolo2d.patch" + "${FILESDIR}/${P}-leptonica-1.73-compat.patch" ) src_unpack() {