summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Riha2021-09-20 10:00:20 +0200
committerJose Riha2021-09-20 10:00:20 +0200
commit98b7eabbadef03786d0bf6429b08e04d70993009 (patch)
treec755a97fbd605ad17636d52cb4f83afc23d1f853
parent57bbb66bf646035cdeba38ff2db6ead81fb4cd89 (diff)
downloadaur-darkplaces.tar.gz
Fix building with gcc-11
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD14
-rw-r--r--gcc-11.patch43
3 files changed, 56 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d6ccfb6cd600..9ee24cabeb3d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = darkplaces
pkgdesc = An advanced Quake 1 game engine
pkgver = 20140513
- pkgrel = 3
+ pkgrel = 4
url = http://icculus.org/twilight/darkplaces/
install = darkplaces.install
arch = i686
@@ -17,8 +17,9 @@ pkgbase = darkplaces
noextract = darkplacesengine20140513.zip
source = http://icculus.org/twilight/darkplaces/files/darkplacesengine20140513.zip
source = darkplaces.desktop
+ source = gcc-11.patch::https://gitweb.gentoo.org/repo/gentoo.git/plain/games-fps/darkplaces/files/darkplaces-20140513-gcc-11.patch?id=bc2ba1cd6fdc5a7ad7d161efb21652b73c6b207e
sha512sums = 45864b590057c6de0ea978b3cc967feb879b87b2d376f3b4d8525e037b10ca1fc68599c152506494bb06669c6c2304e0aa0ee1b28f7a0d589d10c23f7285052c
sha512sums = daed32cb397b8f5d8a569b0679680377b9a1fb7a30fc5b99742381723850b792424d221deafb48ed4bad99d9fc7812f8a667263d9f0e63a40fbc2d9e1013c1d6
+ sha512sums = 426e6e3926872131afde4b6f162453f5f24ee0075b13c2da9732c7519bdbae9f05348502f74cafce88b183adddf5d9916020d1df0db25b953fafdeda7b49f1e2
pkgname = darkplaces
-
diff --git a/PKGBUILD b/PKGBUILD
index 2f563b921770..a81ae2670cda 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,11 @@
-# Maintainer: Arkham <arkham at archlinux dot us>
+# Maintainer: Jose Riha <jose1711 gmail com>
+# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
# Contributor: Paul Bredbury <brebs@sent.com>
pkgname=darkplaces
pkgver=20140513
-pkgrel=3
+pkgrel=4
pkgdesc="An advanced Quake 1 game engine"
arch=('i686' 'x86_64')
url="http://icculus.org/twilight/darkplaces/"
@@ -13,9 +14,11 @@ depends=('alsa-lib' 'hicolor-icon-theme' 'libjpeg-turbo' 'libxpm'
'libxxf86vm' 'sdl' 'zlib')
install=$pkgname.install
source=(http://icculus.org/twilight/$pkgname/files/darkplacesengine$pkgver.zip
- $pkgname.desktop)
+ $pkgname.desktop
+ gcc-11.patch::https://gitweb.gentoo.org/repo/gentoo.git/plain/games-fps/darkplaces/files/darkplaces-20140513-gcc-11.patch?id=bc2ba1cd6fdc5a7ad7d161efb21652b73c6b207e)
sha512sums=('45864b590057c6de0ea978b3cc967feb879b87b2d376f3b4d8525e037b10ca1fc68599c152506494bb06669c6c2304e0aa0ee1b28f7a0d589d10c23f7285052c'
- 'daed32cb397b8f5d8a569b0679680377b9a1fb7a30fc5b99742381723850b792424d221deafb48ed4bad99d9fc7812f8a667263d9f0e63a40fbc2d9e1013c1d6')
+ 'daed32cb397b8f5d8a569b0679680377b9a1fb7a30fc5b99742381723850b792424d221deafb48ed4bad99d9fc7812f8a667263d9f0e63a40fbc2d9e1013c1d6'
+ '426e6e3926872131afde4b6f162453f5f24ee0075b13c2da9732c7519bdbae9f05348502f74cafce88b183adddf5d9916020d1df0db25b953fafdeda7b49f1e2')
noextract=(darkplacesengine$pkgver.zip)
prepare() {
@@ -27,6 +30,9 @@ prepare() {
# Fix a couple options in the Makefile.
sed -i '1i DP_LINK_TO_LIBJPEG=1' makefile
sed -i '/(STRIP)/d' makefile.inc
+
+ # Fix compilation with GCC-11
+ patch -p1 -i "${srcdir}/gcc-11.patch"
}
build() {
diff --git a/gcc-11.patch b/gcc-11.patch
new file mode 100644
index 000000000000..5670b053cef7
--- /dev/null
+++ b/gcc-11.patch
@@ -0,0 +1,43 @@
+https://bugs.gentoo.org/786288
+
+Attach alignment annotation to strict, not it's typedef alias.
+--- a/dpsoftrast.c
++++ b/dpsoftrast.c
+@@ -177,7 +177,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Triangle_s
+ float w[3];
+ ALIGN(float attribs[DPSOFTRAST_ARRAY_TOTAL][3][4]);
+ }
+-DPSOFTRAST_State_Triangle);
++) DPSOFTRAST_State_Triangle;
+
+ #define DPSOFTRAST_CALCATTRIB(triangle, span, data, slope, arrayindex) { \
+ slope = _mm_load_ps((triangle)->attribs[arrayindex][0]); \
+@@ -209,7 +209,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Span_s
+ int depthbase; // depthbuffer value at x (add depthslope*startx to get first pixel's depthbuffer value)
+ int depthslope; // depthbuffer value pixel delta
+ }
+-DPSOFTRAST_State_Span);
++) DPSOFTRAST_State_Span;
+
+ #define DPSOFTRAST_DRAW_MAXSPANS 1024
+ #define DPSOFTRAST_DRAW_MAXTRIANGLES 128
+@@ -299,8 +299,8 @@ typedef ALIGN(struct DPSOFTRAST_State_Thread_s
+ DPSOFTRAST_State_Span spans[DPSOFTRAST_DRAW_MAXSPANS];
+ DPSOFTRAST_State_Triangle triangles[DPSOFTRAST_DRAW_MAXTRIANGLES];
+ unsigned char pixelmaskarray[DPSOFTRAST_DRAW_MAXSPANLENGTH+4]; // LordHavoc: padded to allow some termination bytes
+-}
+-DPSOFTRAST_State_Thread);
++})
++DPSOFTRAST_State_Thread;
+
+ typedef ALIGN(struct DPSOFTRAST_State_s
+ {
+@@ -358,7 +358,7 @@ typedef ALIGN(struct DPSOFTRAST_State_s
+
+ DPSOFTRAST_State_Command_Pool commandpool;
+ }
+-DPSOFTRAST_State);
++) DPSOFTRAST_State;
+
+ DPSOFTRAST_State dpsoftrast;
+