commit 5e634c64496b6b4c2820b1beef2997d94213c0ab5f300d19aa1a017322f6b854 Author: Michael Vetter Date: Wed Jun 10 17:09:55 2020 +0000 Accepting request 813283 from home:jengelh:dev new depdendency for gzdoom OBS-URL: https://build.opensuse.org/request/show/813283 OBS-URL: https://build.opensuse.org/package/show/games/zmusic?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/1.1.2.tar.gz b/1.1.2.tar.gz new file mode 100644 index 0000000..e4b9106 --- /dev/null +++ b/1.1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:951940fe63ee386fdea044f2543c7460977921ce3e60d282b87be81546078e07 +size 1528782 diff --git a/system-gme.patch b/system-gme.patch new file mode 100644 index 0000000..9329013 --- /dev/null +++ b/system-gme.patch @@ -0,0 +1,32 @@ +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(-) + +Index: ZMusic-1.1.2/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) ++include(FindPkgConfig) ++pkg_check_modules(GME libgme) ++option(FORCE_INTERNAL_GME "Use internal gme" OFF) + mark_as_advanced( FORCE_INTERNAL_GME ) + + 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" ) diff --git a/zmusic.changes b/zmusic.changes new file mode 100644 index 0000000..89eb04d --- /dev/null +++ b/zmusic.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Wed Jun 10 15:33:07 UTC 2020 - Jan Engelhardt + +- Initial package (v1.1.2) for build.opensuse.org +- Added system-gme.patch (carryover from gzdoom.spec; modified) diff --git a/zmusic.spec b/zmusic.spec new file mode 100644 index 0000000..d702983 --- /dev/null +++ b/zmusic.spec @@ -0,0 +1,103 @@ +# +# spec file for package zmusic +# +# Copyright (c) 2020 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: zmusic +Version: 1.1.2 +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 +Patch1: system-gme.patch +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkg-config +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(fluidsynth) +BuildRequires: pkgconfig(libgme) +BuildRequires: pkgconfig(libmpg123) +BuildRequires: pkgconfig(sndfile) +BuildRequires: pkgconfig(zlib) +Recommends: timidity +Recommends: timidity-eawpats +# DUMB is modified to read OggVorbis samples +Provides: bundled(dumb) = 0.9.3 + +%description +This is the music playback code from gzdoom, which was separated into its own +code repository starting with gzdoom-4.4.0. + +%package -n libzmusic1 +Summary: ZDoom component library for music handling +Group: System/Libraries + +%description -n libzmusic1 +This is the music playback code from gzdoom, which was separated into its own +code repository starting with gzdoom-4.4.0. + +%package devel +Summary: Headers for the ZMusic library +Group: Development/Libraries/C and C++ +Requires: libzmusic1 = %version + +%description devel +This subpackage contains the headers for the zmusic library, which is ZDoom's +music component library. + +%prep +%autosetup -p1 -n ZMusic-%version + +%build +# There is handcrafted assembler, which LTO does not play nice with. +%define _lto_cflags %nil + +%ifarch %ix86 +# Allow sw to use intrinsics (functions like _mm_set_sd). +# Guarded by cpuid calls by sw. +export CFLAGS="%optflags -msse -msse2" +export CXXFLAGS="%optflags -msse -msse2" +%endif +%cmake -DNO_STRIP=1 \ + -DCMAKE_SHARED_LINKER_FLAGS="" \ + -DCMAKE_EXE_LINKER_FLAGS="" -DCMAKE_MODULE_LINKER_FLAGS="" \ + -DINSTALL_DOCS_PATH="%_defaultdocdir/%name" \ + -DDYN_FLUIDSYNTH=OFF \ + -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF +make %{?_smp_mflags} + +%install +%cmake_install +b="%buildroot" +# Won't need lite (a subset with no GPL code) in openSUSE. +rm -f "$b/%_libdir"/libzmusiclite* + +%post -n libzmusic1 -p /sbin/ldconfig +%postun -n libzmusic1 -p /sbin/ldconfig + +%files -n libzmusic1 +%_libdir/libzmusic.so.1* +%license licenses/* + +%files devel +%_includedir/* +%_libdir/libzmusic.so + +%changelog