gocr-0.50.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. DESCRIPTION="An OCR (Optical Character Recognition) reader"
  5. HOMEPAGE="http://jocr.sourceforge.net"
  6. SRC_URI="http://www-e.uni-magdeburg.de/jschulen/ocr/${P}.tar.gz"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
  10. IUSE="doc scanner tk"
  11. DEPEND=">=media-libs/netpbm-9.12
  12. doc? ( >=media-gfx/transfig-3.2 app-text/ghostscript-gpl )
  13. tk? ( dev-lang/tk )"
  14. RDEPEND="${DEPEND}
  15. tk? (
  16. media-gfx/xli
  17. scanner? ( media-gfx/xsane )
  18. )"
  19. src_compile() {
  20. local mymakes="src man"
  21. use doc && mymakes="${mymakes} doc examples"
  22. emake ${mymakes}
  23. }
  24. src_install() {
  25. emake DESTDIR="${D}" prefix="${EPREFIX}/usr" exec_prefix="${EPREFIX}/usr" install
  26. dodoc AUTHORS BUGS CREDITS HISTORY RE* TODO
  27. # remove the tk frontend if tk is not selected
  28. use tk || rm "${ED}"/usr/bin/gocr.tcl
  29. # and install the documentation and examples
  30. if use doc ; then
  31. dodoc doc/gocr.html doc/examples.txt doc/unicode.txt
  32. insinto /usr/share/doc/${PF}/examples
  33. doins "${S}"/examples/*.{fig,tex,pcx}
  34. docompress -x /usr/share/doc/${PF}/examples
  35. fi
  36. }