summaryrefslogtreecommitdiff
path: root/Mk/bsd.options.mk
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2019-02-25 22:07:54 +0000
committerJan Beich <jbeich@FreeBSD.org>2019-02-25 22:07:54 +0000
commit0335c38a4b27892d8da53dbbdb70b1fffc6aba0b (patch)
tree2616b56081f1f233cbc8261e31e92505ef25daee /Mk/bsd.options.mk
parent- Update to 3.2.8-438-ga95f2cbfe (diff)
Add option helper for MESON_ARGS = -Dfoo=enabled
feature options define combo like auto/yes/no in a standand way. In other words, upstream projects of ports that use _MESON_YES are supposed to migrate to _MESON_ENABLED. https://mesonbuild.com/Build-options.html#features Reviewed by: tobik (implicit) Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D19127
Notes
Notes: svn path=/head/; revision=493901
Diffstat (limited to '')
-rw-r--r--Mk/bsd.options.mk19
1 files changed, 19 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index a2f0d31b402c..56eb4f026715 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -131,6 +131,13 @@
# Option enabled -D${content}=no
# Option disabled -D${content}=yes
#
+# ${opt}_MESON_ENABLED Will add to MESON_ARGS:
+# Option enabled -D${content}=enabled
+# Option disabled -D${content}=disabled
+# ${opt}_MESON_DISABLED Will add to MESON_ARGS:
+# Option enabled -D${content}=disabled
+# Option disabled -D${content}=enabled
+#
# ${opt}_IMPLIES When opt is enabled, options named in IMPLIES will
# get enabled too.
# ${opt}_PREVENTS When opt is enabled, if any options in PREVENTS are
@@ -503,6 +510,12 @@ MESON_ARGS+= ${${opt}_MESON_YES:C/.*/-D&=yes/}
. if defined(${opt}_MESON_NO)
MESON_ARGS+= ${${opt}_MESON_NO:C/.*/-D&=no/}
. endif
+. if defined(${opt}_MESON_ENABLED)
+MESON_ARGS+= ${${opt}_MESON_ENABLED:C/.*/-D&=enabled/}
+. endif
+. if defined(${opt}_MESON_DISABLED)
+MESON_ARGS+= ${${opt}_MESON_DISABLED:C/.*/-D&=disabled/}
+. endif
. for configure in CONFIGURE CMAKE MESON QMAKE
. if defined(${opt}_${configure}_ON)
${configure}_ARGS+= ${${opt}_${configure}_ON}
@@ -565,6 +578,12 @@ MESON_ARGS+= ${${opt}_MESON_YES:C/.*/-D&=no/}
. if defined(${opt}_MESON_NO)
MESON_ARGS+= ${${opt}_MESON_NO:C/.*/-D&=yes/}
. endif
+. if defined(${opt}_MESON_ENABLED)
+MESON_ARGS+= ${${opt}_MESON_ENABLED:C/.*/-D&=disabled/}
+. endif
+. if defined(${opt}_MESON_DISABLED)
+MESON_ARGS+= ${${opt}_MESON_DISABLED:C/.*/-D&=enabled/}
+. endif
. for configure in CONFIGURE CMAKE MESON QMAKE
. if defined(${opt}_${configure}_OFF)
${configure}_ARGS+= ${${opt}_${configure}_OFF}