diff options
author | Thomas Kahle <tomka@gentoo.org> | 2016-08-09 13:35:28 +0200 |
---|---|---|
committer | Thomas Kahle <tomka@gentoo.org> | 2016-08-09 13:35:56 +0200 |
commit | c049a5c2ecd9a07a7aacd34c192b5824b9ccad74 (patch) | |
tree | 8ae4845552ec297374098ca4d2e85e9ce5e7e057 /app-text | |
parent | dev-python/flask-babel: Bump (diff) | |
download | gentoo-c049a5c2ecd9a07a7aacd34c192b5824b9ccad74.tar.gz gentoo-c049a5c2ecd9a07a7aacd34c192b5824b9ccad74.tar.bz2 gentoo-c049a5c2ecd9a07a7aacd34c192b5824b9ccad74.zip |
app-text/tesseract: Bump to 3.04.01 (bug 590788)
Package-Manager: portage-2.3.0
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/tesseract/Manifest | 1 | ||||
-rw-r--r-- | app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch | 27 | ||||
-rw-r--r-- | app-text/tesseract/tesseract-3.04.01.ebuild | 150 |
3 files changed, 178 insertions, 0 deletions
diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest index 6ec6df624bf0..d4b3c5d59953 100644 --- a/app-text/tesseract/Manifest +++ b/app-text/tesseract/Manifest @@ -70,6 +70,7 @@ DIST swe.traineddata-3.04.00 9460295 SHA256 2a6407bbf187eb1fcfd1633fae9abffcd622 DIST swe.traineddata.gz 959911 SHA256 25331ca1f41378a86336604476049810a0c5350417205e300cb2d11048cec2c1 SHA512 e38fe9fd7d26420ee1aab3db7f700d58210dbfaef45d03114679d2671bc1942d7b031499e763204e15ebeadafa2f8f063f78941f2299b2c74f635425ddce856a WHIRLPOOL db1225d47e2e3b26372689f96164d8286701dbb2e0f1a82368c784c8d127a0d11248924936abd05d0092ba8ad5ce222b6d113ceb0f440b85faaca37396781480 DIST tesseract-3.03-rc1.tar.gz 12812907 SHA256 d244956236f7491d74d7f342895f611a6c46c45fa9900173d5b7625d8461d2ea SHA512 4acd6a3c0db5568bd6cb199776a52fbf1643692cf2d9da7449644662461c0c3ef7e5941bb49be94135433a90de400413df062edd612ce9ec9c06e9206a57113f WHIRLPOOL 93f33f62aeb5a9f65a7642bc282138622076989618f787a044ad79463ab9cd9a9ebaeb5e34e52cf5c95c569b01fc552a44d2eda24e697d0c9a045fb626b9aa77 DIST tesseract-3.04.00.tar.gz 2264427 SHA256 7e6e48b625e1fba9bc825a4ef8c39f12c60aae1084939133b3c6a00f8f8dc38c SHA512 60c31bad40b4c01395782fb98b3326407e75ebdbda962de4fb0e878824efb05140bdcb139dcf7d4f699ae5350e81a00320ebe7fbec083a0d374952488cc59e25 WHIRLPOOL 81b685e4d50d94056a4f99ce6beb4c73983e9449e1eed07a69d4649b0a8231b17fede430a8c181b37216a55e9f6102a578c85d84b2bbe6e9643ca98f16ae3260 +DIST tesseract-3.04.01.tar.gz 2269105 SHA256 57f63e1b14ae04c3932a2683e4be4954a2849e17edd638ffe91bc5a2156adc6a SHA512 816f6c29f8efeaf157891ddb022bd0daf8eb27c0cb8b6df5542e745d209f0ce617245e4583c59a561ed3216044d3afb38f8620ee94cdea656364923dcb140b5b WHIRLPOOL 995502084484d172becdfdaa38888cd21f0fe2b8845fe4a64726f9fbcd35310d64153be6325016dd50ca37b95069112b63d4f0528bd989a58c3b88dc6c6a6813 DIST tesseract-ocr-3.01.heb-com.tar.gz 270977 SHA256 20a9d53172a8dbf1a4bbd7f7e9e3a523a9435c47c751533642e8a9becc8584ff SHA512 378dc49da535f70c860c29b9a43cae478f6d8403c93a623b1781194c02aad3ea12345f9ea6ebbac4fb2033179964d23fb075e6aa206ec79530b41947d5d44411 WHIRLPOOL cc6463928c05d5904af71ea6170e946e601639761eaab317f0570275e0eaee81cba2c0636dc5dec40f8ba6d16ad498e7177a0c2bf5a886f2598c99568f151fd6 DIST tesseract-ocr-3.01.osd.tar.gz 4320544 SHA256 7861210fd0970ad30503e8c70d7841de6716bd293d8512fd8787a1a07219b7aa SHA512 ad0d6246574db10dbe5a439ba4266765114b1343228608c5ad35bea125c5e308e286a133ecf2fc9407287af56ea57bb48c32f445fef98256a119a2f432f6e2b6 WHIRLPOOL ffa5a9f209e54a36860e2a2cdee955a83df768fbb814717a2d1e0efe05b3aa2283bc14a33cfa72d7179ddeb684587fe04c0d37cefa944ba2182c9c7e6c9affd4 DIST tesseract-ocr-3.01.slk-frak.tar.gz 292809 SHA256 f35b8a858d509c540a5829d94e8f8800ed25db4c904661000f4c4fa528d5c156 SHA512 a015719fe72b5463b6e9849de0ba5cdb9ed996ac60a47a7fab360c1028cc52b3ad41872b8b35e988f4430f991791ae0837c6823e479cb1549b65d5f530f62fe6 WHIRLPOOL 79419ea93b9d69d4be3ef8399656a5adb6dc383b9496434c99db8f5f0d6fca70314d68e96f59940674a51b79448e43b5ed59389e382528bf050134e6a6edb00d diff --git a/app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch b/app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch new file mode 100644 index 000000000000..a9dd00419347 --- /dev/null +++ b/app-text/tesseract/files/tesseract-3.04.01-use-system-piccolo2d.patch @@ -0,0 +1,27 @@ +diff -U 3 -dHrN tesseract-3.04.01/java/Makefile.am tesseract-3.04.01-scrollview/java/Makefile.am +--- tesseract-3.04.01/java/Makefile.am 2016-02-16 22:27:01.000000000 +0100 ++++ tesseract-3.04.01-scrollview/java/Makefile.am 2016-08-09 13:18:12.810503862 +0200 +@@ -36,10 +36,9 @@ + com/google/scrollview/ScrollView.class + + SCROLLVIEW_LIBS = \ +- $(srcdir)/piccolo2d-core-3.0.jar \ +- $(srcdir)/piccolo2d-extras-3.0.jar ++ /usr/share/piccolo2d/lib/piccolo2d.jar + +-CLASSPATH = $(srcdir)/piccolo2d-core-3.0.jar:$(srcdir)/piccolo2d-extras-3.0.jar ++CLASSPATH = /usr/share/piccolo2d/lib/piccolo2d.jar + + ScrollView.jar : $(SCROLLVIEW_CLASSES) + $(JAR) cfm $@ Manifest.txt com/google/scrollview/*.class \ +diff -U 3 -dHrN tesseract-3.04.01/viewer/Makefile.am tesseract-3.04.01-scrollview/viewer/Makefile.am +--- tesseract-3.04.01/viewer/Makefile.am 2016-02-16 22:27:01.000000000 +0100 ++++ tesseract-3.04.01-scrollview/viewer/Makefile.am 2016-08-09 13:20:57.788318147 +0200 +@@ -17,3 +17,7 @@ + + libtesseract_viewer_la_SOURCES = \ + scrollview.cpp svmnode.cpp svutil.cpp svpaint.cpp ++ ++if !GRAPHICS_DISABLED ++AM_CPPFLAGS += -DSCROLLVIEW_PATH=/usr/share/tessdata/ ++endif diff --git a/app-text/tesseract/tesseract-3.04.01.ebuild b/app-text/tesseract/tesseract-3.04.01.ebuild new file mode 100644 index 000000000000..ee55a2589d5e --- /dev/null +++ b/app-text/tesseract/tesseract-3.04.01.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_PN="tesseract-ocr" +LANGPACKV="3.04.00" +URI_PREFIX="https://github.com/${MY_PN}/tessdata/raw/${LANGPACKV}/" +JAVA_PKG_OPT_USE="scrollview" + +inherit eutils autotools java-pkg-opt-2 + +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} + doc? ( https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02-doc-html.tar.gz ) + math? ( ${URI_PREFIX}equ.traineddata -> equ.traineddata-${LANGPACKV} ) + linguas_ar? ( ${URI_PREFIX}ara.traineddata -> ara.traineddata-${LANGPACKV} ) + linguas_bg? ( ${URI_PREFIX}bul.traineddata -> bul.traineddata-${LANGPACKV} ) + linguas_ca? ( ${URI_PREFIX}cat.traineddata -> cat.traineddata-${LANGPACKV} ) + linguas_chr? ( ${URI_PREFIX}chr.traineddata -> chr.traineddata-${LANGPACKV} ) + linguas_cs? ( ${URI_PREFIX}ces.traineddata -> ces.traineddata-${LANGPACKV} ) + linguas_de? ( ${URI_PREFIX}deu.traineddata -> deu.traineddata-${LANGPACKV} + ${URI_PREFIX}deu_frak.traineddata -> deu_frak.traineddata-${LANGPACKV} ) + linguas_da? ( ${URI_PREFIX}dan.traineddata -> dan.traineddata-${LANGPACKV} + ${URI_PREFIX}dan_frak.traineddata -> dan_frak.traineddata-${LANGPACKV} ) + linguas_el? ( ${URI_PREFIX}ell.traineddata -> ell.traineddata-${LANGPACKV} ) + linguas_es? ( ${URI_PREFIX}spa.traineddata -> spa.traineddata-${LANGPACKV} ) + linguas_fi? ( ${URI_PREFIX}fin.traineddata -> fin.traineddata-${LANGPACKV} ) + linguas_fr? ( ${URI_PREFIX}fra.traineddata -> fra.traineddata-${LANGPACKV} ) + linguas_he? ( ${URI_PREFIX}heb.traineddata -> heb.traineddata-${LANGPACKV} ) + linguas_hi? ( ${URI_PREFIX}hin.traineddata -> hin.traineddata-${LANGPACKV} ) + linguas_hu? ( ${URI_PREFIX}hun.traineddata -> hun.traineddata-${LANGPACKV} ) + linguas_id? ( ${URI_PREFIX}ind.traineddata -> ind.traineddata-${LANGPACKV} ) + linguas_it? ( ${URI_PREFIX}ita.traineddata -> ita.traineddata-${LANGPACKV} ) + linguas_ja? ( ${URI_PREFIX}jpn.traineddata -> jpn.traineddata-${LANGPACKV} ) + linguas_ko? ( ${URI_PREFIX}kor.traineddata -> kor.traineddata-${LANGPACKV} ) + linguas_lt? ( ${URI_PREFIX}lit.traineddata -> lit.traineddata-${LANGPACKV} ) + linguas_lv? ( ${URI_PREFIX}lav.traineddata -> lav.traineddata-${LANGPACKV} ) + linguas_nl? ( ${URI_PREFIX}nld.traineddata -> nld.traineddata-${LANGPACKV} ) + linguas_no? ( ${URI_PREFIX}nor.traineddata -> nor.traineddata-${LANGPACKV} ) + linguas_pl? ( ${URI_PREFIX}pol.traineddata -> pol.traineddata-${LANGPACKV} ) + linguas_pt? ( ${URI_PREFIX}por.traineddata -> por.traineddata-${LANGPACKV} ) + linguas_ro? ( ${URI_PREFIX}ron.traineddata -> ron.traineddata-${LANGPACKV} ) + linguas_ru? ( ${URI_PREFIX}rus.traineddata -> rus.traineddata-${LANGPACKV} ) + linguas_sk? ( ${URI_PREFIX}slk.traineddata -> slk.traineddata-${LANGPACKV} + ${URI_PREFIX}slk_frak.traineddata -> slk_frak.traineddata-${LANGPACKV} ) + linguas_sl? ( ${URI_PREFIX}slv.traineddata -> slv.traineddata-${LANGPACKV} ) + linguas_sr? ( ${URI_PREFIX}srp.traineddata -> srp.traineddata-${LANGPACKV} ) + linguas_sv? ( ${URI_PREFIX}swe.traineddata -> swe.traineddata-${LANGPACKV} ) + linguas_th? ( ${URI_PREFIX}tha.traineddata -> tha.traineddata-${LANGPACKV} ) + linguas_tl? ( ${URI_PREFIX}tgl.traineddata -> tgl.traineddata-${LANGPACKV} ) + linguas_tr? ( ${URI_PREFIX}tur.traineddata -> tur.traineddata-${LANGPACKV} ) + linguas_uk? ( ${URI_PREFIX}ukr.traineddata -> ukr.traineddata-${LANGPACKV} ) + linguas_vi? ( ${URI_PREFIX}vie.traineddata -> vie.traineddata-${LANGPACKV} ) + linguas_zh_CN? ( ${URI_PREFIX}chi_sim.traineddata -> chi_sim.traineddata-${LANGPACKV} ) + linguas_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 ~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_ja 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 +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} + scrollview? ( >=virtual/jdk-1.7 )" + +RDEPEND="${CDEPEND} + scrollview? ( >=virtual/jre-1.7 )" + +DOCS=(AUTHORS ChangeLog NEWS README.md ReleaseNotes ) + +PATCHES=( + "${FILESDIR}/tesseract-2.04-gcc47.patch" + "${FILESDIR}/${P}-use-system-piccolo2d.patch" +) + +src_unpack() { + unpack ${P}.tar.gz + use doc && unpack tesseract-ocr-3.02.02-doc-html.tar.gz + find "${DISTDIR}/" -name "*traineddata-${LANGPACKV}" \ + -execdir sh -c 'cp -- "$0" "${S}/tessdata/${0%-*}"' '{}' ';' || die +} + +src_prepare() { + epatch "${PATCHES[@]}" + 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 scrollview && emake ScrollView.jar JAVAC="javac $(java-pkg_javac-args)" + use training && emake training +} + +src_install() { + 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 + + if use doc; then + dohtml -r "${WORKDIR}/${MY_PN}"/doc/html/* + fi + + insinto /usr/share/tessdata + doins tessdata/*traineddata* # language files + use scrollview && doins java/ScrollView.jar # scrollview +} |