svn commit: r320146 - in head: misc/gnome2-reference x11/xscreensaver-gnome

Baptiste Daroussin bapt at FreeBSD.org
Fri Jun 7 05:36:31 UTC 2013


Author: bapt
Date: Fri Jun  7 05:36:30 2013
New Revision: 320146
URL: http://svnweb.freebsd.org/changeset/ports/320146

Log:
  Convert to new options framework

Modified:
  head/misc/gnome2-reference/Makefile
  head/x11/xscreensaver-gnome/Makefile

Modified: head/misc/gnome2-reference/Makefile
==============================================================================
--- head/misc/gnome2-reference/Makefile	Fri Jun  7 05:33:07 2013	(r320145)
+++ head/misc/gnome2-reference/Makefile	Fri Jun  7 05:36:30 2013	(r320146)
@@ -54,17 +54,21 @@ REF_LIST=	accessibility/at-spi-reference
 
 NO_BUILD=	yes
 
+.MAKE.FreeBSD_UL= yes
+
 REF_LIST_INC=	${.CURDIR}/Makefile.inc
 .include "${REF_LIST_INC}"
 
-.include <bsd.port.pre.mk>
-
 .for ref in ${_PORT_REF_LIST:C/^([^:]+).*/\1/}
-OPTIONS+=	${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//:S/-/_/:U} "Install ${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//} programing reference " on
+OPTIONS_DEFINE+=	${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//:S/-/_/:U}
+OPTIONS_DEFAULT+=	${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//:S/-/_/:U}
+${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//:S/-/_/:U}_DESC=	Install ${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//} programing reference
 .endfor
 
+.include <bsd.port.options.mk>
+
 .for ref in ${_PORT_REF_LIST}
-.if !defined(WITHOUT_${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//:S/-/_/:U:C/^([^:]+).*/\1/})
+.if ${PORT_OPTIONS:M${ref:C|^[^/]+/([^/]+).*|\1|:S/-reference//:S/-/_/:U:C/^([^:]+).*/\1/}}
 RUN_DEPENDS+=	${ref:C|^[^:]+:([^:]+).*|\1|:C|^[^/]+/([^/]+).*|\1|}>0:${PORTSDIR}/${ref:C/^([^:]+).*/\1/}
 .endif
 .endfor
@@ -78,4 +82,4 @@ create-ref-list:
 	(cd ${PORTSDIR}/${port} && ${ECHO_CMD} "${port}:`${MAKE} -V PORTNAME` \\" >> ${REF_LIST_INC})
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/x11/xscreensaver-gnome/Makefile
==============================================================================
--- head/x11/xscreensaver-gnome/Makefile	Fri Jun  7 05:33:07 2013	(r320145)
+++ head/x11/xscreensaver-gnome/Makefile	Fri Jun  7 05:36:30 2013	(r320146)
@@ -1,10 +1,6 @@
-# New ports collection makefile for:	xscreensaver-gnome
-# Date created:				13th February 2002
-# Whom:					Ade Lovett <ade at FreeBSD.org>
-#
+# Created by: Ade Lovett <ade at FreeBSD.org>
 # $FreeBSD$
 #   $MCom: ports/x11/xscreensaver-gnome/Makefile,v 1.5 2007/08/15 18:29:16 mezz Exp $
-#
 
 PORTNAME?=	xscreensaver-gnome
 PORTVERSION=	5.12
@@ -38,10 +34,11 @@ CONFIGURE_ENV=	LIBS="-lintl"
 CPPFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 
-OPTIONS?=	PAM "Pluggable Authentication Module support" on \
-		KEYRING "Enable GnomeKeyring integration (needs PAM)" on \
-		ALL_FORTUNES "Enable support for all fortunes" off \
-		SETUID_HACKS "Install sonar hack suid so it can ping" off
+OPTIONS_DEFINE=	PAM KEYRING ALL_FORTUNES SETUID_HACKS
+OPTIONS_DEFAULT=	PAM KEYRING
+KEYRING_DESC=		GnomeKeyring integration (needs PAM)
+ALL_FORTUNES_DESC=	Support for all fortunes
+SETUID_HACKS_DESC=	Install sonar hack suid so it can ping
 
 SUB_FILES+=	xscreensaver.pam
 
@@ -88,11 +85,11 @@ MAN6?=	anemone.6 anemotaxis.6 antinspect
 
 .include <bsd.port.pre.mk>
 
-.if defined(WITH_ALL_FORTUNES)
+.if ${PORT_OPTIONS:MALL_FORTUNES}
 CONFIGURE_ARGS+=	--with-fortune="/usr/games/fortune -sa"
 .endif
 
-.if defined(WITH_PAM) || defined(WITH_KEYRING)
+.if ${PORT_OPTIONS:MPAM} || ${PORT_OPTIONS:MKEYRING}
 CONFIGURE_ARGS+=	--with-pam
 PLIST_SUB+=		PAM=""
 .else
@@ -100,14 +97,14 @@ CONFIGURE_ARGS+=	--without-pam
 PLIST_SUB+=		PAM="@comment "
 .endif
 
-.if defined(WITH_KEYRING)
+.if ${PORT_OPTIONS:MKEYRING}
 SUB_LIST+=		PAM_KEYRING=
 RUN_DEPENDS+=		${LOCALBASE}/lib/pam_gnome_keyring.so:${PORTSDIR}/security/gnome-keyring
 .else
 SUB_LIST+=		PAM_KEYRING=\#
 .endif
 
-.if defined(WITH_SETUID_HACKS)
+.if ${PORT_OPTIONS:MSETUID_HACKS}
 CONFIGURE_ARGS+=	--with-setuid-hacks
 .endif
 
@@ -121,7 +118,7 @@ post-patch:
 	    	s|malloc.h|stdlib.h|g ; \
 		s|/usr/X11R6|${LOCALBASE}|g' \
 		${WRKSRC}/configure
-.if defined(WITH_PAM)
+.if ${PORT_OPTIONS:MPAM}
 .for f in driver/passwd-pam.c driver/xscreensaver.man
 	@${REINPLACE_CMD} -e 's|/etc/pam.d|${PREFIX}/etc/pam.d|g' \
 	    	${WRKSRC}/${f}
@@ -136,7 +133,7 @@ pre-build:
 	@(cd ${WRKSRC}/hacks/glx && ./molecules.sh molecules.h ../images/molecules/*.pdb)
 
 pre-install:
-.if defined(WITH_PAM)
+.if ${PORT_OPTIONS:MPAM}
 	@${CP} ${WRKDIR}/xscreensaver.pam ${WRKSRC}/driver/xscreensaver.pam
 .endif
 


More information about the svn-ports-all mailing list