X-Git-Url: https://git.tld-linux.org/?p=packages%2Frpm-tld-macros.git;a=blobdiff_plain;f=macros.tld;fp=macros.tld;h=7b3e1e33c1bde5b5bcd1fef505f4afd20ee041cf;hp=522578804c9f7ee7dabe99134476cfccfda37c3f;hb=bd795208f1ec3774879d8e60f46efe38dfac057a;hpb=f9a6a99d5d0496bd6d1a28a7067e78baa8f78482 diff --git a/macros.tld b/macros.tld index 5225788..7b3e1e3 100644 --- a/macros.tld +++ b/macros.tld @@ -629,6 +629,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