From 6315bae9fb3fed19b699f7101c58fd7e7a651dc6953c9e03b1c6f366bfed38cd Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 20 Mar 2023 21:24:18 +0000 Subject: [PATCH] - Add 0001-Add-missing-standard-library-includes-fix-build-with.patch OBS-URL: https://build.opensuse.org/package/show/games/zmusic?expand=0&rev=18 --- ...dard-library-includes-fix-build-with.patch | 200 ++++++++++++++++++ zmusic.changes | 6 + zmusic.spec | 3 +- 3 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 0001-Add-missing-standard-library-includes-fix-build-with.patch diff --git a/0001-Add-missing-standard-library-includes-fix-build-with.patch b/0001-Add-missing-standard-library-includes-fix-build-with.patch new file mode 100644 index 0000000..bb809ba --- /dev/null +++ b/0001-Add-missing-standard-library-includes-fix-build-with.patch @@ -0,0 +1,200 @@ +From 7695852856d2d841308fb6375ac2f7ec26e29eea Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sat, 4 Feb 2023 20:16:24 +0000 +Subject: [PATCH] Add missing standard library includes (fix build with GCC 13) + +GCC 13 (as usual for new compiler releases) shuffles around some +internal includes and so etc is no longer transitively included. + +See https://www.gnu.org/software/gcc/gcc-13/porting_to.html. + +Bug: https://bugs.gentoo.org/892814 +--- + source/mididevices/music_adlmidi_mididevice.cpp | 1 + + source/mididevices/music_fluidsynth_mididevice.cpp | 1 + + source/mididevices/music_opl_mididevice.cpp | 3 ++- + source/mididevices/music_opnmidi_mididevice.cpp | 1 + + source/mididevices/music_timidity_mididevice.cpp | 1 + + source/mididevices/music_timiditypp_mididevice.cpp | 3 ++- + source/mididevices/music_wavewriter_mididevice.cpp | 1 + + source/mididevices/music_wildmidi_mididevice.cpp | 3 ++- + source/musicformats/music_midi.cpp | 3 ++- + source/streamsources/music_gme.cpp | 4 +++- + source/streamsources/music_opl.cpp | 2 ++ + source/zmusic/fileio.h | 1 + + 12 files changed, 19 insertions(+), 5 deletions(-) + +Index: source/mididevices/music_adlmidi_mididevice.cpp +=================================================================== +--- source/mididevices/music_adlmidi_mididevice.cpp.orig ++++ source/mididevices/music_adlmidi_mididevice.cpp +@@ -34,6 +34,7 @@ + + // HEADER FILES ------------------------------------------------------------ + ++#include + #include + + #include "zmusic/zmusic_internal.h" +Index: source/mididevices/music_fluidsynth_mididevice.cpp +=================================================================== +--- source/mididevices/music_fluidsynth_mididevice.cpp.orig ++++ source/mididevices/music_fluidsynth_mididevice.cpp +@@ -35,6 +35,7 @@ + // HEADER FILES ------------------------------------------------------------ + + #include ++#include + #include + #include + #include "zmusic/zmusic_internal.h" +Index: source/mididevices/music_opl_mididevice.cpp +=================================================================== +--- source/mididevices/music_opl_mididevice.cpp.orig ++++ source/mididevices/music_opl_mididevice.cpp +@@ -35,6 +35,7 @@ + + // HEADER FILES ------------------------------------------------------------ + ++#include + #include "zmusic/zmusic_internal.h" + #include "mididevice.h" + #include "zmusic/mus2midi.h" +@@ -333,4 +334,4 @@ MIDIDevice* CreateOplMIDIDevice(const ch + { + throw std::runtime_error("OPL device not supported in this configuration"); + } +-#endif +\ No newline at end of file ++#endif +Index: source/mididevices/music_opnmidi_mididevice.cpp +=================================================================== +--- source/mididevices/music_opnmidi_mididevice.cpp.orig ++++ source/mididevices/music_opnmidi_mididevice.cpp +@@ -34,6 +34,7 @@ + + // HEADER FILES ------------------------------------------------------------ + ++#include + #include "mididevice.h" + #include "zmusic/zmusic_internal.h" + +Index: source/mididevices/music_timidity_mididevice.cpp +=================================================================== +--- source/mididevices/music_timidity_mididevice.cpp.orig ++++ source/mididevices/music_timidity_mididevice.cpp +@@ -34,6 +34,7 @@ + + // HEADER FILES ------------------------------------------------------------ + ++#include + #include + #include "mididevice.h" + #include "zmusic/zmusic_internal.h" +Index: source/mididevices/music_timiditypp_mididevice.cpp +=================================================================== +--- source/mididevices/music_timiditypp_mididevice.cpp.orig ++++ source/mididevices/music_timiditypp_mididevice.cpp +@@ -32,6 +32,7 @@ + ** + */ + ++#include + #include "mididevice.h" + #include "zmusic/zmusic_internal.h" + +@@ -239,4 +240,4 @@ MIDIDevice* CreateTimidityPPMIDIDevice(c + { + throw std::runtime_error("Timidity++ device not supported in this configuration"); + } +-#endif +\ No newline at end of file ++#endif +Index: source/mididevices/music_wavewriter_mididevice.cpp +=================================================================== +--- source/mididevices/music_wavewriter_mididevice.cpp.orig ++++ source/mididevices/music_wavewriter_mididevice.cpp +@@ -38,6 +38,7 @@ + #include "mididevice.h" + #include "zmusic/m_swap.h" + #include "fileio.h" ++#include + #include + + // MACROS ------------------------------------------------------------------ +Index: source/mididevices/music_wildmidi_mididevice.cpp +=================================================================== +--- source/mididevices/music_wildmidi_mididevice.cpp.orig ++++ source/mididevices/music_wildmidi_mididevice.cpp +@@ -34,6 +34,7 @@ + + // HEADER FILES ------------------------------------------------------------ + ++#include + #include "mididevice.h" + #include "zmusic/zmusic_internal.h" + +@@ -278,4 +279,4 @@ MIDIDevice* CreateWildMIDIDevice(const c + { + throw std::runtime_error("WildMidi device not supported in this configuration"); + } +-#endif +\ No newline at end of file ++#endif +Index: source/musicformats/music_midi.cpp +=================================================================== +--- source/musicformats/music_midi.cpp.orig ++++ source/musicformats/music_midi.cpp +@@ -34,8 +34,9 @@ + + // HEADER FILES ------------------------------------------------------------ + +-#include + #include ++#include ++#include + #include + #include "zmusic/zmusic_internal.h" + #include "zmusic/musinfo.h" +Index: source/streamsources/music_gme.cpp +=================================================================== +--- source/streamsources/music_gme.cpp.orig ++++ source/streamsources/music_gme.cpp +@@ -38,9 +38,11 @@ + //#define GME_DLL + + #include ++#include ++#include ++ + #include "streamsource.h" + #include +-#include + #include "fileio.h" + + // MACROS ------------------------------------------------------------------ +Index: source/streamsources/music_opl.cpp +=================================================================== +--- source/streamsources/music_opl.cpp.orig ++++ source/streamsources/music_opl.cpp +@@ -35,6 +35,8 @@ + + #ifdef HAVE_OPL + ++#include ++ + #include "streamsource.h" + #include "oplsynth/opl.h" + #include "oplsynth/opl_mus_player.h" +Index: source/zmusic/fileio.h +=================================================================== +--- source/zmusic/fileio.h.orig ++++ source/zmusic/fileio.h +@@ -25,6 +25,7 @@ + #pragma once + #include + #include ++#include + #include + #include + diff --git a/zmusic.changes b/zmusic.changes index 46a887f..6598874 100644 --- a/zmusic.changes +++ b/zmusic.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 20 21:21:03 UTC 2023 - Jan Engelhardt + +- Add 0001-Add-missing-standard-library-includes-fix-build-with.patch + to make gcc 13 happy. + ------------------------------------------------------------------- Wed Nov 23 23:15:36 UTC 2022 - Jan Engelhardt diff --git a/zmusic.spec b/zmusic.spec index 1e7fd5c..23dd583 100644 --- a/zmusic.spec +++ b/zmusic.spec @@ -1,7 +1,7 @@ # # spec file for package zmusic # -# Copyright (c) 2022 SUSE LLC +# 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 @@ -29,6 +29,7 @@ Source: https://github.com/ZDoom/ZMusic/archive/%version.tar.gz Patch1: system-fluidsynth.patch Patch2: system-gme.patch Patch3: dumb-dumb.patch +Patch4: 0001-Add-missing-standard-library-includes-fix-build-with.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkg-config