summaryrefslogtreecommitdiffstats
path: root/games/gzdoom
diff options
context:
space:
mode:
Diffstat (limited to 'games/gzdoom')
-rw-r--r--games/gzdoom/README11
-rw-r--r--games/gzdoom/doinst.sh1
-rw-r--r--games/gzdoom/gcc13-missing-includes.diff60
-rw-r--r--games/gzdoom/gzdoom.SlackBuild90
-rw-r--r--games/gzdoom/gzdoom.info14
-rw-r--r--games/gzdoom/gzdoom.pngbin1618 -> 0 bytes
-rw-r--r--games/gzdoom/window_title_version.diff35
7 files changed, 138 insertions, 73 deletions
diff --git a/games/gzdoom/README b/games/gzdoom/README
index 7755b41bfe..30176aa78d 100644
--- a/games/gzdoom/README
+++ b/games/gzdoom/README
@@ -1,9 +1,12 @@
+gzdoom (OpenGL port of DOOM)
+
Enhanced OpenGL port of the official DOOM source code that also supports
Heretic, Hexen, and Strife.
-This is the latest version of gzdoom, which may not run well on
-older/slower systems. If gzdoom does't run smoothly on your system,
-try installing gzdoom-legacy instead. Note that gzdoom and gzdoom-legacy
-conflict: only install one or the other.
+This is the latest version of gzdoom, which may not run well
+on older/slower systems. If you have problems, try running with
+"-glversion 3.3". If it still won't start, or doesn't run smoothly on
+your system, try installing gzdoom-legacy instead. Note that gzdoom
+and gzdoom-legacy conflict: only install one or the other.
See README_SBo.txt for optional runtime dependencies.
diff --git a/games/gzdoom/doinst.sh b/games/gzdoom/doinst.sh
index 4a25de5e6f..65c7e2eeb9 100644
--- a/games/gzdoom/doinst.sh
+++ b/games/gzdoom/doinst.sh
@@ -7,4 +7,3 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi
-
diff --git a/games/gzdoom/gcc13-missing-includes.diff b/games/gzdoom/gcc13-missing-includes.diff
new file mode 100644
index 0000000000..4083e06f80
--- /dev/null
+++ b/games/gzdoom/gcc13-missing-includes.diff
@@ -0,0 +1,60 @@
+From ee8c12eac62349f4524229370da20915624485ef Mon Sep 17 00:00:00 2001
+From: Jan Engelhardt <jengelh@inai.de>
+Date: Thu, 30 Mar 2023 23:41:22 +0200
+Subject: [PATCH] build: resolve missing includes under gcc-13
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+$ make
+...
+~/gzdoom/libraries/ZVulkan/src/vulkanbuilders.cpp: In member function ‘std::unique_ptr<VulkanShader> ShaderBuilder::Create(const char*, VulkanDevice*)’:
+~/gzdoom/libraries/ZVulkan/src/vulkanbuilders.cpp:168:28: error: ‘runtime_error’ is not a member of ‘std’
+~/gzdoom/libraries/ZVulkan/include/zvulkan/vk_mem_alloc/vk_mem_alloc.h: In function ‘void VmaUint32ToStr(char*, size_t, uint32_t)’:
+~/gzdoom/libraries/ZVulkan/include/zvulkan/vk_mem_alloc/vk_mem_alloc.h:2410:9: error: ‘snprint ’ was not declared in this scope
+---
+ src/common/rendering/vulkan/system/vk_builders.cpp | 1 +
+ src/common/rendering/vulkan/system/vk_swapchain.cpp | 1 +
+ .../rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h | 2 ++
+ 3 files changed, 4 insertions(+)
+
+diff --git a/src/common/rendering/vulkan/system/vk_builders.cpp b/src/common/rendering/vulkan/system/vk_builders.cpp
+index aff0de50a9..b8d4a13de9 100644
+--- a/src/common/rendering/vulkan/system/vk_builders.cpp
++++ b/src/common/rendering/vulkan/system/vk_builders.cpp
+@@ -20,6 +20,7 @@
+ **
+ */
+
++#include <stdexcept>
+ #include "vk_builders.h"
+ #include "engineerrors.h"
+ #include "renderstyle.h"
+diff --git a/src/common/rendering/vulkan/system/vk_swapchain.cpp b/src/common/rendering/vulkan/system/vk_swapchain.cpp
+index f44139b1f5..e89a6bd823 100644
+--- a/src/common/rendering/vulkan/system/vk_swapchain.cpp
++++ b/src/common/rendering/vulkan/system/vk_swapchain.cpp
+@@ -20,6 +20,7 @@
+ **
+ */
+
++#include <stdexcept>
+ #include "vk_swapchain.h"
+ #include "vk_objects.h"
+ #include "c_cvars.h"
+diff --git a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h b/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h
+index fd4472286b..db0b94f4e8 100644
+--- a/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h
++++ b/src/common/rendering/vulkan/thirdparty/vk_mem_alloc/vk_mem_alloc.h
+@@ -104,6 +104,8 @@ Documentation of all members: vk_mem_alloc.h
+ - [Source repository on GitHub](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator)
+ */
+
++#include <stdio.h>
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+--
+2.40.1
+
diff --git a/games/gzdoom/gzdoom.SlackBuild b/games/gzdoom/gzdoom.SlackBuild
index 808d3fea23..0a599804e2 100644
--- a/games/gzdoom/gzdoom.SlackBuild
+++ b/games/gzdoom/gzdoom.SlackBuild
@@ -1,11 +1,23 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for gzdoom
-# 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.
+# 20230810 bkw: add patch to fix build on -current (does no harm on 15.0).
+# 20230109 bkw: Updated for 4.10.0. Many thanks to fourtysixandtwo for
+# testing this on more capable hardware than I have, and for finding
+# the "-glversion 3.3" argument.
+# 20201115 bkw: Add missing fix_zipdir.diff. Dammit.
+# 20201107 bkw: Updated for 4.5.0.
+# 20201027 bkw:
+# - Updated for 4.4.2.
+# - Add new zmusic dep.
+# - Use 'make install/strip' now that it's supported.
+# - Use upstream's icon, multiple sizes in /usr/share/icons.
+# 20200302 bkw: Updated for 4.3.3.
# 20191201 bkw: Updated for 4.2.4.
# 20181022 bkw: Updated for 3.6.0.
# 20180827 bkw: Updated for 3.5.1.
@@ -25,10 +37,13 @@
# - Stop supporting old versions of gzdoom. The old versions are now
# supported as "gzdoom-legacy" for those that need them.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gzdoom
-VERSION=${VERSION:-4.2.4}
+VERSION=${VERSION:-4.10.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +53,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}
@@ -63,56 +82,75 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-g$VERSION $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-g$VERSION.tar.gz || \
- tar xvf $CWD/g$VERSION.tar.gz || \
- tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || \
- tar xvf $CWD/$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-g$VERSION.tar.gz
cd $PRGNAM-g$VERSION || 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 {} \+
-# gzdoom in windowed mode wants to display its git tag and hash as part
-# of the window title. For releases this shows up as "<unknown version> 0",
-# which doesn't hurt anything but is ugly.
-# This makes the window title appear as e.g. "GZDOOM 2.1.1 (Aug 3 2016)". The
-# date is the build date.
-patch -p1 < $CWD/window_title_version.diff
-sed -i "/#define *VERSIONSTR/s,GIT_DESCRIPTION,\"$VERSION\"," src/version.h
+# 20230810 bkw: patch for gcc 13 (Slackware -current), from AUR, by
+# way of biker_rat on LQ, delivered C/O ponce.
+patch -p1 < $CWD/gcc13-missing-includes.diff
-# This isn't currently used, but was in the past, and will be again I'm sure.
-[ -e $CWD/compilefix.$VERSION.diff ] && \
- patch -p1 < $CWD/compilefix.$VERSION.diff
+# 20201027 bkw: fix the '<unknown version>' in the window title. This
+# used to be done in an uglier way (with a patch that occasionally broke
+# when applied against new gzdooms).
+sed -i '/COMMAND.*UpdateRevision/s,^,# ,' src/CMakeLists.txt
+( echo "#define GIT_DESCRIPTION \"$VERSION\""
+ echo "#define GIT_HASH \"release\""
+ echo "#define GIT_TIME __DATE__" ) > src/gitinfo.h
# 3.1.0 started needing -DNDEBUG. Using ld.gold speeds up the final link
# enough to be worth using (saves 17+ sec on my test box).
SLKCFLAGS="$SLKCFLAGS -DNDEBUG -fuse-ld=gold"
+# 20200302 bkw: gcc 5.5 needs this, not sure it's required by the C++ spec
+sed -i '1i#include <cmath>' \
+ src/rendering/swrenderer/drawers/r_draw.cpp \
+ src/rendering/swrenderer/viewport/r_spritedrawer.cpp
+
+# 20220318 bkw: gzdoom requires SSE2. not a problem for x86_64, but we
+# have to explicitly set the flags for the 32-bit build to succeed.
+SLKCFLAGS+=" -msse -msse2"
+
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\\\"" \
+ -DINSTALL_DOCS_PATH=doc/$PRGNAM-$VERSION \
+ -DINSTALL_PATH=games \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
-DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1
- mkdir -p $PKG/usr/games $PKG/usr/share/games/doom
- install -m0755 -s $PRGNAM $PKG/usr/games/$PRGNAM
- install -m0644 *.pk3 $PKG/usr/share/games/doom/
+ make install/strip DESTDIR=$PKG
cd ..
+if fgrep -q '<unknown' src/gitinfo.h; then
+ echo "*** BREAKAGE: gitinfo.h got regenerated with <unknown version>" 1>&2
+ echo "*** Fix it, or get the maintainer to." 1>&2
+ echo "*** Press ^C to abort or wait 5 seconds for the build to continue" 1>&2
+ sleep 5
+fi
+
# .desktop written for this SlackBuild
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
-# PNG converted from Windows icon
+# 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
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README_SBo.txt > $PKG/usr/doc/$PRGNAM-$VERSION/README_SBo.txt
@@ -124,4 +162,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/gzdoom/gzdoom.info b/games/gzdoom/gzdoom.info
index 4a58a7644a..83f1c39a2e 100644
--- a/games/gzdoom/gzdoom.info
+++ b/games/gzdoom/gzdoom.info
@@ -1,10 +1,10 @@
PRGNAM="gzdoom"
-VERSION="4.2.4"
+VERSION="4.10.0"
HOMEPAGE="http://gzdoom.drdteam.org/"
-DOWNLOAD="https://github.com/coelckers/gzdoom/archive/g4.2.4/gzdoom-g4.2.4.tar.gz"
-MD5SUM="d69673ebf158e97284c04d68c6f5a395"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="SDL2 OpenAL"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/coelckers/gzdoom/archive/g4.10.0/gzdoom-g4.10.0.tar.gz"
+MD5SUM_x86_64="54d8348650b8693fb545b20538e019ad"
+REQUIRES="zmusic"
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/gzdoom/gzdoom.png b/games/gzdoom/gzdoom.png
deleted file mode 100644
index 013cf60890..0000000000
--- a/games/gzdoom/gzdoom.png
+++ /dev/null
Binary files differ
diff --git a/games/gzdoom/window_title_version.diff b/games/gzdoom/window_title_version.diff
deleted file mode 100644
index 253c88207f..0000000000
--- a/games/gzdoom/window_title_version.diff
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -Naur gzdoom-g3.1.0/src/gitinfo.cpp gzdoom-g3.1.0.patched/src/gitinfo.cpp
---- gzdoom-g3.1.0/src/gitinfo.cpp 2017-05-31 06:11:33.000000000 -0400
-+++ gzdoom-g3.1.0.patched/src/gitinfo.cpp 2017-06-10 16:21:51.138003050 -0400
-@@ -39,27 +39,20 @@
-
- const char *GetGitDescription()
- {
-- return GIT_DESCRIPTION;
-+ return VERSIONSTR;
- }
-
- const char *GetGitHash()
- {
-- return GIT_HASH;
-+ return "release";
- }
-
- const char *GetGitTime()
- {
-- return GIT_TIME;
-+ return __DATE__;
- }
-
- const char *GetVersionString()
- {
-- if (GetGitDescription()[0] == '\0')
-- {
-- return VERSIONSTR;
-- }
-- else
-- {
-- return GIT_DESCRIPTION;
-- }
-+ return VERSIONSTR;
- }