ports/172448: [PATCH] Convert ports to OptionsNG

Chris Petrik c.petrik.sosa at gmail.com
Sun Oct 7 11:00:24 UTC 2012


>Number:         172448
>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 11:00:24 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Chris Petrik
>Release:        FreeBSD 10-CURRENT
>Organization:
none
>Environment:
>Description:
Options NG
accessibility/kdeaccessibility4
accessibility/speech-dispatcher
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: kdeaccessibility4/Makefile
===================================================================
--- kdeaccessibility4/Makefile	(revision 305450)
+++ kdeaccessibility4/Makefile	(working copy)
@@ -1,7 +1,4 @@
-# New ports collection Makefile for:	kdeaccessibility
-# Date created:				2008-01-31
-# Whom:					Martin Wilke <miwi at FreeBSD.org>
-#
+# Created by: Martin Wilke <miwi at FreeBSD.org>
 # $FreeBSD$
 
 PORTNAME=	kdeaccessibility
@@ -18,31 +15,35 @@
 
 LATEST_LINK=	${PORTNAME}4
 
-OPTIONS=	JOVIE "Install Jovie text-to-speech system" on \
-		KACCESSIBLE "Install Accessibility services for KDE" on \
-		KMAG "Install Screen magnifier" on \
-		KMOUSETOOL "Install Automatic mouse click tool" on \
-		KMOUTH "Install Speech synthesizer frontend" on
+OPTIONS_DEFINE= JOVIE KACCESSIBLE KMAG KMOUSETOOL KMOUTH
 
+JOVIE_DESC=Install Jovie text-to-speech system
+KACCESSIBLE_DESC=Install Accessibility services for KDE
+KMAG_DESC=Install Screen magnifier
+KMOUSETOOL_DESC=Install Automatic mouse click tool
+KMOUTH_DESC=Install Speech synthesizer frontend
+
+OPTIONS_DEFAULT=	JOVIE KACCESSIBLE KMAG KMOUSETOOL KMOUTH
+
 .include <bsd.port.options.mk>
 
-.ifndef(WITHOUT_JOVIE)
+.if ${PORT_OPTIONS:MJOVIE}
 RUN_DEPENDS+=	${KDE4_PREFIX}/bin/jovie:${PORTSDIR}/accessibility/jovie
 .endif
 
-.ifndef(WITHOUT_KACCESSIBLE)
+.if ${PORT_OPTIONS:MJOVIE}(WITHOUT_KACCESSIBLE)
 RUN_DEPENDS+=	${KDE4_PREFIX}/lib/kde4/libexec/kaccessibleapp:${PORTSDIR}/accessibility/kaccessible
 .endif
 
-.ifndef(WITHOUT_KMAG)
+.if ${PORT_OPTIONS:MKMAG}
 RUN_DEPENDS+=	${KDE4_PREFIX}/bin/kmag:${PORTSDIR}/accessibility/kmag
 .endif
 
-.ifndef(WITHOUT_KMOUSETOOL)
+.if ${PORT_OPTIONS:MKMOUSETOOL}
 RUN_DEPENDS+=	${KDE4_PREFIX}/bin/kmousetool:${PORTSDIR}/accessibility/kmousetool
 .endif
 
-.ifndef(WITHOUT_KMOUTH)
+.if ${PORT_OPTIONS:MKMOUTH}
 RUN_DEPENDS+=	${KDE4_PREFIX}/bin/kmouth:${PORTSDIR}/accessibility/kmouth
 .endif
 
Index: speech-dispatcher/Makefile
===================================================================
--- speech-dispatcher/Makefile	(revision 305454)
+++ speech-dispatcher/Makefile	(working copy)
@@ -1,7 +1,4 @@
-# New ports collection makefile for:	speech-dispatcher
-# Date created:				8 December 2009
-# Whom:					Alberto Villa <villa.alberto at gmail.com>
-#
+# Created by: Alberto Villa <villa.alberto at gmail.com>
 # $FreeBSD$
 
 PORTNAME=	speech-dispatcher
