summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2021-08-26 22:12:06 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2021-08-26 22:12:25 +0200
commit1e59292df94aaf90e33d3e136b61b734ed197980 (patch)
tree315dd58cd7062be0d1e0c22ae7c6593cae0c92b7 /app-text
parentdev-libs/openssl: Stabilize 1.1.1l x86, #810433 (diff)
downloadgentoo-1e59292df94aaf90e33d3e136b61b734ed197980.tar.gz
gentoo-1e59292df94aaf90e33d3e136b61b734ed197980.tar.bz2
gentoo-1e59292df94aaf90e33d3e136b61b734ed197980.zip
app-text/tesseract: 5.0.0_beta20210815 beta bump
This masked ebuild will help for initial testing of 5.0.0 and relevant ebuild changes Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/tesseract/Manifest1
-rw-r--r--app-text/tesseract/metadata.xml1
-rw-r--r--app-text/tesseract/tesseract-5.0.0_beta20210815.ebuild95
3 files changed, 97 insertions, 0 deletions
diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest
index 62173ed39608..beb6199c9642 100644
--- a/app-text/tesseract/Manifest
+++ b/app-text/tesseract/Manifest
@@ -39,6 +39,7 @@ DIST swe.traineddata-3.04.00 9460295 BLAKE2B 766bcd64e506eea7014975de1ddf6cffcf8
DIST tesseract-3.05.02.tar.gz 3571750 BLAKE2B f8c856449ab763d66a50d4bc65450f3c71132e66b4306f5a022c3df65c62646ec202256e12b5ce91888330a5ef10a3966f91eddc241cf306809ce40abc165c82 SHA512 4cb23a6981dd5ec9eefea7b9674847ae88a411a7308ee6d946a920c76eefcf5fe7a90f6cb3ff00493a0e69b5c327d052fa8514d7f3ed506bccbe4b0163065793
DIST tesseract-4.1.0.tar.gz 1965053 BLAKE2B 172aed0b149cb1af8c8c7b53022de237c8e07086bad78063374d5e425180e4b70eca5cee4d66a1f5b0bc2d51f6b8d41bf0c564918a85977d83fdbe6ba2f5497b SHA512 d617f5c5b826640b2871dbe3d7973bcc5e66fafd837921a20e009d683806ed50f0f258aa455019d99fc54f5cb65c2fa0380e3a3c92b39ab0684b8799c730b09d
DIST tesseract-4.1.1.tar.gz 1974988 BLAKE2B f729beb017ec81704b84f5e6539706ff0cd6a51a4d1b7b730c394af58ce2ea2a659203bf239417e8d500cfbde845a73d6e6e181ca946257c2f22525820899602 SHA512 017723a2268be789fe98978eed02fd294968cc8050dde376dee026f56f2b99df42db935049ae5e72c4519a920e263b40af1a6a40d9942e66608145b3131a71a2
+DIST tesseract-5.0.0_beta20210815.tar.gz 1914265 BLAKE2B eadefb46a84fcc73d3da7a1780d1e0669840183266176021871e57ca55c79e9b56a78334414732b9024ae911cee522069c3170bf71af877c46c1ffae37c88b3f SHA512 4b78af9119c35d783e47523b41ee8bbf63913f8c122e94b6e6538a4cbab8e751df9f00f3a50d48e8a7beb948c6b23794e2481721696bf3e0f284de8aa6e9e8e7
DIST tgl.traineddata-3.04.00 4114554 BLAKE2B 1cbd5e20fcf5fa7ea183daa76e1d09d7bd4427ce2456de49f23e374af8ae48219a32f71a25d0a98c26c79ac87dc4f8f68621c76fad85b6105561f5285d635c8d SHA512 8c205fd0d4b2fc774e5b6a19cb56dcdb91b7d001acd881e34363e437d5eeae8615b853ae09f93c4957328d3a423300b9a20a443ca971a14ede1867de6194a2bb
DIST tha.traineddata-3.04.00 13565168 BLAKE2B 1fe254a7ace923a88579c46111a0be81ad7cac9d60d59189e26fef6c11469da26e86ca867ff97cbf1b83fc501d6e48fee0e729f6e73e7f5a512e7b89998475c2 SHA512 1f8750ee148a6dc5677441bdf8b41d09594b591c34c7fc0af1923a89acf9db76f12ab3ed136819b6900b70ff393fd586054fd383a427ca70b4cf9aecb6db029a
DIST tur.traineddata-3.04.00 14069931 BLAKE2B 385714a9fb0efa7a8299de7152729a7f7e12a29d4c33cc4df6c5592bd1ddca145acb056caaf93f077279489c3a12e2d95285d0790979cbb036206ecdab910080 SHA512 822b51bf9836f0d2b5923fc8ea14690a16d6e1831dc8828d0aad7cb4bda2bcec06ba7cdc79187d48b93e3541dfd46f1f50dc44dae504af9dd7a788052a05b51e
diff --git a/app-text/tesseract/metadata.xml b/app-text/tesseract/metadata.xml
index c3f203799bf0..8a74de4013f4 100644
--- a/app-text/tesseract/metadata.xml
+++ b/app-text/tesseract/metadata.xml
@@ -16,6 +16,7 @@
<remote-id type="github">tesseract-ocr/tesseract</remote-id>
</upstream>
<use>
+ <flag name="float32">Support float for model training and text recognition (faster, requires less RAM)</flag>
<flag name="math"> Enable support for recognition of equations.</flag>
<flag name="scrollview"> Install viewer to debug recognition (ScrollView).</flag>
<flag name="osd"> Enable support orientation and script detection.</flag>
diff --git a/app-text/tesseract/tesseract-5.0.0_beta20210815.ebuild b/app-text/tesseract/tesseract-5.0.0_beta20210815.ebuild
new file mode 100644
index 000000000000..0b194b123b8d
--- /dev/null
+++ b/app-text/tesseract/tesseract-5.0.0_beta20210815.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal toolchain-funcs
+
+DESCRIPTION="An OCR Engine, originally developed at HP, now open source."
+HOMEPAGE="https://github.com/tesseract-ocr"
+BETA_PV=$(ver_rs 3-4 "-")
+SRC_URI="https://github.com/tesseract-ocr/${PN}/archive/${BETA_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc float32 jpeg opencl openmp png static-libs tiff training webp"
+
+COMMON_DEPEND=">=media-libs/leptonica-1.74:=[${MULTILIB_USEDEP},zlib,tiff?,jpeg?,png?,webp?]
+ opencl? (
+ virtual/opencl[${MULTILIB_USEDEP}]
+ media-libs/tiff:0=[${MULTILIB_USEDEP}]
+ media-libs/leptonica:=[tiff]
+ )
+ training? (
+ dev-libs/icu:=
+ x11-libs/pango:=
+ x11-libs/cairo:=
+ )"
+RDEPEND="${COMMON_DEPEND}
+ || (
+ >=app-text/tessdata_fast-4.0.0
+ >=app-text/tessdata_best-4.0.0
+ >=app-text/tessdata_legacy-4.0.0
+ )"
+DEPEND="${COMMON_DEPEND}
+ app-text/asciidoc
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ doc? ( app-doc/doxygen )"
+
+S=${WORKDIR}/${PN}-${BETA_PV}
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # scrollview disabled for now, see bug #686944
+ local myeconfargs=(
+ --enable-shared
+ --disable-graphics
+ $(use_enable float32)
+ $(use_enable opencl)
+ $(use_enable openmp)
+ $(use_enable static-libs static)
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ default
+ if multilib_is_native_abi; then
+ use doc && emake doc
+ use training && emake training
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ DOCS=( "${S}"/AUTHORS "${S}"/ChangeLog "${S}"/README.md )
+ if use doc; then
+ HTML_DOCS=( doc/html/. )
+ fi
+ einstalldocs
+
+ if use training; then
+ emake DESTDIR="${D}" training-install
+ fi
+ fi
+ emake DESTDIR="${D}" install
+}
+
+multilib_src_install_all() {
+ find "${D}" -name '*.la' -type f -delete || die
+}