summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2019-08-26 12:38:48 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2019-08-26 12:39:13 +0200
commit569e97daacd0f990661927f2141717984979512d (patch)
tree4057990e932df920d918233614461115f6f555c3
parentmedia-plugins/gst-plugins-ximagesrc: bump to 1.14.5, no code changes from 1.14.4 (diff)
downloadgentoo-569e97daacd0f990661927f2141717984979512d.tar.gz
gentoo-569e97daacd0f990661927f2141717984979512d.tar.bz2
gentoo-569e97daacd0f990661927f2141717984979512d.zip
app-text/tesseract: add multilib support
This can be used to add tesseract support in media-video/ffmpeg Bug: https://bugs.gentoo.org/622900 Package-Manager: Portage-2.3.73, Repoman-2.3.17 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
-rw-r--r--app-text/tesseract/tesseract-4.1.0-r1.ebuild91
1 files changed, 91 insertions, 0 deletions
diff --git a/app-text/tesseract/tesseract-4.1.0-r1.ebuild b/app-text/tesseract/tesseract-4.1.0-r1.ebuild
new file mode 100644
index 00000000000..7313d345c7a
--- /dev/null
+++ b/app-text/tesseract/tesseract-4.1.0-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2019 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, orginally developed at HP, now open source."
+HOMEPAGE="https://github.com/tesseract-ocr"
+SRC_URI="https://github.com/tesseract-ocr/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc 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 )"
+
+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 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
+}