summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta2020-02-11 17:22:08 +0100
committerJan Cholasta2020-02-12 19:33:13 +0100
commit43a2f4027c34a5d224031eb84563846a206643dc (patch)
treedc3e9abdc01fefcfa07709abf1ecbe71e8f61062
downloadaur-43a2f4027c34a5d224031eb84563846a206643dc.tar.gz
zmusic-1.0.0
-rw-r--r--.SRCINFO26
-rw-r--r--.gitignore4
-rw-r--r--0001-Use-correct-soundfont-path.patch25
-rw-r--r--PKGBUILD39
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5f0946667e25
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = zmusic
+ pkgdesc = GZDoom's music system as a standalone library
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://github.com/coelckers/ZMusic
+ arch = x86_64
+ license = BSD
+ license = GPL3
+ license = LGPL2.1
+ license = LGPL3
+ license = custom:dumb
+ makedepends = cmake
+ depends = alsa-lib
+ depends = gcc-libs
+ depends = zlib
+ optdepends = fluidsynth>=2: FluidSynth MIDI device
+ optdepends = libsndfile: WAV/FLAC/OGG audio support
+ optdepends = mpg123: MP3 audio support
+ optdepends = soundfont-fluid: default soundfont for FluidSynth
+ source = ZMusic-1.0.0.tar.gz::https://github.com/coelckers/ZMusic/archive/1.0.0.tar.gz
+ source = 0001-Use-correct-soundfont-path.patch
+ sha256sums = cf7d7651035acd3d7f847c1e763770619eaf121f475323c70faa7f296df8c589
+ sha256sums = 6c1b5bf589e5c36186869276ade865d35fdf860241dcd2e0f557e5a82dfd066f
+
+pkgname = zmusic
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f128e5c969b2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/ZMusic*
+/pkg/
+/src/
+/*.pkg.tar.*
diff --git a/0001-Use-correct-soundfont-path.patch b/0001-Use-correct-soundfont-path.patch
new file mode 100644
index 000000000000..943ab0748c14
--- /dev/null
+++ b/0001-Use-correct-soundfont-path.patch
@@ -0,0 +1,25 @@
+From 174eb60580c9ffedad91951eefe65a517e040d4e Mon Sep 17 00:00:00 2001
+From: Jan Cholasta <jan@cholasta.net>
+Date: Tue, 11 Feb 2020 14:26:04 +0100
+Subject: [PATCH] Use correct soundfont path
+
+---
+ source/mididevices/music_fluidsynth_mididevice.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/mididevices/music_fluidsynth_mididevice.cpp b/source/mididevices/music_fluidsynth_mididevice.cpp
+index 675b4f9..8a11198 100644
+--- a/source/mididevices/music_fluidsynth_mididevice.cpp
++++ b/source/mididevices/music_fluidsynth_mididevice.cpp
+@@ -644,7 +644,7 @@ void Fluid_SetupConfig(const char* patches, std::vector<std::string> &patch_path
+ // The following will only be used if no soundfont at all is provided, i.e. even the standard one coming with GZDoom is missing.
+ #ifdef __unix__
+ // This is the standard location on Ubuntu.
+- Fluid_SetupConfig("/usr/share/sounds/sf2/FluidR3_GS.sf2:/usr/share/sounds/sf2/FluidR3_GM.sf2", patch_paths, false);
++ Fluid_SetupConfig("/usr/share/soundfonts/FluidR3_GS.sf2:/usr/share/soundfonts/FluidR3_GM.sf2", patch_paths, false);
+ #endif
+ #ifdef _WIN32
+ // On Windows, look for the 4 megabyte patch set installed by Creative's drivers as a default.
+--
+2.25.0
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9825f9cedf41
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Jan Cholasta <grubber at grubber cz>
+pkgname=zmusic
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="GZDoom's music system as a standalone library"
+arch=('x86_64')
+url='https://github.com/coelckers/ZMusic'
+license=('BSD' 'GPL3' 'LGPL2.1' 'LGPL3' 'custom:dumb')
+depends=('alsa-lib' 'gcc-libs' 'zlib')
+optdepends=('fluidsynth>=2: FluidSynth MIDI device'
+ 'libsndfile: WAV/FLAC/OGG audio support'
+ 'mpg123: MP3 audio support'
+ 'soundfont-fluid: default soundfont for FluidSynth')
+makedepends=('cmake')
+_srcname=ZMusic-${pkgver}
+_sover=arch.1
+source=("${_srcname}.tar.gz::https://github.com/coelckers/ZMusic/archive/${pkgver}.tar.gz"
+ '0001-Use-correct-soundfont-path.patch')
+sha256sums=('cf7d7651035acd3d7f847c1e763770619eaf121f475323c70faa7f296df8c589'
+ '6c1b5bf589e5c36186869276ade865d35fdf860241dcd2e0f557e5a82dfd066f')
+
+prepare() {
+ cd $_srcname
+ echo "set_target_properties(zmusic zmusiclite PROPERTIES SOVERSION ${_sover})" >>source/CMakeLists.txt
+ patch -i "$srcdir"/0001-Use-correct-soundfont-path.patch -p 1
+}
+
+build() {
+ cd $_srcname
+ mkdir -p build
+ cmake -B build -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr
+ make -C build
+}
+
+package() {
+ cd $_srcname
+ make -C build install DESTDIR="$pkgdir"
+ install licenses/{bsd,dumb,legal,zmusic}.txt -t "$pkgdir"/usr/share/licenses/$pkgname -D -m 644
+}