SHA256
1
0
forked from pool/zmusic

- Update to release 1.1.6

OBS-URL: https://build.opensuse.org/package/show/games/zmusic?expand=0&rev=7
This commit is contained in:
Jan Engelhardt 2021-04-10 22:32:37 +00:00 committed by Git OBS Bridge
parent 0e227853a2
commit 5e7233046e
7 changed files with 152 additions and 31 deletions

View File

@ -0,0 +1,27 @@
From f24498950d44235e307e6734ca627723e34986a9 Mon Sep 17 00:00:00 2001
From: "alexey.lysiuk" <alexey.lysiuk@gmail.com>
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29a18a6a8d0db4978a9d5badbbd612be2337d64ef0d768e944ea70f526eae285
size 1809045

3
1.1.6.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2cc4a08c4d213df80743828538631f452e1858c2ea5bb47a616e221492de05c0
size 1810769

69
dumb-dumb.patch Normal file
View File

@ -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"

View File

@ -1,32 +1,45 @@
From: Jan Engelhardt <jengelh@inai.de>
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)

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sat Apr 10 21:07:37 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- 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 <jengelh@inai.de>

View File

@ -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