ports/183892: Allow multiple value in ${opt}_USE= FOO=bar,baz
Mathieu Arnold
mat at FreeBSD.org
Tue Nov 12 12:10:01 UTC 2013
>Number: 183892
>Category: ports
>Synopsis: Allow multiple value in ${opt}_USE= FOO=bar,baz
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Nov 12 12:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Mathieu Arnold
>Release: FreeBSD 9.2-RELEASE i386
>Organization:
Absolight
>Environment:
System: FreeBSD aragorn.in.absolight.net 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC 2013 root at bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
>Description:
When you had :
.if !defined(WITHOUT_X11)
USE_XORG= x11 ice sm xext xineramaproto xinerama xrandr xrender xtst
.endif
you need to do now
X11_USE= xorg=x11 xorg=ice xorg=sm xorg=xext xorg=xineramaproto xorg=xinerama xorg=xrandr xorg=xrender xorg=xtst
which is ugly. With this patch you can do :
X11_USE= xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst
>How-To-Repeat:
>Fix:
--- use_mk_multiple.diff begins here ---
Index: Mk/bsd.options.mk
===================================================================
--- Mk/bsd.options.mk (revision 333559)
+++ Mk/bsd.options.mk (working copy)
@@ -95,6 +95,8 @@
#
# ${opt}_USE= FOO=bar When option is enabled, it will enable
# USE_FOO+= bar
+# If you need more than one option, you can do
+# FOO=bar,baz and you'll get USE_FOO=bar baz
#
# For each of CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CONFIGURE_ENV MAKE_ARGS MAKE_ENV
# ALL_TARGET INSTALL_TARGET USES DISTFILES PLIST_FILES PLIST_DIRS PLIST_DIRSTRY
@@ -383,7 +385,7 @@
. if defined(${opt}_USE)
. for option in ${${opt}_USE}
_u= ${option:C/=.*//g}
-USE_${_u:U}+= ${option:C/.*=//g}
+USE_${_u:U}+= ${option:C/.*=//g:C/,/ /g}
. endfor
. endif
. if defined(${opt}_CONFIGURE_ENABLE)
--- use_mk_multiple.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list