summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-01-21 22:50:49 +0100
committerDavid Seifert <soap@gentoo.org>2020-01-21 22:50:49 +0100
commitcec28ef25995ebf8b2b8ab88624bd1955270521e (patch)
tree12b300b77329b741d5208ea47fef8aea842d07ff /app-text/gocr/gocr-0.50.ebuild
parentapp-text/rtf2html: Port to EAPI 7 (diff)
downloadgentoo-cec28ef25995ebf8b2b8ab88624bd1955270521e.tar.gz
gentoo-cec28ef25995ebf8b2b8ab88624bd1955270521e.tar.bz2
gentoo-cec28ef25995ebf8b2b8ab88624bd1955270521e.zip
app-text/gocr: Port to EAPI 7
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'app-text/gocr/gocr-0.50.ebuild')
-rw-r--r--app-text/gocr/gocr-0.50.ebuild34
1 files changed, 21 insertions, 13 deletions
diff --git a/app-text/gocr/gocr-0.50.ebuild b/app-text/gocr/gocr-0.50.ebuild
index d117bc57f841..80528df1f6e7 100644
--- a/app-text/gocr/gocr-0.50.ebuild
+++ b/app-text/gocr/gocr-0.50.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=7
DESCRIPTION="An OCR (Optical Character Recognition) reader"
HOMEPAGE="http://jocr.sourceforge.net"
@@ -12,8 +12,12 @@ SLOT="0"
KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc scanner tk"
-DEPEND=">=media-libs/netpbm-9.12
- doc? ( >=media-gfx/transfig-3.2 app-text/ghostscript-gpl )
+DEPEND="
+ >=media-libs/netpbm-9.12
+ doc? (
+ >=media-gfx/transfig-3.2
+ app-text/ghostscript-gpl
+ )
tk? ( dev-lang/tk )"
RDEPEND="${DEPEND}
tk? (
@@ -22,24 +26,28 @@ RDEPEND="${DEPEND}
)"
src_compile() {
- local mymakes="src man"
+ local targets=( src man )
+ use doc && targets+=( doc examples )
- use doc && mymakes="${mymakes} doc examples"
-
- emake ${mymakes}
+ emake "${targets[@]}"
}
src_install() {
emake DESTDIR="${D}" prefix="${EPREFIX}/usr" exec_prefix="${EPREFIX}/usr" install
- dodoc AUTHORS BUGS CREDITS HISTORY RE* TODO
+ einstalldocs
+ dodoc HISTORY REMARK.txt REVIEW
# remove the tk frontend if tk is not selected
- use tk || rm "${ED}"/usr/bin/gocr.tcl
+ if ! use tk; then
+ rm "${ED}"/usr/bin/gocr.tcl || die
+ fi
+
# and install the documentation and examples
- if use doc ; then
+ if use doc; then
dodoc doc/gocr.html doc/examples.txt doc/unicode.txt
- insinto /usr/share/doc/${PF}/examples
- doins "${S}"/examples/*.{fig,tex,pcx}
+
+ docinto examples
+ dodoc examples/*.{fig,tex,pcx}
docompress -x /usr/share/doc/${PF}/examples
fi
}