summaryrefslogtreecommitdiff
path: root/games-fps
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /games-fps
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/Manifest.gzbin10872 -> 10866 bytes
-rw-r--r--games-fps/darkplaces/Manifest3
-rw-r--r--games-fps/darkplaces/darkplaces-20140513-r1.ebuild2
-rw-r--r--games-fps/darkplaces/files/darkplaces-20140513-gcc-11.patch43
-rw-r--r--games-fps/quakeforge/Manifest9
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch33
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch9
-rw-r--r--games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch15
-rw-r--r--games-fps/quakeforge/metadata.xml5
-rw-r--r--games-fps/quakeforge/quakeforge-0.7.2-r1.ebuild126
-rw-r--r--games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild173
-rw-r--r--games-fps/xonotic/Manifest3
-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
14 files changed, 298 insertions, 168 deletions
diff --git a/games-fps/Manifest.gz b/games-fps/Manifest.gz
index 53e10d3a3145..b54e5b31eb2b 100644
--- a/games-fps/Manifest.gz
+++ b/games-fps/Manifest.gz
Binary files differ
diff --git a/games-fps/darkplaces/Manifest b/games-fps/darkplaces/Manifest
index 613adcc4124f..14e6fbdc3aef 100644
--- a/games-fps/darkplaces/Manifest
+++ b/games-fps/darkplaces/Manifest
@@ -1,5 +1,6 @@
+AUX darkplaces-20140513-gcc-11.patch 1432 BLAKE2B a46d76475e074b8ce7a3ddc9fd813d903456487eaf66282e81dd689b89840325aa6af516243e8ddd8c861717cc16590e465196aa9cd9b4231966a251e6c77050 SHA512 426e6e3926872131afde4b6f162453f5f24ee0075b13c2da9732c7519bdbae9f05348502f74cafce88b183adddf5d9916020d1df0db25b953fafdeda7b49f1e2
DIST darkplacesengine20140513.zip 28113487 BLAKE2B 9e3ffa759921fd61d1308f7c08cc1253a5a3d32c57e8dd8c2a05771aa0b5019fac7932ad337e4be95545bf093f4a2f20d221328ae0bfa45c2b00a7f5700fc04a SHA512 45864b590057c6de0ea978b3cc967feb879b87b2d376f3b4d8525e037b10ca1fc68599c152506494bb06669c6c2304e0aa0ee1b28f7a0d589d10c23f7285052c
DIST fuhquake-lits.rar 8388829 BLAKE2B fb9c4db151deb43424de9331641154f412394ae6346864bc62a210c7d8d12c6ed6c8647cb4cd83fa853155c5f562f7e9b8d3c779fe74c1bb3f05bb6f627b1d5e SHA512 6e59f5e08a6c401b329b86b0cd677a04b1a5aee11f24973c77c9e7ea50cab9dedf4fc15c4f3d6b73bdc87bacdc9612a3c244d0a4ceceef943abb6e256ac23925
DIST id1.pk3 350470 BLAKE2B 76426667de5f42633f608b75286671344d439398aa9b819e9ba3979ca317a93930b1077de7efb4b1bad670a6341c7536d572cfc2590a5812c71dd0c4e8def784 SHA512 d4d7233bc1e5049e89d09448818219b0ce7941fecde5381cd95933e4c96ebc9b4e34ff7eae5eb5d0d1e3cc2ceb4f5254f4d600aded7dda373713149817621331
-EBUILD darkplaces-20140513-r1.ebuild 4482 BLAKE2B 3572a76783bfd7301effe4fe8ee4de5dbe987333b23b4a0ad2af5a82cc23ad7c85eaae903630cb47eaf7039f630f2c446273233fce9455f34f6ed1753f6c652c SHA512 300e90637dcdb64629f630300733b799092f7bf43675f68ac071bb430d1d0c03a1d1a1ca11aec63475d105d191cfdbb8912aa0b23424802d165198acd043f553
+EBUILD darkplaces-20140513-r1.ebuild 4525 BLAKE2B 1b99e2227e00a4bd33d3729021b53e7f3dcc8b46ee025d506fa482380baf04ba18cd6acc3fec61b649d116b2fd7b6327edc3095f02ec41627047d8645f736044 SHA512 5b8d482f1ec1f245c437f75607faec812020b5f3380b708d2eca8d5affa4964fe5cc980a3947bcfc36aa2485a7057e9ea3dab42bdeeebd5ca639bfc3238fdb28
MISC metadata.xml 567 BLAKE2B 46fb34c2aab597b51dd9e8d5effb76af828734a9a7826c503de0a843d12ddeb275d31d846f419635450a3ce1880eb31a1942e684cdc82d1aad83d1aa1cc97d17 SHA512 719f0053b4390b1dccb63e70bddb518f9aad79c8b240dd37ed16b1680a1053a51e309632893c87c51d6057e2602bc6a3fbe8c7d11330da76d5646b3c8c542bbd
diff --git a/games-fps/darkplaces/darkplaces-20140513-r1.ebuild b/games-fps/darkplaces/darkplaces-20140513-r1.ebuild
index 7934dcbe22d3..4ac04b2d8f39 100644
--- a/games-fps/darkplaces/darkplaces-20140513-r1.ebuild
+++ b/games-fps/darkplaces/darkplaces-20140513-r1.ebuild
@@ -68,6 +68,8 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=("${FILESDIR}"/${P}-gcc-11.patch)
+
dir="/usr/share/quake1"
opengl_client() {
diff --git a/games-fps/darkplaces/files/darkplaces-20140513-gcc-11.patch b/games-fps/darkplaces/files/darkplaces-20140513-gcc-11.patch
new file mode 100644
index 000000000000..5670b053cef7
--- /dev/null
+++ b/games-fps/darkplaces/files/darkplaces-20140513-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;
+
diff --git a/games-fps/quakeforge/Manifest b/games-fps/quakeforge/Manifest
index 8b32102cdc69..d8dc3e3678b1 100644
--- a/games-fps/quakeforge/Manifest
+++ b/games-fps/quakeforge/Manifest
@@ -1,4 +1,5 @@
-AUX quakeforge-0.7.2-gentoo.patch 1365 BLAKE2B 486c303505940d78b982b92848b04532a77cf2a5896d1cb26b9cf4dc013dca03aea0686102e42a30f7c4038819859c69f01890f55632c0d5af1102cf91d23f86 SHA512 521ba870e7b04e98c4d5507f661b0bfe7f18dc3901b671aed8c03c7691466e4e67f382d0fe05545eabff3ae684b8ed39e6681b4179348682f9adeb3eab177d9d
-DIST quakeforge-0.7.2.tar.bz2 2887823 BLAKE2B 27526b0e5491cc9a052f70c387c46b0d5518c0d63264f799cac81e471a87b978c9edcf22f4a68db25b8c05b7b51371504459e8ba5de450719e92aae712940cc7 SHA512 d296e10b86466aee0a4be527a5fea7a44bae60ebef52ad86381744dc96e2bed2ad14d3b790b4514a5c59ac897662e91b80a9d49c822910930742a1d2b8a2ec55
-EBUILD quakeforge-0.7.2-r1.ebuild 3100 BLAKE2B 16c34ae2ad3e0b827ec82d5fccf993b312a4819296d0c0714c8ac8f974bad0abb217389f346c926f88787bff21fedcfaa4872c8116de808e3da2a13ff3fc996f SHA512 92b942153f275b9e0a0b300dee691ba42af0bb5e5dbd304bd45a5fc35c95e83d68983d08499d33d3bc619468944a828ce24f421be5b277e53e9d24a7c3280ac1
-MISC metadata.xml 1685 BLAKE2B f2ee32565cd97551e6cd22200d0ce2332a014b774511b172dc1e2b486a27e417af441f1f944b8325bf23dc7363e46a01fa6b51237353f8964e98dd5836357cb3 SHA512 caf9d7549c8e5d801f8d626b8a4c2528735a13fa2c721f4b9d5c9ae74ae15ee55c22f165d3027fcfed8309d6bf1face5dea9ebbb1b8624d679658c6768d77bc0
+AUX quakeforge-0.7.2_p20210601-png-stub.patch 230 BLAKE2B fb1185bcbb377186bcacff8156dd4f5724882057b75af0cc42745471fa68fc30b672f589465d05603ded336b5370f9220aa6fb23546923317ca512056f5a0077 SHA512 cd5e88b23042a6462996d88034770211a59018e9ea81a498bbe4e5abd2aa4c01847c607bcd9670f6e1748bef1c4508668ed2b6f3b3b1690b392e9f9a9c93660e
+AUX quakeforge-0.7.2_p20210601-skipped-tests.patch 473 BLAKE2B a5ee046cd5b351741afe1953ddfc039df415d46d6d4f3085555466d052b0b61f58ce2684c8ea3b94817e754a12f5a423b0c98951daaa998970a89f89230a9952 SHA512 8d2f0b5f78b56e564fbf7b8602ded77f2403b0ce19d43c981e5f71d9fa7555529953447241effa209609480822e8a30e69a53b66b53618391887658435dd82aa
+DIST quakeforge-0.7.2_p20210601.tar.gz 3140318 BLAKE2B 4359c2e92a52bc314bca82dcf6f90aebe2fb7260e9c2e1444d3ca239c53adf1ca912093c5c0ccacb4cf9375e199c244f1b8787196c2f8f3bbc7eb00962b0d8da SHA512 a27e4317b3c01f129f1f32209c02b86abf7148c3e0b2e39306324d6b4758d9165883c169ebfde03fc7350b499088cd685991483911b5ae57ccb9b80baaefa733
+EBUILD quakeforge-0.7.2_p20210601.ebuild 4879 BLAKE2B dd2ce56a125af5b069e16e159fb9d6a3c413263983d4ce1a730f6e2a53979d9247b5d1b8f953a53ddb7711e7c09853000632aefd121c74340f8ef03621c6ae8c SHA512 17da66fdac3ced92859908bc52878594661970e0fb03492ca720008c54f1a81e068f92a642b8b0b8749b65c76438799b92e6095102b4c6354784d1857da7bd59
+MISC metadata.xml 1814 BLAKE2B 88bcd7f96f83c035c1f84ec910895f7a197d5d29ac4d4c10b40baae21ecf37143a771c3f74deec60a906a6c36cf29ae2a2260362b6a891c216e1a2f40774e2d8 SHA512 c87273afde2a0776677b4c2b524eda78590311c70351101c0e6cc3c341fad95ad0c7636ac31822959722e55eb64d976c9bb777fc7a931ef946d31bf8a0826919
diff --git a/games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch b/games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch
deleted file mode 100644
index 38fb0c187689..000000000000
--- a/games-fps/quakeforge/files/quakeforge-0.7.2-gentoo.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/nq/source/Makefile.am 2012-11-18 16:57:56.658388682 +0100
-+++ b/nq/source/Makefile.am 2012-11-18 16:58:11.470268607 +0100
-@@ -138,7 +138,7 @@
- nq_x11_SOURCES= sys_unix.c
- nq_x11_LDADD= $(nq_x11_libs) \
- $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
-- $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS)
-+ $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS) -ldl
- nq_x11_LDFLAGS= $(common_ldflags)
- nq_x11_DEPENDENCIES= $(nq_x11_libs)
-
---- a/qw/source/Makefile.am 2012-11-18 17:10:59.148172332 +0100
-+++ b/qw/source/Makefile.am 2012-11-18 17:11:55.866876762 +0100
-@@ -168,7 +168,7 @@
- qw_client_x11_SOURCES= cl_sys_unix.c
- qw_client_x11_LDADD= $(qw_client_x11_libs) \
- $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
-- $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS) $(LIBCURL_LIBS)
-+ $(X_EXTRA_LIBS) $(X_SHM_LIB) $(NET_LIBS) $(LIBCURL_LIBS) -ldl
- qw_client_x11_LDFLAGS= $(common_ldflags)
- qw_client_x11_DEPENDENCIES= $(qw_client_x11_libs)
-
---- a/tools/qwaq/Makefile.am 2012-11-18 17:15:16.024714317 +0100
-+++ b/tools/qwaq/Makefile.am 2012-11-18 17:15:41.955749660 +0100
-@@ -38,7 +38,7 @@
- qwaq_x11_SOURCES=qwaq.c qwaq-bi.c
- qwaq_x11_LDADD= $(qwaq_x11_libs) $(QWAQ_LIBS) \
- $(VIDMODE_LIBS) $(DGA_LIBS) $(X_LIBS) -lX11 \
-- $(X_EXTRA_LIBS) $(X_SHM_LIB)
-+ $(X_EXTRA_LIBS) $(X_SHM_LIB) -ldl
- qwaq_x11_LDFLAGS=
- qwaq_x11_DEPENDENCIES= $(qwaq_x11_libs) $(QWAQ_DEPS)
-
diff --git a/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch
new file mode 100644
index 000000000000..d32fab57b7e1
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-png-stub.patch
@@ -0,0 +1,9 @@
+Fix stub definition for USE=-png
+https://github.com/quakeforge/quakeforge/issues/14
+--- a/libs/image/png.c
++++ b/libs/image/png.c
+@@ -320,3 +320,3 @@
+ VISIBLE tex_t *
+-LoadPNG (QFile *infile)
++LoadPNG (QFile *infile, int load)
+ {
diff --git a/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch
new file mode 100644
index 000000000000..5b25af47ac26
--- /dev/null
+++ b/games-fps/quakeforge/files/quakeforge-0.7.2_p20210601-skipped-tests.patch
@@ -0,0 +1,15 @@
+These are only failing at high precision and
+should not affect normal usage.
+ quat/simd: fails with -mavx
+ sebvf: random failure, sometimes pass
+--- a/libs/util/test/Makemodule.am
++++ b/libs/util/test/Makemodule.am
+@@ -15,8 +15,5 @@
+ libs/util/test/test-qfs \
+- libs/util/test/test-quat \
+ libs/util/test/test-seb \
+- libs/util/test/test-sebvf \
+ libs/util/test/test-seg \
+ libs/util/test/test-set \
+- libs/util/test/test-simd \
+ libs/util/test/test-txtbuffer \
diff --git a/games-fps/quakeforge/metadata.xml b/games-fps/quakeforge/metadata.xml
index bd3de0628e47..a5c31dd9bfe4 100644
--- a/games-fps/quakeforge/metadata.xml
+++ b/games-fps/quakeforge/metadata.xml
@@ -30,10 +30,11 @@ features, and improving the OpenGL renderer. And QuakeForge is still the
most portable source tree based on the id Software code.
</longdescription>
<use>
- <flag name="wildmidi">enable libWildMidi support</flag>
- <flag name="xdg">enable XDG support</flag>
+ <flag name="client">Build Normal and QuakeWorld clients alongside the servers</flag>
+ <flag name="wildmidi">Use <pkg>media-sound/wildmidi</pkg> for midi support</flag>
</use>
<upstream>
+ <remote-id type="github">quakeforge/quakeforge</remote-id>
<remote-id type="sourceforge">quake</remote-id>
</upstream>
</pkgmetadata>
diff --git a/games-fps/quakeforge/quakeforge-0.7.2-r1.ebuild b/games-fps/quakeforge/quakeforge-0.7.2-r1.ebuild
deleted file mode 100644
index df5368e0a3a6..000000000000
--- a/games-fps/quakeforge/quakeforge-0.7.2-r1.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit flag-o-matic autotools
-
-DESCRIPTION="New 3d engine based off of id Softwares's Quake and QuakeWorld game engine"
-HOMEPAGE="http://www.quakeforge.net/"
-SRC_URI="mirror://sourceforge/quake/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="alsa cdinstall debug dga fbcon flac ipv6 ncurses oss png sdl vorbis wildmidi X xdg xv zlib"
-RESTRICT="userpriv"
-
-RDEPEND="
- media-libs/libsamplerate
- net-misc/curl
- virtual/opengl
- alsa? ( media-libs/alsa-lib )
- dga? ( x11-libs/libXxf86dga )
- flac? ( media-libs/flac )
- ncurses? ( sys-libs/ncurses:0 )
- png? ( media-libs/libpng:0 )
- sdl? ( media-libs/libsdl[video] )
- vorbis? (
- media-libs/libogg
- media-libs/libvorbis
- )
- wildmidi? ( media-sound/wildmidi )
- X? (
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXxf86vm
- )
- xv? (
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXxf86vm
- )
- zlib? ( sys-libs/zlib )"
-DEPEND="${RDEPEND}
- cdinstall? ( games-fps/quake1-data )
- >=sys-devel/bison-2.6
- sys-devel/flex
- virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}"/${P}-gentoo.patch
-)
-
-src_prepare() {
- default
- eautoreconf
- append-cflags -std=gnu89 # build with gcc5 (bug #570392)
-}
-
-src_configure() {
- local debugopts
- use debug \
- && debugopts="--enable-debug --disable-optimize --enable-profile" \
- || debugopts="--disable-debug --disable-profile"
-
- local clients=${QF_CLIENTS}
- use fbcon && clients="${clients},fbdev"
- use sdl && clients="${clients},sdl"
- use X && clients="${clients},x11"
- [ "${clients:0:1}" == "," ] && clients=${clients:1}
-
- local servers=${QF_SERVERS:-master,nq,qw,qtv}
-
- local tools=${QF_TOOLS:-all}
-
- econf \
- --enable-dependency-tracking \
- $(use_enable ncurses curses) \
- $(use_enable vorbis) \
- $(use_enable png) \
- $(use_enable zlib) \
- $(use_with ipv6) \
- $(use_with fbcon fbdev) \
- $(use_with X x) \
- $(use_enable xv vidmode) \
- $(use_enable dga) \
- $(use_enable sdl) \
- --disable-xmms \
- $(use_enable alsa) \
- $(use_enable flac) \
- $(use_enable oss) \
- $(use_enable xdg) \
- $(use_enable wildmidi) \
- --enable-sound \
- --disable-optimize \
- --disable-Werror \
- --without-svga \
- ${debugopts} \
- --with-global-cfg=/etc/quakeforge.conf \
- --with-sharepath=/usr/share/quake1 \
- --with-clients=${clients} \
- --with-servers=${servers} \
- --with-tools=${tools}
-}
-
-src_install() {
- emake -j1 DESTDIR="${D}" install
- dodoc ChangeLog NEWS TODO
-}
-
-pkg_postinst() {
- # same warning used in quake1 / quakeforge / nprquake-sdl
- echo
- elog "Before you can play, you must make sure"
- elog "${PN} can find your Quake .pak files"
- elog
- elog "You have 2 choices to do this"
- elog "1 Copy pak*.pak files to /usr/share/quake1/id1"
- elog "2 Symlink pak*.pak files in /usr/share/quake1/id1"
- elog
- elog "Example:"
- elog "my pak*.pak files are in /mnt/secondary/Games/Quake/Id1/"
- elog "ln -s /mnt/secondary/Games/Quake/Id1/pak0.pak /usr/share/quake1/id1/pak0.pak"
- elog
- elog "You only need pak0.pak to play the demo version,"
- elog "the others are needed for registered version"
-}
diff --git a/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild b/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild
new file mode 100644
index 000000000000..504324b8b2b3
--- /dev/null
+++ b/games-fps/quakeforge/quakeforge-0.7.2_p20210601.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic readme.gentoo-r1 toolchain-funcs
+
+MY_COMMIT="53b553e89234306dc0111b107308fb42998e522b"
+
+DESCRIPTION="3D engine based on id Software's Quake and QuakeWorld game engines"
+HOMEPAGE="http://www.quakeforge.net/"
+SRC_URI="https://github.com/quakeforge/quakeforge/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${MY_COMMIT}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa +client custom-cflags debug doc flac ipv6 jack ncurses oss png sdl vorbis wildmidi zlib"
+
+RDEPEND="
+ client? (
+ media-libs/libsamplerate
+ net-misc/curl
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ alsa? ( media-libs/alsa-lib )
+ flac? ( media-libs/flac )
+ jack? ( virtual/jack )
+ sdl? ( media-libs/libsdl[sound] )
+ vorbis? ( media-libs/libvorbis )
+ wildmidi? ( media-sound/wildmidi )
+ )
+ ncurses? ( sys-libs/ncurses:= )
+ png? ( media-libs/libpng:= )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="
+ ${RDEPEND}
+ client? (
+ virtual/opengl
+ x11-base/xorg-proto
+ )"
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen[dot]
+ media-gfx/transfig
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-png-stub.patch
+ "${FILESDIR}"/${P}-skipped-tests.patch
+)
+
+src_prepare() {
+ default
+
+ echo ${PV} > .tarball-version || die
+
+ eautoreconf
+}
+
+src_configure() {
+ if ! use custom-cflags; then
+ # package does a lot of fragile micro-optimizations
+ strip-flags
+
+ # nq-x11 segfaults starting a new game with -O2+ and gcc11
+ # https://github.com/quakeforge/quakeforge/issues/12
+ tc-is-gcc && [[ $(gcc-major-version) -ge 11 ]] && replace-flags '-O[2-9]*' -Os
+ fi
+
+ append-ldflags -Wl,-z,noexecstack
+
+ qf_client() {
+ echo $(usex client $(use_enable ${1}) --disable-${1})
+ }
+
+ local econfargs=(
+ $(qf_client alsa)
+ $(qf_client flac)
+ $(qf_client jack)
+ $(qf_client oss)
+ $(qf_client sdl)
+ $(qf_client vorbis)
+ # vulkan is work-in-progress and currently needs <=vulkan-headers-1.2.169
+ # https://github.com/quakeforge/quakeforge/issues/13
+ --disable-vulkan # $(qf_client vulkan)
+ $(qf_client wildmidi)
+ $(use_enable client sound)
+ $(use_enable client vidmode)
+ $(use_enable debug)
+ $(use_enable ncurses curses)
+ $(use_enable png)
+ $(use_enable zlib)
+ $(use_with client x)
+ $(use_with ipv6)
+ --disable-Werror
+ --disable-dga
+ --disable-static
+ --enable-xdg
+ # non-x11 clients are mostly abandoned/broken (SDL1 still useful for pulseaudio)
+ --with-clients=$(usex client x11 '')
+ --with-cpp="$(tc-getCPP) -x c %u %d %s -o %o %i" # see config.d/qfcc.m4
+ --with-global-cfg="${EPREFIX}"/etc/quakeforge.conf
+ --with-sharepath="${EPREFIX}"/usr/share/quake1
+ )
+
+ # Jack audio is special (need a different method to enable), and an
+ # issue prevents it from being usable without another audio output.
+ # https://github.com/quakeforge/quakeforge/issues/16
+ # Given hopefully temporary, not relying on REQUIRED_USE.
+ use alsa || use oss || use sdl || econfargs+=( --enable-oss )
+
+ econf "${econfargs[@]}"
+}
+
+src_compile() {
+ default
+
+ use doc && emake doc
+}
+
+src_install() {
+ use doc && local HTML_DOCS=( doxygen/html/. )
+
+ emake -j1 DESTDIR="${D}" install
+
+ find "${ED}" -name '*.la' -delete || die
+
+ local DISABLE_AUTOFORMATTING="yes"
+ local DOC_CONTENTS=\
+"Before you can play (using nq-x11 or qw-client-x11), you must ensure
+that ${PN} can find your Quake pak0.pak (and optionally pak1.pak)
+at one of these locations with lowercase filenames:
+ - '~/.local/share/${PN}/id1/pak0.pak'
+ - '${EPREFIX}/usr/share/quake1/id1/pak0.pak'
+
+You can add them yourself or use either of:
+ - games-fps/quake1-data: install from a Quake CD-ROM
+ - games-fps/quake1-demodata: pak0.pak only (limited demo)
+
+Key binds notes:
+ Defaults ('imt_mod' table) expect you to set key binds manually in:
+ - '~/.local/share/${PN}/id1/autoexec.cfg' (or '${EPREFIX}/usr/share/quake1/id1')
+ For the in-game bind menu to be usable ('imt_0' table), bring up the
+ console with backtick \`, and run 'imt imt_0' (only needed once).
+ A mouse-grab bind ('toggle in_grab') and using freelook is recommended.
+
+Audio/Video notes:
+ Can add settings in:
+ - '~/.config/${PN}/${PN}.conf' (or '${EPREFIX}/etc/${PN}.conf')
+ Examples:
+ - set vid_width 800
+ - set vid_height 600
+ - set snd_output sdl (or alsa, oss)
+ - setrom vid_render gl (or sw for software rendering)
+ - setrom snd_render default (specially set jack here for JACK audio)"
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ ${REPLACING_VERSIONS} ]] && ver_test ${REPLACING_VERSIONS} -le 0.7.2-r1; then
+ elog "Migration may be needed for ${PN}'s home paths, now using:"
+ elog " ~/.${PN}rc -> ~/.config/${PN}/${PN}.conf"
+ elog " ~/.${PN}/ -> ~/.local/share/${PN}/"
+ elog "Also, nq-sdl / qw-client-sdl are no longer available (use -x11 instead)."
+ fi
+}
diff --git a/games-fps/xonotic/Manifest b/games-fps/xonotic/Manifest
index e1ee5bac0717..f2b5ca55f83f 100644
--- a/games-fps/xonotic/Manifest
+++ b/games-fps/xonotic/Manifest
@@ -1,3 +1,4 @@
+AUX xonotic-0.8.2-gcc-11.patch 1409 BLAKE2B 4c0ebe1dd7c9d6bd4a8cf57819203956d66095fa17335ff4747e994f1cc44e8dea6f8d4d693fa41e4e3b1c83571354611148b1824a003abe644ab9efbb1c6012 SHA512 981ac3b288a4921e80e3889500ea7d8e212608ba6af2c8f19f42000212265dfd6b15d5ccb1e31b5a251daf7cdf1cf049eb936a648f2f3056d30a1e27fe00e59e
DIST xonotic-0.8.2.zip 991045679 BLAKE2B 3005473da954492bb7387f9e0e13c2415e638877fa8b83e14872f3b04ed0fc21b82e18f51aa6c68e8bf02d09d4a73f290cbcaebdfa8c0a12ceb6582309baee8a SHA512 0787fcf326827ae0292e5917c7ff2c7fd79947209d4b62e7f83b8b828bec15b575da304e0631f9f163c9b0bd93bed13616e142398ff08cbdaaea890a939dfca5
-EBUILD xonotic-0.8.2.ebuild 2391 BLAKE2B 4efc6189bb1654a8a219050bc61bf2b0f0695425dd0594e9a6ed6b1a40dadedbe1e3556e7f009fa77d6af6b220ef1fc8cd0cdd326068c74613039b1bdf0b3fad SHA512 5eecf5415b7c55967b7fb6f80ed2fa5c0c21fc095788425d0ffb43bc9ac821ddced3df156cc2af1713fd344157b4212384d538dcb621433ee2ff4cae25914610
+EBUILD xonotic-0.8.2.ebuild 2434 BLAKE2B c485eae1cfe8edccf346d0e7093ef2eb4749ae7637026596e347d7bbbb28771f155102bb16e91b51b2b25c17860e7655f8a93f2e1792d2b3c004ce79174e9a2e SHA512 61335e7eabe368be03c8d43c3b3c0ae57600ecbeee5c3815148e08ef9cf277a124a41f4b3fd8cb4411cd3538a6d0a96ef6faaf10d32a67f6277577ffafede22f
MISC metadata.xml 351 BLAKE2B a5005814468014cf93d7f807b7f1c5d9252aecf20584267cdef61547d109727230f14c3f21297e202c4876e0534fac7d5ab86022c3741d582115c04b1bcf18f9 SHA512 14665ca256c368cbf80a08aaff18c005a25a4197eae82b559e934fbe6a3b17ef6f1fbd323621e38af5725f3e61ff750c72bb8fe650fb76eeed818070d411e3f6
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 000000000000..f6a9569e0163
--- /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 41f326a13222..315c91ab3b4e 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"