Update sysutils/cfengine36 to version 3.6.1_1,1
[dports.git] / graphics / ocropus / Makefile
1 # Created by: Hiroto Kagotani <hiroto.kagotani@gmail.com>
2 # $FreeBSD$
3
4 PORTNAME=       ocropus
5 PORTVERSION=    0.4
6 PORTREVISION=   12
7 CATEGORIES=     graphics
8 MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE}
9
10 MAINTAINER=     hiroto.kagotani@gmail.com
11 COMMENT=        The OCRopus(tm) open source document analysis and OCR system
12
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
18
19 WRKSRC=         ${WRKDIR}/ocropus-0.4/ocropus
20
21 OPTIONS_DEFINE= SDL LEPTONICA
22 SDL_DESC=       Enable SDL for graphical debugging
23 LEPTONICA_DESC= Enable Leptonica image analysis
24
25 MAKE_JOBS_UNSAFE=       yes
26 USE_PYTHON_BUILD=       yes
27 USE_AUTOTOOLS=  aclocal automake autoconf
28 AUTOMAKE_ARGS=  --add-missing
29 USES=           gmake
30 CONFIGURE_ARGS= --without-fst --without-tesseract --with-iulib=${LOCALBASE}
31 CPPFLAGS+=      -I${LOCALBASE}/include
32 LDFLAGS+=       -L${LOCALBASE}/lib
33
34 .include <bsd.port.options.mk>
35
36 .if ${PORT_OPTIONS:MSDL}
37 USE_SDL=        sdl
38 .else
39 CONFIGURE_ARGS+=--without-SDL
40 .endif
41
42 .if ${PORT_OPTIONS:MLEPTONICA}
43 LIB_DEPENDS+=   liblept.so:${PORTSDIR}/graphics/leptonica
44 .else
45 CONFIGURE_ARGS+=--without-leptonica
46 .endif
47
48 pre-configure:
49         @(cd ${CONFIGURE_WRKSRC} \
50           && ${SETENV} ${PYTHON_CMD} genAM.py >Makefile.am)
51
52 run-autotools: run-autotools-aclocal run-autotools-automake run-autotools-autoconf
53
54 run-autotools-autoconf:
55         @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOTOOLS_ENV} ${AUTOCONF} \
56                 ${AUTOCONF_ARGS})
57         @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|'\
58                 ${WRKSRC}/configure
59
60 .include <bsd.port.mk>