[packages/mimalloc] add static_libs bcond
atler
atler at pld-linux.org
Fri May 3 16:00:33 CEST 2024
commit da26cf7165afc408e5c2cb86512456dec4f52117
Author: Jan Palus <atler at pld-linux.org>
Date: Fri May 3 15:19:41 2024 +0200
add static_libs bcond
mimalloc.spec | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/mimalloc.spec b/mimalloc.spec
index 9c380be..15fa592 100644
--- a/mimalloc.spec
+++ b/mimalloc.spec
@@ -1,6 +1,9 @@
# TODO
# - drop dependency on libatomic from archs that don't require it
# https://github.com/microsoft/mimalloc/issues/634
+#
+# Conditional build:
+%bcond_without static_libs # static library
Summary: Compact general purpose allocator with excellent performance
Name: mimalloc
@@ -90,6 +93,7 @@ Static mimalloc library.
%build
%cmake -B build \
-DMI_BUILD_OBJECT:BOOL=OFF \
+ %{cmake_on_off static_libs MI_BUILD_STATIC} \
-DMI_INSTALL_TOPLEVEL:BOOL=ON
%{__make} -C build
@@ -120,6 +124,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/cmake/mimalloc
%{_pkgconfigdir}/mimalloc.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libmimalloc.a
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mimalloc.git/commitdiff/da26cf7165afc408e5c2cb86512456dec4f52117
More information about the pld-cvs-commit
mailing list