Created
October 19, 2021 23:11
-
-
Save tonylambiris/d843f92f0450e61461f24e43f103da27 to your computer and use it in GitHub Desktop.
Fixes for aur/quake2 package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.SRCINFO b/.SRCINFO | |
index 9fb5f01..959cdaf 100644 | |
--- a/.SRCINFO | |
+++ b/.SRCINFO | |
@@ -1,5 +1,3 @@ | |
-# Generated by mksrcinfo v8 | |
-# Sat Feb 3 01:55:40 UTC 2018 | |
pkgbase = quake2 | |
pkgdesc = Quake 2 engine. You need the retail .pak files to play. | |
pkgver = r0.16.2 | |
@@ -35,6 +33,7 @@ pkgbase = quake2 | |
source = snd_alsa.c | |
source = gnusource.patch | |
source = map_command_fix.patch | |
+ source = updates_for_gcc.patch | |
sha256sums = 98cea3cbd70bd1f195e5190d0ae047c636e00e21dbc6cc5bdee4acd52876d3e9 | |
sha256sums = 94bf596cd85d38ea294b99ccb0ebb5e4b9776cca335001b3803e2d8407395589 | |
sha256sums = ceefb2fd748961cb0bc3244220f3eb09d8f7b8ca2eb32cdf9b284727a2fdc919 | |
@@ -56,6 +55,6 @@ pkgbase = quake2 | |
sha256sums = fd434189a6242ad288e5827c8285e0dca3f26fe447be50204d4b6817cb1ae624 | |
sha256sums = 9ac34f2bebbb6d4a19c590e00db8e5b0034b3ffe2a245a595e28ab43d65d7617 | |
sha256sums = 7ce69543faf226e871dbe78c058a3499f5c283860ae2d9e39e397178123264ec | |
+ sha256sums = 637c94188ee5fb147fae56fd368b7b184f3a111adc1099ec0da0a95046c93d6a | |
pkgname = quake2 | |
- | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 3a0a38d..0f00e67 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -24,7 +24,7 @@ source=("http://www.icculus.org/quake2/files/quake2-${pkgver}.tar.gz" | |
'http://www.icculus.org/quake2/files/pak17.pak' | |
'http://www.icculus.org/quake2/files/pak19.pak' | |
'quake2.sh' 'q2ded.sh' 'xatrix.sh' 'rogue.sh' 'ctf.sh' 'snd_alsa.c' | |
- 'gnusource.patch' 'map_command_fix.patch') | |
+ 'gnusource.patch' 'map_command_fix.patch' 'updates_for_gcc.patch') | |
sha256sums=('98cea3cbd70bd1f195e5190d0ae047c636e00e21dbc6cc5bdee4acd52876d3e9' | |
'94bf596cd85d38ea294b99ccb0ebb5e4b9776cca335001b3803e2d8407395589' | |
'ceefb2fd748961cb0bc3244220f3eb09d8f7b8ca2eb32cdf9b284727a2fdc919' | |
@@ -45,7 +45,8 @@ sha256sums=('98cea3cbd70bd1f195e5190d0ae047c636e00e21dbc6cc5bdee4acd52876d3e9' | |
'ea50ae5cca9d633fe2ad30c59beb2ad350130bdd2a78f773639794f2c12d1ed1' | |
'fd434189a6242ad288e5827c8285e0dca3f26fe447be50204d4b6817cb1ae624' | |
'9ac34f2bebbb6d4a19c590e00db8e5b0034b3ffe2a245a595e28ab43d65d7617' | |
- '7ce69543faf226e871dbe78c058a3499f5c283860ae2d9e39e397178123264ec') | |
+ '7ce69543faf226e871dbe78c058a3499f5c283860ae2d9e39e397178123264ec' | |
+ '637c94188ee5fb147fae56fd368b7b184f3a111adc1099ec0da0a95046c93d6a') | |
PKGEXT='.pkg.tar' | |
# Computer Architecture Variable used by Quake2 | |
@@ -107,6 +108,9 @@ prepare() { | |
# Map command fix by h3xx | |
/usr/bin/patch -p1 < "${srcdir}/map_command_fix.patch" | |
+ # Updates to compile using newer gcc releases | |
+ /usr/bin/patch -p1 < "${srcdir}/updates_for_gcc.patch" | |
+ | |
msg "Quake 2 patching complete" | |
} | |
diff --git a/updates_for_gcc.patch b/updates_for_gcc.patch | |
new file mode 100644 | |
index 0000000..8657d60 | |
--- /dev/null | |
+++ b/updates_for_gcc.patch | |
@@ -0,0 +1,21 @@ | |
+--- quake2-r0.16.2/src/client/client.h.orig 2021-10-19 19:01:04.759948327 -0400 | |
++++ quake2-r0.16.2/src/client/client.h 2021-10-19 19:01:09.269967879 -0400 | |
+@@ -49,7 +49,6 @@ | |
+ #ifdef QMAX | |
+ #define random() ((rand () & 0x7fff) / ((float)0x7fff)) | |
+ #define crandom() (2.0 * (random() - 0.5)) | |
+-vec3_t clientOrg; //lerped org of client for server->client side effects | |
+ | |
+ void vectoangles2 (vec3_t value1, vec3_t angles); | |
+ | |
+--- quake2-r0.16.2/src/rogue/g_local.h.orig 2021-10-19 18:48:36.838227524 -0400 | |
++++ quake2-r0.16.2/src/rogue/g_local.h 2021-10-19 18:48:42.321615327 -0400 | |
+@@ -22,7 +22,7 @@ | |
+ //================================================================== | |
+ | |
+ #ifndef _WIN32 | |
+-#include <bits/nan.h> | |
++#include <math.h> | |
+ #define min(a,b) ((a) < (b) ? (a) : (b)) | |
+ #define max(a,b) ((a) > (b) ? (a) : (b)) | |
+ #ifdef __sun__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment