]> TLD Linux GIT Repositories - packages/rpm-tld-macros.git/commitdiff
- added enabled_disabled macros
authorMarcin Krol <hawk@tld-linux.org>
Fri, 1 Jan 2021 21:07:13 +0000 (22:07 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Fri, 1 Jan 2021 21:07:13 +0000 (22:07 +0100)
macros.tld

index f042af19ebc6ea779941516d558b5ea86ca2693f..18c687c0bef38eee13646a06f315637851a6bf0b 100644 (file)
@@ -429,6 +429,10 @@ LC_ALL=C.UTF-8 %{__meson} \
 %__true_false() %{expand:%%{?with_%{1}:true}%%{!?with_%{1}:false}}
 %__true_false_not() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:true}}
 
+# expands to enabled or disabled based on bcond; for use with meson or cmake
+%__enabled_disabled() %{expand:%%{?with_%{1}:enabled}%%{!?with_%{1}:disabled}}
+%__enabled_disabled_not() %{expand:%%{?with_%{1}:enabled}%%{!?with_%{1}:disabled}}
+
 # for use with cmake:
 # Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
 # BuildRequires: rpmbuild(macros) >= 1.742