diff options
Diffstat (limited to 'games/qzdoom')
-rw-r--r-- | games/qzdoom/README | 5 | ||||
-rw-r--r-- | games/qzdoom/README_SBo.txt | 16 | ||||
-rw-r--r-- | games/qzdoom/compilefix.diff | 34 | ||||
-rw-r--r-- | games/qzdoom/doinst.sh | 6 | ||||
-rw-r--r-- | games/qzdoom/qzdoom.SlackBuild | 111 | ||||
-rw-r--r-- | games/qzdoom/qzdoom.info | 6 | ||||
-rw-r--r-- | games/qzdoom/slack-desc | 2 |
7 files changed, 143 insertions, 37 deletions
diff --git a/games/qzdoom/README b/games/qzdoom/README index 23eed5a9c2..ae6406d25c 100644 --- a/games/qzdoom/README +++ b/games/qzdoom/README @@ -2,6 +2,9 @@ qzdoom (software-rendered engine for Doom and related games) QZDoom is a continuation of dpJudas's truecolor software rendering, for ZDoom, merged with and forked from GZDoom. It supports Doom, -Doom II, Heretic, Hexen, Strife, and a most other IWAD games. +Doom II, Heretic, Hexen, Strife, and most other IWAD games. See README_SBo.txt for optional runtime dependencies. + +Starting with qzdoom-2.1.0 BUILD=2, it's now safe to install gzdoom +and qzdoom on the same Slackware system. diff --git a/games/qzdoom/README_SBo.txt b/games/qzdoom/README_SBo.txt index ea3125ad01..f9ecf0ec63 100644 --- a/games/qzdoom/README_SBo.txt +++ b/games/qzdoom/README_SBo.txt @@ -20,17 +20,17 @@ To hear the in-game music, there are several options. In the game menu, select "Options | Sound Options" and set "MIDI Device" to one of the below: -1. FluidSynth - Install fluidsynth and fluid-soundfont. These are runtime -dependencies (no need to rebuild qzdoom). +1. FluidSynth - Install fluid-soundfont. This is a runtime dependency + (no need to rebuild qzdoom). 2. Timidity - Install TiMidity++ and either eawpats or freepats (all -runtime dependencies), and set up /etc/timidity/timidity.cfg to use -it. This uses more CPU than FluidSynth, and may make the framerate -stutter and jerk even on high-end systems. + runtime dependencies), and set up /etc/timidity/timidity.cfg to use + it. This uses more CPU than FluidSynth, and may make the framerate + stutter and jerk even on high-end systems. 3. GUS or OPL - Nothing extra required; these are software emulations -of classic soundcards from the early 1990s. They may sound "clunky" to -modern ears, but they may also bring back fond memories for long-time -Doom players. + of classic soundcards from the early 1990s. They may sound "clunky" to + modern ears, but they may also bring back fond memories for long-time + Doom players. qzdoom also supports WildMIDI, but this is currently not available on SBo. diff --git a/games/qzdoom/compilefix.diff b/games/qzdoom/compilefix.diff new file mode 100644 index 0000000000..b156e873d3 --- /dev/null +++ b/games/qzdoom/compilefix.diff @@ -0,0 +1,34 @@ +diff -Naur qzdoom-q2.1.0/game-music-emu/CMakeLists.txt qzdoom-q2.1.0.patched/game-music-emu/CMakeLists.txt +--- qzdoom-q2.1.0/game-music-emu/CMakeLists.txt 2018-06-07 07:27:25.000000000 -0400 ++++ qzdoom-q2.1.0.patched/game-music-emu/CMakeLists.txt 2021-11-09 13:58:55.345649214 -0500 +@@ -89,7 +89,7 @@ + if (__LIBGME_TEST_VISIBILITY) + # get the gcc version + exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info) +- string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") ++ string (REGEX MATCH "[1-9][0-9]*\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") + + # gcc <4.1 had poor support for symbol visibility + if ((${_gcc_version} VERSION_GREATER "4.1") OR (${_gcc_version} VERSION_EQUAL "4.1")) +diff -Naur qzdoom-q2.1.0/src/scripting/types.cpp qzdoom-q2.1.0.patched/src/scripting/types.cpp +--- qzdoom-q2.1.0/src/scripting/types.cpp 2018-06-07 07:27:25.000000000 -0400 ++++ qzdoom-q2.1.0.patched/src/scripting/types.cpp 2021-11-09 14:13:57.493590140 -0500 +@@ -33,6 +33,7 @@ + ** + */ + ++#include <limits> + #include "vmintern.h" + #include "s_sound.h" + #include "dthinker.h" +diff -Naur qzdoom-q2.1.0/src/sound/oplsynth/OPL3.cpp qzdoom-q2.1.0.patched/src/sound/oplsynth/OPL3.cpp +--- qzdoom-q2.1.0/src/sound/oplsynth/OPL3.cpp 2018-06-07 07:27:25.000000000 -0400 ++++ qzdoom-q2.1.0.patched/src/sound/oplsynth/OPL3.cpp 2021-11-09 14:15:14.021585129 -0500 +@@ -43,6 +43,7 @@ + * + */ + ++#include <limits> + #include <math.h> + + #include "doomtype.h" diff --git a/games/qzdoom/doinst.sh b/games/qzdoom/doinst.sh index 5fb28930db..3e5691a052 100644 --- a/games/qzdoom/doinst.sh +++ b/games/qzdoom/doinst.sh @@ -1,3 +1,9 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/games/qzdoom/qzdoom.SlackBuild b/games/qzdoom/qzdoom.SlackBuild index 9a4cac5913..bcebcba2aa 100644 --- a/games/qzdoom/qzdoom.SlackBuild +++ b/games/qzdoom/qzdoom.SlackBuild @@ -1,18 +1,46 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for qzdoom -# Written by B. Watson (yalhcru@gmail.com) +# Written by B. Watson (urchlay@slackware.uk) # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # Heavily based on gzdoom.SlackBuild, since gzdoom and qzdoom are synced # up regularly. +# 20211109 bkw: BUILD=3 +# - fix compile for -current. +# - fix fluidsynth hack for -current. + +# 20201027 bkw: BUILD=2 +# - Updated download URL. +# - Install .pk3 files somewhere else, so they don't conflict with gzdoom. +# - Use upstream icon (also scaled versions in /usr/share/icons). +# - Make fluidsynth MIDI work again. +# - Fix <unknown version> in the window title. +# - Remove extraneous article from README & slack-desc ("a most" => "most"). + +# Note about "new" releases: + +# qzdoom now belongs to a different github user, so the URL is +# updated... but there's still no new release of it. If you check the +# repo, you'll see the same releases as gzdoom (e.g. g4.4.2). These +# are *not* qzdoom, they're gzdoom (try downloading the tarballs from +# the qzdoom and gzdoom repos with the same version number and diffing +# them). So only releases (tags) that begin with "q" are really +# qzdoom, and 2.1.0 is still the latest. + +# TL;DR: Please don't email me saying there's a new release unless the +# version number starts with "q". + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=qzdoom VERSION=${VERSION:-2.1.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -22,7 +50,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} @@ -43,44 +75,75 @@ fi set -e +SRCVER=q$VERSION + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-q$VERSION -tar xvf $CWD/$PRGNAM-q$VERSION.tar.gz -cd $PRGNAM-q$VERSION +rm -rf $PRGNAM-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER 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 {} \+ + +# patch fixes 2 things: +# - stoopid gcc version detection can't cope with 2-digit numbers. +# - take better aim at the moving target that is the C++ standard. +# specifically a couple of files need '#include <limits>'. +patch -p1 < $CWD/compilefix.diff + +# 20201027 bkw: dirty hack to get fluidsynth 2.x to work. qzdoom's +# fluidsynth support stopped working when fluidsynth got updated +# to 2.x. +# 20211109 bkw: -current now has an even newer fluidsynth (so.3). +sed -i '/libfluidsynth\.so/s,\.1,.3,' \ + src/sound/mididevices/music_fluidsynth_mididevice.cpp + +# 20201027 bkw: fix the '<unknown version>' in the window title. +( echo "#define GIT_DESCRIPTION \"$VERSION\"" + echo "#define GIT_HASH \"release\"" + echo "#define GIT_TIME __DATE__" ) > src/gitinfo.h + +# 20201027 bkw: change SHARE_DIR to qzdoom, to avoid stepping on or +# accidentally loading the *.pk3 stuff from gzdoom. This won't stop +# qzdoom from finding the IWADs in /usr/share/games/doom since this +# path is also searched. SLKCFLAGS="$SLKCFLAGS -DNDEBUG -fuse-ld=gold" - +SD=/usr/share/games/$PRGNAM mkdir -p build cd build cmake \ - -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS -DSHARE_DIR=\\\"/usr/share/games/doom\\\"" \ - -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS -DSHARE_DIR=\\\"/usr/share/games/doom\\\"" \ + -DCMAKE_C_FLAGS_RELEASE="$SLKCFLAGS -DSHARE_DIR=\\\"$SD\\\"" \ + -DCMAKE_CXX_FLAGS_RELEASE="$SLKCFLAGS -DSHARE_DIR=\\\"$SD\\\"" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DINSTALL_PATH=games \ + -DINSTALL_DOCS_PATH=doc/$PRGNAM-$VERSION \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DINSTALL_PK3_PATH=$SD \ -DCMAKE_BUILD_TYPE=Release .. make VERBOSE=1 make install/strip DESTDIR=$PKG VERBOSE=1 cd .. -# no easy way to coerce the docs to go where they should, so: -mkdir -p $PKG/usr/doc/ -mv $PKG/usr/share/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION -rm -rf $PKG/usr/share/doc - -# icon is the same as gzdoom's, .desktop written by SlackBuild author. -mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps +# .desktop written by SlackBuild author. +mkdir -p $PKG/usr/share/applications cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png +# New-school desktop-ey icons. +for i in 16 22 32 48 64 128 256; do + SIZE=${i}x${i} + DIR=$PKG/usr/share/icons/hicolor/$SIZE/apps + mkdir -p $DIR + convert src/posix/zdoom.xpm -resize $SIZE $DIR/$PRGNAM.png +done + +# Old-school windowmanagerish icon. +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +# docs already installed. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -88,4 +151,4 @@ 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/qzdoom/qzdoom.info b/games/qzdoom/qzdoom.info index 7b81200484..3a9fc199b4 100644 --- a/games/qzdoom/qzdoom.info +++ b/games/qzdoom/qzdoom.info @@ -1,10 +1,10 @@ PRGNAM="qzdoom" VERSION="2.1.0" HOMEPAGE="https://qzdoom.drdteam.org/" -DOWNLOAD="https://github.com/raa-eruanna/qzdoom/archive/q2.1.0/qzdoom-q2.1.0.tar.gz" +DOWNLOAD="https://github.com/madame-rachelle/qzdoom/archive/q2.1.0/qzdoom-q2.1.0.tar.gz" MD5SUM="170bb4b75d6b00030224bf250074c659" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="SDL2 OpenAL" +REQUIRES="" MAINTAINER="B. Watson" -EMAIL="yalhcru@gmail.com" +EMAIL="urchlay@slackware.uk" diff --git a/games/qzdoom/slack-desc b/games/qzdoom/slack-desc index f78128c5bb..3ac2e45583 100644 --- a/games/qzdoom/slack-desc +++ b/games/qzdoom/slack-desc @@ -10,7 +10,7 @@ qzdoom: qzdoom (software-rendered engine for Doom and related games) qzdoom: qzdoom: QZDoom is a continuation of dpJudas's truecolor software rendering qzdoom: for ZDoom, merged with and forked from GZDoom. It supports Doom, -qzdoom: Doom II, Heretic, Hexen, Strife, and a most other IWAD games. +qzdoom: Doom II, Heretic, Hexen, Strife, and most other IWAD games. qzdoom: qzdoom: qzdoom: |