@@ -42,29 +39,29 @@
 
 INFO=		spd-say ${PORTNAME} ssip
 
-OPTIONS=	ALSA	"ALSA support" off \
-		ESPEAK	"eSpeak output module" on \
-		FESTIVAL	"Festival output module" off \
-		FLITE	"Festival Lite output module" off \
-		LIBAO	"libao support" off \
-		NAS	"Network Audio System support" off \
-		PULSEAUDIO	"PulseAudio support" off \
-		PYTHON	"Python support" off
+OPTIONS_DEFINE= ALSA ESPEAK FESTIVAL FLITE LIBAO NAS PULSEAUDIO PYTHON
 
+ESPEAK_DESCR=eSpeak output module
+FESTIVAL_DESCR=Festival output module
+FLITE_DESCR=Festival Lite output module 
+LIBAO_DESCR=libao support 
+
+OPTIONS_DEFAULT=	ESPEAK
+
 .include <bsd.port.options.mk>
 
 .if ${OSVERSION} < 800067 && ${ARCH} == "amd64"
 CFLAGS+=	-fPIC
 .endif
 
-.ifdef(WITH_ALSA)
+.if ${PORT_OPTIONS:MALSA}
 LIB_DEPENDS+=	asound.2:${PORTSDIR}/audio/alsa-lib
 CONFIGURE_ARGS+=	--with-alsa
 .else
 CONFIGURE_ARGS+=	--without-alsa
 .endif
 
-.ifndef(WITHOUT_ESPEAK)
+.if ${PORT_OPTIONS:MESPEAK}
 LIB_DEPENDS+=	espeak.1:${PORTSDIR}/audio/espeak
 CONFIGURE_ARGS+=	--with-espeak
 PLIST_SUB+=	ESPEAK=""
@@ -73,12 +70,13 @@
 PLIST_SUB+=	ESPEAK="@comment "
 .endif
 
-.ifdef(WITH_FESTIVAL)
+.if ${PORT_OPTIONS:MFESTIVAL}
+
 RUN_DEPENDS+=	festival:${PORTSDIR}/audio/festival \
 		${LOCALBASE}/share/festival/lib/${PORTNAME}.scm:${PORTSDIR}/audio/festival-freebsoft-utils
 .endif
 
-.ifdef(WITH_FLITE)
+.if ${PORT_OPTIONS:MFLITE}
 BUILD_DEPENDS+=	flite:${PORTSDIR}/audio/flite
 RUN_DEPENDS+=	flite:${PORTSDIR}/audio/flite
 CONFIGURE_ARGS+=	--with-flite
@@ -88,28 +86,28 @@
 PLIST_SUB+=	FLITE="@comment "
 .endif
 
-.ifdef(WITH_LIBAO)
+.if ${PORT_OPTIONS:MLIBAO}
 LIB_DEPENDS+=	ao.4:${PORTSDIR}/audio/libao
 CONFIGURE_ARGS+=	--with-libao
 .else
 CONFIGURE_ARGS+=	--without-libao
 .endif
 
-.ifdef(WITH_NAS)
+.if ${PORT_OPTIONS:MNAS}
 LIB_DEPENDS+=	audio.2:${PORTSDIR}/audio/nas
 CONFIGURE_ARGS+=	--with-nas
 .else
 CONFIGURE_ARGS+=	--without-nas
 .endif
 
-.if defined(WITH_PULSEAUDIO) && ${OSVERSION} >= 700041
+.if ${PORT_OPTIONS:MPULSEAUDIO} && ${OSVERSION} >= 700041
 LIB_DEPENDS+=	pulse.0:${PORTSDIR}/audio/pulseaudio
 CONFIGURE_ARGS+=	--with-pulse
 .else
 CONFIGURE_ARGS+=	--without-pulse
 .endif
 
-.ifdef(WITH_PYTHON)
+.if ${PORT_OPTIONS:MPYTHON}
 USE_PYTHON=	2.5+
 CONFIGURE_ARGS+=	--enable-python
 PLIST_SUB+=	PYTHON=""


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



More information about the freebsd-ports-bugs mailing list