summaryrefslogtreecommitdiff
path: root/games/doomretro
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-04-14 01:52:13 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-04-19 10:52:24 +0700
commit974bceb7acae65baac22d0872d20a451aabbf90a (patch)
tree889a2c000efd9620c69c477e8044f567cec58989 /games/doomretro
parent2e438af4f87dda8adf1a7beb8bdf5b629a2bb743 (diff)
downloadslackbuilds-974bceb7acae65baac22d0872d20a451aabbf90a.tar.gz
games/doomretro: Updated for version 3.5.4, new maintainer.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/doomretro')
-rw-r--r--games/doomretro/README5
-rw-r--r--games/doomretro/doomretro.SlackBuild46
-rw-r--r--games/doomretro/doomretro.desktop2
-rw-r--r--games/doomretro/doomretro.info10
-rw-r--r--games/doomretro/doomretro.sh51
5 files changed, 96 insertions, 18 deletions
diff --git a/games/doomretro/README b/games/doomretro/README
index 96e48436ab..1a4d81b0ee 100644
--- a/games/doomretro/README
+++ b/games/doomretro/README
@@ -5,6 +5,11 @@ other DOOM source ports, as well as many orignal ideas. DOOM Retro is
deliberately minimalist by design, and does a few things differently when
compared with other source ports.
+The game looks in /usr/share/games/doom (and a few other places) for
+game date. To play Shareware Doom, install doom_shareware_data. To play
+Doom 2 or the full version of Doom, copy doom2.wad or doom.wad from the
+game CD or install directory to /usr/share/games/doom.
+
For MIDI playback, first build and install FluidSynth, then build and install
SDL2_mixer (so that it has FluidSynth support), and then build and install DOOM
Retro. Then, before starting DOOM Retro, set the SDL_SOUNDFONTS environment
diff --git a/games/doomretro/doomretro.SlackBuild b/games/doomretro/doomretro.SlackBuild
index 54ffb3e806..6b7c29d392 100644
--- a/games/doomretro/doomretro.SlackBuild
+++ b/games/doomretro/doomretro.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for doomretro
# Copyright 2017 Dugan Chen Canada
+# Copyright 2020 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +23,23 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20200413 bkw:
+# - take over maintenance
+# - update for v3.5.4
+# - move binary to /usr/games
+# - include wrapper script
+
+# *** RANT MODE ON***
+# Every Doom engine on the planet besides this one attempts to load *some*
+# IWAD file, if you don't give it one on the command line. But this one is
+# supposed to pop up a file dialog to let you choose one. Only the dialog
+# code hasn't been ported to Linux. So for us, unlike *all other* Doom
+# source ports, we *must* specify the IWAD file on the command line. So I
+# have to use a wrapper script to make it act like a normal Doom engine...
+# *** RANT MODE OFF***
+
PRGNAM=doomretro
-VERSION=${VERSION:-2.9.3}
+VERSION=${VERSION:-3.5.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,14 +76,19 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+
+# All these --excludes save ~30MB in /tmp, and avoid the recursive chmod
+# tripping over broken symlinks.
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz \
+ --exclude=xcode \
+ --exclude=codeblocks \
+ --exclude=msvc \
+ --exclude=SDL2\*
+
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
mkdir -p build
cd build
@@ -76,11 +97,13 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release ..
make
- make install DESTDIR=$PKG
+ make install/strip DESTDIR=$PKG
cd ..
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+mkdir -p $PKG/usr/games
+mv $PKG/usr/bin/$PRGNAM $PKG/usr/games/$PRGNAM.bin
+rm -rf $PKG/usr/bin
+install -m0755 -oroot -groot $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
@@ -92,8 +115,7 @@ convert res/$PRGNAM.ico[2] $PKG/usr/share/icons/hicolor/32x32/apps/$PRGNAM.png
convert res/$PRGNAM.ico[3] $PKG/usr/share/icons/hicolor/24x24/apps/$PRGNAM.png
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CODEOWNERS LICENSE *.md \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CODEOWNERS LICENSE *.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/games/doomretro/doomretro.desktop b/games/doomretro/doomretro.desktop
index 73ad4a0761..fcb98398f7 100644
--- a/games/doomretro/doomretro.desktop
+++ b/games/doomretro/doomretro.desktop
@@ -3,6 +3,6 @@ Type=Application
Name=Doom Retro
GenericName=Classic refined DOOM source port
Icon=doomretro
-Exec=/usr/bin/doomretro %F
+Exec=/usr/games/doomretro %F
Terminal=false
Categories=Game;ActionGame;
diff --git a/games/doomretro/doomretro.info b/games/doomretro/doomretro.info
index 3ada58dfb1..32e0e4bef3 100644
--- a/games/doomretro/doomretro.info
+++ b/games/doomretro/doomretro.info
@@ -1,10 +1,10 @@
PRGNAM="doomretro"
-VERSION="2.9.3"
+VERSION="3.5.4"
HOMEPAGE="https://www.doomretro.com"
-DOWNLOAD="https://github.com/bradharding/doomretro/archive/v2.9.3/doomretro-2.9.3.tar.gz"
-MD5SUM="f71c3b5176a126a31398f4daca73ecd0"
+DOWNLOAD="https://github.com/bradharding/doomretro/archive/v3.5.4/doomretro-3.5.4.tar.gz"
+MD5SUM="8ff77662d873f143c21b08fe87b9aa14"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="SDL2_image SDL2_mixer"
-MAINTAINER="Dugan Chen"
-EMAIL="thedoogster [at] gmail [dot] com"
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/games/doomretro/doomretro.sh b/games/doomretro/doomretro.sh
new file mode 100644
index 0000000000..71b6a0b4f8
--- /dev/null
+++ b/games/doomretro/doomretro.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# doomretro.sh by B. Watson. Part of the SlackBuilds.org doomretro build.
+# Licensed under the WTFPL.
+
+# 20200414 bkw: doomretro on Linux doesn't open any IWAD file by default,
+# and doesn't offer a file-chooser dialog. So this wrapper script tries
+# to pick a suitable IWAD to use, if it can find one. Notice that this
+# only happens if we're run with no arguments.
+
+# Can't use an absolute path for this, or else the engine expects to
+# read doomretro.wad and write doomretro.cfg to the same directory as
+# the binary.
+realbin=doomretro.bin
+
+if [ "$1" ]; then
+ # we got arguments, just use them as-is
+ exec $realbin "$@"
+fi
+
+# no args, so try to find an IWAD and pass it as an arg to the real exe.
+wadpath="$DOOMWADDIR:\
+$DOOMWADPATH:\
+.:\
+/usr/share/games/doom:\
+/usr/local/share/games/doom:\
+/usr/share/doomretro:\
+/usr/share/doom:\
+/usr/local/doom:\
+$HOME:\
+$HOME/doom:\
+$HOME/.doom:\
+$HOME/.doomwads"
+
+iwads="doom2.wad:doom.wad:doom1.wad"
+
+IFS=:
+for dir in $wadpath; do
+ if [ -d "$dir" ]; then
+ for wad in $iwads; do
+ wad="$dir/$wad"
+ if [ -e "$wad" ]; then
+ echo "$( basename $0 ): Using $wad" 1>&2
+ exec $realbin "$wad"
+ fi
+ done
+ fi
+done
+
+# if we get, no wads found, let the real binary complain about it
+exec $realbin