1 # Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org>
2 # $FreeBSD: graphics/tesseract/Makefile 338168 2013-12-30 20:55:18Z ohauer $
8 MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
9 DISTFILES= tesseract-ocr-${PORTVERSION}${EXTRACT_SUFX}
11 MAINTAINER= bf@FreeBSD.org
12 COMMENT= Commercial quality open source OCR engine
16 LIB_DEPENDS= lept:${PORTSDIR}/graphics/leptonica
18 DIST_SUBDIR= ${PORTNAME}
19 PROJECTHOST= tesseract-ocr
20 WRKSRC= ${WRKDIR}/tesseract-ocr
25 CONFIGURE_ENV= LIBLEPT_HEADERSDIR="${LOCALBASE}/include/leptonica" \
26 LIBS="${PTHREAD_LIBS}"
27 LDFLAGS+= -L${LOCALBASE}/lib
30 .include <bsd.port.options.mk>
33 DATADIR= ${PREFIX}/share/tessdata
34 MAN1= ambiguous_words.1 cntraining.1 combine_tessdata.1 dawg2wordlist.1 \
35 mftraining.1 shapeclustering.1 tesseract.1 unicharset_extractor.1 \
37 MAN5= unicharambigs.5 unicharset.5
41 .if ${PORT_OPTIONS:MDOCS}
42 PORTDOCS= AUTHORS ChangeLog README ReleaseNotes html
45 .if ${PORT_OPTIONS:MDOCS} || make(makesum)
46 DISTFILES+= tesseract-ocr-${PORTVERSION}-doc-html${EXTRACT_SUFX}
49 .if ${PORT_OPTIONS:MEXAMPLES}
50 PORTEXAMPLES= eurotext.tif phototest.tif
54 @${REINPLACE_CMD} -e 's|-O3 -DNDEBUG||' ${WRKSRC}/configure
55 @${REINPLACE_CMD} -e \
56 's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' \
59 @${FIND} ${WRKSRC} -type f -name 'Makefile.in' -print0 | ${XARGS} -0 \
60 ${REINPLACE_CMD} -e '\|^install-am:|,+1s|install-data-am||'
64 .if ${PORT_OPTIONS:MDOCS}
66 @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS:Nhtml} ${DOCSDIR}
67 @cd ${WRKSRC}/doc && ${COPYTREE_SHARE} html ${DOCSDIR}
69 .if ${PORT_OPTIONS:MEXAMPLES}
70 @${MKDIR} ${EXAMPLESDIR}
71 @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}
77 .include <bsd.port.mk>