diff options
author | B. Watson <yalhcru@gmail.com> | 2020-10-25 02:02:37 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-10-31 11:15:37 +0700 |
commit | 63c0f8d3e150cd385055d1ed11094f29064c012a (patch) | |
tree | 3b84b6423f45af5f2372e9b994983d825f460ca5 /games | |
parent | 70518dbaedd94c3d6c3727449bc2119ae220a36e (diff) |
games/xroar: Updated for version 0.36.2.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/xroar/README | 21 | ||||
-rw-r--r-- | games/xroar/README_SBo.txt | 40 | ||||
-rw-r--r-- | games/xroar/slack-desc | 4 | ||||
-rw-r--r-- | games/xroar/xroar.SlackBuild | 80 | ||||
-rw-r--r-- | games/xroar/xroar.info | 8 |
5 files changed, 96 insertions, 57 deletions
diff --git a/games/xroar/README b/games/xroar/README index 6b78012d7a19..66ac73893d5b 100644 --- a/games/xroar/README +++ b/games/xroar/README @@ -9,24 +9,5 @@ http://en.wikipedia.org/wiki/TRS-80_Color_Computer http://archive.worldofdragon.org/index.php?title=Main_Page http://archive.worldofdragon.org/archive/index.php -Optional dependencies: +For optional dependencies and build options, see README_SBo.txt. -SDL2 - if you prefer SDL2 to SDL1, install SDL2 before building xroar. - I haven't noticed any difference between xroar built with SDL1 or SDL2, - but the option is there in case you need it. If SDL2 is installed, - you can build without it by setting SDL2=no in the environment. - -gtkglext - if you want a full GTK+ user interface, install gtkglext - before building xroar. If gtkglext is installed, you can build - without it by setting GTKGLEXT=no in the environment. - -jack - if you want to use JACK for audio output, install jack and set - JACK=yes in the environment before building xroar. If JACK audio has - x-runs, try 'setcap cap_ipc_lock,cap_sys_nice=ep /usr/games/xroar'. - -Other build options (environment variables): - -OSS - use OSS for audio? Default is "no", export OSS="yes" to enable. - Most users won't need this. - -PULSE - use PulseAudio? Default is "yes", export PULSE="no" to disable. diff --git a/games/xroar/README_SBo.txt b/games/xroar/README_SBo.txt new file mode 100644 index 000000000000..c7ccc12db306 --- /dev/null +++ b/games/xroar/README_SBo.txt @@ -0,0 +1,40 @@ +Optional Dependencies +===================== + +SDL2 - If this is installed, xroar's alternate "bare-bones" SDL2 + user inteface will be available via the "-ui sdl" option. + +jack - if you want to use JACK for audio output, install jack and set + JACK=yes in the environment before building xroar. If JACK audio has + x-runs, try 'setcap cap_ipc_lock,cap_sys_nice=ep /usr/games/xroar'. + + +Environment Variables +===================== + +GTKGLEXT - If you have gtkglext installed, but don't want to build + xroar with it, export GTKGLEXT=no [1] [2]. + +SDL2 - If you have SDL2 installed, but don't want to build xroar with + it, export SDL2=no [2]. + +OSS - use OSS for audio? Default is "no", export OSS="yes" to enable. + Most users won't need this. + +PULSE - use PulseAudio? Default is "yes", export PULSE="no" to disable. + + +Notes +===== + +[1]: Yes, gtkglext is optional, despite being listed in REQUIRES in + the .info file. There's no "either-or" syntax for REQUIRES, so + I had to list either gtkglext or SDL2, and the gtkglext UI + is a lot nicer so it's what most people will want. + +[2]: At least one of SDL2 or gtkglext is required, so you can't build + with SDL2=no GTKGLEXT=no. If you want to be super-pedantic, yes, + it *is* possible to build xroar without either gtkglext or SDL2, + but the result is that xroar won't display anything at all. This + is useless and confusing, nobody wants it, and I'm not willing to + support it. diff --git a/games/xroar/slack-desc b/games/xroar/slack-desc index c87520bc5fda..4a27a9c5abf4 100644 --- a/games/xroar/slack-desc +++ b/games/xroar/slack-desc @@ -13,7 +13,7 @@ xroar: DS and Windows. Due to hardware similarities, XRoar also emulates xroar: the Tandy Colour Computer (CoCo) models 1 & 2. xroar: xroar: This package is built with: -xroar: SDL version: @SDLVER@ | GtkGLExt: @GTKGLEXT@ -xroar: PulseAudio: @PULSE@ | OSS audio: @OSS@ | JACK audio: @JACK@ +xroar: GtkGLExt: @GTKGLEXT@ | SDL2: @SDL2@ | +xroar: PulseAudio: @PULSE@ | OSS audio: @OSS@ | JACK audio: @JACK@ xroar: xroar: diff --git a/games/xroar/xroar.SlackBuild b/games/xroar/xroar.SlackBuild index c068ce6b19d0..9a38359102a8 100644 --- a/games/xroar/xroar.SlackBuild +++ b/games/xroar/xroar.SlackBuild @@ -6,6 +6,13 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20201025 bkw: +# - update for 0.36.2 +# - the SDL 1.x UI is gone. One or the other of SDL2, gtkglext is +# required. Actually not really: you can build without either one, +# in which case you get an xroar that has no display at all! Added +# code to the script to prevent this from happening. + # 20191130 bkw: # - update for 0.35.4 # - restore the SDL1 build, now that it builds again @@ -31,7 +38,7 @@ # 20170122 bkw: update for 0.34.7 PRGNAM=xroar -VERSION=${VERSION:-0.35.4} +VERSION=${VERSION:-0.36.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -64,40 +71,50 @@ fi set -e -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ - \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +### Build options +# Lots of these. Check them immediately (don't bother to extract the +# source if there's a problem). # Most users will want to leave OSS and PULSE alone. - -# Can't check ldd output to see if OSS is built-in, so take -# some care to leave the value of OSS presentable for use in -# the slack-desc. -OSS="${OSS:-no}" -case "$OSS" in - y*|Y*) OSS=yes ;; - *) OSS=no ;; -esac - -[ "$OSS" = "yes" ] || OSSOPT="--without-oss" +[ "${OSS:-no}" = "yes" ] || OSSOPT="--without-oss" [ "${PULSE:-yes}" = "yes" ] || PULSEOPT="--without-pulse" # Not sure why anyone would need this, but it's easy to support. JACKOPT="--without-jack" [ "${JACK:-no}" = "yes" ] && JACKOPT="--with-jack" -[ "${SDL2:-yes}" = "no" ] && SDL2OPT="--without-sdl2" +SDL2=${SDL2:-yes} +GTKGLEXT=${GTKGLEXT:-yes} -[ "${GTKGLEXT:-yes}" = "no" ] && GTKGLOPT="--without-gtkgl" +if [ "$SDL2" = "yes" ]; then + pkg-config --exists sdl2 || SDL2=no +fi -# fix underlinking via LDFLAGS instead of a .diff +if [ "$GTKGLEXT" = "yes" ]; then + pkg-config --exists gtkglext-1.0 || GTKGLEXT=no +fi +echo "=== SDL2=$SDL2, GTKGLEXT=$GTKGLEXT" +if [ "$SDL2" != "yes" ] && [ "$GTKGLEXT" != "yes" ]; then + echo "*** Fatal error: cannot build without at least one of SDL2 or gtkglext" 1>&2 + exit 1 +fi + +[ "${SDL2:-yes}" != "yes" ] && SDL2OPT="--without-sdl2" +[ "${GTKGLEXT:-yes}" != "yes" ] && GTKGLOPT="--without-gtkgl" +### End of build options. + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# fix underlinking via LDFLAGS instead of a .diff LDFLAGS="-lm" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -116,16 +133,16 @@ 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 -PULSE=no +# reset these for use in the slack-desc +SDL2=no; JACK=no; GTKGLEXT=no; PULSE=no; OSS=no + +# actually examine the binary to figure out build options. ldd $PKG/usr/games/$PRGNAM > ldd.tmp -grep -q libSDL2 ldd.tmp && SDLVER=2.0 +grep -q libSDL2 ldd.tmp && SDL2=yes grep -q libjack ldd.tmp && JACK=yes grep -q libgtkglext ldd.tmp && GTKGLEXT=yes grep -q libpulse.so ldd.tmp && PULSE=yes +strings $PKG/usr/games/$PRGNAM | grep -q /dev/dsp && OSS=yes # man page needs to be in section 6, since this is in games/ mkdir -p $PKG/usr/man/man6 @@ -165,10 +182,11 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install sed -e "s,@JACK@,$JACK," \ - -e "s,@SDLVER@,$SDLVER," \ + -e "s,@SDL2@,$SDL2," \ -e "s,@GTKGLEXT@,$GTKGLEXT," \ -e "s,@PULSE@,$PULSE," \ -e "s,@OSS@,$OSS," \ + -e "s,: no,& ,g" \ $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh diff --git a/games/xroar/xroar.info b/games/xroar/xroar.info index f40281e8f7e6..88d6b3a35ad4 100644 --- a/games/xroar/xroar.info +++ b/games/xroar/xroar.info @@ -1,10 +1,10 @@ PRGNAM="xroar" -VERSION="0.35.4" +VERSION="0.36.2" HOMEPAGE="http://www.6809.org.uk/dragon/xroar.shtml" -DOWNLOAD="http://www.6809.org.uk/xroar/dl/0.35/xroar-0.35.4.tar.gz" -MD5SUM="072fb6c260840ff6e6f12083a4907939" +DOWNLOAD="http://www.6809.org.uk/xroar/dl/xroar-0.36.2.tar.gz" +MD5SUM="c1bcc681508c5e97c335c7d71b2abd4b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="xroar-roms" +REQUIRES="gtkglext xroar-roms" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" |