ports/172457: [PATCH] Convert ports to OptionsNG

Chris Petrik c.petrik.sosa at gmail.com
Sun Oct 7 17:10:10 UTC 2012


>Number:         172457
>Category:       ports
>Synopsis:       [PATCH] Convert ports to OptionsNG
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 07 17:10:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Chris Petrik
>Release:        FreeBSD 10-CURRENT
>Organization:
none
>Environment:
>Description:
Update ports for Options NG

astro/josm
astro/marble
astro/prune
astro/py-RO
astro/sextractor
astro/wcslib
astro/xtide
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: josm/Makefile
===================================================================
--- josm/Makefile	(revision 305494)
+++ josm/Makefile	(working copy)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	josm
-# Date created:		2009/02/24
-# Whom:			Gleb Smirnoff <glebius at FreeBSD.org>
-#
+# Created by: Gleb Smirnoff <glebius at FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	josm
 PORTVERSION=	5485
@@ -33,7 +29,8 @@
 
 PLIST_FILES=	bin/josm ${JAVAJARDIR:C,${PREFIX}/?,,}/${DISTNAME}
 
-OPTIONS=	WEBKIT_IMAGE "Build webkit-image (needed for Yahoo imagery)" off
+OPTIONS_DEFINE=	WEBKIT_IMAGE
+WEBKIT_IMAGE_DESC=	Build webkit-image (needed for Yahoo imagery)
 
 .include <bsd.port.options.mk>
 
@@ -41,7 +38,7 @@
 	@${ECHO_CMD} "You can change limit of memory available to josm by defining"
 	@${ECHO_CMD} "JOSM_MEMORY_LIMIT variable in /etc/make.conf. Default is 1024 (MB)."
 
-.if defined(WITH_WEBKIT_IMAGE)
+.if ${PORT_OPTIONS:MWEBKIT_IMAGE}
 PLIST_FILES+=	bin/webkit-image
 
 USE_QT4=	corelib gui webkit moc_build
Index: marble/Makefile
===================================================================
--- marble/Makefile	(revision 305494)
+++ marble/Makefile	(working copy)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	marble
-# Date created:		2010-05-30
-# Whom:			Max Brazhnikov <makc at FreeBSD.org>
-#
+# Created by: Max Brazhnikov <makc at FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	marble
 PORTVERSION=	${KDE4_VERSION}
@@ -27,11 +23,14 @@
 MAKE_JOBS_SAFE=	yes
 CMAKE_ARGS=	-DMOBILE:BOOL=FALSE
 
-OPTIONS=	GPS "Support for GPS position provider" on
+OPTIONS_DEFINE=	GPS
+OPTIONS_DEFAULT=	GPS
 
+GPS_DESC=	Support for GPS position provider
+
 .include <bsd.port.options.mk>
 
-.ifndef(WITHOUT_GPS)
+.if ${PORT_OPTIONS:MGPS}
 LIB_DEPENDS+=	gps.20:${PORTSDIR}/astro/gpsd
 PLIST_SUB+=	GPS=""
 .else
Index: prune/Makefile
===================================================================
--- prune/Makefile	(revision 305494)
+++ prune/Makefile	(working copy)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	prune
-# Date created:		25 Jun 2009
-# Whom:			Dmitry Marakasov <amdmi3 at FreeBSD.org>
-#
+# Created by: Dmitry Marakasov <amdmi3 at FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	prune
 PORTVERSION=	11
@@ -28,11 +24,12 @@
 
 PLIST_FILES=	bin/prune-gps-tool ${JAVAJARDIR:C,${PREFIX}/?,,}/${DISTNAME}
 
-OPTIONS=	THREED "Support for 3D view of track" off
+OPTIONS_DEFINE=	THREED
+THREED_DESC=	Support for 3D view of track
 
 .include <bsd.port.options.mk>
 
-.if defined(WITH_THREED)
+.if ${PORT_OPTIONS:MTHREED}
 RUN_DEPENDS+=	java3d>=1.5.2:${PORTSDIR}/java/java3d
 .endif
 
Index: py-RO/Makefile
===================================================================
--- py-RO/Makefile	(revision 305494)
+++ py-RO/Makefile	(working copy)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	py-RO
-# Date created:				Dec 26, 2010
-# Whom:					Wen Heping <wenheping at gmail.com>
-#
+# Created by: Wen Heping <wenheping at gmail.com>
 # $FreeBSD$
-#
 
 PORTNAME=	RO
 PORTVERSION=	2.9.3
@@ -17,24 +13,27 @@
 BUILD_DEPENDS=	${PYTHON_SITELIBDIR}/numpy/core/numeric.py:${PORTSDIR}/math/py-numpy
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
-OPTIONS=	MATPLOTLIB "Add support for Matplotlib" Off \
-		PYFITS     "Add Support for PyFITS" On \
-		PYGAME     "Add Support for PyGame" Off
+OPTIONS_DEFINE=	MATPLOTLIB PYFITS PYGAME
+OPTIONS_DEFAULT=	PYFITS
 
