From 287ff0a811528349cb9fa2b121b0cc893e6b381e2020f06d11697922c62a1675 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 30 Mar 2022 19:26:29 +0000 Subject: [PATCH] - Add fluidsynth1.diff OBS-URL: https://build.opensuse.org/package/show/games/dsda-doom?expand=0&rev=4 --- dsda-doom.changes | 1 + dsda-doom.spec | 11 ++++++++-- fluidsynth1.diff | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 fluidsynth1.diff diff --git a/dsda-doom.changes b/dsda-doom.changes index ea2841d..b3ce7c3 100644 --- a/dsda-doom.changes +++ b/dsda-doom.changes @@ -6,6 +6,7 @@ Wed Mar 30 18:39:27 UTC 2022 - Jan Engelhardt * Fixed a crash caused by saving the game state after an intercept overrun * Added mouse stutter correction option (on by default) +- Add fluidsynth1.diff ------------------------------------------------------------------- Fri Mar 4 19:55:59 UTC 2022 - Jan Engelhardt diff --git a/dsda-doom.spec b/dsda-doom.spec index 01f2551..335b47e 100644 --- a/dsda-doom.spec +++ b/dsda-doom.spec @@ -30,10 +30,13 @@ Source: https://github.com/kraflab/dsda-doom/archive/refs/tags/v%version Patch1: prboom-nodatetime.diff Patch2: prboom-hbar-all.diff Patch3: prboom-hbar-gradient.diff +Patch4: fluidsynth1.diff BuildRequires: Mesa-devel BuildRequires: c++_compiler BuildRequires: cmake -BuildRequires: fluidsynth-devel +%if 0%{?suse_version} >= 1550 +BuildRequires: fluidsynth-devel >= 2 +%endif BuildRequires: hicolor-icon-theme BuildRequires: libpng-devel BuildRequires: libvorbis-devel @@ -58,7 +61,11 @@ It features: * MBFv21, UMAPINFO and DSDHacked specification support %prep -%autosetup -p0 +%setup -q +%patch -P 1 -P 2 -P 3 -p0 +%if 0%{?sle_version} < 150400 +%patch -P 4 -p0 +%endif %build pushd prboom2/ diff --git a/fluidsynth1.diff b/fluidsynth1.diff new file mode 100644 index 0000000..50e56ba --- /dev/null +++ b/fluidsynth1.diff @@ -0,0 +1,55 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Wed, 30 Mar 2022 21:13:50 +0200 +Subject: [PATCH] Continue supporting fluidsynth1 API +Upstream: probably not worth, given Leap 15.4 (FL2) is around the corner + +Platforms such as openSUSE Leap 15.3 still only have FL1, owing +to the branch having set off in 2017. +--- + prboom2/src/MUSIC/flplayer.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/prboom2/src/MUSIC/flplayer.c b/prboom2/src/MUSIC/flplayer.c +index 27cd31aa..282714e8 100644 +--- prboom2/src/MUSIC/flplayer.c ++++ prboom2/src/MUSIC/flplayer.c +@@ -231,17 +231,19 @@ static int fl_init (int samplerate) + } + + { +- int lumpnum; ++ int lumpnum = -1; + int checked_file = false; + dboolean replaced_soundfont = false; + const char *checked_f_font = NULL; + ++#if FLUIDSYNTH_VERSION_MAJOR >= 2 + lumpnum = W_CheckNumForName("SNDFONT"); + + if (lumpnum >= 0) + { + replaced_soundfont = !W_LumpNumInPortWad(lumpnum); + } ++#endif + + if (!replaced_soundfont && snd_soundfont && snd_soundfont[0]) + { +@@ -251,6 +253,7 @@ static int fl_init (int samplerate) + f_font = fluid_synth_sfload (f_syn, filename, 1); + } + ++#if FLUIDSYNTH_VERSION_MAJOR >= 2 + if ((!checked_file || f_font == FLUID_FAILED) && lumpnum >= 0) + { + fluid_sfloader_t *sfloader; +@@ -262,6 +265,7 @@ static int fl_init (int samplerate) + fluid_synth_add_sfloader(f_syn, sfloader); + f_font = fluid_synth_sfload(f_syn, "SNDFONT", 1); + } ++#endif + + if (!checked_f_font) + { +-- +2.35.1