diff options
author | antoine <antoine@FreeBSD.org> | 2015-01-22 20:18:00 +0800 |
---|---|---|
committer | antoine <antoine@FreeBSD.org> | 2015-01-22 20:18:00 +0800 |
commit | dbc8c0fb64997d92cd442ccaf829050e24be6860 (patch) | |
tree | d99e951752a922f4cec56c5f460a7348a3a37e5b /Mk/bsd.options.mk | |
parent | d2997a419f537bab149a8e5a6664ab4eca2c7fb4 (diff) | |
download | freebsd-ports-gnome-dbc8c0fb64997d92cd442ccaf829050e24be6860.tar.gz freebsd-ports-gnome-dbc8c0fb64997d92cd442ccaf829050e24be6860.tar.zst freebsd-ports-gnome-dbc8c0fb64997d92cd442ccaf829050e24be6860.zip |
Add a ${opt}_USE_OFF option helper
PR: 195817
Differential Revision: https://reviews.freebsd.org/D1581
Reviewed by: bapt, mat, jbeich
With hat: portmgr
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r-- | Mk/bsd.options.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 949cf28a7cbf..1290d72c3bf2 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -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}_DEPENDS} . 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/=.*//} |