Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/tesseract/
Date: Mon, 02 Jan 2023 10:54:42
Message-Id: 1672656875.9316322afb219ca2b33f617a73d6089bf966d1e5.voyageur@gentoo
1 commit: 9316322afb219ca2b33f617a73d6089bf966d1e5
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 2 10:50:17 2023 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 10:54:35 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9316322a
7
8 app-text/tesseract: add 5.3.0
9
10 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
11
12 app-text/tesseract/Manifest | 1 +
13 app-text/tesseract/tesseract-5.3.0.ebuild | 92 +++++++++++++++++++++++++++++++
14 2 files changed, 93 insertions(+)
15
16 diff --git a/app-text/tesseract/Manifest b/app-text/tesseract/Manifest
17 index f845d02a0e34..22de478c5b30 100644
18 --- a/app-text/tesseract/Manifest
19 +++ b/app-text/tesseract/Manifest
20 @@ -1,2 +1,3 @@
21 DIST tesseract-4.1.1.tar.gz 1974988 BLAKE2B f729beb017ec81704b84f5e6539706ff0cd6a51a4d1b7b730c394af58ce2ea2a659203bf239417e8d500cfbde845a73d6e6e181ca946257c2f22525820899602 SHA512 017723a2268be789fe98978eed02fd294968cc8050dde376dee026f56f2b99df42db935049ae5e72c4519a920e263b40af1a6a40d9942e66608145b3131a71a2
22 DIST tesseract-5.2.0.tar.gz 1913462 BLAKE2B 6b80e5bb71543cf971683f66b87fd45a971a6f337ca53567d134c3bdc227f1338a3340f5bb5c2f183288135acd6521031b0f6de6e96e333fed4dc10e93b7319e SHA512 23ed931495e4ea793904f99a06a95a47873b923c4e5d8f3fc8f9203cac86b0e0013c416ab4d8d4a863a081eea00a196a0198c6fb17a39917a1baea2280d84794
23 +DIST tesseract-5.3.0.tar.gz 1913678 BLAKE2B 975b3a50dc2c9ec7ded82caaa068d2d9d362ee0bc6d51b41a52c692ac7f51231d4c64a9dda9e7b850297d4c1f13eb40a709e59eebe143df4f5e2a060cfbbfd3a SHA512 fc0cfda980059390b7d6d3d8e475b4ecc9dcfee1abc3b16fc9ffc8904db0a0847a5f6f1b32bd2e1f6f5a714a8c4df0fb3dc7c6aa25ece6162bf52fe86b4d0f34
24
25 diff --git a/app-text/tesseract/tesseract-5.3.0.ebuild b/app-text/tesseract/tesseract-5.3.0.ebuild
26 new file mode 100644
27 index 000000000000..7c7753b1ecf2
28 --- /dev/null
29 +++ b/app-text/tesseract/tesseract-5.3.0.ebuild
30 @@ -0,0 +1,92 @@
31 +# Copyright 1999-2023 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +inherit autotools multilib-minimal toolchain-funcs
37 +
38 +DESCRIPTION="An OCR Engine, originally developed at HP, now open source"
39 +HOMEPAGE="https://github.com/tesseract-ocr"
40 +SRC_URI="https://github.com/tesseract-ocr/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
41 +
42 +LICENSE="Apache-2.0"
43 +SLOT="0/5"
44 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
45 +IUSE="doc float32 jpeg opencl openmp png static-libs tiff training webp"
46 +
47 +COMMON_DEPEND=">=media-libs/leptonica-1.74:=[${MULTILIB_USEDEP},zlib,tiff?,jpeg?,png?,webp?]
48 + opencl? (
49 + virtual/opencl[${MULTILIB_USEDEP}]
50 + media-libs/tiff:=[${MULTILIB_USEDEP}]
51 + media-libs/leptonica:=[tiff]
52 + )
53 + training? (
54 + dev-libs/icu:=
55 + x11-libs/pango:=
56 + x11-libs/cairo:=
57 + )"
58 +RDEPEND="${COMMON_DEPEND}
59 + || (
60 + >=app-text/tessdata_fast-4.0.0
61 + >=app-text/tessdata_best-4.0.0
62 + >=app-text/tessdata_legacy-4.0.0
63 + )"
64 +DEPEND="${COMMON_DEPEND}
65 + app-text/asciidoc
66 + app-text/docbook-xsl-stylesheets
67 + dev-libs/libxslt
68 + doc? ( app-doc/doxygen )"
69 +
70 +pkg_pretend() {
71 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
72 +}
73 +
74 +pkg_setup() {
75 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
76 +}
77 +
78 +src_prepare() {
79 + default
80 + eautoreconf
81 +}
82 +
83 +multilib_src_configure() {
84 + # scrollview disabled for now, see bug #686944
85 + local myeconfargs=(
86 + --enable-shared
87 + --disable-graphics
88 + $(use_enable float32)
89 + $(use_enable opencl)
90 + $(use_enable openmp)
91 + $(use_enable static-libs static)
92 + )
93 +
94 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
95 +}
96 +
97 +multilib_src_compile() {
98 + default
99 + if multilib_is_native_abi; then
100 + use doc && emake doc
101 + use training && emake training
102 + fi
103 +}
104 +
105 +multilib_src_install() {
106 + if multilib_is_native_abi; then
107 + DOCS=( "${S}"/AUTHORS "${S}"/ChangeLog "${S}"/README.md )
108 + if use doc; then
109 + HTML_DOCS=( doc/html/. )
110 + fi
111 + einstalldocs
112 +
113 + if use training; then
114 + emake DESTDIR="${D}" training-install
115 + fi
116 + fi
117 + emake DESTDIR="${D}" install
118 +}
119 +
120 +multilib_src_install_all() {
121 + find "${D}" -name '*.la' -type f -delete || die
122 +}