svn commit: r377651 - head/Mk
Antoine Brodin
antoine at FreeBSD.org
Thu Jan 22 12:18:01 UTC 2015
Author: antoine
Date: Thu Jan 22 12:18:00 2015
New Revision: 377651
URL: https://svnweb.freebsd.org/changeset/ports/377651
QAT: https://qat.redports.org/buildarchive/r377651/
Log:
Add a ${opt}_USE_OFF option helper
PR: 195817
Differential Revision: https://reviews.freebsd.org/D1581
Reviewed by: bapt, mat, jbeich
With hat: portmgr
Modified:
head/Mk/bsd.options.mk
Modified: head/Mk/bsd.options.mk
==============================================================================
--- head/Mk/bsd.options.mk Thu Jan 22 12:01:05 2015 (r377650)
+++ head/Mk/bsd.options.mk Thu Jan 22 12:18:00 2015 (r377651)
@@ -99,6 +99,8 @@
# USE_FOO+= bar
# If you need more than one option, you can do
# FOO=bar,baz and you'll get USE_FOO=bar baz
+# ${opt}_USE_OFF= FOO=bar When option is disabled, it will enable
+# USE_FOO+= bar
#
# For each of:
# ALL_TARGET CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS CONFLICTS_BUILD
@@ -460,6 +462,12 @@ ${deptype}_DEPENDS+= ${${opt}_${deptype}
. endif
. endfor
. else
+. if defined(${opt}_USE_OFF)
+. for option in ${${opt}_USE_OFF}
+_u= ${option:C/=.*//g}
+USE_${_u:tu}+= ${option:C/.*=//g:C/,/ /g}
+. endfor
+. endif
. if defined(${opt}_CONFIGURE_ENABLE)
. for iopt in ${${opt}_CONFIGURE_ENABLE}
CONFIGURE_ARGS+= --disable-${iopt:C/=.*//}
More information about the svn-ports-head
mailing list