1 # Created by: Hiroto Kagotani <hiroto.kagotani@gmail.com>
8 MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
10 MAINTAINER= hiroto.kagotani@gmail.com
11 COMMENT= The OCRopus(tm) open source document analysis and OCR system
13 LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png \
14 libjpeg.so:${PORTSDIR}/graphics/jpeg \
15 libtiff.so:${PORTSDIR}/graphics/tiff \
16 libiulib.so:${PORTSDIR}/graphics/iulib \
17 libgsl.so:${PORTSDIR}/math/gsl
19 WRKSRC= ${WRKDIR}/ocropus-0.4/ocropus
21 OPTIONS_DEFINE= SDL LEPTONICA
22 SDL_DESC= Enable SDL for graphical debugging
23 LEPTONICA_DESC= Enable Leptonica image analysis
27 USE_AUTOTOOLS= aclocal automake autoconf
28 AUTOMAKE_ARGS= --add-missing
30 CONFIGURE_ARGS= --without-fst --without-tesseract --with-iulib=${LOCALBASE}
31 CPPFLAGS+= -I${LOCALBASE}/include
32 LDFLAGS+= -L${LOCALBASE}/lib
34 .include <bsd.port.options.mk>
36 .if ${PORT_OPTIONS:MSDL}
39 CONFIGURE_ARGS+=--without-SDL
42 .if ${PORT_OPTIONS:MLEPTONICA}
43 LIB_DEPENDS+= liblept.so:${PORTSDIR}/graphics/leptonica
45 CONFIGURE_ARGS+=--without-leptonica
49 @(cd ${CONFIGURE_WRKSRC} \
50 && ${SETENV} ${PYTHON_CMD} genAM.py >Makefile.am)
52 run-autotools: run-autotools-aclocal run-autotools-automake run-autotools-autoconf
54 run-autotools-autoconf:
55 @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \
57 @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|'\
60 .include <bsd.port.mk>