Bug 172414 - [PATCH] Convert my ports to OptionsNG
Summary: [PATCH] Convert my ports 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: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-06 23:00 UTC by Chris Petrik
Modified: 2012-10-07 08:50 UTC (History)
0 users

See Also:


Attachments
file.diff (5.36 KB, patch)
2012-10-06 23:00 UTC, Chris Petrik
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Petrik 2012-10-06 23:00:27 UTC
Update my ports to OptionsNG

ftp/bareftp
multimedia/mplayerxp
x11-wm/waimea (deprecated)
x11-wm/waimea-devel (deprecated)

Fix: Patch supplied.

Patch attached with submission follows:
How-To-Repeat: N/A
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2012-10-07 08:33:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bapt

I'll take it.
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2012-10-07 08:46:13 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-10-07 08:46:19 UTC
Author: bapt
Date: Sun Oct  7 07:46:04 2012
New Revision: 305437
URL: http://svn.freebsd.org/changeset/ports/305437

Log:
  Convert to new options framework
  
  PR:		ports/172414
  Submitted by:	Chris Petrik <c.petrik.sosa@gmail.com> (maintainer)

Modified:
  head/ftp/bareftp/Makefile
  head/multimedia/mplayerxp/Makefile
  head/x11-wm/waimea-devel/Makefile
  head/x11-wm/waimea/Makefile

Modified: head/ftp/bareftp/Makefile
==============================================================================
--- head/ftp/bareftp/Makefile	Sun Oct  7 07:45:08 2012	(r305436)
+++ head/ftp/bareftp/Makefile	Sun Oct  7 07:46:04 2012	(r305437)
@@ -25,16 +25,17 @@ MAKE_JOBS_SAFE=	yes
 
 MAN1=		bareftp.1
 
-OPTIONS=	KEYRING "Support for Gnome Keyring" on
+OPTIONS_DEFINE=	GNOMEKEYRING
+OPTIONS_DEFAULT=	GNOMEKEYRING
 
 .include <bsd.port.options.mk>
 
-.if defined(WITHOUT_KEYRING)
-CONFIGURE_ARGS+=	--without-gnomekeyring
-.else
+.if ${PORT_OPTIONS:MGNOMEKEYRING}
 KEYRING_DETECT=	${LOCALBASE}/libdata/pkgconfig/gnome-keyring-sharp-1.0.pc
 BUILD_DEPENDS+=	${KEYRING_DETECT}:${PORTSDIR}/security/gnome-keyring-sharp
 RUN_DEPENDS+=	${KEYRING_DETECT}:${PORTSDIR}/security/gnome-keyring-sharp
+.else
+CONFIGURE_ARGS+=	--without-gnomekeyring
 .endif
 
 # TODO

Modified: head/multimedia/mplayerxp/Makefile
==============================================================================
--- head/multimedia/mplayerxp/Makefile	Sun Oct  7 07:45:08 2012	(r305436)
+++ head/multimedia/mplayerxp/Makefile	Sun Oct  7 07:46:04 2012	(r305437)
@@ -15,14 +15,13 @@ LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphic
 		vcdinfo.2:${PORTSDIR}/multimedia/vcdimager
 RUN_DEPENDS=	${LOCALBASE}/share/mplayer/fonts:${PORTSDIR}/multimedia/mplayer-fonts
 
-OPTIONS=	DVDNAV       	"Enable libdvdnav support"   	off \
-		DVDPLAY      	"Enable libdvdplay support"    	off \
-		CDPARANOIA   	"Enable CDDA support"         	off \
-		OCFLAGS     	"Use optimized compiler flags"	off \
-		SDL          	"Enable SDL video output"     	off \
-		TERMCAP      	"Enable termcap key support"  	off \
-		WIN32        	"Enable win32 codec set"      	on
+OPTIONS_DEFINE=	DVDNAV DVDPLAY CDPARANOIA OPTIMIZED_CFLAGS SDL TERMCAP WIN32
+DVDNAV_DESC=	Enable libdvdnav support
+DVDPLAY_DESC=	Enable libdvdplay support
+TERMCAP_DESC=	Enable termcap key support
+WIN32_DESC=	Enable win32 codec set
 
+OPTIONS_DEFAULT=	WIN32
 ONLY_FOR_ARCHS=	i386
 
 USE_BZIP2=	yes
@@ -63,7 +62,7 @@ CFLAGS+=	-fomit-frame-pointer
 ##
 
 # cdda support
-.if defined(WITH_CDPARANOIA)
+.if ${PORT_OPTIONS:MCDPARANOIA}
 LIB_DEPENDS+=	cdda_paranoia.0:${PORTSDIR}/audio/cdparanoia
 
 CONFIGURE_ARGS+=	--enable-cdparanoia
@@ -71,7 +70,7 @@ CONFIGURE_ARGS+=	--enable-cdparanoia
 CONFIGURE_ARGS+=	--disable-cdparanoia
 .endif
 # dvd support
-.if defined(WITH_DVDNAV) || defined(WITH_DVDPLAY)
+.if ${PORT_OPTIONS:MDVDNAV} || ${PORT_OPTIONS:MDVDPLAY}
 LIB_DEPENDS+=	dvdread.4:${PORTSDIR}/multimedia/libdvdread
 
 CONFIGURE_ARGS+=	--enable-libdvdread
@@ -79,7 +78,7 @@ CONFIGURE_ARGS+=	--enable-libdvdread
 CONFIGURE_ARGS+=	--disable-libdvdread
 .endif
 # xine libdvdnav
