commit 84b570588c73afc50e3f0b6cb6e7db30e7b6fbb3
Author: Adam Gołębiowski <[email protected]>
Date:   Sun Mar 24 12:43:57 2019 +0100

    - 1.742, cmake_on_off macros from libgit2.spec (other variant also seen in 
freerdp.spec)

 rpm-build-macros.spec | 2 +-
 rpm.macros            | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index 18293fa..4116ba2 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -1,4 +1,4 @@
-%define                rpm_macros_rev  1.741
+%define                rpm_macros_rev  1.742
 %define                find_lang_rev   1.40
 Summary:       PLD Linux RPM build macros
 Summary(pl.UTF-8):     Makra do budowania pakietów RPM dla Linuksa PLD
diff --git a/rpm.macros b/rpm.macros
index b97afe2..8a26e75 100644
--- a/rpm.macros
+++ b/rpm.macros
@@ -433,6 +433,11 @@ 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}}
 
+# for use with cmake:
+# Usage: cmake_with BCOND_NAME [OPTION_NAME]
+# BuildRequires: rpmbuild(macros) >= 1.742
+%cmake_on_off() 
-D%{?2}%{!?2:%{1}}:BOOL=%{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}}
+
 #-----------------------------------------------------------------
 
 # overload to insert debuginfo package
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/84b570588c73afc50e3f0b6cb6e7db30e7b6fbb3

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to