aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2014-07-15 23:35:53 +0800
committeradamw <adamw@FreeBSD.org>2014-07-15 23:35:53 +0800
commitf829ece66a2fdc710cd17edfc792e29924212e93 (patch)
treebcfbb6cd3c4053cc07af29ffe3860e62b052a7f9 /graphics
parent42e5f6b5afa5422924bf6b484a4fe8219d6e64f5 (diff)
downloadfreebsd-ports-gnome-f829ece66a2fdc710cd17edfc792e29924212e93.tar.gz
freebsd-ports-gnome-f829ece66a2fdc710cd17edfc792e29924212e93.tar.zst
freebsd-ports-gnome-f829ece66a2fdc710cd17edfc792e29924212e93.zip
Use OPTIONS helpers.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/zbar/Makefile76
1 files changed, 24 insertions, 52 deletions
diff --git a/graphics/zbar/Makefile b/graphics/zbar/Makefile
index 2ecbd8c45fa1..a8dc998ab906 100644
--- a/graphics/zbar/Makefile
+++ b/graphics/zbar/Makefile
@@ -18,75 +18,47 @@ GNU_CONFIGURE= yes
USE_LDCONFIG= yes
USES= iconv libtool gmake pkgconfig
-CONFIGURE_ARGS= --with-jpeg=yes
+CONFIGURE_ARGS= --with-jpeg=yes
OPTIONS_DEFINE= X11 IMAGEMAGICK V4L PYTHON GTK2 QT4 DOCS
-OPTIONS_DEFAULT= X11 IMAGEMAGICK
+OPTIONS_DEFAULT=X11 IMAGEMAGICK
+OPTIONS_SUB= yes
V4L_DESC= Build zbarcam video scanner
-.include <bsd.port.options.mk>
+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
-.if ${PORT_OPTIONS:MX11}
-USE_XORG= ice sm x11 xau xcb xdmcp xext xv
-CONFIGURE_ARGS+= --with-x=yes
-.else
-CONFIGURE_ARGS+= --with-x=no --without-xshm --without-xv
-.endif
+IMAGEMAGICK_LIB_DEPENDS= libMagick++-6.Q*.so:${PORTSDIR}/graphics/ImageMagick
+IMAGEMAGICK_CONFIGURE_ON= --with-imagemagick=yes
+IMAGEMAGICK_CONFIGURE_OFF= --with-imagemagick=no
-.if ${PORT_OPTIONS:MIMAGEMAGICK}
-LIB_DEPENDS+= libMagick++-6.Q*.so:${PORTSDIR}/graphics/ImageMagick
-CONFIGURE_ARGS+= --with-imagemagick=yes
-PLIST_SUB+= IMAGEMAGICK=""
-.else
-CONFIGURE_ARGS+= --with-imagemagick=no
-PLIST_SUB+= IMAGEMAGICK="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MV4L}
-BUILD_DEPENDS+= v4l_compat>=1.0.20101027:${PORTSDIR}/multimedia/v4l_compat
-CONFIGURE_ARGS+= --enable-video=yes
-PLIST_SUB+= V4L=""
-.else
-CONFIGURE_ARGS+= --enable-video=no
-PLIST_SUB+= V4L="@comment "
-.endif
+V4L_BUILD_DEPENDS= v4l_compat>=1.0.20101027:${PORTSDIR}/multimedia/v4l_compat
+V4L_CONFIGURE_ON= --enable-video=yes
+V4L_CONFIGURE_OFF= --enable-video=no
-.if ${PORT_OPTIONS:MPYTHON}
-USE_PYTHON= 2
-USE_GNOME+= pygtk2
-CONFIGURE_ARGS+= --with-python=yes
-PLIST_SUB+= PYTHON=""
-.else
-CONFIGURE_ARGS+= --with-python=no
-PLIST_SUB+= PYTHON="@comment "
-.endif
+PYTHON_USE= PYTHON=2 GNOME=pygtk2
+PYTHON_CONFIGURE_ON= --with-python=yes
+PYTHON_CONFIGURE_OFF= --with-python=no
-.if ${PORT_OPTIONS:MGTK2}
-USE_GNOME+= gtk20
-CONFIGURE_ARGS+= --with-gtk=yes
-PLIST_SUB+= GTK2=""
-.else
-CONFIGURE_ARGS+= --with-gtk=no
-PLIST_SUB+= GTK2="@comment "
-.endif
+GTK2_USE= GNOME=gtk20
+GTK2_CONFIGURE_ON= --with-gtk=yes
+GTK2_CONFIGURE_OFF= --with-gtk=no
-.if ${PORT_OPTIONS:MQT4}
-USE_QT4= gui moc_build
-CONFIGURE_ARGS+= --with-qt=yes
-PLIST_SUB+= QT4=""
-.else
-CONFIGURE_ARGS+= --with-qt=no
-PLIST_SUB+= QT4="@comment "
-.endif
+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 ! ${PORT_OPTIONS:MDOCS}
+.if empty(PORT_OPTIONS:MDOCS)
@${REINPLACE_CMD} '/^install-data-am: /s/install-dist_docDATA//' \
${WRKSRC}/Makefile.in
.endif