summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2019-06-04 16:35:30 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2019-06-04 16:39:53 +0200
commit98f4080a82c54d39d0a6c646649ca47fe9c7d649 (patch)
tree5f158ce5cae610a761ee5141c796ee72b8667255 /app-text/tesseract
parentapp-portage/gemato: ppc64 stable wrt bug #686688 (diff)
downloadgentoo-98f4080a82c54d39d0a6c646649ca47fe9c7d649.tar.gz
gentoo-98f4080a82c54d39d0a6c646649ca47fe9c7d649.tar.bz2
gentoo-98f4080a82c54d39d0a6c646649ca47fe9c7d649.zip
app-text/tesseract: 4.0.0 bump
Thanks marecki and Chris Mayo for the help This version does not provide scrollview anymore, see bug for details Closes: https://bugs.gentoo.org/686944 Package-Manager: Portage-2.3.67, Repoman-2.3.14 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/files/tesseract-4.0.0-manpages.patch49
-rw-r--r--app-text/tesseract/tesseract-4.0.0.ebuild129
3 files changed, 179 insertions, 0 deletions
diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest
index 039ffa606571..c36c72654297 100644
--- a/app-text/tesseract/Manifest
+++ b/app-text/tesseract/Manifest
@@ -123,6 +123,7 @@ DIST tam.traineddata-4.00 17333471 BLAKE2B 67e4b10d8e9fab5df8455b35483972d5543cc
DIST tel.traineddata-4.00 54446537 BLAKE2B 0ecb044b58017e36a6d9e28927242ecb6ac8975f079c42c78a661faa87ac1ed7f9d38fd59383d3ca1b484fbf371aeb5e872765921d4b79066a938b88671a3d9f SHA512 5e5c2ca84f095ec4dd3184d6cb75702482c699b5cd04f8750ab8958f578f7b24cf3253a83d19a4a1f3716466b95a81737d473339e3593538e46372c4588febb6
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.0.0_beta4.tar.gz 1855821 BLAKE2B 8273fefc5c07526c87adcbe1d9d81204f622f42396564d8e5fae5ed5275c47bcefab1bc5df1560dee722a1236fbd2211f622e61b3f279219a877b3bb3bad822e SHA512 37347c461c288cbaf839b65ac1283ab5b60e6723726442a5d067e6a4e2f48d6847d7393206f1ddd4de3c5dbd8a8d9febcc42d68567a46a4665fbf678bab232d4
DIST tgk.traineddata-4.00 6555909 BLAKE2B a3023ec0fa10e3f52e5059b20da48a81eaa90b6665b55b50ac74d7f1f4acea3d7b6eae9f00f2a0a1f58798eb15d976367145d72976db1dd019fe249cae36a1b2 SHA512 abc5f2c4ac91b17a250f2f4847c9528a7673d51230415b7a069dc7243e2c210564400d34d5c38da6b727c8c24af26cbde3e7ef8a9674fa1605da001b4b1b60bb
DIST tgl.traineddata-3.04.00 4114554 BLAKE2B 1cbd5e20fcf5fa7ea183daa76e1d09d7bd4427ce2456de49f23e374af8ae48219a32f71a25d0a98c26c79ac87dc4f8f68621c76fad85b6105561f5285d635c8d SHA512 8c205fd0d4b2fc774e5b6a19cb56dcdb91b7d001acd881e34363e437d5eeae8615b853ae09f93c4957328d3a423300b9a20a443ca971a14ede1867de6194a2bb
diff --git a/app-text/tesseract/files/tesseract-4.0.0-manpages.patch b/app-text/tesseract/files/tesseract-4.0.0-manpages.patch
new file mode 100644
index 000000000000..dfa8e9fde340
--- /dev/null
+++ b/app-text/tesseract/files/tesseract-4.0.0-manpages.patch
@@ -0,0 +1,49 @@
+From 39ed30ad834a43cf403f88158c6db7a96f1bed29 Mon Sep 17 00:00:00 2001
+From: Stefan Weil <sw@weilnetz.de>
+Date: Fri, 1 Feb 2019 19:47:46 +0100
+Subject: Fix build rule for manpages
+
+This is similar to commit 2106cba0a98a90451df835f3ab7b2aaf54826442
+which fixed doc/generate_manpages.sh.
+
+Signed-off-by: Stefan Weil <sw@weilnetz.de>
+---
+ doc/Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index a218aca3..c0eeda84 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -2,9 +2,6 @@
+
+ if ASCIIDOC
+
+-asciidoc=asciidoc -d manpage
+-
+-
+ man_MANS = \
+ combine_lang_model.1 \
+ combine_tessdata.1 \
+@@ -29,6 +26,8 @@ man_MANS += \
+ unicharset.5
+ endif
+
++man_xslt = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
++
+ EXTRA_DIST = $(man_MANS) Doxyfile
+
+ .PHONY: html
+@@ -36,7 +35,8 @@ EXTRA_DIST = $(man_MANS) Doxyfile
+ html: $(patsubst %,%.html,$(man_MANS))
+
+ %: %.asc
+- $(asciidoc) -o $@ $<
++ asciidoc -b docbook -d manpage -o - $< | \
++ xsltproc --nonet $(man_xslt) -
+
+ %.html: %.asc
+ asciidoc -b html5 -o $@ $<
+--
+cgit v1.2.1
+
diff --git a/app-text/tesseract/tesseract-4.0.0.ebuild b/app-text/tesseract/tesseract-4.0.0.ebuild
new file mode 100644
index 000000000000..d4ba59d9b351
--- /dev/null
+++ b/app-text/tesseract/tesseract-4.0.0.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN="tesseract-ocr"
+LANGPACKV="4.00"
+URI_PREFIX="https://github.com/${MY_PN}/tessdata/raw/${LANGPACKV}/"
+
+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/${MY_PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+ ${URI_PREFIX}eng.traineddata -> eng.traineddata-${LANGPACKV}
+ math? ( ${URI_PREFIX}equ.traineddata -> equ.traineddata-${LANGPACKV} )
+ osd? ( ${URI_PREFIX}osd.traineddata -> osd.traineddata-${LANGPACKV} )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc jpeg math opencl openmp osd png static-libs tiff training webp"
+
+# List of supported Gentoo linguas and their upstream mapping
+# https://github.com/tesseract-ocr/tesseract/wiki/Data-Files
+# "old" variants were regrouped in the matching modern locale
+LANGUAGES="af:afr am:amh ar:ara as:asm az:aze,aze_cyrl be:bel bn:ben bo:bod bs:bos bg:bul ca:cat cs:ces zh:chi_sim,chi_tra cy:cym da:dan de:deu,frk dz:dzo el:ell,grc en:enm eo:epo et:est eu:eus fa:fas fi:fin fr:fra,frm ga:gle gl:glg gu:guj he:heb hi:hin hr:hrv hu:hun id:ind is:isl it:ita,ita_old ja:jpn kn:kan ka:kat,kat_old kk:kaz km:khm ky:kir ko:kor ku:kur lo:lao la:lat lv:lav lt:lit ml:mal mr:mar mk:mkd ms:msa my:mya ne:nep nl:nld no:nor or:ori pa:pan pl:pol pt:por ro:ron ru:rus sa:san si:sin sk:slk sl:slv es:spa,spa_old sq:sqi sr:srp,srp_latn sw:swa sv:swe syc:syr ta:tam te:tel tg:tgk tl:tgl th:tha tr:tur ug:uig uk:ukr uz:uzb,uzb_cyrl vi:vie"
+# Missing matches:
+# ceb Cebuano
+# chr Cherokee
+# hat Haitian; Haitian Creole
+# iku Inuktitut
+# jav Javanese
+# mlt Maltese
+# pus Pushto; Pashto
+# tir Tigrinya
+# urd Urdu
+# yid Yiddish
+# l10n_en provides the additional data:
+# enm English, Middle (1100-1500)
+
+for lang in ${LANGUAGES}; do
+ gentoo_lang=${lang%:*}
+ tess_langs=${lang#*:}
+ for tess_lang in ${tess_langs//,/ }; do
+ SRC_URI+=" l10n_${gentoo_lang}? ( ${URI_PREFIX}${tess_lang}.traineddata -> ${tess_lang}.traineddata-${LANGPACKV} )"
+ done
+ IUSE+=" l10n_${gentoo_lang}"
+done
+
+# With opencl USE=tiff is necessary in leptonica
+RDEPEND=">=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:=
+ )"
+
+DEPEND="${RDEPEND}
+ app-text/asciidoc
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ doc? ( app-doc/doxygen )"
+
+DOCS=( AUTHORS ChangeLog README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-manpages.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ for file in ${A}; do
+ if [[ "${file}" == *traineddata* ]]; then
+ cp "${DISTDIR}/${file}" "${S}/tessdata/${file%-*}" || die
+ fi
+ done
+}
+
+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
+
+ insinto /usr/share/tessdata
+ doins tessdata/*traineddata* # language files
+}