aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/tesseract/Makefile
blob: 157042e3faec46c631bedd5c1594014e026ad5c9 (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
47
48
49
50
51
52
# New ports collection makefile for:    tesseract
# Date created:     18 July 2007
# Whom:         Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   tesseract
DISTVERSION=    2.04
PORTREVISION=   1
CATEGORIES= graphics
MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE} CENKES
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} ${LANGFILES}

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

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

PROJECTHOST=    tesseract-ocr
LANGS2_00?= deu eng fra ita nld spa
LANGS2_01?= deu-f por vie
LANGS2_04?= eus

.for _N in 2_00 2_01 2_04
LANGFILES+= ${LANGS${_N}:S|^|${PORTNAME}-${_N:S|_|.|}.|:S|$|${EXTRACT_SUFX}|}
.endfor

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

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

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>