forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note removing GCC 13 patch as per tesseract-ocr/tesseract@e3fb0c6 Closes: https://bugs.gentoo.org/910403 Signed-off-by: Alexander Kurakin <[email protected]> Closes: gentoo#31899 Signed-off-by: Bernard Cafarelli <[email protected]>
- Loading branch information
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DIST tesseract-4.1.1.tar.gz 1974988 BLAKE2B f729beb017ec81704b84f5e6539706ff0cd6a51a4d1b7b730c394af58ce2ea2a659203bf239417e8d500cfbde845a73d6e6e181ca946257c2f22525820899602 SHA512 017723a2268be789fe98978eed02fd294968cc8050dde376dee026f56f2b99df42db935049ae5e72c4519a920e263b40af1a6a40d9942e66608145b3131a71a2 | ||
DIST tesseract-5.2.0.tar.gz 1913462 BLAKE2B 6b80e5bb71543cf971683f66b87fd45a971a6f337ca53567d134c3bdc227f1338a3340f5bb5c2f183288135acd6521031b0f6de6e96e333fed4dc10e93b7319e SHA512 23ed931495e4ea793904f99a06a95a47873b923c4e5d8f3fc8f9203cac86b0e0013c416ab4d8d4a863a081eea00a196a0198c6fb17a39917a1baea2280d84794 | ||
DIST tesseract-5.3.0.tar.gz 1913678 BLAKE2B 975b3a50dc2c9ec7ded82caaa068d2d9d362ee0bc6d51b41a52c692ac7f51231d4c64a9dda9e7b850297d4c1f13eb40a709e59eebe143df4f5e2a060cfbbfd3a SHA512 fc0cfda980059390b7d6d3d8e475b4ecc9dcfee1abc3b16fc9ffc8904db0a0847a5f6f1b32bd2e1f6f5a714a8c4df0fb3dc7c6aa25ece6162bf52fe86b4d0f34 | ||
DIST tesseract-5.3.2.tar.gz 1916850 BLAKE2B d900f7e21a53a4ca77ab820359cf8b528ac0114816029c257dffa141ae9fdecfe4ddb97160b598d1f144c139f3fbceea080fb050802d6d3fa7ac8bc8e1353d72 SHA512 92db2a513f00b931a0207cc705020bee9fea4ff7fa93c57a6f446b5777713864cce19121b316ef8b78b6bd625ee7e6fd473352515f98c4a2187569cbd0a9713a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# Copyright 1999-2023 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 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:=[${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 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 | ||
} |