diff options
author | nulldev | 2022-01-14 20:02:53 -0500 |
---|---|---|
committer | nulldev | 2022-01-14 20:02:53 -0500 |
commit | 20f763fb9eda3d69fe7e2e49e3018cca38822681 (patch) | |
tree | 204caa5179c569a804f0e5e41a17f46da9f88b4c | |
parent | a23cb9b74826e1939babece004df62fe85378558 (diff) | |
download | aur-20f763fb9eda3d69fe7e2e49e3018cca38822681.tar.gz |
Fix background music not playing
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 10 |
2 files changed, 11 insertions, 2 deletions
@@ -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 @@ -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 "\$@" |