aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/tesseract/Makefile
blob: 155b96a09a10d529595af46bd834d32a1fef2962 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# New ports collection makefile for:    tesseract
# Date created:     18 July 2007
# Whom:         Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   tesseract
DISTVERSION=    2.01
CATEGORIES= graphics
MASTER_SITES=   http://tesseract-ocr.googlecode.com/files/ CENKES
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} ${LANGFILES}

MAINTAINER= infofarmer@FreeBSD.org
COMMENT=    Commercial quality open source OCR engine

LIB_DEPENDS=    tiff.4:${PORTSDIR}/graphics/tiff
RUN_DEPENDS=    xterm:${PORTSDIR}/x11/xterm

LANGS=  deu eng fra ita nld spa
LANGVER=    2.00
LANGFILES=  ${LANGS:S|^|${PORTNAME}-${LANGVER}.|:S|$|${EXTRACT_SUFX}|}
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  LIBTIFF_CFLAGS="-I${LOCALBASE}/include"\
        LIBTIFF_LIBS="-L${LOCALBASE}/lib -ltiff"
PORTDOCS=   AUTHORS ChangeLog NEWS README ReleaseNotes
PORTEXAMPLES=   eurotext.tif phototest.tif
PORT_VERBS= cntraining mftraining tessdata unicharset_extractor \
        wordlist2dawg ${PORTNAME}

post-patch:
    @${REINPLACE_CMD} -e 's|/usr/bin/X11/xterm|${LOCALBASE}/bin/xterm|'\
        ${WRKSRC}/ccutil/debugwin.cpp

post-install:
    @cd ${WRKDIR}/tessdata/&&${COPYTREE_SHARE} . ${PREFIX}/share/tessdata/
.ifndef NOPORTDOCS
    @${INSTALL} -d ${DOCSDIR}/
    @cd ${WRKSRC}/&&${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
.endif
.ifndef NOPORTEXAMPLES
    @${INSTALL} -d ${EXAMPLESDIR}/
    @cd ${WRKSRC}/&&${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}/
.endif

.include <bsd.port.mk>