public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/SDL2_sound] f43: unbundle dr_flac and dr_mp3 and make it conditional
@ 2026-07-01 20:11 Dominik 'Rathann' Mierzejewski
  0 siblings, 0 replies; only message in thread
From: Dominik 'Rathann' Mierzejewski @ 2026-07-01 20:11 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/SDL2_sound
Branch : f43
Commit : 7400c0349b678c7d9b894582593079a7ec6d1e5d
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date   : 2026-06-23T23:14:56+02:00
Stats  : +29/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/SDL2_sound/c/7400c0349b678c7d9b894582593079a7ec6d1e5d?branch=f43

Log:
unbundle dr_flac and dr_mp3 and make it conditional

---
diff --git a/SDL2_sound-unbundle-dr_libs.patch b/SDL2_sound-unbundle-dr_libs.patch
new file mode 100644
index 0000000..95521ff
--- /dev/null
+++ b/SDL2_sound-unbundle-dr_libs.patch
@@ -0,0 +1,12 @@
+diff -up SDL_sound-2.0.6/CMakeLists.txt.orig SDL_sound-2.0.6/CMakeLists.txt
+--- SDL_sound-2.0.6/CMakeLists.txt.orig	2026-06-07 18:40:24.000000000 +0200
++++ SDL_sound-2.0.6/CMakeLists.txt	2026-06-23 22:28:08.320779870 +0200
+@@ -180,8 +180,6 @@ set(SDLSOUND_SRCS
+     src/SDL_sound_wav.c
+ )
+ set(SDLSOUND_HDRS
+-    src/dr_flac.h
+-    src/dr_mp3.h
+     src/SDL_sound.h
+     src/SDL_sound_internal.h
+     src/stb_vorbis.h

diff --git a/SDL2_sound.spec b/SDL2_sound.spec
index 988be06..a8f6b29 100644
--- a/SDL2_sound.spec
+++ b/SDL2_sound.spec
@@ -2,6 +2,8 @@
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
 %global date 20260117
 
+%bcond bundled_dr_libs 0
+
 Name:           SDL2_sound
 Version:        2.0.6
 Release:        1%{?dist}
@@ -17,6 +19,7 @@ Source0:        https://github.com/icculus/SDL_sound/archive/%{commit}/%{name}-%
 %else
 Source0:        https://github.com/icculus/SDL_sound/archive/v%{version}/%{name}-%{version}.tar.gz
 %endif
+Patch0:         %{name}-unbundle-dr_libs.patch
 BuildRequires:  cmake
 BuildRequires:  doxygen
 BuildRequires:  gcc-c++
@@ -30,8 +33,14 @@ Provides:       bundled(libmodplug) = 0.8.9.1
 # 2.x lacks both this routine and the SDL_IO_SEEK_CUR needed for its
 # implementation, SDL_SeekIO(x, 0, SDL_IO_SEEK_CUR). Instead, we fall back to
 # using the bundled dr_flac and dr_mp3 libraries.
+%if %{with bundled_dr_libs}
 Provides:       bundled(dr_flac) = 0.13.3
 Provides:       bundled(dr_mp3) = 0.7.3
+%else
+# Header-only libraries (thus the -static)
+BuildRequires:  dr_flac-static >= 0.13.3
+BuildRequires:  dr_mp3-static >= 0.7.3
+%endif
 # This has been forked; see "#ifdef __SDL_SOUND_INTERNAL__"
 Provides:       bundled(stb_vorbis) = 1.22
 # SDL_mixer fork, stripped further, see https://github.com/icculus/SDL_sound/tree/main/src/timidity/CHANGES
@@ -63,9 +72,14 @@ This package contains the headers and libraries for SDL_sound development.
 
 %prep
 %if 0%{?commit:1}
-%autosetup -n SDL_sound-%{commit} -p1
+%setup -q -n SDL_sound-%{commit}
 %else
-%autosetup -n SDL_sound-%{version} -p1
+%setup -q -n SDL_sound-%{version}
+%endif
+%if %{without bundled_dr_libs}
+%patch -P0 -p1 -b .orig
+# Unbundle dr_flac and dr_mp3, from dr_libs.
+rm src/dr_flac.h src/dr_mp3.h
 %endif
 
 %build
@@ -123,6 +137,7 @@ mv man3 %{buildroot}/%{_mandir}
 %changelog
 * Tue Jun 23 2026 Dominik Mierzejewski <dominik@greysector.net> - 2.0.6-1
 - update to 2.0.6
+- unbundle dr_flac and dr_mp3 and make it conditional
 
 * Thu Mar 05 2026 Dominik Mierzejewski <dominik@greysector.net> - 2.0.5^20260117git1be041b-1
 - update to 20260117 snapshot from stable-2.0 branch

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-01 20:11 [rpms/SDL2_sound] f43: unbundle dr_flac and dr_mp3 and make it conditional Dominik 'Rathann' Mierzejewski

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