# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils 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 linguas_de? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.00.deu.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_de_FR? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.01.deu-f.tar.gz ) linguas_vn? ( http://tesseract-ocr.googlecode.com/files/${PN}-2.01.vie.tar.gz )" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~x86" IUSE="tiff linguas_de linguas_de_FR linguas_en linguas_es linguas_fr linguas_it linguas_nl linguas_vn" DEPEND="tiff? ( media-libs/tiff )" RDEPEND="$DEPEND" src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}/${P}-unicharset_extractor.patch" # Add language data (linguas_de...) if [ -e "${WORKDIR}/tessdata/" ]; then mv -f "${WORKDIR}/tessdata/"* "${S}/tessdata/" else ewarn "TIP:" ewarn "You need at least one of the language data files (linguas_??) or tesseract will not work." ewarn " " fi # ERROR -> Make: *** No rule to make target `install'. Stop. # Look into this, but removing makefile seems to be a quick fix. rm -f "${S}/java/makefile" } src_compile() { econf $(use_with tiff libtiff ) || die "econf failed" emake || die } src_install() { emake DESTDIR="${D}" install || die "install failed" dodoc README ReleaseNotes AUTHORS }