summaryrefslogtreecommitdiff
path: root/games/SameBoy/SameBoy.SlackBuild
diff options
context:
space:
mode:
authorHunter Sezen <orbea@fredslev.dk>2018-11-12 07:49:29 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-11-13 05:18:58 +0700
commite447f17fc5875ae28835b4de2f7dd012376e976e (patch)
tree31732b59157a2cd7981517f111198cde42c728af /games/SameBoy/SameBoy.SlackBuild
parente39af6696244189680cdf532e7645e96f47db711 (diff)
downloadslackbuilds-e447f17fc5875ae28835b4de2f7dd012376e976e.tar.gz
games/SameBoy: Updated for version 0.11.2.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/SameBoy/SameBoy.SlackBuild')
-rw-r--r--games/SameBoy/SameBoy.SlackBuild48
1 files changed, 25 insertions, 23 deletions
diff --git a/games/SameBoy/SameBoy.SlackBuild b/games/SameBoy/SameBoy.SlackBuild
index 35d46e0c84..eacc94ccaf 100644
--- a/games/SameBoy/SameBoy.SlackBuild
+++ b/games/SameBoy/SameBoy.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=SameBoy
LIBNAM=$(printf %s $PRGNAM | tr 'A-Z' 'a-z')_libretro
SRCNAM=${LIBNAM%%_*}
-VERSION=${VERSION:-0.11.1}
+VERSION=${VERSION:-0.11.2}
RGBVERS=${RGBVERS:-0.3.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -69,6 +69,27 @@ else
CONF=release
fi
+# Add a build-time option to change the resources directory.
+# https://github.com/LIJI32/SameBoy/commit/91904df5e8cc7370776c37bdb46467a81887a6b4
+# https://github.com/LIJI32/SameBoy/pull/129
+# https://github.com/LIJI32/SameBoy/issues/39
+patch -p1 < $CWD/datadir.patch
+
+# Reconnect the joypad when SameBoy starts directly to a ROM
+# https://github.com/LIJI32/SameBoy/commit/7ffed9c43cd533c4ab16ab9d8b0879a39a00a02b
+# https://github.com/LIJI32/SameBoy/issues/131
+patch -p1 < $CWD/joypad.patch
+
+# Apply the SDL 2.0.6 audio workaround to everything except Windows
+# https://github.com/LIJI32/SameBoy/commit/453673a2a653a45d8ee378ba5335f98df5e22efa
+# https://github.com/LIJI32/SameBoy/issues/130
+patch -p1 < $CWD/sdl.patch
+
+# Adjust DAC attributes to fix LADX’s crackling audio
+# https://github.com/LIJI32/SameBoy/commit/94136f5741b7484189af048830126c4bad04ac11
+# https://github.com/LIJI32/SameBoy/issues/125
+patch -p1 < $CWD/sound.patch
+
PATH="$TMP/$PRGNAM-$VERSION/rgbds-$RGBVERS/bin:$PATH"
make -C rgbds-$RGBVERS Q=
@@ -77,29 +98,10 @@ make -C rgbds-$RGBVERS install Q= \
DESTDIR=./
if pkg-config --exists sdl2; then
- make CONF=$CONF
+ make CONF=$CONF DATA_DIR=/usr/share/games/$SRCNAM/
mkdir -p $PKG/usr/games $PKG/usr/share/games
cp -av build/bin/SDL $PKG/usr/share/games/$SRCNAM
-
-# SameBoy SDL doesn't work with FHS paths yet
-# https://github.com/LIJI32/SameBoy/issues/39
-cat > $PKG/usr/games/$SRCNAM <<EOF
-#!/bin/sh
-set -euf
-CWD="\$(pwd)"
-cd /usr/share/games/$SRCNAM
-
-if [ "\${1:-}" ]; then
- case "\$1" in
- /* ) ./$SRCNAM "\$1" ;;
- * ) ./$SRCNAM "\$CWD/\$1" ;;
- esac
-else
- ./$SRCNAM
-fi
-EOF
-
- chmod 0755 $PKG/usr/games/$SRCNAM
+ mv $PKG/usr/share/games/$SRCNAM/$SRCNAM $PKG/usr/games
else
make bootroms
fi
@@ -110,7 +112,7 @@ install -Dm0644 build/bin/$LIBNAM.so \
$PKG/usr/lib${LIBDIRSUFFIX}/libretro/$LIBNAM.so
# sameboy_libretro.info from:
-# https://raw.githubusercontent.com/libretro/libretro-super/908c0384b9642bb013c9d282a3cde1911fd29aa7/dist/info/sameboy_libretro.info
+# https://raw.githubusercontent.com/libretro/libretro-super/88176482b14e22b744b129bee84f27cb196936a9/dist/info/sameboy_libretro.info
install -Dm0644 $CWD/$LIBNAM-info \
$PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$LIBNAM.info