Bug 183892 - Allow multiple value in ${opt}_USE= FOO=bar,baz
Summary: Allow multiple value in ${opt}_USE= FOO=bar,baz
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: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-12 12:10 UTC by Mathieu Arnold
Modified: 2013-11-12 13:30 UTC (History)
0 users

See Also:


Attachments
use_mk_multiple.diff (803 bytes, patch)
2013-11-12 12:10 UTC, Mathieu Arnold
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Arnold freebsd_committer freebsd_triage 2013-11-12 12:10:00 UTC
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
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2013-11-12 12:21:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

-> portmgr.
Comment 2 baptiste.daroussin 2013-11-12 12:39:54 UTC
Approved, please commit.
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-11-12 13:23:22 UTC
Author: mat
Date: Tue Nov 12 13:23:14 2013
New Revision: 333568
URL: http://svnweb.freebsd.org/changeset/ports/333568

Log:
  Allow multiple value in ${opt}_USE= FOO=bar,baz.
  
  Which is nice in case you end up with something like :
  X11_USE=	xorg=x11 xorg=ice xorg=sm xorg=xext xorg=xineramaproto
  		xorg=xinerama xorg=xrandr xorg=xrender xorg=xtst
  
  now you can do :
  X11_USE=	xorg=x11,ice,sm,xext,xineramaproto,xinerama,xrandr,xrender,xtst
  
  PR:		ports/183892
  Approved by:	bapt

Modified:
  head/Mk/bsd.options.mk

Modified: head/Mk/bsd.options.mk
==============================================================================
--- head/Mk/bsd.options.mk	Tue Nov 12 13:09:18 2013	(r333567)
+++ head/Mk/bsd.options.mk	Tue Nov 12 13:23:14 2013	(r333568)
@@ -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 @@ PLIST_SUB:=	${PLIST_SUB} ${opt}="@commen
 .    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)
_______________________________________________
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"
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2013-11-12 13:23:28 UTC
State Changed
From-To: open->closed

Committed, thanks!