From 4b7aaa7e9205dce0c84490a47714d846bb9e2be1cd583ce7784f44f4faba3a5d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 23 Nov 2022 23:57:30 +0000 Subject: [PATCH] - Update to release 1.1.11 OBS-URL: https://build.opensuse.org/package/show/games/zmusic?expand=0&rev=16 --- 1.1.11.tar.gz | 3 ++ ZMusic-1.1.9.tar.gz | 3 -- system-fluidsynth.patch | 67 +++++++++++++++++++++++++++++++++++++++++ system-gme.patch | 50 ++++++++++++------------------ zmusic.changes | 8 +++++ zmusic.spec | 11 ++++--- 6 files changed, 103 insertions(+), 39 deletions(-) create mode 100644 1.1.11.tar.gz delete mode 100644 ZMusic-1.1.9.tar.gz create mode 100644 system-fluidsynth.patch diff --git a/1.1.11.tar.gz b/1.1.11.tar.gz new file mode 100644 index 0000000..adc4357 --- /dev/null +++ b/1.1.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:623c3d7edfcdbe1ba4e7a9dc9a4d834fb92a228881621247855ecd57447631dd +size 2227621 diff --git a/ZMusic-1.1.9.tar.gz b/ZMusic-1.1.9.tar.gz deleted file mode 100644 index 89d63a7..0000000 --- a/ZMusic-1.1.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bf39917028bbe2f382748b4400a1cbaeb8975157fe404cff53411297d6ac68c -size 1813045 diff --git a/system-fluidsynth.patch b/system-fluidsynth.patch new file mode 100644 index 0000000..306d43b --- /dev/null +++ b/system-fluidsynth.patch @@ -0,0 +1,67 @@ +From: Jan Engelhardt +Date: 2022-11-24 00:30:41.636640680 +0100 +Subject: Disintegrate the bundled libfluidsynth + +Do a partial revert of this commit: + +""" +commit 47475495f43c0e9fed55fbe861cf2cb94628f39c +Author: Christoph Oelckers +Date: Sun Jul 31 12:12:11 2022 +0200 + + - integrate FluidSynth directly into the project in source form. + + The primary reason for this is to avoid dealing with FluidSynth's rather messy compile setup. + This also protects us from breaking API/ABI changes like between version 1 and 2. +""" + +The primary reason for this revert is to avoid dealing with +FluidSynth's rather messy compile setup. Because it's already done in +the distro's fluidsynth package and need not be repeated for zmusic. + +--- + source/CMakeLists.txt | 7 +++++-- + source/mididevices/music_fluidsynth_mididevice.cpp | 2 +- + thirdparty/CMakeLists.txt | 1 - + 3 files changed, 6 insertions(+), 4 deletions(-) + +Index: source/CMakeLists.txt +=================================================================== +--- source/CMakeLists.txt.orig ++++ source/CMakeLists.txt +@@ -142,8 +142,11 @@ use_fast_math(zmusiclite) + target_include_directories(zmusic INTERFACE $ $) + target_include_directories(zmusiclite INTERFACE $ $) + +-target_link_libraries_hidden(zmusic zmusic-obj adl oplsynth opn timidity timidityplus wildmidi fluidsynth) +-target_link_libraries_hidden(zmusiclite zmusic-obj fluidsynth) ++include(FindPkgConfig) ++pkg_search_module(FLUIDSYNTH REQUIRED fluidsynth) ++target_include_directories(zmusic-obj INTERFACE ${FLUIDSYNTH_INCLUDE_DIRS}) ++target_link_libraries_hidden(zmusic zmusic-obj adl oplsynth opn timidity timidityplus wildmidi ${FLUIDSYNTH_LIBRARIES}) ++target_link_libraries_hidden(zmusiclite zmusic-obj ${FLUIDSYNTH_LIBRARIES}) + + target_compile_definitions(zmusic PUBLIC $<$,STATIC_LIBRARY>:ZMUSIC_STATIC>) + target_compile_definitions(zmusiclite PRIVATE ZMUSIC_LITE=1 PUBLIC $<$,STATIC_LIBRARY>:ZMUSIC_STATIC>) +Index: source/mididevices/music_fluidsynth_mididevice.cpp +=================================================================== +--- source/mididevices/music_fluidsynth_mididevice.cpp.orig ++++ source/mididevices/music_fluidsynth_mididevice.cpp +@@ -46,7 +46,7 @@ + + FluidConfig fluidConfig; + +-#include "../thirdparty/fluidsynth/include/fluidsynth.h" ++#include + + class FluidSynthMIDIDevice : public SoftSynthMIDIDevice + { +Index: thirdparty/CMakeLists.txt +=================================================================== +--- thirdparty/CMakeLists.txt.orig ++++ thirdparty/CMakeLists.txt +@@ -45,4 +45,3 @@ add_subdirectory(timidity) + add_subdirectory(timidityplus) + add_subdirectory(wildmidi) + add_subdirectory(oplsynth) +-add_subdirectory(fluidsynth/src) diff --git a/system-gme.patch b/system-gme.patch index a7ef2de..2c1d7b0 100644 --- a/system-gme.patch +++ b/system-gme.patch @@ -3,47 +3,35 @@ Date: 2019-12-18 23:10:30.098185171 +0100 Use GME system libraries instead of bundled code. +How GME is released does not matter. The job of a distro is to string +together all its GME users with whatever GME version was chosen by +the distro. ABI incompatibilites are addressed, else our own stack +wouldn't work. + --- - thirdparty/CMakeLists.txt | 23 +++++++++++++++-------- - 1 file changed, 15 insertions(+), 8 deletions(-) + thirdparty/CMakeLists.txt | 6 ++++++ + 1 file changed, 6 insertions(+) Index: thirdparty/CMakeLists.txt =================================================================== --- thirdparty/CMakeLists.txt.orig +++ thirdparty/CMakeLists.txt -@@ -20,21 +20,28 @@ endif() - # system copy exists soley to placate people following distro guidelines to the - # letter without regard as to why the vendored copy is forced. - # [Blzut3] Commented out per request from Graf Zahl. --#option(FORCE_INTERNAL_GME "Use internal gme (it is highly unlikely this should be turned off)" ON) -+# Conducive? What a load of unsourced claims. -+# One point of a system library - the important one for openSUSE - is to just have -+# *one* *single version* in the system that gets used. It does not matter -+# if it's a proper release, a Git snapshot, or if the next miniscule increment -+# is completely ABI incompatible. Just don't bloat by bundling everywhere. -+# -+include(FindPkgConfig) -+pkg_check_modules(GME libgme) -+option(FORCE_INTERNAL_GME "Use internal gme" OFF) +@@ -25,6 +25,11 @@ endif() + #option(FORCE_INTERNAL_GME "Use internal gme (it is highly unlikely this should be turned off)" ON) #mark_as_advanced(FORCE_INTERNAL_GME GME_INCLUDE_DIR GME_LIBRARY) #find_package(GME QUIET) --#if(GME_FOUND AND NOT FORCE_INTERNAL_GME) --# message(STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIRS}") --# set_property(TARGET gme PROPERTY IMPORTED_GLOBAL TRUE) --# determine_package_config_dependency(ZMUSIC_PACKAGE_DEPENDENCIES TARGET gme MODULE GME) --#else() --# message(STATUS "Using internal gme library") -+if(NOT FORCE_INTERNAL_GME) -+ message(STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIRS}") -+ determine_package_config_dependency(ZMUSIC_PACKAGE_DEPENDENCIES TARGET gme MODULE GME) -+else() -+ message(STATUS "Using internal gme library") - # Use MAME as it's a balanced emulator: well-accurate, but doesn't eats lot of CPU - # Nuked OPN2 is very accurate emulator, but it eats too much CPU for the workflow - set(GME_YM2612_EMU "MAME" CACHE STRING "Which YM2612 emulator to use: \"Nuked\" (LGPLv2.1+), \"MAME\" (GPLv2+), or \"GENS\" (LGPLv2.1+)") ++include(FindPkgConfig) ++pkg_check_modules(GME libgme) ++message(STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIRS}") ++determine_package_config_dependency(ZMUSIC_PACKAGE_DEPENDENCIES TARGET gme MODULE GME) ++if(FALSE) + #if(GME_FOUND AND NOT FORCE_INTERNAL_GME) + # message(STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIRS}") + # set_property(TARGET gme PROPERTY IMPORTED_GLOBAL TRUE) +@@ -37,6 +42,7 @@ endif() mark_as_advanced(GME_YM2612_EMU) add_subdirectory(game-music-emu) --#endif() + #endif() +endif() add_subdirectory(dumb) diff --git a/zmusic.changes b/zmusic.changes index b02ebe6..46a887f 100644 --- a/zmusic.changes +++ b/zmusic.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Nov 23 23:15:36 UTC 2022 - Jan Engelhardt + +- Update to release 1.1.11 + * Added missing check for AMF format in module loader. + * Fixed EMIDI track designation checks. +- Add system-fluidsynth.patch + ------------------------------------------------------------------- Mon Jul 4 21:46:43 UTC 2022 - Jan Engelhardt diff --git a/zmusic.spec b/zmusic.spec index 03f1335..1e7fd5c 100644 --- a/zmusic.spec +++ b/zmusic.spec @@ -17,17 +17,18 @@ Name: zmusic -Version: 1.1.9 +Version: 1.1.11 Release: 0 Summary: ZDoom component library for music handling License: GPL-3.0-only Group: Development/Libraries/C and C++ URL: https://zdoom.org/ -#Git-Clone: https://github.com/coelckers/ZMusic -Source: https://github.com/coelckers/ZMusic/archive/%version.tar.gz#/ZMusic-%version.tar.gz -Patch1: system-gme.patch -Patch2: dumb-dumb.patch +#Git-Clone: https://github.com/ZDoom/ZMusic +Source: https://github.com/ZDoom/ZMusic/archive/%version.tar.gz +Patch1: system-fluidsynth.patch +Patch2: system-gme.patch +Patch3: dumb-dumb.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkg-config