[packages/rpm-pld-macros] - added enabled_disabled and enabled_disabled_not for use with meson

hawk hawk at pld-linux.org
Fri Jan 1 22:13:12 CET 2021


commit 8bc275295f55336daa6b1acd39f82cab52194d0f
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Fri Jan 1 22:11:38 2021 +0100

    - added enabled_disabled and enabled_disabled_not for use with meson

 macros.pld | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/macros.pld b/macros.pld
index 69f4891..d4e908c 100644
--- a/macros.pld
+++ b/macros.pld
@@ -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}:disabled}%%{!?with_%{1}:enabled}}
+
 # for use with cmake:
 # Usage: cmake_on_off BCOND_NAME [OPTION_NAME]
 # BuildRequires: rpmbuild(macros) >= 1.742
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/8bc275295f55336daa6b1acd39f82cab52194d0f



More information about the pld-cvs-commit mailing list