diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2013-10-04 19:38:13 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2013-10-04 19:38:13 +0800 |
commit | 2357f3186c0aafecb6177d60a28cd9888bf8fd2c (patch) | |
tree | 05338e991c361b579efa0efc68d71847a05c1289 /Mk/bsd.options.mk | |
parent | 2b559ac70703d41474af0a4b588f13aed7a97de8 (diff) | |
download | freebsd-ports-gnome-2357f3186c0aafecb6177d60a28cd9888bf8fd2c.tar.gz freebsd-ports-gnome-2357f3186c0aafecb6177d60a28cd9888bf8fd2c.tar.zst freebsd-ports-gnome-2357f3186c0aafecb6177d60a28cd9888bf8fd2c.zip |
- Add option helper opt_USE= FOO=bar -> USE_FOO=bar
Discussed with: bapt
With hat: portmgr
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r-- | Mk/bsd.options.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 28886a6edd8d..e52790f3a491 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -93,6 +93,9 @@ # ${opt}_CMAKE_OFF When option is disabled, it will add its content to # the CMAKE_ARGS. # +# ${opt}_USE= FOO=bar When option is enabled, it will enable +# USE_FOO+= bar +# # 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 # EXTRA_PATCHES PATCHFILES PATCH_SITES CATEGORIES, defining ${opt}_${variable} @@ -381,6 +384,12 @@ PLIST_SUB:= ${PLIST_SUB} ${opt}="@comment " . endif . if ${PORT_OPTIONS:M${opt}} +. if defined(${opt}_USE) +. for option in ${${opt}_USE} +_u= ${option:C/=.*//g} +USE_${_u:U}+= ${option:C/.*=//g} +. endfor +. endif . if defined(${opt}_CONFIGURE_ENABLE) CONFIGURE_ARGS+= --enable-${${opt}_CONFIGURE_ENABLE} . endif |