summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornulldev2022-01-14 20:02:53 -0500
committernulldev2022-01-14 20:02:53 -0500
commit20f763fb9eda3d69fe7e2e49e3018cca38822681 (patch)
tree204caa5179c569a804f0e5e41a17f46da9f88b4c
parenta23cb9b74826e1939babece004df62fe85378558 (diff)
downloadaur-20f763fb9eda3d69fe7e2e49e3018cca38822681.tar.gz
Fix background music not playing
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD10
2 files changed, 11 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d0c86ea94fc7..05ef8b2ca661 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = spacecadetpinball-git
pkgdesc = Reverse engineered port of "3D Pinball for Windows – Space Cadet" to Linux
pkgver = 2.0.1.r5.g8f34829
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/k4zmu2a/SpaceCadetPinball
arch = x86_64
arch = i686
@@ -16,6 +16,7 @@ pkgbase = spacecadetpinball-git
makedepends = git
depends = sdl2
depends = sdl2_mixer
+ optdepends = freepats-general-midi: Soundfont for playing background music
provides = spacecadetpinball
conflicts = spacecadetpinball
noextract = Space_Cadet.rar
diff --git a/PKGBUILD b/PKGBUILD
index ddbe778d2776..feae6d0cea44 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,10 +3,11 @@ _pkgname=spacecadetpinball
pkgname=$_pkgname-git
pkgdesc='Reverse engineered port of "3D Pinball for Windows – Space Cadet" to Linux'
pkgver=2.0.1.r5.g8f34829
-pkgrel=1
+pkgrel=2
arch=('x86_64' 'i686' 'pentium4' 'aarch64' 'armv7h' 'armv6h')
depends=('sdl2' 'sdl2_mixer')
makedepends=('unrar' 'cmake' 'git')
+optdepends=('freepats-general-midi: Soundfont for playing background music')
provides=("$_pkgname")
conflicts=("$_pkgname")
license=('MIT' 'proprietary')
@@ -47,6 +48,13 @@ package() {
# Install wrapper script
install -Dm0755 /dev/stdin "$pkgdir/usr/bin/$_pkgname" <<END
#!/bin/sh
+
+# Configure soundfonts if not already configured
+if [ -z "$SDL_SOUNDFONTS" ]; then
+ # Use first available soundfont
+ export SDL_SOUNDFONTS="$(find /usr/share/soundfonts -type f -print -quit 2> /dev/null)"
+fi
+
# Run program in correct directory so it can find it's resources
cd /usr/lib/$_pkgname
exec ./$_pkgname "\$@"