summaryrefslogtreecommitdiffstats
path: root/games/gzdoom-legacy
diff options
context:
space:
mode:
Diffstat (limited to 'games/gzdoom-legacy')
-rw-r--r--games/gzdoom-legacy/README5
-rw-r--r--games/gzdoom-legacy/README_versions.txt5
-rw-r--r--games/gzdoom-legacy/compilefix.1.8.09.diff143
-rw-r--r--games/gzdoom-legacy/compilefix.1.9.1.diff12
-rw-r--r--games/gzdoom-legacy/compilefix.2.4.0.diff23
-rw-r--r--games/gzdoom-legacy/gzdoom-legacy.SlackBuild33
-rw-r--r--games/gzdoom-legacy/gzdoom-legacy.info4
-rw-r--r--games/gzdoom-legacy/slack-desc2
8 files changed, 205 insertions, 22 deletions
diff --git a/games/gzdoom-legacy/README b/games/gzdoom-legacy/README
index e242f3eb6f..1c3496f600 100644
--- a/games/gzdoom-legacy/README
+++ b/games/gzdoom-legacy/README
@@ -1,3 +1,5 @@
+gzdoom-legacy (OpenGL port of DOOM, older version)
+
Enhanced OpenGL port of the official DOOM source code that also supports
Heretic, Hexen, and Strife.
@@ -6,9 +8,6 @@ run smoothly on older/slower hardware. If you're looking for the latest
version, you want the regular "gzdoom" build. Note that gzdoom-legacy
and gzdoom conflict: only install one or the other.
-Optional compile-time dependencies: fluidsynth and OpenAL. These are
-auto-detected.
-
See README_SBo.txt for optional runtime dependencies.
This script can be used to build gzdoom 1.8.09, 1.9.1, or 2.3.2. For
diff --git a/games/gzdoom-legacy/README_versions.txt b/games/gzdoom-legacy/README_versions.txt
index 56be5eae3d..3676c68eb9 100644
--- a/games/gzdoom-legacy/README_versions.txt
+++ b/games/gzdoom-legacy/README_versions.txt
@@ -15,12 +15,9 @@ file, and copy the lines below:
For 1.8.09:
VERSION="1.8.09"
-DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/g1.8.09.tar.gz"
+DOWNLOAD="https://slackware.uk/~urchlay/src/g1.8.09.tar.gz"
MD5SUM="ddc1dd8aef254312031184be6dec21e6"
-Note that SDL2 is not required for 1.8.09 (you can remove it from REQUIRES
-in the .info file, if you like).
-
For 1.9.1:
VERSION="1.9.1"
diff --git a/games/gzdoom-legacy/compilefix.1.8.09.diff b/games/gzdoom-legacy/compilefix.1.8.09.diff
new file mode 100644
index 0000000000..ac9d89d363
--- /dev/null
+++ b/games/gzdoom-legacy/compilefix.1.8.09.diff
@@ -0,0 +1,143 @@
+diff -Naur gzdoom-g1.8.09/game-music-emu/CMakeLists.txt gzdoom-g1.8.09.patched/game-music-emu/CMakeLists.txt
+--- gzdoom-g1.8.09/game-music-emu/CMakeLists.txt 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/game-music-emu/CMakeLists.txt 2021-10-09 16:57:46.630159506 -0400
+@@ -84,7 +84,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 gzdoom-g1.8.09/src/b_func.cpp gzdoom-g1.8.09.patched/src/b_func.cpp
+--- gzdoom-g1.8.09/src/b_func.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/b_func.cpp 2021-10-09 16:57:46.631159506 -0400
+@@ -123,7 +123,7 @@
+ if (vangle == 0)
+ return false; //Looker seems to be blind.
+
+- return (angle_t)abs (R_PointToAngle2 (player->mo->x, player->mo->y, to->x, to->y) - player->mo->angle) <= vangle/2;
++ return (angle_t)fabs (R_PointToAngle2 (player->mo->x, player->mo->y, to->x, to->y) - player->mo->angle) <= vangle/2;
+ }
+
+ //-------------------------------------
+@@ -210,7 +210,7 @@
+ {
+ angle = an;
+ //have to be somewhat precise. to avoid suicide.
+- if (abs (angle - player->mo->angle) < 12*ANGLE_1)
++ if (fabs (angle - player->mo->angle) < 12*ANGLE_1)
+ {
+ t_rocket = 9;
+ no_fire = false;
+@@ -252,7 +252,7 @@
+ angle -= m;
+ }
+
+- if (abs (angle - player->mo->angle) < 4*ANGLE_1)
++ if (fabs (angle - player->mo->angle) < 4*ANGLE_1)
+ {
+ increase = !increase;
+ }
+diff -Naur gzdoom-g1.8.09/src/g_hexen/a_dragon.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_dragon.cpp
+--- gzdoom-g1.8.09/src/g_hexen/a_dragon.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/g_hexen/a_dragon.cpp 2021-10-09 17:06:47.628110327 -0400
+@@ -79,7 +79,7 @@
+ { // attack the destination mobj if it's attackable
+ AActor *oldTarget;
+
+- if (abs(actor->angle-R_PointToAngle2(actor->x, actor->y,
++ if (fabs(actor->angle-R_PointToAngle2(actor->x, actor->y,
+ target->x, target->y)) < ANGLE_45/2)
+ {
+ oldTarget = actor->target;
+@@ -121,9 +121,9 @@
+ }
+ angleToSpot = R_PointToAngle2(actor->x, actor->y,
+ mo->x, mo->y);
+- if ((angle_t)abs(angleToSpot-angleToTarget) < bestAngle)
++ if ((angle_t)fabs(angleToSpot-angleToTarget) < bestAngle)
+ {
+- bestAngle = abs(angleToSpot-angleToTarget);
++ bestAngle = fabs(angleToSpot-angleToTarget);
+ bestActor = mo;
+ }
+ }
+@@ -198,14 +198,14 @@
+ }
+ angle = R_PointToAngle2(self->x, self->y, self->target->x,
+ self->target->y);
+- if (abs(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
++ if (fabs(self->angle-angle) < ANGLE_45/2 && self->CheckMeleeRange())
+ {
+ int damage = pr_dragonflight.HitDice (8);
+ int newdam = P_DamageMobj (self->target, self, self, damage, NAME_Melee);
+ P_TraceBleed (newdam > 0 ? newdam : damage, self->target, self);
+ S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
+ }
+- else if (abs(self->angle-angle) <= ANGLE_1*20)
++ else if (fabs(self->angle-angle) <= ANGLE_1*20)
+ {
+ self->SetState (self->MissileState);
+ S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
+diff -Naur gzdoom-g1.8.09/src/g_hexen/a_heresiarch.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_heresiarch.cpp
+--- gzdoom-g1.8.09/src/g_hexen/a_heresiarch.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/g_hexen/a_heresiarch.cpp 2021-10-09 17:06:55.063109651 -0400
+@@ -314,7 +314,7 @@
+ case SORC_STOPPING: // Balls stopping
+ if ((parent->StopBall == RUNTIME_TYPE(actor)) &&
+ (parent->args[1] > SORCBALL_SPEED_ROTATIONS) &&
+- (abs(angle - (parent->angle>>ANGLETOFINESHIFT)) < (30<<5)))
++ (fabs(angle - (parent->angle>>ANGLETOFINESHIFT)) < (30<<5)))
+ {
+ // Can stop now
+ actor->target->args[3] = SORC_FIRESPELL;
+diff -Naur gzdoom-g1.8.09/src/g_hexen/a_hexenspecialdecs.cpp gzdoom-g1.8.09.patched/src/g_hexen/a_hexenspecialdecs.cpp
+--- gzdoom-g1.8.09/src/g_hexen/a_hexenspecialdecs.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/g_hexen/a_hexenspecialdecs.cpp 2021-10-09 17:07:05.703108684 -0400
+@@ -109,7 +109,7 @@
+ if (playeringame[i])
+ {
+ AActor *pmo = players[i].mo;
+- if (P_CheckSight (self, pmo) && (abs (R_PointToAngle2 (pmo->x,
++ if (P_CheckSight (self, pmo) && (fabs (R_PointToAngle2 (pmo->x,
+ pmo->y, self->x, self->y) - pmo->angle) <= ANGLE_45))
+ { // Previous state (pottery bit waiting state)
+ self->SetState (self->state - 1);
+diff -Naur gzdoom-g1.8.09/src/p_enemy.cpp gzdoom-g1.8.09.patched/src/p_enemy.cpp
+--- gzdoom-g1.8.09/src/p_enemy.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/p_enemy.cpp 2021-10-09 16:57:46.631159506 -0400
+@@ -2738,7 +2738,7 @@
+
+ // 0 means no limit. Also, if we turn in a single step anyways, no need to go through the algorithms.
+ // It also means that there is no need to check for going past the other.
+- if (max_turn && (max_turn < (angle_t)abs(self->angle - other_angle)))
++ if (max_turn && (max_turn < (angle_t)fabs(self->angle - other_angle)))
+ {
+ if (self->angle > other_angle)
+ {
+diff -Naur gzdoom-g1.8.09/src/p_mobj.cpp gzdoom-g1.8.09.patched/src/p_mobj.cpp
+--- gzdoom-g1.8.09/src/p_mobj.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/p_mobj.cpp 2021-10-09 16:59:08.847152032 -0400
+@@ -2932,7 +2932,7 @@
+ if (thing->flags4&MF4_SHIELDREFLECT)
+ {
+ // Shield reflection (from the Centaur
+- if (abs (angle - thing->angle)>>24 > 45)
++ if ((int)(fabs (angle - thing->angle))>>24 > 45)
+ return true; // Let missile explode
+
+ if (thing->IsKindOf (RUNTIME_CLASS(AHolySpirit))) // shouldn't this be handled by another flag???
+diff -Naur gzdoom-g1.8.09/src/p_setup.cpp gzdoom-g1.8.09.patched/src/p_setup.cpp
+--- gzdoom-g1.8.09/src/p_setup.cpp 2014-12-21 09:18:40.000000000 -0500
++++ gzdoom-g1.8.09.patched/src/p_setup.cpp 2021-10-09 17:02:30.783133675 -0400
+@@ -1311,7 +1311,7 @@
+
+ ptp_angle = R_PointToAngle2 (li->v1->x, li->v1->y, li->v2->x, li->v2->y);
+ dis = 0;
+- delta_angle = (abs(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES;
++ delta_angle = ((int)fabs(ptp_angle-(segangle<<16))>>ANGLETOFINESHIFT)*360/FINEANGLES;
+
+ if (delta_angle != 0)
+ {
diff --git a/games/gzdoom-legacy/compilefix.1.9.1.diff b/games/gzdoom-legacy/compilefix.1.9.1.diff
new file mode 100644
index 0000000000..129886b3ea
--- /dev/null
+++ b/games/gzdoom-legacy/compilefix.1.9.1.diff
@@ -0,0 +1,12 @@
+diff -Naur gzdoom-g1.9.1/game-music-emu/CMakeLists.txt gzdoom-g1.9.1.patched/game-music-emu/CMakeLists.txt
+--- gzdoom-g1.9.1/game-music-emu/CMakeLists.txt 2016-02-23 05:34:50.000000000 -0500
++++ gzdoom-g1.9.1.patched/game-music-emu/CMakeLists.txt 2021-10-09 15:42:40.090569168 -0400
+@@ -84,7 +84,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 --git a/games/gzdoom-legacy/compilefix.2.4.0.diff b/games/gzdoom-legacy/compilefix.2.4.0.diff
new file mode 100644
index 0000000000..15aff4b37b
--- /dev/null
+++ b/games/gzdoom-legacy/compilefix.2.4.0.diff
@@ -0,0 +1,23 @@
+diff -Naur gzdoom-g2.4.0/game-music-emu/CMakeLists.txt gzdoom-g2.4.0.patched/game-music-emu/CMakeLists.txt
+--- gzdoom-g2.4.0/game-music-emu/CMakeLists.txt 2017-03-19 16:37:06.000000000 -0400
++++ gzdoom-g2.4.0.patched/game-music-emu/CMakeLists.txt 2021-10-09 14:02:12.973117056 -0400
+@@ -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 gzdoom-g2.4.0/src/sound/oalsound.cpp gzdoom-g2.4.0.patched/src/sound/oalsound.cpp
+--- gzdoom-g2.4.0/src/sound/oalsound.cpp 2017-03-19 16:37:06.000000000 -0400
++++ gzdoom-g2.4.0.patched/src/sound/oalsound.cpp 2021-10-09 13:59:39.997130962 -0400
+@@ -40,6 +40,7 @@
+ #include <dlfcn.h>
+ #endif
+
++#include <functional>
+ #include <memory>
+ #include <chrono>
+
diff --git a/games/gzdoom-legacy/gzdoom-legacy.SlackBuild b/games/gzdoom-legacy/gzdoom-legacy.SlackBuild
index 295f2dcc18..9c9d407413 100644
--- a/games/gzdoom-legacy/gzdoom-legacy.SlackBuild
+++ b/games/gzdoom-legacy/gzdoom-legacy.SlackBuild
@@ -1,11 +1,15 @@
-#!/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.
+# 20211009 bkw: BUILD=3, fix build on -current.
+# 20200426 bkw:
+# - Fix <unknown version> in window title for real this time, BUILD=2.
+
# 20170610 bkw:
# - Renamed to gzdoom-legacy. Too much effort to keep testing old
# gzdoom versions every time there's a new release, so the regular
@@ -30,11 +34,14 @@
# build now uses its own dedicated fmodapi, which installs to
# a private directory (won't conflict with system fmodapi, if present).
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gzdoom-legacy
SRCNAM=gzdoom
VERSION=${VERSION:-2.4.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -44,7 +51,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}
@@ -75,11 +86,8 @@ tar xvf $CWD/$SRCNAM-g$VERSION.tar.gz || \
tar xvf $CWD/$VERSION.tar.gz
cd $SRCNAM-g$VERSION || cd $SRCNAM-$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 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 {} \+
# fmodapi support tries to find its lib in the current dir, fix it:
sed -i \
@@ -95,9 +103,10 @@ patch -p1 < $CWD/window_title_version.diff
# Sometimes upstream forgets to bump the version number, so the window
# title will read 1.8.08 for version 1.8.09, eg.
-sed -i "/#define *VERSIONSTR/s,\"[^\"]*\",\"$VERSION\"," src/version.h
+sed -i "/#define *VERSIONSTR/s,[^ ]*$,\"$VERSION\"," src/version.h
-# This isn't currently used, but was in the past, and will be again I'm sure.
+# Version-specific patches. As of 2021, it's unlikely any old versions
+# of gzdoom will build without patching.
[ -e $CWD/compilefix.$VERSION.diff ] && \
patch -p1 < $CWD/compilefix.$VERSION.diff
@@ -144,4 +153,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-legacy/gzdoom-legacy.info b/games/gzdoom-legacy/gzdoom-legacy.info
index 4fdd6f12ce..180287e61d 100644
--- a/games/gzdoom-legacy/gzdoom-legacy.info
+++ b/games/gzdoom-legacy/gzdoom-legacy.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://github.com/coelckers/gzdoom/archive/g2.4.0/gzdoom-g2.4.0.tar.g
MD5SUM="2337388b44cd206ddbb3a2c44c78d3cc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="SDL2 fmodapi"
+REQUIRES="fmodapi"
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/gzdoom-legacy/slack-desc b/games/gzdoom-legacy/slack-desc
index 18c19805b0..518ebe6f7b 100644
--- a/games/gzdoom-legacy/slack-desc
+++ b/games/gzdoom-legacy/slack-desc
@@ -6,7 +6,7 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-gzdoom-legacy: gzdoom-legacy (OpenGL port of DOOM)
+gzdoom-legacy: gzdoom-legacy (OpenGL port of DOOM, older version)
gzdoom-legacy:
gzdoom-legacy: Enhanced OpenGL port of the official DOOM source code that also
gzdoom-legacy: supports Heretic, Hexen, and Strife.