1 |
commit: fa323ef580d791b1dc583fc6169238150b9d71d4 |
2 |
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 30 19:57:12 2019 +0000 |
4 |
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 30 19:57:25 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa323ef5 |
7 |
|
8 |
app-text/tesseract: 4.1.0 bump |
9 |
|
10 |
This adds the ability to choose trained data files: |
11 |
* app-text/tessdata_fast: default and recommended for most users |
12 |
* app-text/tessdata_best: to trade a lot of speed for slightly better accuracy |
13 |
* app-text/tessdata_legacy: the only one that supports the legacy recognizer |
14 |
|
15 |
Closes: https://bugs.gentoo.org/663564 |
16 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
17 |
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org> |
18 |
|
19 |
app-text/tesseract/Manifest | 1 + |
20 |
app-text/tesseract/metadata.xml | 3 +- |
21 |
app-text/tesseract/tesseract-4.1.0.ebuild | 83 +++++++++++++++++++++++++++++++ |
22 |
3 files changed, 85 insertions(+), 2 deletions(-) |
23 |
|
24 |
diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest |
25 |
index 48fb2313882..771ad9e7623 100644 |
26 |
--- a/app-text/tesseract/Manifest |
27 |
+++ b/app-text/tesseract/Manifest |
28 |
@@ -124,6 +124,7 @@ DIST tel.traineddata-4.00 54446537 BLAKE2B 0ecb044b58017e36a6d9e28927242ecb6ac89 |
29 |
DIST tesseract-3.05.01.tar.gz 3574810 BLAKE2B 0af97d0a58c05ce4d6f8fb3f76302344f75b5894b036adc327ecc79f90f2b41da58c8145509dc131706e806e291355e221482980294e2c9caff4be93d9b448b6 SHA512 a49c20c98386684cd89582e57b772811204fad8e5ff18214fb0da109f73629c70845054985e31e8deeb49107fbcf56e546aff661f08eb5dd60fbf83dbe976e81 |
30 |
DIST tesseract-3.05.02.tar.gz 3571750 BLAKE2B f8c856449ab763d66a50d4bc65450f3c71132e66b4306f5a022c3df65c62646ec202256e12b5ce91888330a5ef10a3966f91eddc241cf306809ce40abc165c82 SHA512 4cb23a6981dd5ec9eefea7b9674847ae88a411a7308ee6d946a920c76eefcf5fe7a90f6cb3ff00493a0e69b5c327d052fa8514d7f3ed506bccbe4b0163065793 |
31 |
DIST tesseract-4.0.0.tar.gz 1961372 BLAKE2B 5d684ec58deddc2cad6d61f5a3e22e9bccc1fa96b57d5bcad5239d5ba6d0805978b94b4b44a871c0796a756173b8072327f8a44a6a84da5604a3b50d9e425d21 SHA512 69e57d4ba1fc43d212fd0fff69a2b5d48a3b37cfee7054fdc083cbb7e04d92317609a32e457229661d70ce8d9b16c9d25e81bfc3861db660dd2c8f292202d447 |
32 |
+DIST tesseract-4.1.0.tar.gz 1965053 BLAKE2B 172aed0b149cb1af8c8c7b53022de237c8e07086bad78063374d5e425180e4b70eca5cee4d66a1f5b0bc2d51f6b8d41bf0c564918a85977d83fdbe6ba2f5497b SHA512 d617f5c5b826640b2871dbe3d7973bcc5e66fafd837921a20e009d683806ed50f0f258aa455019d99fc54f5cb65c2fa0380e3a3c92b39ab0684b8799c730b09d |
33 |
DIST tgk.traineddata-4.00 6555909 BLAKE2B a3023ec0fa10e3f52e5059b20da48a81eaa90b6665b55b50ac74d7f1f4acea3d7b6eae9f00f2a0a1f58798eb15d976367145d72976db1dd019fe249cae36a1b2 SHA512 abc5f2c4ac91b17a250f2f4847c9528a7673d51230415b7a069dc7243e2c210564400d34d5c38da6b727c8c24af26cbde3e7ef8a9674fa1605da001b4b1b60bb |
34 |
DIST tgl.traineddata-3.04.00 4114554 BLAKE2B 1cbd5e20fcf5fa7ea183daa76e1d09d7bd4427ce2456de49f23e374af8ae48219a32f71a25d0a98c26c79ac87dc4f8f68621c76fad85b6105561f5285d635c8d SHA512 8c205fd0d4b2fc774e5b6a19cb56dcdb91b7d001acd881e34363e437d5eeae8615b853ae09f93c4957328d3a423300b9a20a443ca971a14ede1867de6194a2bb |
35 |
DIST tgl.traineddata-4.00 11991699 BLAKE2B d888013c0416c1e057522ec828e2c2b4470d50b55b6de580ecf20090771cd6726167ca1dc66f02afab1f7c369035db1ea84cb0c7ddcc36d37820c0c065648986 SHA512 fda51303a8963432fa541510287aec32ea9ee7342e0ca7dfba4f40c5d352aec74bf7982bc469e12196d51a8906dd224df01aead0d14859102267e7ffd19f0380 |
36 |
|
37 |
diff --git a/app-text/tesseract/metadata.xml b/app-text/tesseract/metadata.xml |
38 |
index 90921345d11..c3f203799bf 100644 |
39 |
--- a/app-text/tesseract/metadata.xml |
40 |
+++ b/app-text/tesseract/metadata.xml |
41 |
@@ -13,8 +13,7 @@ |
42 |
1995. In 1995, this engine was among the top 3 evaluated by UNLV. It was |
43 |
open-sourced by HP and UNLV in 2005.</longdescription> |
44 |
<upstream> |
45 |
- <remote-id type="google-code">tesseract-ocr</remote-id> |
46 |
- <remote-id type="github">tesseract-ocr/tessdata</remote-id> |
47 |
+ <remote-id type="github">tesseract-ocr/tesseract</remote-id> |
48 |
</upstream> |
49 |
<use> |
50 |
<flag name="math"> Enable support for recognition of equations.</flag> |
51 |
|
52 |
diff --git a/app-text/tesseract/tesseract-4.1.0.ebuild b/app-text/tesseract/tesseract-4.1.0.ebuild |
53 |
new file mode 100644 |
54 |
index 00000000000..c7877cb2d44 |
55 |
--- /dev/null |
56 |
+++ b/app-text/tesseract/tesseract-4.1.0.ebuild |
57 |
@@ -0,0 +1,83 @@ |
58 |
+# Copyright 1999-2019 Gentoo Authors |
59 |
+# Distributed under the terms of the GNU General Public License v2 |
60 |
+ |
61 |
+EAPI=7 |
62 |
+ |
63 |
+inherit autotools toolchain-funcs |
64 |
+ |
65 |
+DESCRIPTION="An OCR Engine, orginally developed at HP, now open source." |
66 |
+HOMEPAGE="https://github.com/tesseract-ocr" |
67 |
+SRC_URI="https://github.com/tesseract-ocr/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
68 |
+ |
69 |
+LICENSE="Apache-2.0" |
70 |
+SLOT="0" |
71 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
72 |
+IUSE="doc jpeg opencl openmp png static-libs tiff training webp" |
73 |
+ |
74 |
+COMMON_DEPEND=">=media-libs/leptonica-1.74:=[zlib,tiff?,jpeg?,png?,webp?] |
75 |
+ opencl? ( |
76 |
+ virtual/opencl |
77 |
+ media-libs/tiff:0= |
78 |
+ media-libs/leptonica:=[tiff] |
79 |
+ ) |
80 |
+ training? ( |
81 |
+ dev-libs/icu:= |
82 |
+ x11-libs/pango:= |
83 |
+ x11-libs/cairo:= |
84 |
+ )" |
85 |
+RDEPEND="${COMMON_DEPEND} |
86 |
+ || ( |
87 |
+ >=app-text/tessdata_fast-4.0.0 |
88 |
+ >=app-text/tessdata_best-4.0.0 |
89 |
+ >=app-text/tessdata_legacy-4.0.0 |
90 |
+ )" |
91 |
+DEPEND="${COMMON_DEPEND} |
92 |
+ app-text/asciidoc |
93 |
+ app-text/docbook-xsl-stylesheets |
94 |
+ dev-libs/libxslt |
95 |
+ doc? ( app-doc/doxygen )" |
96 |
+ |
97 |
+DOCS=( AUTHORS ChangeLog README.md ) |
98 |
+ |
99 |
+pkg_pretend() { |
100 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
101 |
+} |
102 |
+ |
103 |
+pkg_setup() { |
104 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
105 |
+} |
106 |
+ |
107 |
+src_prepare() { |
108 |
+ default |
109 |
+ eautoreconf |
110 |
+} |
111 |
+ |
112 |
+src_configure() { |
113 |
+ # scrollview disabled for now, see bug #686944 |
114 |
+ local myeconfargs=( |
115 |
+ --enable-shared |
116 |
+ --disable-graphics |
117 |
+ $(use_enable opencl) |
118 |
+ $(use_enable openmp) |
119 |
+ $(use_enable static-libs static) |
120 |
+ ) |
121 |
+ |
122 |
+ econf "${myeconfargs[@]}" |
123 |
+} |
124 |
+ |
125 |
+src_compile() { |
126 |
+ default |
127 |
+ use doc && emake doc |
128 |
+ use training && emake training |
129 |
+} |
130 |
+ |
131 |
+src_install() { |
132 |
+ use doc && HTML_DOCS=( doc/html/. ) |
133 |
+ default |
134 |
+ |
135 |
+ find "${D}" -name '*.la' -type f -delete || die |
136 |
+ |
137 |
+ if use training; then |
138 |
+ emake DESTDIR="${D}" training-install |
139 |
+ fi |
140 |
+} |