summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2019-07-30 21:57:12 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2019-07-30 21:57:25 +0200
commitfa323ef580d791b1dc583fc6169238150b9d71d4 (patch)
treebd1d1c9ad0d8a00e3d81444646976f46b9c52ac0 /app-text/tesseract
parentapp-text/tessdata_legacy: initial commit (diff)
downloadgentoo-fa323ef580d791b1dc583fc6169238150b9d71d4.tar.gz
gentoo-fa323ef580d791b1dc583fc6169238150b9d71d4.tar.bz2
gentoo-fa323ef580d791b1dc583fc6169238150b9d71d4.zip
app-text/tesseract: 4.1.0 bump
This adds the ability to choose trained data files: * app-text/tessdata_fast: default and recommended for most users * app-text/tessdata_best: to trade a lot of speed for slightly better accuracy * app-text/tessdata_legacy: the only one that supports the legacy recognizer Closes: https://bugs.gentoo.org/663564 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'app-text/tesseract')
-rw-r--r--app-text/tesseract/Manifest1
-rw-r--r--app-text/tesseract/metadata.xml3
-rw-r--r--app-text/tesseract/tesseract-4.1.0.ebuild83
3 files changed, 85 insertions, 2 deletions
diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest
index 48fb2313882..771ad9e7623 100644
--- a/app-text/tesseract/Manifest
+++ b/app-text/tesseract/Manifest
@@ -124,6 +124,7 @@ DIST tel.traineddata-4.00 54446537 BLAKE2B 0ecb044b58017e36a6d9e28927242ecb6ac89
DIST tesseract-3.05.01.tar.gz 3574810 BLAKE2B 0af97d0a58c05ce4d6f8fb3f76302344f75b5894b036adc327ecc79f90f2b41da58c8145509dc131706e806e291355e221482980294e2c9caff4be93d9b448b6 SHA512 a49c20c98386684cd89582e57b772811204fad8e5ff18214fb0da109f73629c70845054985e31e8deeb49107fbcf56e546aff661f08eb5dd60fbf83dbe976e81
DIST tesseract-3.05.02.tar.gz 3571750 BLAKE2B f8c856449ab763d66a50d4bc65450f3c71132e66b4306f5a022c3df65c62646ec202256e12b5ce91888330a5ef10a3966f91eddc241cf306809ce40abc165c82 SHA512 4cb23a6981dd5ec9eefea7b9674847ae88a411a7308ee6d946a920c76eefcf5fe7a90f6cb3ff00493a0e69b5c327d052fa8514d7f3ed506bccbe4b0163065793
DIST tesseract-4.0.0.tar.gz 1961372 BLAKE2B 5d684ec58deddc2cad6d61f5a3e22e9bccc1fa96b57d5bcad5239d5ba6d0805978b94b4b44a871c0796a756173b8072327f8a44a6a84da5604a3b50d9e425d21 SHA512 69e57d4ba1fc43d212fd0fff69a2b5d48a3b37cfee7054fdc083cbb7e04d92317609a32e457229661d70ce8d9b16c9d25e81bfc3861db660dd2c8f292202d447
+DIST tesseract-4.1.0.tar.gz 1965053 BLAKE2B 172aed0b149cb1af8c8c7b53022de237c8e07086bad78063374d5e425180e4b70eca5cee4d66a1f5b0bc2d51f6b8d41bf0c564918a85977d83fdbe6ba2f5497b SHA512 d617f5c5b826640b2871dbe3d7973bcc5e66fafd837921a20e009d683806ed50f0f258aa455019d99fc54f5cb65c2fa0380e3a3c92b39ab0684b8799c730b09d
DIST tgk.traineddata-4.00 6555909 BLAKE2B a3023ec0fa10e3f52e5059b20da48a81eaa90b6665b55b50ac74d7f1f4acea3d7b6eae9f00f2a0a1f58798eb15d976367145d72976db1dd019fe249cae36a1b2 SHA512 abc5f2c4ac91b17a250f2f4847c9528a7673d51230415b7a069dc7243e2c210564400d34d5c38da6b727c8c24af26cbde3e7ef8a9674fa1605da001b4b1b60bb
DIST tgl.traineddata-3.04.00 4114554 BLAKE2B 1cbd5e20fcf5fa7ea183daa76e1d09d7bd4427ce2456de49f23e374af8ae48219a32f71a25d0a98c26c79ac87dc4f8f68621c76fad85b6105561f5285d635c8d SHA512 8c205fd0d4b2fc774e5b6a19cb56dcdb91b7d001acd881e34363e437d5eeae8615b853ae09f93c4957328d3a423300b9a20a443ca971a14ede1867de6194a2bb
DIST tgl.traineddata-4.00 11991699 BLAKE2B d888013c0416c1e057522ec828e2c2b4470d50b55b6de580ecf20090771cd6726167ca1dc66f02afab1f7c369035db1ea84cb0c7ddcc36d37820c0c065648986 SHA512 fda51303a8963432fa541510287aec32ea9ee7342e0ca7dfba4f40c5d352aec74bf7982bc469e12196d51a8906dd224df01aead0d14859102267e7ffd19f0380
diff --git a/app-text/tesseract/metadata.xml b/app-text/tesseract/metadata.xml
index 90921345d11..c3f203799bf 100644
--- a/app-text/tesseract/metadata.xml
+++ b/app-text/tesseract/metadata.xml
@@ -13,8 +13,7 @@
1995. In 1995, this engine was among the top 3 evaluated by UNLV. It was
open-sourced by HP and UNLV in 2005.</longdescription>
<upstream>
- <remote-id type="google-code">tesseract-ocr</remote-id>
- <remote-id type="github">tesseract-ocr/tessdata</remote-id>
+ <remote-id type="github">tesseract-ocr/tesseract</remote-id>
</upstream>
<use>
<flag name="math"> Enable support for recognition of equations.</flag>
diff --git a/app-text/tesseract/tesseract-4.1.0.ebuild b/app-text/tesseract/tesseract-4.1.0.ebuild
new file mode 100644
index 00000000000..c7877cb2d44
--- /dev/null
+++ b/app-text/tesseract/tesseract-4.1.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="An OCR Engine, orginally developed at HP, now open source."
+HOMEPAGE="https://github.com/tesseract-ocr"
+SRC_URI="https://github.com/tesseract-ocr/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc jpeg opencl openmp png static-libs tiff training webp"
+
+COMMON_DEPEND=">=media-libs/leptonica-1.74:=[zlib,tiff?,jpeg?,png?,webp?]
+ opencl? (
+ virtual/opencl
+ media-libs/tiff:0=
+ media-libs/leptonica:=[tiff]
+ )
+ training? (
+ dev-libs/icu:=
+ x11-libs/pango:=
+ x11-libs/cairo:=
+ )"
+RDEPEND="${COMMON_DEPEND}
+ || (
+ >=app-text/tessdata_fast-4.0.0
+ >=app-text/tessdata_best-4.0.0
+ >=app-text/tessdata_legacy-4.0.0
+ )"
+DEPEND="${COMMON_DEPEND}
+ app-text/asciidoc
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS ChangeLog README.md )
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # scrollview disabled for now, see bug #686944
+ local myeconfargs=(
+ --enable-shared
+ --disable-graphics
+ $(use_enable opencl)
+ $(use_enable openmp)
+ $(use_enable static-libs static)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ default
+ use doc && emake doc
+ use training && emake training
+}
+
+src_install() {
+ use doc && HTML_DOCS=( doc/html/. )
+ default
+
+ find "${D}" -name '*.la' -type f -delete || die
+
+ if use training; then
+ emake DESTDIR="${D}" training-install
+ fi
+}