public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/dr_libs] f44: Use the cmake declarative buildsystem
@ 2026-11-11 20:35 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-11-11 20:35 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/dr_libs
Branch : f44
Commit : 924296d6c6bf41ac272fa42b74eea1ef550ce582
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-11-11T20:32:39+00:00
Stats  : +19/-23 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/dr_libs/c/924296d6c6bf41ac272fa42b74eea1ef550ce582?branch=f44

Log:
Use the cmake declarative buildsystem

---
diff --git a/dr_libs.spec b/dr_libs.spec
index 06d8e7c..456ecd6 100644
--- a/dr_libs.spec
+++ b/dr_libs.spec
@@ -1,6 +1,8 @@
 %global commit fa931f3285ced10ace628f7f1ac951e1951e7ea6
 %global snapdate 20260302
 
+%bcond ctest 1
+
 Name:           dr_libs
 # While the individual header-only libraries are versioned, the overall
 # collection is not, and there are no releases. These libraries follow the
@@ -22,12 +24,18 @@ License:        Unlicense OR MIT-0
 
 Source:        %{url}/archive/%{commit}/dr_libs-%{commit}.tar.gz
 
-BuildRequires:  cmake
+BuildSystem:    cmake
+BuildOption(conf): %{shrink:
+    -DDR_LIBS_BUILD_TESTS:BOOL=%{?with_ctest:ON}%{?!with_ctest:OFF}
+    }
+BuildOption(check): --exclude-regex "${skips}"
+
 BuildRequires:  gcc-c++
 
-# For tests:
+%if %{with ctest}
 BuildRequires:  pkgconfig(flac)
 BuildRequires:  libsndfile-devel
+%endif
 
 # No compiled binaries are installed, so this would be empty.
 %global debug_package %{nil}
@@ -105,9 +113,7 @@ BuildArch:      noarch
 Documentation for dr_libs.
 
 
-%prep
-%autosetup -n dr_libs-%{commit}
-
+%prep -a
 # Omit the "playback" tests. We cannot run these anyway, so we would have to
 # skip them, and by not even compiling them, we can avoid a BuildRequires on
 # miniaudio.
@@ -117,14 +123,6 @@ sed --regexp-extended --in-place \
 mkdir -p tests/testvectors/mp3/tests
 
 
-%conf
-%cmake -DDR_LIBS_BUILD_TESTS:BOOL=ON
-
-
-%build
-%cmake_build
-
-
 %install
 # There are no install targets in CMakeLists.txt, so %%cmake_install would do
 # nothing. We install manually instead:
@@ -132,16 +130,7 @@ install -D --preserve-timestamps --mode=0644 \
     --target='%{buildroot}%{_includedir}' dr_*.h
 
 
-%check
-skips='^($.'
-# Fails with “No output file specified.”
-skips="${skips}|wav_encoding"
-# These require files in tests/testvectors/mp3/tests/ that are not distributed:
-skips="${skips}|mp3_(basic|extract)"
-skips="${skips})$"
-
-%ctest --exclude-regex "${skips}"
-
+%check -p
 # As a sanity check, verify that all of the subpackage version numbers appear
 # in the corresponding headers.
 while read -r version header
@@ -154,6 +143,13 @@ done <<'EOF'
 %(printf '%s\n' '%{dr_wav_version}' | sed -r 's/[~^].*//') dr_wav.h
 EOF
 
+skips='^($.'
+# Fails with “No output file specified.”
+skips="${skips}|wav_encoding"
+# These require files in tests/testvectors/mp3/tests/ that are not distributed:
+skips="${skips}|mp3_(basic|extract)"
+skips="${skips})$"
+
 
 %files devel
 # Empty metapackage

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-11 20:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 20:35 [rpms/dr_libs] f44: Use the cmake declarative buildsystem Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox