aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/zbar/Makefile
blob: f8659ee8393fb142cde8804149115a09e699887d (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Created by: Oliver Heesakkers <dev2@heesakkers.info>
# $FreeBSD$

PORTNAME=   zbar
PORTVERSION=    0.10
PORTREVISION=   7
CATEGORIES= graphics
MASTER_SITES=   SF

MAINTAINER= dev2@heesakkers.info
COMMENT=    ZBar barcode reader

LICENSE=    LGPL21

LIB_DEPENDS=    libjpeg.so:${PORTSDIR}/graphics/jpeg

GNU_CONFIGURE=  yes
USE_LDCONFIG=   yes
USES=       iconv libtool gmake pkgconfig

CONFIGURE_ARGS= --with-jpeg=yes

OPTIONS_DEFINE= X11 IMAGEMAGICK V4L PYTHON GTK2 QT4 DOCS
OPTIONS_DEFAULT=X11 IMAGEMAGICK
OPTIONS_SUB=    yes
V4L_DESC=   Build zbarcam video scanner

X11_USE=    XORG=ice,sm,x11,xau,xcb,xdmcp,xext,xv
X11_CONFIGURE_ON=   --with-x=yes
X11_CONFIGURE_OFF=  --with-x=no --without-xshm --without-xv

IMAGEMAGICK_LIB_DEPENDS=    libMagick++-6.so:${PORTSDIR}/graphics/ImageMagick
IMAGEMAGICK_CONFIGURE_ON=   --with-imagemagick=yes
IMAGEMAGICK_CONFIGURE_OFF=  --with-imagemagick=no

V4L_BUILD_DEPENDS=  v4l_compat>=1.0.20101027:${PORTSDIR}/multimedia/v4l_compat
V4L_CONFIGURE_ON=   --enable-video=yes
V4L_CONFIGURE_OFF=  --enable-video=no

PYTHON_USE=     GNOME=pygtk2
PYTHON_USES=        python:2
PYTHON_CONFIGURE_ON=    --with-python=yes
PYTHON_CONFIGURE_OFF=   --with-python=no

GTK2_USE=   GNOME=gtk20
GTK2_CONFIGURE_ON=  --with-gtk=yes
GTK2_CONFIGURE_OFF= --with-gtk=no

QT4_USE=    QT4=gui,moc_build
QT4_CONFIGURE_ON=   --with-qt=yes
QT4_CONFIGURE_OFF=  --with-qt=no

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

.include <bsd.port.options.mk>

post-patch:
    @${REINPLACE_CMD} 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/configure
    @${REINPLACE_CMD} 's|^pkgconfigdir = .*|pkgconfigdir = ${PREFIX}/libdata/pkgconfig|' \
        ${WRKSRC}/Makefile.in
.if empty(PORT_OPTIONS:MDOCS)
    @${REINPLACE_CMD} '/^install-data-am: /s/install-dist_docDATA//' \
        ${WRKSRC}/Makefile.in
.endif

.include <bsd.port.mk>