diff options
-rw-r--r-- | games/xroar/README_SBo.txt | 50 | ||||
-rw-r--r-- | games/xroar/slack-desc | 4 | ||||
-rw-r--r-- | games/xroar/xroar.SlackBuild | 66 | ||||
-rw-r--r-- | games/xroar/xroar.info | 8 |
4 files changed, 58 insertions, 70 deletions
diff --git a/games/xroar/README_SBo.txt b/games/xroar/README_SBo.txt index 0f685f6196..42e0e61dd5 100644 --- a/games/xroar/README_SBo.txt +++ b/games/xroar/README_SBo.txt @@ -1,15 +1,23 @@ -xroar supports multiple audio systems and has two user interfaces, -gtk2 (using gtkglext) and sdl2 (very bare-bones; no menus). By -default, both UIs are built, as is support for PulseAudio and plain -ALSA audio. For most users, these defaults are just fine. If you have -different needs, read on. +xroar supports multiple audio systems and has support for both Gtk+2 +and Gtk+3, as well as SDL 1.x and SDL 2.x. + +This SlackBuild only builds the Gtk+3 and SDL 2 user interfaces. There +are no longer any options to build with Gtk+2 or SDL 1. + +By default, support for PulseAudio and plain ALSA audio are built. For +most users, these defaults are just fine. If you have different needs, +read on. + Optional Dependencies ===================== 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'. + x-runs, try: + + # setcap cap_ipc_lock,cap_sys_nice=ep /usr/games/xroar + If you don't know what jack is, or why you might want to use it, then you don't want it. @@ -17,36 +25,12 @@ jack - If you want to use JACK for audio output, install jack and set Environment Variables ===================== -JACK - see above. Default: no. - -GTKGLEXT - If you have gtkglext installed, but don't want to build - xroar with it, export GTKGLEXT=no [1] [2]. Default: yes. - -SDL2 - If you don't want to build xroar with SDL2, export SDL2=no [2]. - This will remove the "-ui sdl" option, which is probably - of no consequence since the SDL user interface isn't very - featureful. Default: yes. +JACK - see above. Default: no. Most users won't need this. 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. + Most users won't need this. - -Notes -===== - -[1]: Yes, gtkglext is optional, despite being listed in REQUIRES in - the .info file. I made it a hard dependency because the SDL user - interface has no real GUI features, while the gtkglext UI acts - like a proper GUI application. Users who just take the defaults - will end up with the usable UI. If you're reading this, you're - welcome to ignore the REQUIRES="gtkglext" and build with SDL2 - only, if you have a reason to want to. - -[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. +ALSA audio is always enabled. diff --git a/games/xroar/slack-desc b/games/xroar/slack-desc index 4b844ed3a6..ec87b41b5a 100644 --- a/games/xroar/slack-desc +++ b/games/xroar/slack-desc @@ -13,7 +13,7 @@ xroar: the Tandy MC-10; and some other similar machines or clones. It runs xroar: on a wide variety of platforms. xroar: xroar: This package is built with: -xroar: GtkGLExt: @GTKGLEXT@ | SDL2: @SDL2@ | -xroar: PulseAudio: @PULSE@ | OSS audio: @OSS@ | JACK audio: @JACK@ +xroar: ALSA: @ALSA@ | PulseAudio: @PULSE@ | OSS: @OSS@ | JACK: @JACK@ +xroar: xroar: xroar: diff --git a/games/xroar/xroar.SlackBuild b/games/xroar/xroar.SlackBuild index 1e6bdd3c19..97910ef372 100644 --- a/games/xroar/xroar.SlackBuild +++ b/games/xroar/xroar.SlackBuild @@ -6,6 +6,7 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20241122 bkw: update for 1.7.1, remove gtkglext/sdl1/gtk2 support. # 20240926 bkw: update for 1.6.5 # 20240808 bkw: update for 1.5.5 # 20240314 bkw: update for 1.5.4 @@ -34,7 +35,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=xroar -VERSION=${VERSION:-1.6.5} +VERSION=${VERSION:-1.7.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -76,33 +77,22 @@ set -e # Lots of these. Check them immediately (don't bother to extract the # source if there's a problem). +PKGS="sdl2 gtk+-3.0" + # Most users will want to leave OSS and PULSE alone. [ "${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=${SDL2:-yes} -GTKGLEXT=${GTKGLEXT:-yes} - -if [ "$SDL2" = "yes" ]; then - pkg-config --exists sdl2 || SDL2=no +if [ "${JACK:-no}" = "yes" ]; then + JACKOPT="--with-jack" + PKGS+=" jack" fi -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 +# 20241123 bkw: this gives a useful error message, if a dep is missing. +pkg-config --short-errors --print-errors --exists $PKGS -[ "${SDL2:-yes}" != "yes" ] && SDL2OPT="--without-sdl2" -[ "${GTKGLEXT:-yes}" != "yes" ] && GTKGLOPT="--without-gtkgl" ### End of build options. rm -rf $PKG @@ -112,15 +102,25 @@ 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 {} \+ +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20241123 bkw: the old gtk2 + sdl1 + gtkglext UI can still be built, +# but gtk3 and sdl2 have been part of core Slackware for years. From +# now on, only the gtk3/sdl2 build is supported here. Therefore, added +# --without-gtk2 and --without-gtkgl. +# --without-tre is unrelated (tre is a regex library we have on SBo), +# and so far redundant, as it's disabled by default. Force-disable it, +# to avoid surprises if it ever gets enabled by default. We don't need +# tre because our OS has POSIX regex support, which xroar will use instead +# of tre. # fix underlinking via LDFLAGS instead of a .diff LDFLAGS="-lm" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ - $OSSOPT $PULSEOPT $JACKOPT $SDL2OPT $GTKGLOPT \ + $OSSOPT $PULSEOPT $JACKOPT \ --bindir=/usr/games \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ @@ -129,24 +129,29 @@ CXXFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --infodir=/usr/info \ + --without-gtk2 \ + --without-gtkgl \ + --without-tre \ --build=$ARCH-slackware-linux -make +make V=1 make install DESTDIR=$PKG strip $PKG/usr/games/$PRGNAM # reset these for use in the slack-desc -SDL2=no; JACK=no; GTKGLEXT=no; PULSE=no; OSS=no +JACK=no; PULSE=no; OSS=no; ALSA=no # actually examine the binary to figure out build options. this may # seem like overkill, but it's very handy when updating to new xroar # versions (if the slack-desc doesn't match the environment, something # has changed in xroar and this script needs fixing). -ldd $PKG/usr/games/$PRGNAM > ldd.tmp -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 +# 20241123 bkw: go ahead and include ALSA: yes|no in the slack-desc. This +# will always be yes for a regular Slackware install, but it might be +# no if someone's e.g. using OSSv4. +objdump -p $PKG/usr/games/$PRGNAM | grep NEEDED | awk '{ print $2 }' > ldd.tmp +grep -q libjack ldd.tmp && JACK=yes +grep -q libpulse ldd.tmp && PULSE=yes +grep -q libasound ldd.tmp && ALSA=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/ @@ -195,10 +200,9 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install sed -e "s,@JACK@,$JACK," \ - -e "s,@SDL2@,$SDL2," \ - -e "s,@GTKGLEXT@,$GTKGLEXT," \ -e "s,@PULSE@,$PULSE," \ -e "s,@OSS@,$OSS," \ + -e "s,@ALSA@,$ALSA," \ -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 93c5f598c8..f0505fa9d4 100644 --- a/games/xroar/xroar.info +++ b/games/xroar/xroar.info @@ -1,10 +1,10 @@ PRGNAM="xroar" -VERSION="1.6.5" +VERSION="1.7.1" HOMEPAGE="https://www.6809.org.uk/dragon/xroar.shtml" -DOWNLOAD="https://www.6809.org.uk/xroar/dl/xroar-1.6.5.tar.gz" -MD5SUM="728f5bbcac265b3a35336a928809f587" +DOWNLOAD="https://www.6809.org.uk/xroar/dl/xroar-1.7.1.tar.gz" +MD5SUM="34be34d01903a565df4e31b35a98828c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="gtkglext xroar-roms" +REQUIRES="xroar-roms" MAINTAINER="B. Watson" EMAIL="urchlay@slackware.uk" |