1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 DESCRIPTION="An OCR (Optical Character Recognition) reader"
7 HOMEPAGE="http://jocr.sourceforge.net"
8 SRC_URI="http://www-e.uni-magdeburg.de/jschulen/ocr/${P}.tar.gz"
12 KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
15 DEPEND=">=media-libs/netpbm-9.12
16 doc? ( >=media-gfx/transfig-3.2 app-text/ghostscript-gpl )
21 scanner? ( media-gfx/xsane )
25 local mymakes="src man"
27 use doc && mymakes="${mymakes} doc examples"
33 emake DESTDIR="${D}" prefix="${EPREFIX}/usr" exec_prefix="${EPREFIX}/usr" install
34 dodoc AUTHORS BUGS CREDITS HISTORY RE* TODO
36 # remove the tk frontend if tk is not selected
37 use tk || rm "${ED}"/usr/bin/gocr.tcl
38 # and install the documentation and examples
40 dodoc doc/gocr.html doc/examples.txt doc/unicode.txt
41 insinto /usr/share/doc/${PF}/examples
42 doins "${S}"/examples/*.{fig,tex,pcx}
43 docompress -x /usr/share/doc/${PF}/examples