summaryrefslogtreecommitdiff
path: root/games/xroar/xroar.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/xroar/xroar.SlackBuild')
-rw-r--r--games/xroar/xroar.SlackBuild32
1 files changed, 28 insertions, 4 deletions
diff --git a/games/xroar/xroar.SlackBuild b/games/xroar/xroar.SlackBuild
index 207ccddeb9..a3144c3183 100644
--- a/games/xroar/xroar.SlackBuild
+++ b/games/xroar/xroar.SlackBuild
@@ -6,6 +6,11 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20170822 bkw:
+# - update for 0.34.8
+# - add SDL2=no and GTKGLEXT=no options, mostly for my own testing
+# - record build options in slack-desc
+
# 20170122 bkw:
# - update for 0.34.7
@@ -43,7 +48,7 @@
# - mention gtkglext in README as an optional dep
PRGNAM=xroar
-VERSION=${VERSION:-0.34.7}
+VERSION=${VERSION:-0.34.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -98,13 +103,17 @@ patch -p1 < $CWD/alsa_first.diff
JACKOPT="--without-jack"
[ "${JACK:-no}" = "yes" ] && JACKOPT="--with-jack"
+[ "${SDL2:-yes}" = "no" ] && SDL2OPT="--without-sdl2"
+
+[ "${GTKGLEXT:-yes}" = "no" ] && GTKGLOPT="--without-gtkgl"
+
# fix underlinking via LDFLAGS instead of a .diff
LDFLAGS="-lm" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- $JACKOPT \
+ $JACKOPT $SDL2OPT $GTKGLOPT \
--bindir=/usr/games \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -118,6 +127,15 @@ make
make install DESTDIR=$PKG
strip $PKG/usr/games/$PRGNAM
+# set these for use in the slack-desc
+SDLVER=1.2
+JACK=no
+GTKGLEXT=no
+ldd $PKG/usr/games/$PRGNAM > ldd.tmp
+grep -q libSDL2 ldd.tmp && SDLVER=2
+grep -q libjack ldd.tmp && JACK=yes
+grep -q libgtkglext ldd.tmp && GTKGLEXT=yes
+
# man page needs to be in section 6, since this is in games/
mkdir -p $PKG/usr/man/man6
sed '1s,\<1\>,6,' \
@@ -137,19 +155,21 @@ mkdir -p $PKG/usr/share/xroar/roms
# dragon.rom comes from http://www.6809.org.uk/dragon/dragon.rom
cat $CWD/dragon.rom > $PKG/usr/share/$PRGNAM/roms/mini-dragon.rom
+ROMS="mini-dragon"
# Optional ROM images (from MESS site)
for zip in coco coco2 cocoe dragon32 dragon64; do
if [ -e $CWD/$zip.zip ]; then
rm -f *.rom
unzip $CWD/$zip.zip
install -oroot -groot -m0644 *.rom $PKG/usr/share/$PRGNAM/roms
+ ROMS="$ROMS $zip"
fi
done
# If the user doesn't include a d32.rom from a zip file, make the mini-rom
# the default (at least the emu will start, that way)
if [ ! -e $PKG/usr/share/$PRGNAM/roms/d32.rom ]; then
- ln -s mini-dragon.rom $PKG/usr/share/$PRGNAM/roms/d32.rom
+ ln -s mini-dragon.rom $PKG/usr/share/$PRGNAM/roms/d32.rom
fi
# Icon taken from Fedora package here:
@@ -174,7 +194,11 @@ cp doc/$PRGNAM.html doc/*png $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+sed -e "s,@JACK@,$JACK," \
+ -e "s,@SDLVER@,$SDLVER," \
+ -e "s,@GTKGLEXT@,$GTKGLEXT," \
+ -e "s,@ROMS@,$ROMS," \
+ $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG