commit:     acd4a2db8a5a9c0e03ac696ed1246e7902a8db03
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 12 09:00:35 2024 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Tue Nov 12 09:13:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acd4a2db

app-text/tesseract: add 5.5.0

Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 app-text/tesseract/Manifest               |  1 +
 app-text/tesseract/tesseract-5.5.0.ebuild | 90 +++++++++++++++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest
index d3f9ed3a4abe..67d7b232a819 100644
--- a/app-text/tesseract/Manifest
+++ b/app-text/tesseract/Manifest
@@ -1 +1,2 @@
 DIST tesseract-5.4.1.tar.gz 1899949 BLAKE2B 
8e9ff54902d467a4ef0dc61665570a6d34ecdd2d89fd0023775212eb531e3c11659d17e5bb1733f570f785af4714d5a5259d1f809f6e28c0a65375ba02d21bdc
 SHA512 
a97a31d1b735930a3e8b17bc2eae24210d8242d31399822f8bc2e9f18903d513cf6d02b2274e2f3ce431183467570b3327e01cbc49dca80e38acb90327cc235e
+DIST tesseract-5.5.0.tar.gz 1905018 BLAKE2B 
2f9a215bf9c39b55ca1f49e26914745dcbf2019dec0d62433f23e1920f7f64c506da5c2d1344771755d6a3f4b1eee16d379b4ad0d16ed06a2a4b2d2228a61a08
 SHA512 
206e7da2d28a6271217ff384b482aa45a50beee0c53327aa4fd3da7082dce83386c8b7600194cbc30282134013b6182a1bed9d128ed6378f2957d0b8d1770b2d

diff --git a/app-text/tesseract/tesseract-5.5.0.ebuild 
b/app-text/tesseract/tesseract-5.5.0.ebuild
new file mode 100644
index 000000000000..d4438214a13d
--- /dev/null
+++ b/app-text/tesseract/tesseract-5.5.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal toolchain-funcs
+
+DESCRIPTION="An OCR Engine, originally 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/5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="doc float32 jpeg openmp png static-libs tiff training webp"
+
+COMMON_DEPEND=">=media-libs/leptonica-1.74:=[${MULTILIB_USEDEP},zlib,tiff?,jpeg?,png?,webp?]
+       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-text/doxygen )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-5.4.1-arm64-neon-tesseract.patch
+)
+
+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 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
+}

Reply via email to