public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/dr_libs] f44: Use the cmake declarative buildsystem
Date: Wed, 11 Nov 2026 20:35:12 GMT	[thread overview]
Message-ID: <179442931291.1.639432438984374733.rpms-dr_libs-924296d6c6bf@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-11-11 20:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179442931291.1.639432438984374733.rpms-dr_libs-924296d6c6bf@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox