From 1db368af86e1f774875f89320c171305dcf1e85b811235132e87643737fbe9af Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 10 Jul 2022 10:19:35 +0000 Subject: [PATCH 1/2] - Update to release 2.6.0 OBS-URL: https://build.opensuse.org/package/show/games/SDL2_mixer?expand=0&rev=26 --- 0001-use-after-free-fluidsynth.patch | 30 ------------------ SDL2_mixer-2.0.4.tar.gz | 3 -- SDL2_mixer-2.6.0.tar.gz | 3 ++ SDL2_mixer.changes | 26 ++++++++++++++++ SDL2_mixer.spec | 46 +++++++++++++--------------- baselibs.conf | 6 ---- 6 files changed, 51 insertions(+), 63 deletions(-) delete mode 100644 0001-use-after-free-fluidsynth.patch delete mode 100644 SDL2_mixer-2.0.4.tar.gz create mode 100644 SDL2_mixer-2.6.0.tar.gz delete mode 100644 baselibs.conf diff --git a/0001-use-after-free-fluidsynth.patch b/0001-use-after-free-fluidsynth.patch deleted file mode 100644 index 566763d..0000000 --- a/0001-use-after-free-fluidsynth.patch +++ /dev/null @@ -1,30 +0,0 @@ -From adee41d0c5211142c3422c889dcda8ccf9aad34f Mon Sep 17 00:00:00 2001 -From: Sam Lantinga -Date: Wed, 20 Jan 2021 10:17:10 -0800 -Subject: [PATCH] Fixed use-after-free in music_fluidsynth.c - -Tom M. - -There is a dangerous use-after-free in FLUIDSYNTH_Delete(): the settings object is deleted **before** the synth. Since the settings have been created first to initialize the synth, you must first delete the synth and then delete the settings. This currently crashes all applications that use fluidsynth 2.1.6 and SDL2_mixer. - -Originally reported at https://github.com/FluidSynth/fluidsynth/issues/748 ---- - src/codecs/music_fluidsynth.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/codecs/music_fluidsynth.c b/src/codecs/music_fluidsynth.c -index 8667f0d9..a47247f4 100644 ---- a/music_fluidsynth.c 2018-10-31 15:59:00.000000000 +0100 -+++ b/music_fluidsynth.c 2021-01-20 18:29:11.610459000 +0100 -@@ -273,9 +273,10 @@ - static void FLUIDSYNTH_Delete(void *context) - { - FLUIDSYNTH_Music *music = (FLUIDSYNTH_Music *)context; -+ fluid_settings_t *settings = fluidsynth.fluid_synth_get_settings(music->synth); - fluidsynth.delete_fluid_player(music->player); -- fluidsynth.delete_fluid_settings(fluidsynth.fluid_synth_get_settings(music->synth)); - fluidsynth.delete_fluid_synth(music->synth); -+ fluidsynth.delete_fluid_settings(settings); - SDL_free(music); - } - diff --git a/SDL2_mixer-2.0.4.tar.gz b/SDL2_mixer-2.0.4.tar.gz deleted file mode 100644 index 8d2a38c..0000000 --- a/SDL2_mixer-2.0.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b4cf5a382c061cd75081cf246c2aa2f9df8db04bdda8dcdc6b6cca55bede2419 -size 11125077 diff --git a/SDL2_mixer-2.6.0.tar.gz b/SDL2_mixer-2.6.0.tar.gz new file mode 100644 index 0000000..c408a9a --- /dev/null +++ b/SDL2_mixer-2.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f94a4d3e878cb191c386a714be561838240012250fe17d496f4ff4341d59a391 +size 9929680 diff --git a/SDL2_mixer.changes b/SDL2_mixer.changes index 0bc087c..7490eb0 100644 --- a/SDL2_mixer.changes +++ b/SDL2_mixer.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Sat Jul 9 13:14:16 UTC 2022 - Jan Engelhardt + +- Update to release 2.6.0 + * Added Mix_MasterVolume() for additional volume control over all channels + * Update Mix_Init() return value to match documentation, including MIXER_INIT_* flags for already-initialized modules + Added Mix_HasMusicDecoder() + Memory leak fixes and F32 format support to fluidsynth player + Fixed distorted MIDI playback with FluidSynth if sample rate is out of library's limits + Added Mix_ModMusicJumpToOrder() for mod music formats + Enabled module internal loops in modplug player + Respect original mp3 file offset + * Fixes to ogg playback on big-endian devices + * Added functions to get metadata information and loop point information + (Mix_GetMusic*) + * Extended support for WAV files + * Allow rmid files be opened by native midi + * Prevent clipping due to volume settings in modplug music + * Added looping support for Opus, FLAC files + * Improved OGG looping support +- Switch from libmodplug to libxmp as backend for tracker files +- Rename -devel subpackage based on SRPM name +- Drop 0001-use-after-free-fluidsynth.patch (merged) +- Drop baselibs.conf (no SDL2_ttf-dependent Tumbleweed packages + themselves have baselibs). + ------------------------------------------------------------------- Thu Jan 21 17:14:18 UTC 2021 - Tom Mbrt diff --git a/SDL2_mixer.spec b/SDL2_mixer.spec index 4fa6b82..1ca5add 100644 --- a/SDL2_mixer.spec +++ b/SDL2_mixer.spec @@ -1,7 +1,7 @@ # # spec file for package SDL2_mixer # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,27 +18,22 @@ Name: SDL2_mixer %define lname libSDL2_mixer-2_0-0 -Version: 2.0.4 +Version: 2.6.0 Release: 0 Summary: SDL2 sound mixer library License: Zlib Group: Development/Libraries/C and C++ URL: http://libsdl.org/projects/SDL_mixer/ -#Hg-Clone: http://hg.libsdl.org/SDL_mixer/ -Source: http://libsdl.org/projects/SDL_mixer/release/%name-%version.tar.gz -Source1: baselibs.conf -Patch0: 0001-use-after-free-fluidsynth.patch +#Git-Clone: https://github.com/libsdl-org/SDL_mixer +Source: https://github.com/libsdl-org/SDL_mixer/releases/download/release-%version/SDL2_mixer-%version.tar.gz BuildRequires: dos2unix BuildRequires: pkg-config BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(fluidsynth) -BuildRequires: pkgconfig(libmikmod) -BuildRequires: pkgconfig(libmodplug) >= 0.8.8 -BuildRequires: pkgconfig(opusfile) -%if !(0%{?sle_version} == 120200 && 0%{?is_opensuse}) BuildRequires: pkgconfig(libmpg123) -%endif +BuildRequires: pkgconfig(libxmp) +BuildRequires: pkgconfig(opusfile) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(vorbis) Suggests: timidity @@ -58,13 +53,14 @@ A multichannel audio mixer. It supports four channels of 16-bit stereo audio, plus a single channel of music, mixed by the MikMod MOD, Timidity MIDI, and mpg123 MP3 libraries. -%package -n libSDL2_mixer-devel +%package devel Summary: Development files for the SDL2 sound mixer library Group: Development/Libraries/C and C++ Requires: %lname = %version -Provides: SDL2_mixer-devel = %version-%release +Obsoletes: libSDL2_mixer-devel < %version-%release +Provides: libSDL2_mixer-devel = %version-%release -%description -n libSDL2_mixer-devel +%description devel A multi-channel audio mixer. It supports 4 channels of 16-bit stereo audio, plus a single channel of music, mixed by the MikMod MOD, Timidity MIDI, and mpg123 MP3 libraries. @@ -75,19 +71,20 @@ dos2unix *.txt rm -rf external %build +# --disable-*-shared: Link, rather than dlopen +# %configure \ - --disable-music-mod-modplug-shared \ - --disable-music-mod-mikmod-shared \ + --disable-music-ogg-stb --enable-music-ogg-vorbis \ + --disable-music-flac-drflac --enable-music-flac-libflac \ + --disable-music-mp3-drmp3 --enable-music-mp3-mpg123 \ + --disable-music-mod-modplug --enable-music-mod-xmp \ + --disable-music-mod-xmp-shared \ --disable-music-midi-fluidsynth-shared \ --disable-music-ogg-shared \ --disable-music-flac-shared \ -%if 0%{?sle_version} == 120200 && 0%{?is_opensuse} --enable-music-mp3-mpg123-shared \ -%else - --disable-music-mp3-mpg123-shared \ -%endif --disable-static -make %{?_smp_mflags} +%make_build %install %make_install install-bin @@ -99,13 +96,14 @@ rm -f "%buildroot/%_bindir"/play* %postun -n %lname -p /sbin/ldconfig %files -n %lname -%license COPYING.txt +%license LICENSE.txt %doc CHANGES.txt README.txt %_libdir/libSDL2_mixer-2*.so.* -%files -n libSDL2_mixer-devel +%files devel %_includedir/SDL2/ %_libdir/libSDL2_mixer.so -%_libdir/pkgconfig/SDL2_mixer.pc +%_libdir/pkgconfig/*.pc +%_libdir/cmake/ %changelog diff --git a/baselibs.conf b/baselibs.conf deleted file mode 100644 index fc41079..0000000 --- a/baselibs.conf +++ /dev/null @@ -1,6 +0,0 @@ -libSDL2_mixer-2_0-0 - provides "SDL2_mixer- = " - obsoletes "SDL2_mixer- <= " -libSDL2_mixer-devel - requires -libSDL2_mixer- - requires "libSDL2_mixer-2_0-0- = " From fbfd0df26d67953c7942004dd347b26876436b0a7ca0cf28838d9d087d756da2 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 10 Jul 2022 11:42:45 +0000 Subject: [PATCH 2/2] changelog formatting OBS-URL: https://build.opensuse.org/package/show/games/SDL2_mixer?expand=0&rev=27 --- SDL2_mixer.changes | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/SDL2_mixer.changes b/SDL2_mixer.changes index 7490eb0..91c6d16 100644 --- a/SDL2_mixer.changes +++ b/SDL2_mixer.changes @@ -2,17 +2,18 @@ Sat Jul 9 13:14:16 UTC 2022 - Jan Engelhardt - Update to release 2.6.0 - * Added Mix_MasterVolume() for additional volume control over all channels - * Update Mix_Init() return value to match documentation, including MIXER_INIT_* flags for already-initialized modules - Added Mix_HasMusicDecoder() - Memory leak fixes and F32 format support to fluidsynth player - Fixed distorted MIDI playback with FluidSynth if sample rate is out of library's limits - Added Mix_ModMusicJumpToOrder() for mod music formats - Enabled module internal loops in modplug player - Respect original mp3 file offset + * Added Mix_MasterVolume() for additional volume control over + all channels + * Update Mix_Init() return value to match documentation, + including MIXER_INIT_* flags for already-initialized modules + * Added Mix_HasMusicDecoder() + * Memory leak fixes and F32 format support to fluidsynth player + * Fixed distorted MIDI playback with FluidSynth if sample rate + is out of library's limits + * Added Mix_ModMusicJumpToOrder() for mod music formats * Fixes to ogg playback on big-endian devices - * Added functions to get metadata information and loop point information - (Mix_GetMusic*) + * Added functions to get metadata information and loop point + information (Mix_GetMusic*) * Extended support for WAV files * Allow rmid files be opened by native midi * Prevent clipping due to volume settings in modplug music