summaryrefslogtreecommitdiff
path: root/app-text/gocr/gocr-0.52-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-13 10:28:51 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-13 10:28:51 +0000
commitaafdd1dcd9a66da0b1bcdfadbca62add48751897 (patch)
treed328a4fe625235ee8ea443c3b1bec1fd105af11d /app-text/gocr/gocr-0.52-r1.ebuild
parente0345ef79b0b4a444151748ce1f5364fc2dd147b (diff)
gentoo auto-resync : 13:11:2023 - 10:28:51
Diffstat (limited to 'app-text/gocr/gocr-0.52-r1.ebuild')
-rw-r--r--app-text/gocr/gocr-0.52-r1.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/app-text/gocr/gocr-0.52-r1.ebuild b/app-text/gocr/gocr-0.52-r1.ebuild
new file mode 100644
index 000000000000..c598b8bc26bd
--- /dev/null
+++ b/app-text/gocr/gocr-0.52-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="An OCR (Optical Character Recognition) reader"
+HOMEPAGE="https://www-e.uni-magdeburg.de/jschulen/ocr/"
+SRC_URI="http://www-e.uni-magdeburg.de/jschulen/ocr/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc scanner tk"
+
+DEPEND="
+ >=media-libs/netpbm-9.12
+ doc? (
+ >=media-gfx/fig2dev-3.2.9-r1
+ app-text/ghostscript-gpl
+ )
+ tk? ( dev-lang/tk )"
+RDEPEND="${DEPEND}
+ tk? (
+ media-gfx/xli
+ scanner? ( media-gfx/xsane )
+ )"
+
+src_compile() {
+ local targets=( src man )
+ use doc && targets+=( doc examples )
+
+ emake "${targets[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" prefix="${EPREFIX}/usr" exec_prefix="${EPREFIX}/usr" install
+ einstalldocs
+ dodoc HISTORY REMARK.txt REVIEW
+
+ # remove the tk frontend if tk is not selected
+ if ! use tk; then
+ rm "${ED}"/usr/bin/gocr.tcl || die
+ fi
+
+ # and install the documentation and examples
+ if use doc; then
+ dodoc doc/gocr.html doc/examples.txt doc/unicode.txt
+
+ docinto examples
+ dodoc examples/*.{fig,tex,pcx}
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}