Bug 172397 - [maintainer patch] Convert graphics/zbar to OptionsNG
Summary: [maintainer patch] Convert graphics/zbar to OptionsNG
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-06 14:40 UTC by Oliver Heesakkers
Modified: 2012-10-07 14:03 UTC (History)
0 users

See Also:


Attachments
file.diff (2.62 KB, patch)
2012-10-06 14:40 UTC, Oliver Heesakkers
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Heesakkers 2012-10-06 14:40:10 UTC
The attached patch converts graphics/zbar to OptionsNG

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-06 14:40:21 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-06 14:40:27 UTC
Maintainer of graphics/zbar,

Please note that PR ports/172397 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/172397

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-06 14:40:29 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-10-06 14:48:05 UTC
State Changed
From-To: feedback->open

Fixed typo in submitter address.  Submitter is maintainer.
Comment 5 Alex Kozlov freebsd_committer freebsd_triage 2012-10-06 18:34:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-10-07 11:23:37 UTC
Author: ak
Date: Sun Oct  7 10:23:23 2012
New Revision: 305451
URL: http://svn.freebsd.org/changeset/ports/305451

Log:
  - Convert Makefile headers to new style
  - Convert to new options framework
  - Remove ABI version numbers from LIB_DEPENDS
  
  PR:	ports/172397
  Submitted by:	Oliver Heesakkers <dev2@heesakkers.info> (maintainer)

Modified:
  head/graphics/zbar/Makefile   (contents, props changed)

Modified: head/graphics/zbar/Makefile
==============================================================================
--- head/graphics/zbar/Makefile	Sun Oct  7 10:14:54 2012	(r305450)
+++ head/graphics/zbar/Makefile	Sun Oct  7 10:23:23 2012	(r305451)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	zbar
-# Date created:				12 november 2010
-# Whom:					Oliver Heesakkers <dev2@heesakkers.info>
-#
 # $FreeBSD$
-#
+# Created by:	Oliver Heesakkers <dev2@heesakkers.info>
 
 PORTNAME=	zbar
 PORTVERSION=	0.10
@@ -21,32 +17,29 @@ USE_GMAKE=	yes
 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 +48,7 @@ CONFIGURE_ARGS+=	--with-imagemagick=no
 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 +58,7 @@ CONFIGURE_ARGS+=	--enable-video=no
 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 +68,7 @@ CONFIGURE_ARGS+=	--with-python=no
 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 +77,7 @@ CONFIGURE_ARGS+=	--with-gtk=no
 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 +90,9 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 
 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 empty(PORT_OPTIONS:MDOCS)
 	@${REINPLACE_CMD} '/^install-data-am: /s/install-dist_docDATA//' \
 		${WRKSRC}/Makefile.in
 .endif
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Alex Kozlov freebsd_committer freebsd_triage 2012-10-07 14:03:39 UTC
State Changed
From-To: open->closed

Committed. Thanks!