diff options
author | Thomas Kahle <tomka@gentoo.org> | 2015-12-06 21:17:45 +0100 |
---|---|---|
committer | Thomas Kahle <tomka@gentoo.org> | 2015-12-06 21:25:05 +0100 |
commit | 5af1a823838b97eadf3a7fbc78bcdaceb32d4a33 (patch) | |
tree | 1a61a520f7dea1cc710d3c424e3bf9afb0e8c59c /app-text/tesseract | |
parent | app-emulation/xen-tools: multiple clean ups (diff) | |
download | gentoo-5af1a823838b97eadf3a7fbc78bcdaceb32d4a33.tar.gz gentoo-5af1a823838b97eadf3a7fbc78bcdaceb32d4a33.tar.bz2 gentoo-5af1a823838b97eadf3a7fbc78bcdaceb32d4a33.zip |
app-text/tesseract: Add math USE for scanning equations.
Fixes bug 567318, thanks Jeffrey Thomas Piercy
Package-Manager: portage-2.2.24
Diffstat (limited to 'app-text/tesseract')
-rw-r--r-- | app-text/tesseract/Manifest | 1 | ||||
-rw-r--r-- | app-text/tesseract/metadata.xml | 13 | ||||
-rw-r--r-- | app-text/tesseract/tesseract-3.04.00-r3.ebuild | 131 |
3 files changed, 137 insertions, 8 deletions
diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest index 1a130969847b..67f1bc7addb1 100644 --- a/app-text/tesseract/Manifest +++ b/app-text/tesseract/Manifest @@ -23,6 +23,7 @@ DIST deu_frak.traineddata-3.04.00 1978593 SHA256 cbb200e394485c5b515de203963c2a7 DIST ell.traineddata-3.04.00 5422512 SHA256 bbe0ed0758c69043114b13fc8f00a42342c647f27be352c05b4978e265380e64 SHA512 b542f4cad465332b7d9742ce64951289a22f31c2196335b09037e047c9fe2966689426d9e973173147aa7c0ca73cddb337c9ec7b485b13b80eea3e44ad31bb48 WHIRLPOOL 16d89cb546883bf75a8b75e55c0eb88d915d07cad0f4c5b3e0640385f4b7cb2a6aeeedce13cf48538f5a78ec39776ccdecef9c3264cd749e1d224cdcff5e310a DIST ell.traineddata.gz 944284 SHA256 f8cb765c40733a677fa470370b935c34cfc53ba8de372b33e83ab59c7407195d SHA512 3657cc335e9e484f13ba360518cd3d9bf828a1c0e53a22c84a4085565ebbca0811b8d2a25edd2455c9b6707baa54896d132bcfdad210384b3025ae26506d7582 WHIRLPOOL 634e00d9f1d2d2cc67053efce2b937f7a1201b719ba902744e96ccbc72f682b7374dfa56f050956db39f5a191d1ed41e12d90e01bc87d406070acc0598aa9f71 DIST eng.traineddata-3.04.00 21876550 SHA256 c0515c9f1e0c79e1069fcc05c2b2f6a6841fb5e1082d695db160333c1154f06d SHA512 e03d205900e3f6b866b2342eb8f32fb35dad28c7f58b7bdc3c0bec0de570f87578168d8d64b1f0bedac7bbcf462dd949b00701943a55ba3f42842ad1629e230a WHIRLPOOL e71cec7e7e8b9b8183f459741ce2eb1a33923e73802ab35dae81ab7939b980b028e4d4a3325205a52f67b8502323e9cd8dee6efd69ca40c0eb42b0961d5d8786 +DIST equ.traineddata-3.04.00 2251826 SHA256 3af43a2420ce927dbce68474d644625947189a82ce6ae4fd32106399146819db SHA512 2c5e5f9f85e956e0ebdbb25aa4e92bc163808ba9944c8d1ec9a76e4c70727c3657c6e56c86266a2e769e48c6f6d9aea72bf2080f723f3d90c089f775c3dae9d8 WHIRLPOOL 074d613cdb990703731deb228fbf4bec660e8e4be053bc8196ab639d14f84cb51e11a2ac285e4cbc4c362a90e2117d90a19b843cdf11f5ab3263d604ddd252b8 DIST fin.traineddata-3.04.00 13274908 SHA256 f830c625f635a637cb11a6a565126b1ae105c24ae9fd7cb92c8d5130c7184cf1 SHA512 036e5e383ec4ffc0e06fb5a93d288f21360660d10c6daf8459edd3fb94f611ed49ffcfb9bc1fdd1d8476690f53950ca31963ccdb36a35d3330fe2ffef0a81789 WHIRLPOOL 9068bd4b23ac62d8b4cc846b10abb7bf536b786a8eefc32745ca99370eb6739b4ee9bd912b78cb0922e6111a0e8be2dc58285c0726dd2ebd92bb3349bf8344db DIST fin.traineddata.gz 959833 SHA256 30c05d403295fb659048b5d82db0d87c9cbee5077314e2b52f6fdca9c9ec8520 SHA512 f7db41a5698ce51f8f103201f7dda67cf140a57d28da7bf3420847c60f847bc24c16571d63785b707e9d599017a0a29ab15914c4b413e4e9dd12b019643e9682 WHIRLPOOL 2adbe34d45050331ae3f7d7ba9739dd0dafb600cccd2713f38aa79bc83023898cf97e45c63b9edbb5014f5cffa02596be6ec75b34e45fda5d87f19bc9418db78 DIST fra.traineddata-3.04.00 14044118 SHA256 86afb23ad146467f263e8ade56fd3951b1cc28f8c4eebc34f993d3c02d88a7ab SHA512 c41223608625491fdbf2d4fbe526da472bb5c269958e776b2058d4a782ebeffff9749e30c7db34adcdbd30669d82be97ee58d303027d5a67ae61b87b65c2e561 WHIRLPOOL edd6121dbfb52ca11ce86fcf54ec5f026d6b4341f824fbe1eab45af2e830bf1cf80615626b260c79343337fb61181e69b42281da78e6784dc28d244afd09a1fb diff --git a/app-text/tesseract/metadata.xml b/app-text/tesseract/metadata.xml index 5d984328b595..f9d811c29319 100644 --- a/app-text/tesseract/metadata.xml +++ b/app-text/tesseract/metadata.xml @@ -18,15 +18,12 @@ </upstream> <use> <flag name="webp"> Enable support for webp image format.</flag> - <flag name="scrollview"> Enable graphics support - (ScrollView).</flag> + <flag name="math"> Enable support for recognition of equations.</flag> + <flag name="scrollview"> Enable graphics support (ScrollView).</flag> <flag name="linguas_chr"> Enable support for the Cherokee language.</flag> <flag name="linguas_jp"> Enable support for Japanese.</flag> - <flag name="osd"> Enable support orientation and script - detection.</flag> - <flag name="opencl">Enable opencl support for speedup using GPU - computation.</flag> - <flag name="training">Install training applications to add support - for new languages.</flag> + <flag name="osd"> Enable support orientation and script detection.</flag> + <flag name="opencl">Enable opencl support for speedup using GPU computation.</flag> + <flag name="training">Install training applications to add support for new languages.</flag> </use> </pkgmetadata> diff --git a/app-text/tesseract/tesseract-3.04.00-r3.ebuild b/app-text/tesseract/tesseract-3.04.00-r3.ebuild new file mode 100644 index 000000000000..76400019720b --- /dev/null +++ b/app-text/tesseract/tesseract-3.04.00-r3.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_PN="tesseract-ocr" +URI_PREFIX="https://github.com/${MY_PN}/tessdata/raw/${PV}/" + +inherit eutils autotools autotools-utils + +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-${PV} + doc? ( https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02-doc-html.tar.gz ) + math? ( ${URI_PREFIX}equ.traineddata -> equ.traineddata-${PV} ) + linguas_ar? ( ${URI_PREFIX}ara.traineddata -> ara.traineddata-${PV} ) + linguas_bg? ( ${URI_PREFIX}bul.traineddata -> bul.traineddata-${PV} ) + linguas_ca? ( ${URI_PREFIX}cat.traineddata -> cat.traineddata-${PV} ) + linguas_chr? ( ${URI_PREFIX}chr.traineddata -> chr.traineddata-${PV} ) + linguas_cs? ( ${URI_PREFIX}ces.traineddata -> ces.traineddata-${PV} ) + linguas_de? ( ${URI_PREFIX}deu.traineddata -> deu.traineddata-${PV} + ${URI_PREFIX}deu_frak.traineddata -> deu_frak.traineddata-${PV} ) + linguas_da? ( ${URI_PREFIX}dan.traineddata -> dan.traineddata-${PV} + ${URI_PREFIX}dan_frak.traineddata -> dan_frak.traineddata-${PV} ) + linguas_el? ( ${URI_PREFIX}ell.traineddata -> ell.traineddata-${PV} ) + linguas_es? ( ${URI_PREFIX}spa.traineddata -> spa.traineddata-${PV} ) + linguas_fi? ( ${URI_PREFIX}fin.traineddata -> fin.traineddata-${PV} ) + linguas_fr? ( ${URI_PREFIX}fra.traineddata -> fra.traineddata-${PV} ) + linguas_he? ( ${URI_PREFIX}heb.traineddata -> heb.traineddata-${PV} ) + linguas_hi? ( ${URI_PREFIX}hin.traineddata -> hin.traineddata-${PV} ) + linguas_hu? ( ${URI_PREFIX}hun.traineddata -> hun.traineddata-${PV} ) + linguas_id? ( ${URI_PREFIX}ind.traineddata -> ind.traineddata-${PV} ) + linguas_it? ( ${URI_PREFIX}ita.traineddata -> ita.traineddata-${PV} ) + linguas_jp? ( ${URI_PREFIX}jpn.traineddata -> jpn.traineddata-${PV} ) + linguas_ko? ( ${URI_PREFIX}kor.traineddata -> kor.traineddata-${PV} ) + linguas_lt? ( ${URI_PREFIX}lit.traineddata -> lit.traineddata-${PV} ) + linguas_lv? ( ${URI_PREFIX}lav.traineddata -> lav.traineddata-${PV} ) + linguas_nl? ( ${URI_PREFIX}nld.traineddata -> nld.traineddata-${PV} ) + linguas_no? ( ${URI_PREFIX}nor.traineddata -> nor.traineddata-${PV} ) + linguas_pl? ( ${URI_PREFIX}pol.traineddata -> pol.traineddata-${PV} ) + linguas_pt? ( ${URI_PREFIX}por.traineddata -> por.traineddata-${PV} ) + linguas_ro? ( ${URI_PREFIX}ron.traineddata -> ron.traineddata-${PV} ) + linguas_ru? ( ${URI_PREFIX}rus.traineddata -> rus.traineddata-${PV} ) + linguas_sk? ( ${URI_PREFIX}slk.traineddata -> slk.traineddata-${PV} + ${URI_PREFIX}slk_frak.traineddata -> slk_frak.traineddata-${PV} ) + linguas_sl? ( ${URI_PREFIX}slv.traineddata -> slv.traineddata-${PV} ) + linguas_sr? ( ${URI_PREFIX}srp.traineddata -> srp.traineddata-${PV} ) + linguas_sv? ( ${URI_PREFIX}swe.traineddata -> swe.traineddata-${PV} ) + linguas_th? ( ${URI_PREFIX}tha.traineddata -> tha.traineddata-${PV} ) + linguas_tl? ( ${URI_PREFIX}tgl.traineddata -> tgl.traineddata-${PV} ) + linguas_tr? ( ${URI_PREFIX}tur.traineddata -> tur.traineddata-${PV} ) + linguas_uk? ( ${URI_PREFIX}ukr.traineddata -> ukr.traineddata-${PV} ) + linguas_vi? ( ${URI_PREFIX}vie.traineddata -> vie.traineddata-${PV} ) + linguas_zh_CN? ( ${URI_PREFIX}chi_sim.traineddata -> chi_sim.traineddata-${PV} ) + linguas_zh_TW? ( ${URI_PREFIX}chi_tra.traineddata -> chi_tra.traineddata-${PV} ) + osd? ( ${URI_PREFIX}osd.traineddata -> osd.traineddata-${PV} ) +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" + +IUSE="doc examples jpeg math opencl osd png +scrollview static-libs tiff training -webp linguas_ar linguas_bg linguas_ca linguas_chr linguas_cs linguas_de linguas_da linguas_el linguas_es linguas_fi linguas_fr linguas_he linguas_hi linguas_hu linguas_id linguas_it linguas_jp linguas_ko linguas_lt linguas_lv linguas_nl linguas_no linguas_pl linguas_pt linguas_ro linguas_ru linguas_sk linguas_sl linguas_sr linguas_sv linguas_th linguas_tl linguas_tr linguas_uk linguas_vi linguas_zh_CN linguas_zh_TW" + +# With opencl USE=tiff is necessary in leptonica +DEPEND=">=media-libs/leptonica-1.71[zlib,tiff?,jpeg?,png?,webp?] + opencl? ( virtual/opencl + media-libs/tiff:0 + >=media-libs/leptonica-1.71[zlib,tiff,jpeg?,png?,webp?] + ) + training? ( + dev-libs/icu + x11-libs/pango + x11-libs/cairo + ) +" +RDEPEND="${DEPEND}" + +DOCS=(AUTHORS ChangeLog NEWS README ReleaseNotes ) + +PATCHES=( + "${FILESDIR}/tesseract-2.04-gcc47.patch" + "${FILESDIR}/${P}-fix-scrollview-disabled.patch" +) + +src_unpack() { + unpack ${P}.tar.gz + use doc && unpack tesseract-ocr-3.02.02-doc-html.tar.gz + find "${DISTDIR}/" -name "*traineddata-${PV}" \ + -execdir sh -c 'cp -- "$0" "${S}/tessdata/${0%-*}"' '{}' ';' || die +} + +src_configure() { + local myeconfargs=( + $(use_enable opencl) \ + $(use_enable scrollview graphics) + ) + autotools-utils_src_configure +} + +src_compile() { + default + if use training; then + emake training + fi + } + +src_install() { + autotools-utils_src_install + + if use training; then + pushd "${BUILD_DIR}" + emake DESTDIR="${D}" training-install + popd + fi + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins testing/eurotext.tif testing/phototest.tif + fi + + if use doc; then + dohtml -r "${WORKDIR}"/"${MY_PN}"/doc/html/* + fi + + # install language files + insinto /usr/share/tessdata + doins "${S}"/tessdata/*traineddata* +} |