From 1181748f1f43a7791f8dfde85afc32cf4c7bf0c73937ffc656bd675156834dd7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 21 Aug 2024 12:23:21 +0000 Subject: [PATCH 1/2] [info=171c0ae97a1f403138d89a38a468de6c1f8f8701c8930e747b1b2d23d0057696] OBS-URL: https://build.opensuse.org/package/show/games/SDL_mixer?expand=0&rev=36 --- .gitattributes | 23 +++ .gitignore | 1 + SDL_mixer-1.2.12.tar.gz | 3 + SDL_mixer.changes | 356 ++++++++++++++++++++++++++++++++++++++++ SDL_mixer.spec | 110 +++++++++++++ _scmsync.obsinfo | 4 + baselibs.conf | 6 + build.specials.obscpio | 3 + double-free-crash.patch | 33 ++++ mikmod1.patch | 68 ++++++++ mikmod2.patch | 36 ++++ 11 files changed, 643 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 SDL_mixer-1.2.12.tar.gz create mode 100644 SDL_mixer.changes create mode 100644 SDL_mixer.spec create mode 100644 _scmsync.obsinfo create mode 100644 baselibs.conf create mode 100644 build.specials.obscpio create mode 100644 double-free-crash.patch create mode 100644 mikmod1.patch create mode 100644 mikmod2.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/SDL_mixer-1.2.12.tar.gz b/SDL_mixer-1.2.12.tar.gz new file mode 100644 index 0000000..d64b315 --- /dev/null +++ b/SDL_mixer-1.2.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a +size 3707781 diff --git a/SDL_mixer.changes b/SDL_mixer.changes new file mode 100644 index 0000000..8fd55b0 --- /dev/null +++ b/SDL_mixer.changes @@ -0,0 +1,356 @@ +------------------------------------------------------------------- +Sat Aug 20 08:22:31 UTC 2022 - Jan Engelhardt + +- Specfile modernization +- Rename devel package to just %name-devel, which is what most + our packages do. + +------------------------------------------------------------------- +Tue Jan 6 12:27:02 UTC 2015 - jengelh@inai.de + +- Improve package summary and description. Drop --with-pic which + is enabled implicitly anyway, remove redundant Requires. +- Enable modplug support + +------------------------------------------------------------------- +Sat Nov 23 19:19:39 UTC 2013 - bwiedemann@suse.com + +- import patches from https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/sdl_mixer + to fix mixer / mikmod free corruption (bnc#851996) + Add double-free-crash.patch, mikmod1.patch and mikmod2.patch + +------------------------------------------------------------------- +Tue Aug 13 12:04:26 UTC 2013 - jengelh@inai.de + +- Some metadata spruce-up: add current URLs, softer wildcarding + in the files list + +------------------------------------------------------------------- +Sun Feb 24 09:35:38 UTC 2013 - mailaender@opensuse.org + +- Update to 1.2.12 + * SDL_mixer is now under the zlib license + * Fixed seek offset with SMPEG (was relative, should be absolute) + * Added Mix_LoadMUSType_RW() so you can tell SDL_mixer what type the music is + * Added /usr/local/share/timidity to the timidity data path + * Fixed timidity loading of some MIDI files + * Fixed dropping audio in the FLAC audio decoding + * Fixed memory leak in SDL_LoadMUS() + * Removed GPL native MIDI code for new licensing + * Fixed drums playing on MIDI channel 16 with timidity + * The music-finished hook can start a track immediately + * Added support for FluidSynth + * Added support for libmodplug (disabled by default) + +------------------------------------------------------------------- +Thu Jan 3 02:18:43 UTC 2013 - crrodriguez@opensuse.org + +- Do not use dlopened libraries _ever_. + +------------------------------------------------------------------- +Sat Sep 17 10:23:43 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + +------------------------------------------------------------------- +Mon Aug 1 09:37:56 UTC 2011 - jengelh@medozas.de + +- Update baselibs.conf to also ship libSDL_mixer-devel-32bit + +------------------------------------------------------------------- +Sat Jul 2 14:52:44 UTC 2011 - jengelh@medozas.de + +- Use %_smp_mflags for parallel building +- Strip %clean section (not needed on BS) + +------------------------------------------------------------------- +Sat Jul 24 20:34:26 UTC 2010 - reddwarf@opensuse.org + +- Add FLAC support +- Recommend the libraries that are dlopened + +------------------------------------------------------------------- +Tue Jan 12 09:16:01 UTC 2010 - coolo@novell.com + +- fix file list + +------------------------------------------------------------------- +Mon Dec 21 14:28:09 UTC 2009 - prusnak@suse.cz + +- updated to 1.2.11 + * Fixed initialization error and crashes if MikMod library isn't available + * Fixed bug loading multiple music files + * Added Mix_Init()/Mix_Quit() to prevent constantly loading and unloading DLLs + * Check for fork/vfork on any platform, don't just assume it on UNIX + * Fixed export of Mix_GetNumChunkDecoders() and Mix_GetNumMusicDecoders() + * Reset channel volumes after a fade out interrupts a fade in. + * Fixed crash race condition with position audio functions + * Fixed stereo panning in 8-bit mode + * Added /usr/share/timidity to the default timidity.cfg locations + * MOD support uses libmikmod and is dynamically loaded by default + * Added TIMIDITY_CFG environment variable to fully locate timidity.cfg + * Implemented seamless looping for music playback + * ID3 files are now recognized as MP3 format + * Added decoder enumeration API: + Mix_GetNumChunkDecoders(), Mix_GetChunkDecoder(), + Mix_GetNumMusicDecoders(), Mix_GetMusicDecoder() + * Added support for FLAC audio both as chunks and streaming + * Added support for streaming WAV files with Mix_LoadMUS_RW() + * Fixed crash caused by not resetting position_channels +- drop no longer needed 64bit-fix.patch and timidity_cfg.patch + +------------------------------------------------------------------- +Sat Dec 19 19:21:38 CET 2009 - jengelh@medozas.de + +- add baselibs.conf as a source + +------------------------------------------------------------------- +Wed Oct 7 14:52:31 CEST 2009 - prusnak@suse.cz + +- fix provides and obsoletes [bnc#544957] + +------------------------------------------------------------------- +Fri May 29 17:38:08 CEST 2009 - prusnak@suse.cz + +- removed VisualC.zip, Watcom-OS2.zip, Xcode.tar.gz from upstream + tarball [bnc#508180] + +------------------------------------------------------------------- +Wed May 20 16:12:36 CEST 2009 - prusnak@suse.cz + +- follow Shared Library Policy + +------------------------------------------------------------------- +Wed Dec 10 12:34:56 CET 2008 - olh@suse.de + +- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade + (bnc#437293) + +------------------------------------------------------------------- +Thu Oct 30 12:34:56 CET 2008 - olh@suse.de + +- obsolete old -XXbit packages (bnc#437293) + +------------------------------------------------------------------- +Sun Jul 6 00:40:19 CEST 2008 - crrodriguez@suse.de + +- remove unusable static libraries +- cleanup BuildRequires and -devel package dependencies + +------------------------------------------------------------------- +Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de + +- added baselibs.conf file to build xxbit packages + for multilib support + +------------------------------------------------------------------- +Sun Dec 16 21:40:34 CET 2007 - sndirsch@suse.de + +- fixed BuildRequires for SUSE < 10.2 + +------------------------------------------------------------------- +Wed Jul 25 18:24:14 CEST 2007 - prusnak@suse.cz + +- updated to 1.2.8 + * improved detection of Ogg Vorbis and Tremor libraries + * fixed memory leaks in Effects API + * added support for MP3 playback with libmad (for GPL projects only!) + * fixed the final loop of audio samples of a certain size + * added support for Ogg Vorbis playback with Tremor (an integer decoder) + * fixed memory corruption in timidity resampling code + * fixed building SDL_mixer with SDL 1.3 pre-release + * fixed compiling both timidity and native midi in the same build + * added volume control to playmus + * fixed linking with system libmikmod + * corrected no-op conditions in SetDistance(), SetPanning() and SetPosition() + * fixed copy/paste errors in channel amplitudes +- dropped obsoleted patch: + * timidity-crash.patch (included in update) + * warn.patch (included in update) + * libmikmod.patch (included in update) + +------------------------------------------------------------------- +Sun Jul 22 18:59:22 CEST 2007 - aj@suse.de + +- Cleanup BuildRequires. + +------------------------------------------------------------------- +Sun Apr 15 00:33:38 CEST 2007 - dmueller@suse.de + +- fix requires of devel package again + +------------------------------------------------------------------- +Wed Apr 11 16:18:16 CEST 2007 - sbrabec@suse.cz + +- Require just created libmikmod-devel instead of libmikmod. + +------------------------------------------------------------------- +Fri Mar 2 12:39:04 CET 2007 - prusnak@suse.cz + +- cleaned spec file + +------------------------------------------------------------------- +Thu Jan 18 17:38:07 CET 2007 - prusnak@suse.cz + +- fixed crash in timidity (timidity-crash.patch) [#235376] + +------------------------------------------------------------------- +Thu Sep 14 14:52:41 CEST 2006 - nadvornik@suse.cz + +- updated to 1.2.7: + * Added support for dynamically loading Ogg Vorbis library + * Search timidity.cfg also in /etc + * Fix memory leaks in timidity player + * Always build SDL_RWops music support +- fixed Requires of devel subpackage + +------------------------------------------------------------------- +Fri Mar 10 14:29:44 CET 2006 - bk@suse.de + +- SDL_mixer-devel: add libstdc++ and gcc to Requires (libSDL_mixer.la) +- SDL_mixer-devel: add gpm and libmikmod to Requires (libSDL_mixer.la) +- SDL_mixer-devel: remove libogg-devel from Requires (already by libvorbis-devel) + +------------------------------------------------------------------- +Tue Jan 31 06:46:15 CET 2006 - aj@suse.de + +- Add libogg-devel libvorbis-devel to BuildRequires. + +------------------------------------------------------------------- +Wed Jan 25 21:33:57 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Jul 27 20:21:42 CEST 2005 - nadvornik@suse.cz + +- added libmikmod to nfb [#98983] + +------------------------------------------------------------------- +Thu Jul 21 16:46:20 CEST 2005 - nadvornik@suse.cz + +- update to 1.2.6 +- added devel subpackage + +------------------------------------------------------------------- +Mon Mar 28 15:10:10 CEST 2005 - schwab@suse.de + +- Fix namespace pollution. + +------------------------------------------------------------------- +Fri Jan 28 15:52:17 CET 2005 - ro@suse.de + +- make it possible to build without smpeg + +------------------------------------------------------------------- +Sat Jan 10 17:03:14 CET 2004 - adrian@suse.de + +- add %run_ldconfig + +------------------------------------------------------------------- +Fri Aug 8 15:42:34 CEST 2003 - bk@suse.de + +- update to 1.2.5(numerious fixes, eg for mp3 playback, midi crash) + +------------------------------------------------------------------- +Mon Dec 16 17:46:03 CET 2002 - ro@suse.de + +- fix build with automake, use "AUTOMAKE_OPTIONS = foreign" + +------------------------------------------------------------------- +Tue Aug 20 17:19:15 CEST 2002 - tiwai@suse.de + +- fixed the detection of 64bit architectures [bug #18106] + +------------------------------------------------------------------- +Mon Jul 22 14:57:25 CEST 2002 - bk@suse.de + +- don't use %configure, it uses broken target_platform syntax + +------------------------------------------------------------------- +Tue Jul 16 14:51:37 CEST 2002 - bk@suse.de + +- update to 1.2.4 + +------------------------------------------------------------------- +Thu Jul 11 14:15:31 CEST 2002 - meissner@suse.de + +- rerun auto* so we get shared libraries too. + +------------------------------------------------------------------- +Tue Jan 22 18:23:53 CET 2002 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Thu Oct 18 14:05:32 CEST 2001 - tiwai@suse.de + +- added suse_update_config to build shared libraries. +- added libogg/libvorbis and devel packages to neededforbuild. + +------------------------------------------------------------------- +Thu Aug 16 14:31:54 CEST 2001 - nadvornik@suse.cz + +- added smpeg-devel to neededforbuild + +------------------------------------------------------------------- +Wed Aug 8 17:43:57 CEST 2001 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Wed Aug 8 16:55:46 CEST 2001 - ro@suse.de + +- changed neededforbuild to +- changed neededforbuild to + +------------------------------------------------------------------- +Fri Jun 22 01:59:20 CEST 2001 - ro@suse.de + +- added kdelibs for artsd + +------------------------------------------------------------------- +Thu Apr 12 16:50:28 CEST 2001 - nadvornik@suse.cz + +- update to 1.2.0 + +------------------------------------------------------------------- +Mon Mar 26 12:05:39 CEST 2001 - ro@suse.de + +- changed neededforbuild to + +------------------------------------------------------------------- +Fri Mar 9 01:45:10 CET 2001 - ro@suse.de + +- added xf86 + +------------------------------------------------------------------- +Mon Mar 5 06:19:42 CET 2001 - bk@suse.de + +- rename sdlmixer -> SDL_mixer +- Update to 1.1.0 and added smpeg to neededforbuild for MP3 music support +- fix copyright (LGPL) and group (Applications/Sound -> System/Libraries) +- removed libmikmo from neededforbuild, SDL_mixer uses internal libmikmod + (and timidity) libs + +------------------------------------------------------------------- +Mon Feb 19 17:36:52 CET 2001 - uli@suse.de + +- added alsa* to neededforbuild (needed by new SDL) +- added esound-devel to neededforbuild + +------------------------------------------------------------------- +Mon Nov 6 00:35:48 CET 2000 - ro@suse.de + +- fixed neededforbuild + +------------------------------------------------------------------- +Mon Oct 16 10:17:02 CEST 2000 - nadvornik@suse.cz + +- fixed to compile with correct CFLAGS + +------------------------------------------------------------------- +Thu May 25 16:58:30 CEST 2000 - freitag@suse.de + +- new version v. 1.0.5 + diff --git a/SDL_mixer.spec b/SDL_mixer.spec new file mode 100644 index 0000000..b5c4d14 --- /dev/null +++ b/SDL_mixer.spec @@ -0,0 +1,110 @@ +# +# spec file for package SDL_mixer +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: SDL_mixer +%define lname libSDL_mixer-1_2-0 +Version: 1.2.12 +Release: 0 +Summary: SDL sound mixer library +License: Zlib +Group: Development/Libraries/C and C++ +URL: http://libsdl.org/projects/SDL_mixer/release-1.2.html + +Source: http://libsdl.org/projects/SDL_mixer/release/%name-%version.tar.gz +Source1: baselibs.conf +Patch1: mikmod1.patch +Patch2: mikmod2.patch +Patch3: double-free-crash.patch +BuildRequires: pkg-config +BuildRequires: pkgconfig(flac) +BuildRequires: pkgconfig(fluidsynth) +BuildRequires: pkgconfig(libmikmod) +BuildRequires: pkgconfig(libmodplug) >= 0.8.7 +BuildRequires: pkgconfig(sdl) +BuildRequires: pkgconfig(vorbis) + +%description +A multichannel audio mixer. It supports four channels of 16-bit stereo +audio, plus a single channel of music, mixed by the popular MikMod MOD, +Timidity MIDI, and SMPEG MP3 libraries. + +%package -n %lname +Summary: Simple DirectMedia Layer – Sound mixer library +Group: System/Libraries +Provides: SDL_mixer = %version +Obsoletes: SDL_mixer < %version +# bug437293 +%ifarch ppc64 +Obsoletes: SDL_mixer-64bit +%endif + +%description -n %lname +A multichannel audio mixer. It supports four channels of 16-bit stereo +audio, plus a single channel of music, mixed by the popular MikMod MOD, +Timidity MIDI, and SMPEG MP3 libraries. + +%package devel +Summary: Development files for the SDL sound mixer library +Group: Development/Libraries/C and C++ +Requires: %lname = %version-%release +Obsoletes: libSDL_mixer-devel < %version-%release +Provides: libSDL_mixer-devel = %version-%release +# bug437293 +%ifarch ppc64 +Obsoletes: SDL_mixer-devel-64bit +%endif + +%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 popular MikMod MOD, +Timidity MIDI, and SMPEG MP3 libraries. + +%prep +%autosetup -p1 +# remove unneccessary files from upstream tarball [bnc#508180] to clean up source RPM +rm libmikmod-3.1.12.zip +rm Watcom-OS2.zip +rm -rf VisualC +rm -rf Xcode +rm -rf Xcode-iOS + +%build +%configure --disable-music-mod-shared --disable-music-ogg-shared \ + --disable-music-flac-shared --enable-music-mod-modplug \ + --disable-static +%make_build + +%install +%make_install install-bin +rm -f "%buildroot/%_libdir"/*.la + +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + +%files -n %lname +%license COPYING +%_libdir/libSDL_mixer-1*.so.* + +%files devel +%doc README CHANGES +%_bindir/play* +%_includedir/SDL/ +%_libdir/libSDL_mixer.so +%_libdir/pkgconfig/SDL_mixer.pc + +%changelog diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..76e777e --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1703527529 +commit: 171c0ae97a1f403138d89a38a468de6c1f8f8701c8930e747b1b2d23d0057696 +url: https://src.opensuse.org/jengelh/SDL_mixer +revision: master diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..5d99eb8 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,6 @@ +libSDL_mixer-1_2-0 + provides "SDL_mixer- = " + obsoletes "SDL_mixer- <= " +SDL_mixer-devel + requires -SDL_mixer- + requires "libSDL_mixer-1_2-0- = " diff --git a/build.specials.obscpio b/build.specials.obscpio new file mode 100644 index 0000000..a93ee27 --- /dev/null +++ b/build.specials.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8e03b25956fc342d68465a5f92712592159c8c333d36f13e3371af0af667cb3 +size 256 diff --git a/double-free-crash.patch b/double-free-crash.patch new file mode 100644 index 0000000..9816273 --- /dev/null +++ b/double-free-crash.patch @@ -0,0 +1,33 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1329087437 18000 +# Node ID 2d713670db9b832b0c5aa700824900bc1fc3c3cd +# Parent df72f22b4b411ad4b08f924329678aabd5ac97d6 +# http://hg.libsdl.org/SDL_mixer/rev/2d713670db9b +Fixed 1418 - crash on double free if loading WAV file failed + +diff -r df72f22b4b41 -r 2d713670db9b mixer.c +--- a/mixer.c Mon Jan 30 21:41:45 2012 -0500 ++++ b/mixer.c Sun Feb 12 17:57:17 2012 -0500 +@@ -610,13 +610,15 @@ + break; + default: + SDL_SetError("Unrecognized sound file type"); +- return(0); ++ if ( freesrc ) { ++ SDL_RWclose(src); ++ } ++ loaded = NULL; ++ break; + } + if ( !loaded ) { ++ /* The individual loaders have closed src if needed */ + SDL_free(chunk); +- if ( freesrc ) { +- SDL_RWclose(src); +- } + return(NULL); + } + + diff --git a/mikmod1.patch b/mikmod1.patch new file mode 100644 index 0000000..f7c2c25 --- /dev/null +++ b/mikmod1.patch @@ -0,0 +1,68 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1342998807 25200 +# Node ID 56cad6484b04f83c8d42428c755a046678506436 +# Parent c92001a2c18f628698c58aa4e05a7335d10d0e9e +# http://hg.libsdl.org/SDL_mixer/rev/56cad6484b04 +Paul P Komkoff Jr fixed malloc/free mismatch in the MikMod driver + +diff -r c92001a2c18f -r 56cad6484b04 CHANGES +--- a/CHANGES Sun Mar 04 21:32:47 2012 +0000 ++++ b/CHANGES Sun Jul 22 16:13:27 2012 -0700 +@@ -1,3 +1,7 @@ ++1.2.13: ++Paul P Komkoff Jr - Sun Jul 22 16:12:28 PDT 2012 ++ * Fixed malloc/free mismatch in the MikMod driver ++ + 1.2.12: + Sam Lantinga - Sat Jan 14 22:00:29 2012 -0500 + * Fixed seek offset with SMPEG (was relative, should be absolute) +diff -r c92001a2c18f -r 56cad6484b04 dynamic_mod.c +--- a/dynamic_mod.c Sun Mar 04 21:32:47 2012 +0000 ++++ b/dynamic_mod.c Sun Jul 22 16:13:27 2012 -0700 +@@ -93,6 +93,13 @@ + SDL_UnloadObject(mikmod.handle); + return -1; + } ++ mikmod.MikMod_free = ++ (void (*)(void*)) ++ SDL_LoadFunction(mikmod.handle, "MikMod_free"); ++ if ( mikmod.MikMod_free == NULL ) { ++ SDL_UnloadObject(mikmod.handle); ++ return -1; ++ } + mikmod.Player_Active = + (BOOL (*)(void)) + SDL_LoadFunction(mikmod.handle, "Player_Active"); +diff -r c92001a2c18f -r 56cad6484b04 dynamic_mod.h +--- a/dynamic_mod.h Sun Mar 04 21:32:47 2012 +0000 ++++ b/dynamic_mod.h Sun Jul 22 16:13:27 2012 -0700 +@@ -35,6 +35,7 @@ + void (*MikMod_RegisterDriver)(struct MDRIVER*); + int* MikMod_errno; + char* (*MikMod_strerror)(int); ++ void (*MikMod_free)(void*); + BOOL (*Player_Active)(void); + void (*Player_Free)(MODULE*); + MODULE* (*Player_LoadGeneric)(MREADER*,int,BOOL); +diff -r c92001a2c18f -r 56cad6484b04 music_mod.c +--- a/music_mod.c Sun Mar 04 21:32:47 2012 +0000 ++++ b/music_mod.c Sun Jul 22 16:13:27 2012 -0700 +@@ -109,13 +109,13 @@ + + list = mikmod.MikMod_InfoDriver(); + if ( list ) +- free(list); ++ mikmod.MikMod_free(list); + else + mikmod.MikMod_RegisterDriver(mikmod.drv_nos); + + list = mikmod.MikMod_InfoLoader(); + if ( list ) +- free(list); ++ mikmod.MikMod_free(list); + else + mikmod.MikMod_RegisterAllLoaders(); + + diff --git a/mikmod2.patch b/mikmod2.patch new file mode 100644 index 0000000..fed8998 --- /dev/null +++ b/mikmod2.patch @@ -0,0 +1,36 @@ + +# HG changeset patch +# User Sam Lantinga +# Date 1343000017 25200 +# Node ID 2ebb0d016f277f7f643d8a66ed0e1099e10d1fba +# Parent 56cad6484b04f83c8d42428c755a046678506436 +# http://hg.libsdl.org/SDL_mixer/rev/2ebb0d016f27 +Fixed normal linking with libmikmod and linking with earlier versions of libmikmod. + +diff -r 56cad6484b04 -r 2ebb0d016f27 dynamic_mod.c +--- a/dynamic_mod.c Sun Jul 22 16:13:27 2012 -0700 ++++ b/dynamic_mod.c Sun Jul 22 16:33:37 2012 -0700 +@@ -97,8 +97,8 @@ + (void (*)(void*)) + SDL_LoadFunction(mikmod.handle, "MikMod_free"); + if ( mikmod.MikMod_free == NULL ) { +- SDL_UnloadObject(mikmod.handle); +- return -1; ++ /* libmikmod 3.1 and earlier doesn't have it */ ++ mikmod.MikMod_free = free; + } + mikmod.Player_Active = + (BOOL (*)(void)) +@@ -246,6 +246,11 @@ + mikmod.MikMod_RegisterDriver = MikMod_RegisterDriver; + mikmod.MikMod_errno = &MikMod_errno; + mikmod.MikMod_strerror = MikMod_strerror; ++#if LIBMIKMOD_VERSION < ((3<<16)|(2<<8)) ++ mikmod.MikMod_free = free; ++#else ++ mikmod.MikMod_free = MikMod_free; ++#endif + mikmod.Player_Active = Player_Active; + mikmod.Player_Free = Player_Free; + mikmod.Player_LoadGeneric = Player_LoadGeneric; + From f475317251cd93a6b86b77444b7dad3dc0e90c96e766e3e19d39173030dd32d5 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 21 Aug 2024 12:24:56 +0000 Subject: [PATCH 2/2] [info=2db7fb2b46e898dbddeaaf237e891014c153a4d41d9f5250d4df15e46fe813c8] OBS-URL: https://build.opensuse.org/package/show/games/SDL_mixer?expand=0&rev=37 --- SDL_mixer.changes | 5 ++++ SDL_mixer.spec | 6 ++-- _scmsync.obsinfo | 4 +-- build.specials.obscpio | 2 +- gcc14.patch | 67 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 gcc14.patch diff --git a/SDL_mixer.changes b/SDL_mixer.changes index 8fd55b0..fa5e749 100644 --- a/SDL_mixer.changes +++ b/SDL_mixer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 21 12:28:36 UTC 2024 - Jan Engelhardt + +- Add gcc14.patch + ------------------------------------------------------------------- Sat Aug 20 08:22:31 UTC 2022 - Jan Engelhardt diff --git a/SDL_mixer.spec b/SDL_mixer.spec index b5c4d14..e2e2b01 100644 --- a/SDL_mixer.spec +++ b/SDL_mixer.spec @@ -1,7 +1,7 @@ # # spec file for package SDL_mixer # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Source1: baselibs.conf Patch1: mikmod1.patch Patch2: mikmod2.patch Patch3: double-free-crash.patch +Patch4: gcc14.patch BuildRequires: pkg-config BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(fluidsynth) @@ -93,8 +94,7 @@ rm -rf Xcode-iOS %make_install install-bin rm -f "%buildroot/%_libdir"/*.la -%post -n %lname -p /sbin/ldconfig -%postun -n %lname -p /sbin/ldconfig +%ldconfig_scriptlets -n %lname %files -n %lname %license COPYING diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo index 76e777e..a0a19d6 100644 --- a/_scmsync.obsinfo +++ b/_scmsync.obsinfo @@ -1,4 +1,4 @@ -mtime: 1703527529 -commit: 171c0ae97a1f403138d89a38a468de6c1f8f8701c8930e747b1b2d23d0057696 +mtime: 1724243364 +commit: 2db7fb2b46e898dbddeaaf237e891014c153a4d41d9f5250d4df15e46fe813c8 url: https://src.opensuse.org/jengelh/SDL_mixer revision: master diff --git a/build.specials.obscpio b/build.specials.obscpio index a93ee27..2da3ccc 100644 --- a/build.specials.obscpio +++ b/build.specials.obscpio @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8e03b25956fc342d68465a5f92712592159c8c333d36f13e3371af0af667cb3 +oid sha256:130bb418638469958411dd994adc0b73a5ccd0a961886dfac52ce4d5aa150828 size 256 diff --git a/gcc14.patch b/gcc14.patch new file mode 100644 index 0000000..0c57d0d --- /dev/null +++ b/gcc14.patch @@ -0,0 +1,67 @@ +From: Jan Engelhardt +Date: 2024-08-21 14:26:45.530572801 +0200 + +dynamic_ogg.c: In function ‘Mix_InitOgg’: +dynamic_ogg.c:111:42: error: assignment to ‘int (*)(void *, OggVorbis_File *, char *, long int, ov_callbacks)’ from incompatible pointer type ‘int (*)(void *, OggVorbis_File *, const char *, long int, ov_callbacks)’ [-Wincompatible-pointer-types] + 111 | vorbis.ov_open_callbacks = ov_open_callbacks; +dynamic_mod.c: In function ‘Mix_InitMOD’: +dynamic_mod.c:244:36: error: assignment to ‘BOOL (*)(CHAR *)’ {aka ‘int (*)(char *)’} from incompatible pointer type ‘int (*)(const CHAR *)’ {aka ‘int (*)(const char *)’} [-Wincompatible-pointer-types] + 244 | mikmod.MikMod_Init = MikMod_Init; +dynamic_mod.c:248:40: error: assignment to ‘char * (*)(int)’ from incompatible pointer type ‘const char * (*)(int)’ [-Wincompatible-pointer-types] + 248 | mikmod.MikMod_strerror = MikMod_strerror; +mixer.c: In function ‘Mix_Init’: +mixer.c:153:60: error: implicit declaration of function ‘Mix_InitFluidSynth’ [-Wimplicit-function-declaration] + 153 | if ((initialized & MIX_INIT_FLUIDSYNTH) || Mix_InitFluidSynth() == 0) { +mixer.c: In function ‘Mix_Quit’: +mixer.c:205:17: error: implicit declaration of function ‘Mix_QuitFluidSynth’ [-Wimplicit-function-declaration] + 205 | Mix_QuitFluidSynth(); + +--- + dynamic_mod.h | 4 ++-- + dynamic_ogg.h | 2 +- + mixer.c | 1 + + 3 files changed, 4 insertions(+), 3 deletions(-) + +Index: SDL_mixer-1.2.12/dynamic_mod.h +=================================================================== +--- SDL_mixer-1.2.12.orig/dynamic_mod.h ++++ SDL_mixer-1.2.12/dynamic_mod.h +@@ -30,11 +30,11 @@ typedef struct { + void (*MikMod_Exit)(void); + CHAR* (*MikMod_InfoDriver)(void); + CHAR* (*MikMod_InfoLoader)(void); +- BOOL (*MikMod_Init)(CHAR*); ++ int (*MikMod_Init)(const char *); + void (*MikMod_RegisterAllLoaders)(void); + void (*MikMod_RegisterDriver)(struct MDRIVER*); + int* MikMod_errno; +- char* (*MikMod_strerror)(int); ++ const char *(*MikMod_strerror)(int); + void (*MikMod_free)(void*); + BOOL (*Player_Active)(void); + void (*Player_Free)(MODULE*); +Index: SDL_mixer-1.2.12/dynamic_ogg.h +=================================================================== +--- SDL_mixer-1.2.12.orig/dynamic_ogg.h ++++ SDL_mixer-1.2.12/dynamic_ogg.h +@@ -31,7 +31,7 @@ typedef struct { + void *handle; + int (*ov_clear)(OggVorbis_File *vf); + vorbis_info *(*ov_info)(OggVorbis_File *vf,int link); +- int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, char *initial, long ibytes, ov_callbacks callbacks); ++ int (*ov_open_callbacks)(void *datasource, OggVorbis_File *vf, const char *initial, long ibytes, ov_callbacks callbacks); + ogg_int64_t (*ov_pcm_total)(OggVorbis_File *vf,int i); + #ifdef OGG_USE_TREMOR + long (*ov_read)(OggVorbis_File *vf,char *buffer,int length, int *bitstream); +Index: SDL_mixer-1.2.12/mixer.c +=================================================================== +--- SDL_mixer-1.2.12.orig/mixer.c ++++ SDL_mixer-1.2.12/mixer.c +@@ -35,6 +35,7 @@ + #include "load_ogg.h" + #include "load_flac.h" + #include "dynamic_flac.h" ++#include "dynamic_fluidsynth.h" + #include "dynamic_mod.h" + #include "dynamic_mp3.h" + #include "dynamic_ogg.h"