games/qzdoom: Fix -current build.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2021-11-09 14:17:42 -05:00 committed by Willy Sudiarto Raharjo
parent c707e5a567
commit a1f71ad049
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 47 additions and 5 deletions

View file

@ -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"

View file

@ -9,6 +9,10 @@
# 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.
@ -34,7 +38,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=qzdoom
VERSION=${VERSION:-2.1.0}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -46,9 +50,6 @@ if [ -z "$ARCH" ]; then
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@ -86,10 +87,17 @@ 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 {} \+
# 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.
sed -i '/libfluidsynth\.so/s,\.1,.2,' \
# 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.