Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/gocr/
Date: Tue, 21 Jan 2020 21:51:30
Message-Id: 1579643449.cec28ef25995ebf8b2b8ab88624bd1955270521e.soap@gentoo
1 commit: cec28ef25995ebf8b2b8ab88624bd1955270521e
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 21 21:50:49 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 21 21:50:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cec28ef2
7
8 app-text/gocr: Port to EAPI 7
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: David Seifert <soap <AT> gentoo.org>
12
13 app-text/gocr/gocr-0.50.ebuild | 34 +++++++++++++++++++++-------------
14 1 file changed, 21 insertions(+), 13 deletions(-)
15
16 diff --git a/app-text/gocr/gocr-0.50.ebuild b/app-text/gocr/gocr-0.50.ebuild
17 index d117bc57f84..80528df1f6e 100644
18 --- a/app-text/gocr/gocr-0.50.ebuild
19 +++ b/app-text/gocr/gocr-0.50.ebuild
20 @@ -1,7 +1,7 @@
21 -# Copyright 1999-2018 Gentoo Foundation
22 +# Copyright 1999-2020 Gentoo Authors
23 # Distributed under the terms of the GNU General Public License v2
24
25 -EAPI=4
26 +EAPI=7
27
28 DESCRIPTION="An OCR (Optical Character Recognition) reader"
29 HOMEPAGE="http://jocr.sourceforge.net"
30 @@ -12,8 +12,12 @@ SLOT="0"
31 KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
32 IUSE="doc scanner tk"
33
34 -DEPEND=">=media-libs/netpbm-9.12
35 - doc? ( >=media-gfx/transfig-3.2 app-text/ghostscript-gpl )
36 +DEPEND="
37 + >=media-libs/netpbm-9.12
38 + doc? (
39 + >=media-gfx/transfig-3.2
40 + app-text/ghostscript-gpl
41 + )
42 tk? ( dev-lang/tk )"
43 RDEPEND="${DEPEND}
44 tk? (
45 @@ -22,24 +26,28 @@ RDEPEND="${DEPEND}
46 )"
47
48 src_compile() {
49 - local mymakes="src man"
50 + local targets=( src man )
51 + use doc && targets+=( doc examples )
52
53 - use doc && mymakes="${mymakes} doc examples"
54 -
55 - emake ${mymakes}
56 + emake "${targets[@]}"
57 }
58
59 src_install() {
60 emake DESTDIR="${D}" prefix="${EPREFIX}/usr" exec_prefix="${EPREFIX}/usr" install
61 - dodoc AUTHORS BUGS CREDITS HISTORY RE* TODO
62 + einstalldocs
63 + dodoc HISTORY REMARK.txt REVIEW
64
65 # remove the tk frontend if tk is not selected
66 - use tk || rm "${ED}"/usr/bin/gocr.tcl
67 + if ! use tk; then
68 + rm "${ED}"/usr/bin/gocr.tcl || die
69 + fi
70 +
71 # and install the documentation and examples
72 - if use doc ; then
73 + if use doc; then
74 dodoc doc/gocr.html doc/examples.txt doc/unicode.txt
75 - insinto /usr/share/doc/${PF}/examples
76 - doins "${S}"/examples/*.{fig,tex,pcx}
77 +
78 + docinto examples
79 + dodoc examples/*.{fig,tex,pcx}
80 docompress -x /usr/share/doc/${PF}/examples
81 fi
82 }