summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-06-13 20:59:50 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2021-06-13 20:59:50 +0100
commitd510b1928d20f8df2a297856a1bbc5f8148d56ad (patch)
tree784f7c5da1714cebf7e32c7577d10c67fe71ebc0 /games-fps
parentgames-fps/darkplaces: tweak for gcc-11 (diff)
downloadgentoo-d510b1928d20f8df2a297856a1bbc5f8148d56ad.tar.gz
gentoo-d510b1928d20f8df2a297856a1bbc5f8148d56ad.tar.bz2
gentoo-d510b1928d20f8df2a297856a1bbc5f8148d56ad.zip
games-fps/xonotic: tweak for gcc-11
Reported-by: Artem Ilgamov Closes: https://bugs.gentoo.org/788616 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/xonotic/files/xonotic-0.8.2-gcc-11.patch41
-rw-r--r--games-fps/xonotic/xonotic-0.8.2.ebuild4
2 files changed, 44 insertions, 1 deletions
diff --git a/games-fps/xonotic/files/xonotic-0.8.2-gcc-11.patch b/games-fps/xonotic/files/xonotic-0.8.2-gcc-11.patch
new file mode 100644
index 00000000000..f6a9569e016
--- /dev/null
+++ b/games-fps/xonotic/files/xonotic-0.8.2-gcc-11.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/788616
+
+Attach alignment annotation to strict, not it's typedef alias.
+--- a/source/darkplaces/dpsoftrast.c
++++ b/source/darkplaces/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
+@@ -300,7 +300,7 @@ typedef ALIGN(struct DPSOFTRAST_State_Thread_s
+ 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;
+
diff --git a/games-fps/xonotic/xonotic-0.8.2.ebuild b/games-fps/xonotic/xonotic-0.8.2.ebuild
index 41f326a1322..315c91ab3b4 100644
--- a/games-fps/xonotic/xonotic-0.8.2.ebuild
+++ b/games-fps/xonotic/xonotic-0.8.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -45,6 +45,8 @@ DEPEND="${RDEPEND}
!dedicated? ( ${UIDEPEND} )"
BDEPEND="app-arch/unzip"
+PATCHES=("${FILESDIR}"/${P}-gcc-11.patch)
+
DOCS="Docs/*.txt"
CHECKREQS_DISK_BUILD="1200M"