Date: Sat, 6 Oct 2012 13:34:02 GMT From: Oliver Heesakkers <dev2@heesakkes.info> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/172397: [maintainer patch] Convert graphics/zbar to OptionsNG Message-ID: <201210061334.q96DY247055517@red.freebsd.org> Resent-Message-ID: <201210061340.q96DeBh0051954@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 172397 >Category: ports >Synopsis: [maintainer patch] Convert graphics/zbar to OptionsNG >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Oct 06 13:40:10 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Oliver Heesakkers >Release: 9.0-RELEASE-p3 >Organization: >Environment: >Description: The attached patch converts graphics/zbar to OptionsNG >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN zbar.orig/Makefile zbar/Makefile --- zbar.orig/Makefile 2012-10-06 13:44:25.000000000 +0200 +++ zbar/Makefile 2012-10-06 14:40:25.000000000 +0200 @@ -21,32 +21,29 @@ USE_LDCONFIG= yes USE_ICONV= yes -OPTIONS= X11 "Build with X support" on \ - IMAGEMAGICK "ImageMagick graphics support" on \ - V4L "Build zbarcam video scanner" off \ - PYTHON "Build PyGTK widget" off \ - GTK2 "Build GTK+2 widget" off \ - QT4 "Build Qt4 widget" off +OPTIONS_DEFINE= X11 IMAGEMAGICK V4L PYTHON GTK2 QT4 +OPTIONS_DEFAULT= X11 IMAGEMAGICK +V4L_DESC= Build zbarcam video scanner .include <bsd.port.options.mk> .if exists(${LOCALBASE}/lib/libjpeg.so) CONFIGURE_ARGS+= --with-jpeg=yes -LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg +LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg .else CONFIGURE_ARGS+= --with-jpeg=no .endif -.if defined(WITH_X11) +.if ${PORT_OPTIONS:MX11} USE_XORG= ice sm x11 xau xdmcp xext xv -LIB_DEPENDS+= xcb.2:${PORTSDIR}/x11/libxcb +LIB_DEPENDS+= xcb:${PORTSDIR}/x11/libxcb CONFIGURE_ARGS+= --with-x=yes .else CONFIGURE_ARGS+= --with-x=no --without-xshm --without-xv .endif -.if defined(WITH_IMAGEMAGICK) -LIB_DEPENDS+= Magick++.5:${PORTSDIR}/graphics/ImageMagick +.if ${PORT_OPTIONS:MIMAGEMAGICK} +LIB_DEPENDS+= Magick++:${PORTSDIR}/graphics/ImageMagick CONFIGURE_ARGS+= --with-imagemagick=yes PLIST_SUB+= IMAGEMAGICK="" MAN1= zbarimg.1 @@ -55,7 +52,7 @@ PLIST_SUB+= IMAGEMAGICK="@comment " .endif -.if defined(WITH_V4L) +.if ${PORT_OPTIONS:MV4L} BUILD_DEPENDS+= v4l_compat>=1.0.20101027:${PORTSDIR}/multimedia/v4l_compat CONFIGURE_ARGS+= --enable-video=yes PLIST_SUB+= V4L="" @@ -65,7 +62,7 @@ PLIST_SUB+= V4L="@comment " .endif -.if defined(WITH_PYTHON) +.if ${PORT_OPTIONS:MPYTHON} USE_PYTHON= 2.5-2.7 USE_GNOME+= pygtk2 CONFIGURE_ARGS+= --with-python=yes @@ -75,7 +72,7 @@ PLIST_SUB+= PYTHON="@comment " .endif -.if defined(WITH_GTK2) +.if ${PORT_OPTIONS:MGTK2} USE_GNOME+= gtk20 CONFIGURE_ARGS+= --with-gtk=yes PLIST_SUB+= GTK2="" @@ -84,7 +81,7 @@ PLIST_SUB+= GTK2="@comment " .endif -.if defined(WITH_QT4) +.if ${PORT_OPTIONS:MQT4} USE_QT4= gui moc_build CONFIGURE_ARGS+= --with-qt=yes PLIST_SUB+= QT4="" @@ -97,9 +94,9 @@ post-patch: @${REINPLACE_CMD} 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/configure - @${REINPLACE_CMD} 's|^pkgconfigdir = .*|pkgconfigdir = $$(prefix)/libdata/pkgconfig|' \ + @${REINPLACE_CMD} 's|^pkgconfigdir = .*|pkgconfigdir = ${PREFIX}/libdata/pkgconfig|' \ ${WRKSRC}/Makefile.in -.if defined(NOPORTDOCS) +.if !${PORT_OPTIONS:MDOCS} @${REINPLACE_CMD} '/^install-data-am: /s/install-dist_docDATA//' \ ${WRKSRC}/Makefile.in .endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210061334.q96DY247055517>