Date: Tue, 12 Nov 2013 13:09:25 +0100 (CET) From: Mathieu Arnold <mat@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/183892: Allow multiple value in ${opt}_USE= FOO=bar,baz Message-ID: <20131112120926.0A8DA14269C@aragorn.in.absolight.net> Resent-Message-ID: <201311121210.rACCA0wa011414@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131112120926.0A8DA14269C>