# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-text/tesseract/tesseract-2.04.ebuild,v 1.2 2009/07/25 21:12:14 vostorga Exp $ EAPI="2" inherit eutils autotools DESCRIPTION="A commercial quality OCR engine developed at HP in the 80's and early 90's." HOMEPAGE="http://code.google.com/p/tesseract-ocr/" SRC_URI="http://tesseract-ocr.googlecode.com/files/${P}.tar.gz http://dev.gentooexperimental.org/~chewi/distfiles/${P}-autotools.tar.gz linguas_de? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.deu.tar.gz ) linguas_de_FR? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.01.deu-f.tar.gz ) linguas_en? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.eng.tar.gz ) linguas_fr? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.fra.tar.gz ) linguas_it? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.ita.tar.gz ) linguas_nl? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.nld.tar.gz ) linguas_es? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.spa.tar.gz ) linguas_pt? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.01.por.tar.gz ) linguas_vi? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.01.vie.tar.gz )" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~alpha ~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86" IUSE="tiff linguas_de linguas_de_FR linguas_en linguas_fr linguas_it linguas_nl \ linguas_es linguas_pt linguas_vi" DEPEND="tiff? ( media-libs/tiff )" RDEPEND="${DEPEND}" src_unpack() { unpack ${A/${P}-autotools.tar.gz/} } src_prepare() { # Move language files mv -f "${WORKDIR}"/tessdata/* tessdata/ # Remove obsolete makefile, install target only in uppercase Makefile rm -f "${S}/java/makefile" #bug 269320 epatch "${FILESDIR}"/${P}-gcc44.patch # libtool enhancements mkdir -p m4 || die rm -rf config configure* **/Makefile* || die mv ccstruct/callcpp.cpp cutil/callcpp.cpp || die sed -i "s/config_auto\.h/config.h/g" */*.cpp */*.h || die unpack "${P}-autotools.tar.gz" epatch "${P}-autotools.patch" eautoreconf } src_configure() { econf $(use_with tiff libtiff) || die "econf failed" } src_install() { emake DESTDIR="${D}" install || die "install failed" dodoc README ReleaseNotes AUTHORS phototest.tif || die "dodoc failed" }