mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
games/snes9x: Fix build without portaudio.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
dd4345a6a0
commit
d944e377ac
3 changed files with 27 additions and 10 deletions
|
@ -31,10 +31,18 @@ Notes:
|
||||||
or RETROARCH=no to forcibly disable the core. Note that RetroArch
|
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
|
doesn't have to be installed to build the libretro core, but it's
|
||||||
useless without RetroArch installed. Also note: the libretro core
|
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,
|
- OSS audio is disabled by default. Most users won't be affected,
|
||||||
since PulseAudio is now the default audio system on Slackware, and
|
since PulseAudio is now the default audio system on Slackware, and
|
||||||
ALSA is the fallback option. If you *need* OSS support, set OSS=yes
|
ALSA is the fallback option. If you *need* OSS support, set OSS=yes
|
||||||
in the script's environment. You may also disable PulseAudio by
|
in the script's environment.
|
||||||
setting PULSE=no in the 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.
|
||||||
|
|
|
@ -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: Workstation. The games include some real gems that were only ever
|
||||||
snes9x: released in Japan.
|
snes9x: released in Japan.
|
||||||
snes9x:
|
snes9x:
|
||||||
snes9x: Build options: PULSE=@WITHPULSE@ OSS=@WITHOSS@ RETROARCH=@build_ra@
|
snes9x: Build options:
|
||||||
snes9x:
|
snes9x: PULSE=@PU@ OSS=@OSS@ RETROARCH=@RA@ PORTAUDIO=@PA@
|
||||||
snes9x:
|
snes9x:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
# 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.
|
# 20230410 bkw: update for 1.62.3.
|
||||||
# Most of the work needed for this update was done by M.Dinslage,
|
# 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
|
# to whom I owe thanks. I updated the man page, and added the
|
||||||
|
@ -18,7 +19,7 @@ cd $(dirname $0) ; CWD=$(pwd)
|
||||||
|
|
||||||
PRGNAM=snes9x
|
PRGNAM=snes9x
|
||||||
VERSION=${VERSION:-1.62.3}
|
VERSION=${VERSION:-1.62.3}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-2}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
PKGTYPE=${PKGTYPE:-tgz}
|
PKGTYPE=${PKGTYPE:-tgz}
|
||||||
|
|
||||||
|
@ -95,6 +96,13 @@ if [ "${OSS:-no}" = "no" ]; then
|
||||||
WITHOSS=no
|
WITHOSS=no
|
||||||
fi
|
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"
|
SLKCFLAGS+=" -DNDEBUG"
|
||||||
mkdir -p gtk/build
|
mkdir -p gtk/build
|
||||||
cd gtk/build
|
cd gtk/build
|
||||||
|
@ -103,7 +111,7 @@ cd gtk/build
|
||||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
-DCMAKE_INSTALL_BINDIR=games \
|
-DCMAKE_INSTALL_BINDIR=games \
|
||||||
$PULSEOPT $OSSOPT \
|
$PULSEOPT $OSSOPT $PA_OPT \
|
||||||
-DCMAKE_INSTALL_DATAROOTDIR=share \
|
-DCMAKE_INSTALL_DATAROOTDIR=share \
|
||||||
-DUSE_SYSTEMZIP=OFF \
|
-DUSE_SYSTEMZIP=OFF \
|
||||||
-DCMAKE_BUILD_TYPE=Release ..
|
-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
|
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
mkdir -p $PKG/install
|
mkdir -p $PKG/install
|
||||||
sed -e "s,@WITHPULSE@,$WITHPULSE," \
|
sed -e "s,@PU@,$WITHPULSE," \
|
||||||
-e "s,@WITHOSS@,$WITHOSS," \
|
-e "s,@OSS@,$WITHOSS," \
|
||||||
-e "s,@build_ra@,$build_ra," \
|
-e "s,@PA@,$WITH_PA," \
|
||||||
|
-e "s,@RA@,$build_ra," \
|
||||||
< $CWD/slack-desc \
|
< $CWD/slack-desc \
|
||||||
> $PKG/install/slack-desc
|
> $PKG/install/slack-desc
|
||||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||||
|
|
Loading…
Reference in a new issue