[packages/rav1e] add static_libs bcond

atler atler at pld-linux.org
Tue Apr 21 12:12:26 CEST 2026


commit c7ea5a3342befdb0669a610eae2349741afdac44
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Apr 21 12:07:30 2026 +0200

    add static_libs bcond

 rav1e.spec | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/rav1e.spec b/rav1e.spec
index 4d1f78b..493def1 100644
--- a/rav1e.spec
+++ b/rav1e.spec
@@ -1,6 +1,7 @@
 #
 # Conditional build:
-%bcond_without	clib	# C library
+%bcond_without	clib		# C library
+%bcond_without	static_libs	# static libraries
 
 # no working cargo-c on x32 currently
 %ifarch x32
@@ -109,7 +110,9 @@ cargo -v build --release --frozen %{target_opt} %{features}
 %if %{with clib}
 cargo -v cbuild --release --frozen %{target_opt} \
 	--prefix %{_prefix} \
-	--libdir %{_libdir}
+	--libdir %{_libdir} \
+	--library-type cdylib \
+	%{?with_static_libs:--library-type staticlib}
 %endif
 
 %install
@@ -125,7 +128,9 @@ cargo -v cinstall --frozen --release %{target_opt} \
 	--prefix %{_prefix} \
 	--bindir %{_bindir} \
 	--includedir %{_includedir} \
-	--libdir %{_libdir}
+	--libdir %{_libdir} \
+	--library-type cdylib \
+	%{?with_static_libs:--library-type staticlib}
 %endif
 
 %{__rm} $RPM_BUILD_ROOT%{_prefix}/.crates*
@@ -154,7 +159,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/rav1e
 %{_pkgconfigdir}/rav1e.pc
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/librav1e.a
 %endif
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rav1e.git/commitdiff/6293c87953f9ca866c4c0a14aa86ca22d6fe2c87



More information about the pld-cvs-commit mailing list