summaryrefslogtreecommitdiffstats
path: root/games/doomretro
diff options
context:
space:
mode:
Diffstat (limited to 'games/doomretro')
-rw-r--r--games/doomretro/README16
-rw-r--r--games/doomretro/doomretro.SlackBuild113
-rw-r--r--games/doomretro/doomretro.info12
-rw-r--r--games/doomretro/doomretro.sh51
-rw-r--r--games/doomretro/fix-sdl-mixer-fluidsynth.diff14
5 files changed, 109 insertions, 97 deletions
diff --git a/games/doomretro/README b/games/doomretro/README
index 35a68083b6..478d8ba33d 100644
--- a/games/doomretro/README
+++ b/games/doomretro/README
@@ -1,25 +1,17 @@
+doomretro (Doom source port)
+
DOOM Retro is the classic, refined DOOM source port. It represents
what DOOM should be today, in all its dark, gritty, unapologetically
-pixellated glory. DOOM Retro's source code is forked from Chocolate
+pixellated glory. DOOM Retro's source code is forked from Chocolate
DOOM, with enhancements from 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
+game data. 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 variable to the path to a soundfont in
-sf2 format:
-
-i.e.
-
- export SDL_SOUNDFONTS=/path/to/soundfonts.sf2
-
Settings are stored in $HOME/.config/doomretro. After starting Doom
Retro for the first time, you will find an editable doomretro.cfg
there.
diff --git a/games/doomretro/doomretro.SlackBuild b/games/doomretro/doomretro.SlackBuild
index 12f397b13a..46311d8b64 100644
--- a/games/doomretro/doomretro.SlackBuild
+++ b/games/doomretro/doomretro.SlackBuild
@@ -1,9 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for doomretro
# Copyright 2017 Dugan Chen Canada
-# Copyright 2020 B. Watson
+# Copyright 2020-2023 B. Watson
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,6 +23,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230715 bkw: update for v4.9.2.
+# - finally fix the segfaults when the music changes.
+# - remove music note from README, since music works now.
+# - remove -nomusic from the .desktop file.
+
+# 20230114 bkw: update for v4.7.2, add note about music to README.
+# 20220611 bkw: update for v4.5.1, fix 16x16 icon path.
+# 20211006 bkw:
+# - update for v4.2.3.
+# - get rid of wrapper script; game now picks an IWAD itself.
+# 20210224 bkw: update for v4.0.3
# 20200927 bkw: update for v3.6.1, reformat README to 72 chars
# 20200804 bkw: update for v3.5.10
# 20200413 bkw:
@@ -31,19 +42,13 @@
# - 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***
+cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=doomretro
-VERSION=${VERSION:-3.6.1}
+VERSION=${VERSION:-4.9.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -53,7 +58,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -74,10 +83,17 @@ fi
set -e
+LIBNAM=SDL2_mixer
+LIBVER=${LIBVER:-2.0.4}
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
+TOPDIR=$TMP/$PRGNAM-build
+rm -rf $TOPDIR
+mkdir -p $TOPDIR
+cd $TOPDIR
+
+tar xvf $CWD/$LIBNAM-$LIBVER.tar.lz
# All these --excludes save ~30MB in /tmp, and avoid the recursive chmod
# tripping over broken symlinks.
@@ -87,11 +103,46 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz \
--exclude=msvc \
--exclude=SDL2\*
-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 {} \+
+# 20230715 bkw: This is an ugly way to fix an issue caused by Slackware's
+# SDL2_mixer package. doomretro uses SDL2_mixer's FluidSynth support for
+# its music. And SDL2_mixer-2.0.4 (what's in Slackware 15.0) has a crashing
+# bug: any time Mix_FreeMusic(handle) is called when the handle is using
+# fluidsynth, we get a use-after-free that causes the app to segfault.
+# More details, including a link to the patch I use, here:
+# https://github.com/FluidSynth/fluidsynth/issues/748
+# The fix, here, is to build a *static* patched SDL2_mixer for
+# doomretro to link with. Lot of work, but it does fix the issue. When
+# Slackware 15.1 releases, we should be able to get rid of this.
+
+mkdir -p $LIBNAM-install
+cd $LIBNAM-$LIBVER
+
+patch -p0 < $CWD/fix-sdl-mixer-fluidsynth.diff
+
+# N.B. --disable-music-mp3-mad-gpl because enabling it breaks the build,
+# as we have no static libmad.a. doesn't matter, because doomretro doesn't
+# use mp3 audio anyway.
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=$TOPDIR/$LIBNAM-install \
+ --sysconfdir=/etc \
+ --disable-shared \
+ --enable-static \
+ --disable-dependency-tracking \
+ --disable-music-mp3-mad-gpl \
+ --build=$ARCH-slackware-linux
+
+make
+make install
+
+# this actually works fine, amazingly enough:
+export PKG_CONFIG_PATH=$TOPDIR/$LIBNAM-install/lib/pkgconfig:$PKG_CONFIG_PATH
+
+cd $TOPDIR/$PRGNAM-$VERSION
mkdir -p build
cd build
cmake \
@@ -102,27 +153,31 @@ cd build
make install/strip DESTDIR=$PKG
cd ..
-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
+mv $PKG/usr/bin $PKG/usr/games
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-mkdir -p $PKG/usr/share/icons/hicolor/{16x16,24x24,32x32,48x48,256x256}/apps
-convert res/$PRGNAM.ico[0] $PKG/usr/share/icons/hicolor/256x256/apps/$PRGNAM.png
-convert res/$PRGNAM.ico[1] $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
-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
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+hicolor=$PKG/usr/share/icons/hicolor
+mkdir -p $hicolor/{16x16,32x32,48x48,256x256}/apps
+convert res/$PRGNAM.ico[0] $hicolor/256x256/apps/$PRGNAM.png
+convert res/$PRGNAM.ico[1] $hicolor/48x48/apps/$PRGNAM.png
+convert res/$PRGNAM.ico[2] $hicolor/32x32/apps/$PRGNAM.png
+convert res/$PRGNAM.ico[3] $hicolor/16x16/apps/$PRGNAM.png
+mkdir -p $PKG/usr/share/pixmaps
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps
+
+# 20230715 bkw: include COPYING.txt from SDL2_mixer, since we statically
+# link it to the binary.
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a CODEOWNERS LICENSE *.md $PKGDOC
+cp -a $TOPDIR/$LIBNAM-$LIBVER/COPYING.txt $PKGDOC/COPYING-SDL2_mixer.txt
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/doomretro/doomretro.info b/games/doomretro/doomretro.info
index 82489d0707..bb63fc2cbf 100644
--- a/games/doomretro/doomretro.info
+++ b/games/doomretro/doomretro.info
@@ -1,10 +1,12 @@
PRGNAM="doomretro"
-VERSION="3.6.1"
+VERSION="4.9.2"
HOMEPAGE="https://www.doomretro.com"
-DOWNLOAD="https://github.com/bradharding/doomretro/archive/v3.6.1/doomretro-3.6.1.tar.gz"
-MD5SUM="d22b85a3adb9b0523171c38dabed2ccb"
+DOWNLOAD="https://github.com/bradharding/doomretro/archive/v4.9.2/doomretro-4.9.2.tar.gz \
+ https://slackware.uk/slackware/slackware64-15.0/source/l/SDL2_mixer/SDL2_mixer-2.0.4.tar.lz"
+MD5SUM="cada4c8f2b6a5b7904c67fd26c14a3e1 \
+ 7ff96cc9ed7855d2a92a92f3c23856ef"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="SDL2_image SDL2_mixer"
+REQUIRES=""
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/doomretro/doomretro.sh b/games/doomretro/doomretro.sh
deleted file mode 100644
index 71b6a0b4f8..0000000000
--- a/games/doomretro/doomretro.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/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
diff --git a/games/doomretro/fix-sdl-mixer-fluidsynth.diff b/games/doomretro/fix-sdl-mixer-fluidsynth.diff
new file mode 100644
index 0000000000..be12c1d8f4
--- /dev/null
+++ b/games/doomretro/fix-sdl-mixer-fluidsynth.diff
@@ -0,0 +1,14 @@
+--- music_fluidsynth.c.orig 2018-10-31 15:59:00.000000000 +0100
++++ music_fluidsynth.c 2021-01-20 18:29:11.610459000 +0100
+@@ -273,9 +273,10 @@
+ static void FLUIDSYNTH_Delete(void *context)
+ {
+ FLUIDSYNTH_Music *music = (FLUIDSYNTH_Music *)context;
++ fluid_settings_t *settings = fluidsynth.fluid_synth_get_settings(music->synth);
+ fluidsynth.delete_fluid_player(music->player);
+- fluidsynth.delete_fluid_settings(fluidsynth.fluid_synth_get_settings(music->synth));
+ fluidsynth.delete_fluid_synth(music->synth);
++ fluidsynth.delete_fluid_settings(settings);
+ SDL_free(music);
+ }
+