-.if defined(WITH_DVDNAV)
+.if ${PORT_OPTIONS:MDVDNAV}
 LIB_DEPENDS+=	dvdnav.4:${PORTSDIR}/multimedia/libdvdnav
 
 CONFIGURE_ARGS+=	--enable-libdvdnav
@@ -87,7 +86,7 @@ CONFIGURE_ARGS+=	--enable-libdvdnav
 CONFIGURE_ARGS+=	--disable-libdvdnav
 .endif
 # ogle's libdvdplay
-.if defined(WITH_DVDPLAY)
+.if ${PORT_OPTIONS:MDVDPLAY}
 LIB_DEPENDS+=	dvdplay.0:${PORTSDIR}/multimedia/libdvdplay
 
 CONFIGURE_ARGS+=	--enable-libdvdplay
@@ -95,13 +94,13 @@ CONFIGURE_ARGS+=	--enable-libdvdplay
 CONFIGURE_ARGS+=	--disable-libdvdplay
 .endif
 # compilation optimizations
-.if defined(WITH_OCFLAGS)
+.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
 CFLAGS+=	-O3 -ffast-math
 .else
 MAKE_ARGS+=	OPTFLAGS="${CFLAGS}" SHCFLAGS="${CFLAGS} -PIC"
 .endif
 # sdl
-.if defined(WITH_SDL)
+.if ${PORT_OPTIONS:MSDL}
 USE_SDL=	image sdl
 CONFIGURE_ARGS+=	--enable-sdl --enable-sdl-image
 .else
@@ -109,13 +108,13 @@ CONFIGURE_ARGS+=	--disable-sdl --disable
 .endif
 # termcap key support
 # mplayerxp does not clean up after itself yet
-.if defined(WITH_TERMCAP)
+.if ${PORT_OPTIONS:MTERMCAP}
 CONFIGURE_ARGS+=	--enable-termcap
 .else
 CONFIGURE_ARGS+=	--disable-termcap
 .endif
 # win32 binary dll codecs
-.if !defined(WITHOUT_WIN32)
+.if ${PORT_OPTIONS:MWIN32}
 RUN_DEPENDS+=	${CODEC_DETECTION_FILE}:${CODEC_PORT}
 
 CODEC_PORT=	${PORTSDIR}/multimedia/win32-codecs

Modified: head/x11-wm/waimea-devel/Makefile
==============================================================================
--- head/x11-wm/waimea-devel/Makefile	Sun Oct  7 07:45:08 2012	(r305436)
+++ head/x11-wm/waimea-devel/Makefile	Sun Oct  7 07:46:04 2012	(r305437)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	Waimea
-# Date created:				03 Mar 2005
-# Whom:					Alexey Dokuchaev <danfe@FreeBSD.org>
-#
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	waimea
 PORTVERSION=	0.5.1
@@ -32,19 +28,18 @@ GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-OPTIONS=	PNG "Enable PNG support" On \
-		SVG "Enable SVG support" On \
-		THREAD "Enable threading support" Off
+OPTIONS_DEFINE=	PNG SVG THREADS
+OPTIONS_DEFAULT=	PNG SVG
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.if defined(WITH_PNG)
+.if ${PORT_OPTIONS:MPNG}
 LIB_DEPENDS+=	png15:${PORTSDIR}/graphics/png
 .else
 CONFIGURE_ARGS+=	--disable-png
 .endif
 
-.if defined(WITH_SVG)
+.if ${PORT_OPTIONS:MSVG}
 LIB_DEPENDS+=	svg-cairo.1:${PORTSDIR}/graphics/libsvg-cairo
 .else
 CONFIGURE_ARGS+=	--disable-svg
@@ -52,7 +47,7 @@ MAKE_ARGS=	CPPFLAGS="-I${LOCALBASE}/incl
 		LDFLAGS="-L${LOCALBASE}/lib"
 .endif
 
-.if defined(WITH_THREAD)
+.if ${PORT_OPTIONS:MTHREADS}
 CONFIGURE_ARGS+=	--enable-thread
 .endif
 
@@ -63,4 +58,4 @@ post-extract:
 	@${LN} -fs ${AUTOMAKE_DIR}/${f} ${WRKSRC}/config/${f}
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/x11-wm/waimea/Makefile
==============================================================================
--- head/x11-wm/waimea/Makefile	Sun Oct  7 07:45:08 2012	(r305436)
+++ head/x11-wm/waimea/Makefile	Sun Oct  7 07:46:04 2012	(r305437)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	waimea
-# Date created:				27 May 2002
-# Whom:					Alexey Dokuchaev <danfe@regency.nsu.ru>
-#
+# Created by: Alexey Dokuchaev <danfe@regency.nsu.ru>
 # $FreeBSD$
-#
 
 PORTNAME=	waimea
 PORTVERSION=	0.4.0
@@ -27,17 +23,19 @@ GNU_CONFIGURE=	yes
 
 MAN1=		waimea.1
 
-OPTIONS=	PIXMAP "Build with pixmap textures support" on \
-		DITHER "Enable ordered pseudocolor dithering" off
+OPTIONS_DEFINE= PIXMAP DITHER
+OPTIONS_DEFAULT=	PIXMAP
+PIXMAP_DESC=	Build with pixmap textures support
+DITHER_DESC=	=Enable ordered pseudocolor dithering
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
-.if !defined(WITHOUT_PIXMAP)
+.if ${PORT_OPTIONS:MPIXMAP}
 USE_EFL+=	imlib2
 .endif
 
-.if defined(WITH_DITHER)
+.if ${PORT_OPTIONS:MDITHER}
 CONFIGURE_ARGS+=	--enable-ordered-pseudo
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
_______________________________________________
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"