From 5e7233046e4604287fbe5ec6b11b41f72080b49e9ef5ee03c729dc5c5b10f309 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 10 Apr 2021 22:32:37 +0000 Subject: [PATCH 1/2] - Update to release 1.1.6 OBS-URL: https://build.opensuse.org/package/show/games/zmusic?expand=0&rev=7 --- ...made-sndfile-imported-library-global.patch | 27 ++++++++ 1.1.4.tar.gz | 3 - 1.1.6.tar.gz | 3 + dumb-dumb.patch | 69 +++++++++++++++++++ system-gme.patch | 63 ++++++++++------- zmusic.changes | 9 +++ zmusic.spec | 9 ++- 7 files changed, 152 insertions(+), 31 deletions(-) create mode 100644 0001-made-sndfile-imported-library-global.patch delete mode 100644 1.1.4.tar.gz create mode 100644 1.1.6.tar.gz create mode 100644 dumb-dumb.patch diff --git a/0001-made-sndfile-imported-library-global.patch b/0001-made-sndfile-imported-library-global.patch new file mode 100644 index 0000000..9462426 --- /dev/null +++ b/0001-made-sndfile-imported-library-global.patch @@ -0,0 +1,27 @@ +From f24498950d44235e307e6734ca627723e34986a9 Mon Sep 17 00:00:00 2001 +From: "alexey.lysiuk" +Date: Sun, 14 Mar 2021 19:36:16 +0200 +Subject: [PATCH] - made sndfile imported library global + +CMake earlier than 3.18 does not support library aliases to non-global imported targets. +This fixes #22. +--- + cmake/FindSndFile.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git cmake/FindSndFile.cmake cmake/FindSndFile.cmake +index 0266980..7ba3225 100644 +--- cmake/FindSndFile.cmake ++++ cmake/FindSndFile.cmake +@@ -27,7 +27,7 @@ include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(SndFile DEFAULT_MSG SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR) + + if(SNDFILE_FOUND) +- add_library(sndfile UNKNOWN IMPORTED) ++ add_library(sndfile UNKNOWN IMPORTED GLOBAL) + set_target_properties(sndfile + PROPERTIES + IMPORTED_LOCATION "${SNDFILE_LIBRARY}" +-- +2.31.1 + diff --git a/1.1.4.tar.gz b/1.1.4.tar.gz deleted file mode 100644 index 1a20dc3..0000000 --- a/1.1.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29a18a6a8d0db4978a9d5badbbd612be2337d64ef0d768e944ea70f526eae285 -size 1809045 diff --git a/1.1.6.tar.gz b/1.1.6.tar.gz new file mode 100644 index 0000000..8badae9 --- /dev/null +++ b/1.1.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cc4a08c4d213df80743828538631f452e1858c2ea5bb47a616e221492de05c0 +size 1810769 diff --git a/dumb-dumb.patch b/dumb-dumb.patch new file mode 100644 index 0000000..4332d2b --- /dev/null +++ b/dumb-dumb.patch @@ -0,0 +1,69 @@ + +The code has a wrong #include directive that quickly breaks when not all -I flags +appear as compiler arguments. + + +The command line if you build with internal GME and whatnot: + +/usr/bin/c++ -DHAVE_FLUIDSYNTH -DHAVE_MPG123 -DHAVE_SNDFILE -DHAVE_SYSTEM_MIDI +-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -Dzmusic_EXPORTS +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/../include +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/zmusic +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/dumb/include +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/game-music-emu/gme/.. +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/adlmidi +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/oplsynth +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/opnmidi +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/timidity +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/timidityplus +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/wildmidi +-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 +-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables +-fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG -fPIC -ffp-contract=off -MD +-MT source/CMakeFiles/zmusic.dir/streamsources/music_dumb.cpp.o -MF +CMakeFiles/zmusic.dir/streamsources/music_dumb.cpp.o.d -o +CMakeFiles/zmusic.dir/streamsources/music_dumb.cpp.o -c +/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/streamsources/music_dumb.cpp + + +The command line actually is: + +/usr/bin/c++ -DHAVE_FLUIDSYNTH -DHAVE_MPG123 -DHAVE_SNDFILE -DHAVE_SYSTEM_MIDI +-DZMUSIC_LITE=1 -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp +-Dzmusiclite_EXPORTS +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/../include +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/zmusic +-I/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/thirdparty/dumb/include +-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 +-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables +-fstack-clash-protection -g -DNDEBUG -O2 -g -DNDEBUG -fPIC -ffp-contract=off +-o CMakeFiles/zmusiclite.dir/streamsources/music_dumb.cpp.o -c +/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/streamsources/music_dumb.cpp + +/home/abuild/rpmbuild/BUILD/ZMusic-1.1.6/source/streamsources/music_dumb.cpp:46:10: fatal error: ../dumb/include/dumb.h: No such file or directory + #include "../dumb/include/dumb.h" + ^~~~~~~~~~~~~~~~~~~~~~~~ + + + +--- + source/streamsources/music_dumb.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: source/streamsources/music_dumb.cpp +=================================================================== +--- source/streamsources/music_dumb.cpp.orig ++++ source/streamsources/music_dumb.cpp +@@ -43,8 +43,8 @@ + + + #undef CDECL // w32api's windef.h defines this +-#include "../dumb/include/dumb.h" +-#include "../dumb/include/internal/it.h" ++#include "../thirdparty/dumb/include/dumb.h" ++#include "../thirdparty/dumb/include/internal/it.h" + #include "zmusic/m_swap.h" + #include "zmusic/mididefs.h" + #include "zmusic/midiconfig.h" diff --git a/system-gme.patch b/system-gme.patch index 9329013..470da7a 100644 --- a/system-gme.patch +++ b/system-gme.patch @@ -1,32 +1,45 @@ -From: Jan Engelhardt -Date: 2019-12-18 23:10:30.098185171 +0100 - -Use GME system libraries instead of bundled code. - --- - CMakeLists.txt | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) + thirdparty/CMakeLists.txt | 23 +++++++++++++++-------- + 1 file changed, 15 insertions(+), 8 deletions(-) -Index: ZMusic-1.1.2/CMakeLists.txt +Index: thirdparty/CMakeLists.txt =================================================================== ---- ZMusic-1.1.2.orig/CMakeLists.txt -+++ ZMusic-1.1.2/CMakeLists.txt -@@ -186,7 +186,9 @@ set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${C - set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEB_C_FLAGS} -D_DEBUG" ) - - option(FORCE_INTERNAL_ZLIB "Use internal zlib") --option(FORCE_INTERNAL_GME "Use internal gme" ON) +--- 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) - mark_as_advanced( FORCE_INTERNAL_GME ) + #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+)") + mark_as_advanced(GME_YM2612_EMU) + add_subdirectory(game-music-emu) +-#endif() ++endif() - if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB ) -@@ -202,6 +204,7 @@ endif() - - - if( GME_FOUND AND NOT FORCE_INTERNAL_GME ) -+ set(GME_INCLUDE_DIR "${GME_INCLUDEDIR}") - message( STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIR}" ) - else() - message( STATUS "Using internal gme library" ) + add_subdirectory(dumb) + add_subdirectory(adlmidi) diff --git a/zmusic.changes b/zmusic.changes index 897c998..f88aa92 100644 --- a/zmusic.changes +++ b/zmusic.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Apr 10 21:07:37 UTC 2021 - Jan Engelhardt + +- Update to release 1.1.6 + * Add detection of Opus comment tags in Ogg files. + * Multiply master volume for module player by 4. +- Add 0001-made-sndfile-imported-library-global.patch, + dumb-dumb.patch. + ------------------------------------------------------------------- Sat Oct 31 12:02:30 UTC 2020 - Jan Engelhardt diff --git a/zmusic.spec b/zmusic.spec index 024ef3c..9f64825 100644 --- a/zmusic.spec +++ b/zmusic.spec @@ -1,7 +1,7 @@ # # spec file for package zmusic # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: zmusic -Version: 1.1.4 +Version: 1.1.6 Release: 0 Summary: ZDoom component library for music handling License: GPL-3.0-only @@ -27,6 +27,8 @@ URL: https://zdoom.org/ #Git-Clone: https://github.com/coelckers/ZMusic Source: https://github.com/coelckers/ZMusic/archive/%version.tar.gz Patch1: system-gme.patch +Patch2: dumb-dumb.patch +Patch3: 0001-made-sndfile-imported-library-global.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkg-config @@ -65,7 +67,7 @@ This subpackage contains the headers for the zmusic library, which is ZDoom's music component library. %prep -%autosetup -p1 -n ZMusic-%version +%autosetup -p0 -n ZMusic-%version %build # There is handcrafted assembler, which LTO does not play nice with. @@ -101,5 +103,6 @@ rm -f "$b/%_libdir"/libzmusiclite* %files devel %_includedir/* %_libdir/libzmusic.so +%_libdir/cmake/ %changelog From 9b102df3f7d5e205bd760ea02a06643540c67e3e3b8e6209d7c0c5d63c0a7a7a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 11 Apr 2021 09:28:31 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/games/zmusic?expand=0&rev=8 --- dumb-dumb.patch | 2 ++ system-gme.patch | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/dumb-dumb.patch b/dumb-dumb.patch index 4332d2b..b8799e6 100644 --- a/dumb-dumb.patch +++ b/dumb-dumb.patch @@ -1,3 +1,5 @@ +From: Jan Engelhardt +Date: 2021-04-11 00:13:39.558383079 +0200 The code has a wrong #include directive that quickly breaks when not all -I flags appear as compiler arguments. diff --git a/system-gme.patch b/system-gme.patch index 470da7a..a7ef2de 100644 --- a/system-gme.patch +++ b/system-gme.patch @@ -1,3 +1,8 @@ +From: Jan Engelhardt +Date: 2019-12-18 23:10:30.098185171 +0100 + +Use GME system libraries instead of bundled code. + --- thirdparty/CMakeLists.txt | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)