From 2247b08ebea1871cea1ec596b30be255cd659b91 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Fri, 1 Jan 2021 22:07:13 +0100 Subject: [PATCH] - added enabled_disabled macros --- macros.tld | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/macros.tld b/macros.tld index f042af1..18c687c 100644 --- a/macros.tld +++ b/macros.tld @@ -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 -- 2.46.0