summaryrefslogtreecommitdiffstats
path: root/games/snes9x
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2023-04-18 00:18:14 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-22 11:38:36 +0700
commitd944e377acc690fbec45db351cf1d7658ca54406 (patch)
tree18512f5572d2dc58f643ebb9fea011ea28af187a /games/snes9x
parentdd4345a6a0a6379abbc91b34df027515ada682f2 (diff)
downloadslackbuilds-d944e377acc690fbec45db351cf1d7658ca54406.tar.gz
slackbuilds-d944e377acc690fbec45db351cf1d7658ca54406.tar.xz
games/snes9x: Fix build without portaudio.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/snes9x')
-rw-r--r--games/snes9x/README14
-rw-r--r--games/snes9x/slack-desc4
-rw-r--r--games/snes9x/snes9x.SlackBuild19
3 files changed, 27 insertions, 10 deletions
diff --git a/games/snes9x/README b/games/snes9x/README
index 6370b07b82..7685488ec1 100644
--- a/games/snes9x/README
+++ b/games/snes9x/README
@@ -31,10 +31,18 @@ Notes:
or RETROARCH=no to forcibly disable the core. Note that RetroArch
doesn't have to be installed to build the libretro core, but it's
useless without RetroArch installed. Also note: the libretro core
- builds, but has not been tested by the SlackBuild author.
+ builds, but has not been tested by the SlackBuild author. If it
+ works for you, let me know so I can update this README.
- OSS audio is disabled by default. Most users won't be affected,
since PulseAudio is now the default audio system on Slackware, and
ALSA is the fallback option. If you *need* OSS support, set OSS=yes
- in the script's environment. You may also disable PulseAudio by
- setting PULSE=no in the environment.
+ in the script's environment.
+
+- PulseAudio is enabled by default. You can disable it with PULSE=no
+ in the environment.
+
+- portaudio is an optional dependency. It's autodetected at build time,
+ but you can disable it with PORTAUDIO=no in the environment. I have
+ no idea why anyone would want to built snes9x with portaudio, but
+ do whatever you decide to do.
diff --git a/games/snes9x/slack-desc b/games/snes9x/slack-desc
index d08f491b0f..2860fe1f36 100644
--- a/games/snes9x/slack-desc
+++ b/games/snes9x/slack-desc
@@ -14,6 +14,6 @@ snes9x: for the SNES and Super Famicom Nintendo game systems on your PC or
snes9x: Workstation. The games include some real gems that were only ever
snes9x: released in Japan.
snes9x:
-snes9x: Build options: PULSE=@WITHPULSE@ OSS=@WITHOSS@ RETROARCH=@build_ra@
-snes9x:
+snes9x: Build options:
+snes9x: PULSE=@PU@ OSS=@OSS@ RETROARCH=@RA@ PORTAUDIO=@PA@
snes9x:
diff --git a/games/snes9x/snes9x.SlackBuild b/games/snes9x/snes9x.SlackBuild
index 8244989280..ad26551806 100644
--- a/games/snes9x/snes9x.SlackBuild
+++ b/games/snes9x/snes9x.SlackBuild
@@ -6,6 +6,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230418 bkw: BUILD=2, make portaudio optional + autodetected.
# 20230410 bkw: update for 1.62.3.
# Most of the work needed for this update was done by M.Dinslage,
# to whom I owe thanks. I updated the man page, and added the
@@ -18,7 +19,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=snes9x
VERSION=${VERSION:-1.62.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -95,6 +96,13 @@ if [ "${OSS:-no}" = "no" ]; then
WITHOSS=no
fi
+WITH_PA=no
+PA_OPT="-DUSE_PORTAUDIO=OFF"
+if pkg-config --exists portaudio-2.0 && [ "${PORTAUDIO:-yes}" = "yes" ]; then
+ WITH_PA=yes
+ PA_OPT="-DUSE_PORTAUDIO=ON"
+fi
+
SLKCFLAGS+=" -DNDEBUG"
mkdir -p gtk/build
cd gtk/build
@@ -103,7 +111,7 @@ cd gtk/build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_BINDIR=games \
- $PULSEOPT $OSSOPT \
+ $PULSEOPT $OSSOPT $PA_OPT \
-DCMAKE_INSTALL_DATAROOTDIR=share \
-DUSE_SYSTEMZIP=OFF \
-DCMAKE_BUILD_TYPE=Release ..
@@ -187,9 +195,10 @@ cp -a LICENSE README* docs/* unix/docs/* unix/snes9x.conf.default $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-sed -e "s,@WITHPULSE@,$WITHPULSE," \
- -e "s,@WITHOSS@,$WITHOSS," \
- -e "s,@build_ra@,$build_ra," \
+sed -e "s,@PU@,$WITHPULSE," \
+ -e "s,@OSS@,$WITHOSS," \
+ -e "s,@PA@,$WITH_PA," \
+ -e "s,@RA@,$build_ra," \
< $CWD/slack-desc \
> $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh