summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2018-08-13 21:59:43 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2018-08-13 22:01:12 +0200
commite89d66ff5849a798dd90ab90d05c35325ad2feb4 (patch)
tree28f12fa3b0774c5fcbedf499ca0712c31e114bdb /app-text/tesseract
parentdev-python/scandir: version bump. (diff)
downloadgentoo-e89d66ff5849a798dd90ab90d05c35325ad2feb4.tar.gz
gentoo-e89d66ff5849a798dd90ab90d05c35325ad2feb4.tar.bz2
gentoo-e89d66ff5849a798dd90ab90d05c35325ad2feb4.zip
app-text/tesseract: 3.05.02 bump
This is a stable release, looking into bumping the masked 4.0 release Package-Manager: Portage-2.3.46, Repoman-2.3.10
Diffstat (limited to 'app-text/tesseract')
-rw-r--r--app-text/tesseract/Manifest1
-rw-r--r--app-text/tesseract/tesseract-3.05.02.ebuild148
2 files changed, 149 insertions, 0 deletions
diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest
index 514151081a2..5e7b04fc8ce 100644
--- a/app-text/tesseract/Manifest
+++ b/app-text/tesseract/Manifest
@@ -122,6 +122,7 @@ DIST syr.traineddata-4.00 8056121 BLAKE2B bacf6ee42b8a9dac7042ca2608ec72b6db1a76
DIST tam.traineddata-4.00 17333471 BLAKE2B 67e4b10d8e9fab5df8455b35483972d5543ccf76d7440e7b1c9c8fe89a3cc4e19359a8695b1410004e202b138b8524c000487fdf2ee26247c0a2d4190b7184ed SHA512 9ad90eb8c291712e4cd874d41ed9bcd4169427a50509a353f5549382909458b46a7e4a092dec0d475c548e681426a81597c577f2f821978405a94f965fd4d05f
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.00.00_alpha.tar.gz 3706567 BLAKE2B e3790c95ca7f219a3e1a90de09b9464bc54210d6f553132d4fa9e39f0afe56e458e16424a10a1a6e6461e8e98a84fbea826542a32d3432533165a9d400a416c4 SHA512 282ec941233ceb80fe1008e585a6069fe8ecd6bf2dd1d0f56e2e79b772a0b83bca918d5da892a6cab194a7828607e41a7fd873acec33181b8b86c3c37e434103
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/tesseract-3.05.02.ebuild b/app-text/tesseract/tesseract-3.05.02.ebuild
new file mode 100644
index 00000000000..160fe206b34
--- /dev/null
+++ b/app-text/tesseract/tesseract-3.05.02.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="tesseract-ocr"
+LANGPACKV="3.04.00"
+URI_PREFIX="https://github.com/${MY_PN}/tessdata/raw/${LANGPACKV}/"
+JAVA_PKG_OPT_USE="scrollview"
+
+inherit autotools java-pkg-opt-2 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} )
+ l10n_ar? ( ${URI_PREFIX}ara.traineddata -> ara.traineddata-${LANGPACKV} )
+ l10n_bg? ( ${URI_PREFIX}bul.traineddata -> bul.traineddata-${LANGPACKV} )
+ l10n_ca? ( ${URI_PREFIX}cat.traineddata -> cat.traineddata-${LANGPACKV} )
+ l10n_chr? ( ${URI_PREFIX}chr.traineddata -> chr.traineddata-${LANGPACKV} )
+ l10n_cs? ( ${URI_PREFIX}ces.traineddata -> ces.traineddata-${LANGPACKV} )
+ l10n_de? ( ${URI_PREFIX}deu.traineddata -> deu.traineddata-${LANGPACKV}
+ ${URI_PREFIX}deu_frak.traineddata -> deu_frak.traineddata-${LANGPACKV} )
+ l10n_da? ( ${URI_PREFIX}dan.traineddata -> dan.traineddata-${LANGPACKV}
+ ${URI_PREFIX}dan_frak.traineddata -> dan_frak.traineddata-${LANGPACKV} )
+ l10n_el? ( ${URI_PREFIX}ell.traineddata -> ell.traineddata-${LANGPACKV} )
+ l10n_es? ( ${URI_PREFIX}spa.traineddata -> spa.traineddata-${LANGPACKV} )
+ l10n_fi? ( ${URI_PREFIX}fin.traineddata -> fin.traineddata-${LANGPACKV} )
+ l10n_fr? ( ${URI_PREFIX}fra.traineddata -> fra.traineddata-${LANGPACKV} )
+ l10n_he? ( ${URI_PREFIX}heb.traineddata -> heb.traineddata-${LANGPACKV} )
+ l10n_hi? ( ${URI_PREFIX}hin.traineddata -> hin.traineddata-${LANGPACKV} )
+ l10n_hu? ( ${URI_PREFIX}hun.traineddata -> hun.traineddata-${LANGPACKV} )
+ l10n_id? ( ${URI_PREFIX}ind.traineddata -> ind.traineddata-${LANGPACKV} )
+ l10n_it? ( ${URI_PREFIX}ita.traineddata -> ita.traineddata-${LANGPACKV} )
+ l10n_ja? ( ${URI_PREFIX}jpn.traineddata -> jpn.traineddata-${LANGPACKV} )
+ l10n_ko? ( ${URI_PREFIX}kor.traineddata -> kor.traineddata-${LANGPACKV} )
+ l10n_lt? ( ${URI_PREFIX}lit.traineddata -> lit.traineddata-${LANGPACKV} )
+ l10n_lv? ( ${URI_PREFIX}lav.traineddata -> lav.traineddata-${LANGPACKV} )
+ l10n_nl? ( ${URI_PREFIX}nld.traineddata -> nld.traineddata-${LANGPACKV} )
+ l10n_no? ( ${URI_PREFIX}nor.traineddata -> nor.traineddata-${LANGPACKV} )
+ l10n_pl? ( ${URI_PREFIX}pol.traineddata -> pol.traineddata-${LANGPACKV} )
+ l10n_pt? ( ${URI_PREFIX}por.traineddata -> por.traineddata-${LANGPACKV} )
+ l10n_ro? ( ${URI_PREFIX}ron.traineddata -> ron.traineddata-${LANGPACKV} )
+ l10n_ru? ( ${URI_PREFIX}rus.traineddata -> rus.traineddata-${LANGPACKV} )
+ l10n_sk? ( ${URI_PREFIX}slk.traineddata -> slk.traineddata-${LANGPACKV}
+ ${URI_PREFIX}slk_frak.traineddata -> slk_frak.traineddata-${LANGPACKV} )
+ l10n_sl? ( ${URI_PREFIX}slv.traineddata -> slv.traineddata-${LANGPACKV} )
+ l10n_sr? ( ${URI_PREFIX}srp.traineddata -> srp.traineddata-${LANGPACKV} )
+ l10n_sv? ( ${URI_PREFIX}swe.traineddata -> swe.traineddata-${LANGPACKV} )
+ l10n_th? ( ${URI_PREFIX}tha.traineddata -> tha.traineddata-${LANGPACKV} )
+ l10n_tl? ( ${URI_PREFIX}tgl.traineddata -> tgl.traineddata-${LANGPACKV} )
+ l10n_tr? ( ${URI_PREFIX}tur.traineddata -> tur.traineddata-${LANGPACKV} )
+ l10n_uk? ( ${URI_PREFIX}ukr.traineddata -> ukr.traineddata-${LANGPACKV} )
+ l10n_vi? ( ${URI_PREFIX}vie.traineddata -> vie.traineddata-${LANGPACKV} )
+ l10n_zh-CN? ( ${URI_PREFIX}chi_sim.traineddata -> chi_sim.traineddata-${LANGPACKV} )
+ l10n_zh-TW? ( ${URI_PREFIX}chi_tra.traineddata -> chi_tra.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 examples jpeg math opencl osd png scrollview static-libs tiff training webp l10n_ar l10n_bg l10n_ca l10n_chr l10n_cs l10n_de l10n_da l10n_el l10n_es l10n_fi l10n_fr l10n_he l10n_hi l10n_hu l10n_id l10n_it l10n_ja l10n_ko l10n_lt l10n_lv l10n_nl l10n_no l10n_pl l10n_pt l10n_ro l10n_ru l10n_sk l10n_sl l10n_sr l10n_sv l10n_th l10n_tl l10n_tr l10n_uk l10n_vi l10n_zh-CN l10n_zh-TW"
+
+# With opencl USE=tiff is necessary in leptonica
+CDEPEND=">=media-libs/leptonica-1.71:=[zlib,tiff?,jpeg?,png?,webp?]
+ opencl? (
+ virtual/opencl
+ media-libs/tiff:0=
+ media-libs/leptonica:=[tiff]
+ )
+ scrollview? (
+ >=dev-java/piccolo2d-3.0:0
+ )
+ training? (
+ dev-libs/icu:=
+ x11-libs/pango:=
+ x11-libs/cairo:=
+ )"
+
+DEPEND="${CDEPEND}
+ doc? ( app-doc/doxygen )
+ scrollview? ( >=virtual/jdk-1.7 )"
+
+RDEPEND="${CDEPEND}
+ scrollview? ( >=virtual/jre-1.7 )"
+
+DOCS=( AUTHORS ChangeLog NEWS README.md )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.05.00-no_graphics.patch"
+ "${FILESDIR}/${PN}-4.00.00-use-system-piccolo2d.patch"
+)
+
+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
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ $(use_enable opencl)
+ $(use_enable scrollview graphics)
+ $(use_enable static-libs static)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ default
+ use doc && emake doc
+ use scrollview && emake ScrollView.jar JAVAC="javac $(java-pkg_javac-args)"
+ use training && emake training
+}
+
+src_install() {
+ use doc && HTML_DOCS=( doc/html/. )
+ default
+ prune_libtool_files
+
+ if use training; then
+ emake DESTDIR="${D}" training-install
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins testing/eurotext.tif testing/phototest.tif
+ fi
+
+ insinto /usr/share/tessdata
+ doins tessdata/*traineddata* # language files
+ use scrollview && doins java/ScrollView.jar # scrollview
+}