summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlashbunny2020-07-07 19:54:53 -0400
committerSlashbunny2020-07-07 19:54:53 -0400
commit3e52ade1d1a59df7f56e5019de6472349952419d (patch)
treedfe11f521a9200d730ba21e9b56f7acd13e655fd
parent2770f5d4df6af471e1732affd0d0c1f86e55da68 (diff)
downloadaur-3e52ade1d1a59df7f56e5019de6472349952419d.tar.gz
Add patch to build successfully with gcc10
-rw-r--r--.SRCINFO5
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD18
-rw-r--r--gcc10.patch122
4 files changed, 140 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 83ff8065e5a6..ff870c3427c2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,13 @@
pkgbase = ezquake
pkgdesc = One of the most Popular QuakeWorld clients for Linux/BSD/OSX/Win32. You need the retail pak files to play.
pkgver = 3.2
- pkgrel = 2
+ pkgrel = 3
url = http://ezquake.sourceforge.net/
install = ezquake.install
arch = x86_64
license = GPL
makedepends = unzip
makedepends = vim
- makedepends = gcc9
depends = curl
depends = expat
depends = jansson
@@ -27,11 +26,13 @@ pkgbase = ezquake
source = ezquake.launcher
source = ezquake.desktop
source = ezquake.ico
+ source = gcc10.patch
sha256sums = 801151d540706106cbd26da7266aa5e330842b8cccbc5acd4bc8d5a73db3515d
sha256sums = 6977480a374e531341dec82ccabf3f1443c674959f0e959b7a4c9a63cc2e06c5
sha256sums = aa59da4a296a43af8ea8c5670cef5980a15407124b3e53f3cf805ceb6126e6ed
sha256sums = e92b9cdeac5eadced50a6167eb53b1343b0772d3bf8afa310eb281b88bf7e677
sha256sums = 2a6a5484ddb4cfaf8518b51df39ffd1fa8ce768402eab6401415bececb8e8ab2
+ sha256sums = 6d5dd357210c437ba77ce0ee4fbc0ed6e242ec17ead80b4d76c4a59fcb4b683a
pkgname = ezquake
diff --git a/.gitignore b/.gitignore
index c1a2d5a7d161..83e74ab09fce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,5 +3,5 @@ pkg/
*.pkg.tar.xz
*.pkg.tar
*.src.tar.gz
-ezquake_linux64_3.0-full.tar.gz
-v3.0.tar.gz
+ezquake-*-full-*.tar.gz
+3.2.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index cf67613e4411..306a9235b8eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,31 +2,39 @@
pkgname=ezquake
pkgver=3.2
-pkgrel=2
+pkgrel=3
pkgdesc="One of the most Popular QuakeWorld clients for Linux/BSD/OSX/Win32. You need the retail pak files to play."
url="http://ezquake.sourceforge.net/"
license=('GPL')
depends=('curl' 'expat' 'jansson' 'libjpeg-turbo' 'libpng' 'openssl' 'sdl2' 'speex')
-makedepends=('unzip' 'vim' 'gcc9')
+makedepends=('unzip' 'vim')
conflicts=('ezquake-git' 'fuhquake')
provides=('quake' 'fuhquake')
arch=('x86_64')
install=ezquake.install
source=("https://github.com/ezQuake/ezquake-source/archive/${pkgver}.tar.gz"
"https://github.com/ezQuake/ezquake-source/releases/download/${pkgver}/ezquake-ubuntu-full-${pkgver}.tar.gz"
-'ezquake.launcher' 'ezquake.desktop' 'ezquake.ico')
+'ezquake.launcher' 'ezquake.desktop' 'ezquake.ico' 'gcc10.patch')
noextract=("ezquake-ubuntu-full-${pkgver}.tar.gz")
sha256sums=('801151d540706106cbd26da7266aa5e330842b8cccbc5acd4bc8d5a73db3515d'
'6977480a374e531341dec82ccabf3f1443c674959f0e959b7a4c9a63cc2e06c5'
'aa59da4a296a43af8ea8c5670cef5980a15407124b3e53f3cf805ceb6126e6ed'
'e92b9cdeac5eadced50a6167eb53b1343b0772d3bf8afa310eb281b88bf7e677'
- '2a6a5484ddb4cfaf8518b51df39ffd1fa8ce768402eab6401415bececb8e8ab2')
+ '2a6a5484ddb4cfaf8518b51df39ffd1fa8ce768402eab6401415bececb8e8ab2'
+ '6d5dd357210c437ba77ce0ee4fbc0ed6e242ec17ead80b4d76c4a59fcb4b683a')
+
+prepare() {
+ cd "${srcdir}/ezquake-source-${pkgver}/"
+
+ # Patch to fix build on GCC10
+ patch -p1 < "${srcdir}/gcc10.patch"
+}
build() {
cd "${srcdir}/ezquake-source-${pkgver}/"
# Compile ezquake
- make CC="gcc-9"
+ make
}
package() {
diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644
index 000000000000..20d5a007a9c4
--- /dev/null
+++ b/gcc10.patch
@@ -0,0 +1,122 @@
+--- a/cl_screen.c
++++ b/cl_screen.c
+@@ -3370,9 +3370,9 @@ static char *Sshot_SshotDirectory(void) {
+ }
+
+ #ifdef X11_GAMMA_WORKAROUND
+-unsigned short ramps[3][4096];
++extern unsigned short ramps[3][4096];
+ #else
+-unsigned short ramps[3][256];
++extern unsigned short ramps[3][256];
+ #endif
+
+ //applies hwgamma to RGB data
+--- a/cl_tent.c
++++ b/cl_tent.c
+@@ -29,6 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ #include "utils.h"
+ #include "qsound.h"
+
++temp_entity_list_t temp_entities;
++
+ #define MAX_BEAMS 32
+ typedef struct
+ {
+--- a/common_draw.c
++++ b/common_draw.c
+@@ -26,6 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #include "utils.h"
+ #include "Ctrl.h"
+
++// FIXME: this is horrible - points to &hud_gameclock_offset->integer
++int* gameclockoffset;
++
+ #if 0
+ void Draw_CenterString (int y, char *str)
+ {
+--- a/common_draw.h
++++ b/common_draw.h
+@@ -92,7 +92,7 @@ void HUD_AfterDraw(void);
+
+ qbool Draw_BigFontAvailable(void);
+
+-int *gameclockoffset; // hud_gameclock time offset in seconds
++extern int *gameclockoffset; // hud_gameclock time offset in seconds
+
+ void SCR_DrawWadString(int x, int y, float scale, const char *t);
+ void SCR_HUD_DrawBar(int direction, int value, float max_value, byte *color, int x, int y, int width, int height);
+--- a/protocol.h
++++ b/protocol.h
+@@ -465,5 +465,5 @@ typedef struct temp_entity_list_s
+ int count;
+ } temp_entity_list_t;
+
+-temp_entity_list_t temp_entities;
++extern temp_entity_list_t temp_entities;
+
+--- a/vfs.h
++++ b/vfs.h
+@@ -131,7 +131,7 @@ vfsfile_t *FS_OpenTCP(char *name);
+ // GZIP (*.gz) Support
+ //=====================
+ #ifdef WITH_ZLIB
+-searchpathfuncs_t gzipfilefuncs;
++extern searchpathfuncs_t gzipfilefuncs;
+ #endif // WITH_ZLIB
+
+ //=====================
+--- a/vx_stuff.c
++++ b/vx_stuff.c
+@@ -27,6 +27,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ int GL_LoadTextureImage (char * , char *, int, int, int);
+ int coronatexture;
++int gunflashtexture;
++int explosionflashtexture1;
++int explosionflashtexture2;
++int explosionflashtexture3;
++int explosionflashtexture4;
++int explosionflashtexture5;
++int explosionflashtexture6;
++int explosionflashtexture7;
++int ParticleCount, ParticleCountHigh, CoronaCount, CoronaCountHigh, MotionBlurCount, MotionBlurCountHigh;
+
+ extern cvar_t gl_bounceparticles;
+
+--- a/vx_stuff.h
++++ b/vx_stuff.h
+@@ -49,15 +49,15 @@ void InitCoronas(void);
+ void InitVXStuff(void);
+ void NewStaticLightCorona (coronatype_t type, vec3_t origin, entity_t *serialhint);
+
+-int coronatexture;
+-int gunflashtexture;
+-int explosionflashtexture1;
+-int explosionflashtexture2;
+-int explosionflashtexture3;
+-int explosionflashtexture4;
+-int explosionflashtexture5;
+-int explosionflashtexture6;
+-int explosionflashtexture7;
++extern int coronatexture;
++extern int gunflashtexture;
++extern int explosionflashtexture1;
++extern int explosionflashtexture2;
++extern int explosionflashtexture3;
++extern int explosionflashtexture4;
++extern int explosionflashtexture5;
++extern int explosionflashtexture6;
++extern int explosionflashtexture7;
+
+ float CL_TraceLine (vec3_t start, vec3_t end, vec3_t impact, vec3_t normal);
+ void WeatherEffect(void);
+@@ -126,7 +126,7 @@ extern cvar_t amf_part_trailwidth;
+ extern cvar_t amf_part_trailtype;
+
+ void SCR_DrawAMFstats(void);
+-int ParticleCount, ParticleCountHigh, CoronaCount, CoronaCountHigh, MotionBlurCount, MotionBlurCountHigh;
++extern int ParticleCount, ParticleCountHigh, CoronaCount, CoronaCountHigh, MotionBlurCount, MotionBlurCountHigh;
+ void CL_CreateBlurs (vec3_t start, vec3_t end, entity_t *ent);
+ void CL_UpdateBlurs (void);
+