+MATPLOTLIB_DESC=	Add support for Matplotlib
+PYFITS_DESC=		Add Support for PyFITS
+PYGAME_DESC=		Add Support for PyGame
+
 USE_PYTHON=	yes
 USE_PYDISTUTILS=easy_install
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_MATPLOTLIB)
+.if ${PORT_OPTIONS:MMATPLOTLIB}
 RUN_DEPENDS+=	${PKGNAMEPREFIX}matplotlib>=0.98:${PORTSDIR}/math/py-matplotlib
 .endif
 
-.if !defined(WITHOUT_PYFITS)
+.if ${PORT_OPTIONS:MPYFITS}
 RUN_DEPENDS+=	${PKGNAMEPREFIX}pyfits>=1.1:${PORTSDIR}/astro/py-pyfits
 .endif
 
-.if defined(WITH_PYGAME)
+.if ${PORT_OPTIONS:MPYGAME}
 RUN_DEPENDS+=	${PKGNAMEPREFIX}game>=1.8.1:${PORTSDIR}/devel/py-game
 .endif
 
Index: sextractor/Makefile
===================================================================
--- sextractor/Makefile	(revision 305494)
+++ sextractor/Makefile	(working copy)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	sextractor
-# Date created:		22 April 2008
-# Whom:			Mathias Monnerville <mathias at monnerville.com>
-#
-## $FreeBSD$
-#
+# Created by: Mathias Monnerville <mathias at monnerville.com>
+# $FreeBSD$
 
 PORTNAME=		sextractor
 PORTVERSION=	2.5.0
@@ -20,11 +16,14 @@
 MAN1=	sex.1
 MANX=	sex.x
 
-OPTIONS=	STATIC "Use static linking" on
+OPTIONS_DEFINE=	STATIC
+OPTIONS_DEFAULT=	STATIC
 
+STATIC_DESC=	Use static linking
+
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_STATIC)
+.if ${PORT_OPTIONS:MSTATIC)
 CONFIGURE_ARGS+=	--enable-static
 .endif
 
Index: wcslib/Makefile
===================================================================
--- wcslib/Makefile	(revision 305494)
+++ wcslib/Makefile	(working copy)
@@ -1,8 +1,4 @@
-# ex:ts=4
-# New ports collection makefile for:	wcslib
-# Date created:							Wed Jul 15 10:09:45 EST 2009
-# Whom:									Tony Maher <tonymaher at optusnet.com.au>
-#
+# Created by: Tony Maher <tonymaher at optusnet.com.au>
 # $FreeBSD$
 
 PORTNAME=		wcslib
@@ -25,20 +21,23 @@
 # See makedefs.in which describes why you want to set the extra support.
 # For most users it will not be required.
 
-OPTIONS=		CFITSIO "Add cfitsio support (for tests only)" Off \
-				PGPLOT  "Add pgplot support (for tests only)" Off
+.include <bsd.port.options.mk>
 
+OPTIONS_DEFINE=	CFITSIO PGPLOT
+CFITSIO_DESC=	Add cfitsio support (for tests only)
+PGPLOT_DESC=	Add pgplot support (for tests only)
+
 # The configure script unconditionally searches for the cftisio library
 # and uses it if found.
 
-.if defined(WITH_CFITSIO) || exists(${LOCALBASE}/lib/libcfitsio.so)
+.if ${PORT_OPTIONS:MCFITSIO}
 PLIST_SUB+=		HPXCVT=""
 LIB_DEPENDS+=	cfitsio:${PORTSDIR}/astro/cfitsio
 .else
 PLIST_SUB+=		HPXCVT="@comment "
 .endif
 
-.if defined(WITH_PGPLOT)
+.if ${PORT_OPTIONS:MPGPLOT}
 LIB_DEPENDS+=	pgplot.5:${PORTSDIR}/graphics/pgplot
 .endif
 
Index: xtide/Makefile
===================================================================
--- xtide/Makefile	(revision 305494)
+++ xtide/Makefile	(working copy)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:   xtide
-# Date created:        30 August 1997
-# Whom:                Brion Moss <brion at queeg.com>
-#
+# Created by: Brion Moss <brion at queeg.com>
 # $FreeBSD$
-#
 
 PORTNAME=	xtide
 PORTVERSION=	2.12.1
@@ -37,12 +33,13 @@
 HARM_DISTNAME=	harmonics-dwf-20120302
 WVS_DISTNAME=	wvs
 
-OPTIONS=	WVS "Use world vector shoreline data (big file!)" Off
+OPTIONS_DEFINE=	WVS
+WVS_DESC=	Use world vector shoreline data (big file!)
 
 .include <bsd.port.options.mk>
 .include <bsd.port.pre.mk>
 
-.if !defined(WITHOUT_WVS)
+.if ${PORT_OPTIONS:MWVS}
 DISTFILES+=	${WVS_DISTNAME}${EXTRACT_SUFX}
 PLIST_SUB+=	WVS=""
 .else


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list