SHA256
1
0
forked from pool/zmusic

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
This commit is contained in:
Michael Vetter 2020-06-10 17:09:55 +00:00 committed by Git OBS Bridge
commit 5e634c6449
6 changed files with 167 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
1.1.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:951940fe63ee386fdea044f2543c7460977921ce3e60d282b87be81546078e07
size 1528782

32
system-gme.patch Normal file
View File

@ -0,0 +1,32 @@
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(-)
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" )

5
zmusic.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Wed Jun 10 15:33:07 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- Initial package (v1.1.2) for build.opensuse.org
- Added system-gme.patch (carryover from gzdoom.spec; modified)

103
zmusic.spec Normal file
View File

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