/[gentoo-x86]/app-text/tesseract/tesseract-2.04-r1.ebuild
Gentoo

Contents of /app-text/tesseract/tesseract-2.04-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Mon Jun 4 11:40:10 2012 UTC (6 years, 4 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +6 -3 lines
Include fix for gcc47, #413937

(Portage version: 2.2.0_alpha109/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/tesseract/tesseract-2.04-r1.ebuild,v 1.7 2010/11/20 11:37:09 armin76 Exp $
4
5 EAPI="2"
6
7 inherit eutils
8
9 DESCRIPTION="An OCR Engine that was developed at HP and now at Google"
10 HOMEPAGE="http://code.google.com/p/tesseract-ocr/"
11 SRC_URI="http://tesseract-ocr.googlecode.com/files/${P}.tar.gz
12 http://tesseract-ocr.googlecode.com/files/${PN}-2.00.eng.tar.gz
13 linguas_de? (
14 http://tesseract-ocr.googlecode.com/files/${PN}-2.00.deu.tar.gz
15 http://tesseract-ocr.googlecode.com/files/${PN}-2.01.deu-f.tar.gz
16 )
17 linguas_eu? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.04.eus.tar.gz )
18 linguas_es? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.spa.tar.gz )
19 linguas_fr? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.fra.tar.gz )
20 linguas_it? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.ita.tar.gz )
21 linguas_nl? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.nld.tar.gz )
22 linguas_pt_BR? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.01.por.tar.gz )
23 linguas_vi? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.01.vie.tar.gz )"
24
25 LICENSE="Apache-2.0"
26 SLOT="0"
27 KEYWORDS="alpha amd64 ~arm ~mips ppc ppc64 sparc x86"
28 IUSE="examples tiff linguas_de linguas_eu linguas_es linguas_fr linguas_it linguas_nl linguas_pt_BR linguas_vi"
29
30 DEPEND="tiff? ( media-libs/tiff )"
31 RDEPEND="${DEPEND}"
32
33 # NOTES:
34 # english language files are always installed because they are used by default
35 # that is a tesseract bug and if possible this workaround should be avoided
36 # see bug 287373
37 # deu-f corresponds to an old german graphic style named fraktur
38 # that's the same language (german, de)
39 # stuff in directory java/ seems useless...
40 # in testing/, there is a way to test accuracy, not usable for src_test()
41 # app-ocr/ would be a better category
42
43 src_prepare() {
44 # move language files to have them installed
45 mv "${WORKDIR}"/tessdata/* tessdata/ || die "move language files failed"
46
47 # remove obsolete makefile, install target only in uppercase Makefile
48 rm "${S}/java/makefile" || die "remove obsolete java makefile failed"
49
50 # fix gcc-4.4 compilation, bug 269320
51 # fix gcc-4.7 compilation, bug 413937
52 epatch \
53 "${FILESDIR}"/${P}-gcc44.patch \
54 "${FILESDIR}"/${P}-gcc47.patch
55 }
56
57 src_configure() {
58 econf $(use_with tiff libtiff) \
59 --disable-dependency-tracking
60 }
61
62 src_install() {
63 emake DESTDIR="${D}" install || die "emake install failed"
64
65 dodoc AUTHORS ChangeLog NEWS README ReleaseNotes || die "dodoc failed"
66
67 if use examples; then
68 insinto /usr/share/doc/${PF}/examples
69 doins eurotext.tif phototest.tif || die "doins failed"
70 fi
71 }

  ViewVC Help
Powered by ViewVC 1.1.20