commit:     8fe391924646535649a94d0ed5993aee09238f09
Author:     G-Src <gsrc <AT> fsfans <DOT> club>
AuthorDate: Mon Jul 28 01:48:59 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 17 21:27:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fe39192

games-fps/xonotic: fix GCC 15 build

Signed-off-by: G-Src <gsrc <AT> fsfans.club>
Part-of: https://github.com/gentoo/gentoo/pull/43200
Closes: https://github.com/gentoo/gentoo/pull/43200
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../xonotic/files/xonotic-0.8.6-fix-c23.patch      | 48 ++++++++++++++++++++++
 games-fps/xonotic/xonotic-0.8.6.ebuild             |  6 ++-
 2 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/games-fps/xonotic/files/xonotic-0.8.6-fix-c23.patch 
b/games-fps/xonotic/files/xonotic-0.8.6-fix-c23.patch
new file mode 100644
index 000000000000..b41062d248c1
--- /dev/null
+++ b/games-fps/xonotic/files/xonotic-0.8.6-fix-c23.patch
@@ -0,0 +1,48 @@
+From 56ddec2571e27a8f144d14d2243dcc723b2956f6 Mon Sep 17 00:00:00 2001
+From: Root <[email protected]>
+Date: Mon, 28 Jul 2025 10:27:56 +0800
+Subject: [PATCH] fix GCC 15 build
+
+---
+ source/darkplaces/dpsoftrast.c | 4 ----
+ source/darkplaces/qtypes.h     | 7 +------
+ 2 files changed, 1 insertion(+), 10 deletions(-)
+
+diff --git a/source/darkplaces/dpsoftrast.c b/source/darkplaces/dpsoftrast.c
+index fff29b8..1eda341 100644
+--- a/source/darkplaces/dpsoftrast.c
++++ b/source/darkplaces/dpsoftrast.c
+@@ -10,10 +10,6 @@
+ #pragma warning(disable : 4324)
+ #endif
+ 
+-#ifndef __cplusplus
+-typedef qboolean bool;
+-#endif
+-
+ #define ALIGN_SIZE 16
+ #define ATOMIC_SIZE 4
+ 
+diff --git a/source/darkplaces/qtypes.h b/source/darkplaces/qtypes.h
+index 6c09614..e6e277b 100644
+--- a/source/darkplaces/qtypes.h
++++ b/source/darkplaces/qtypes.h
+@@ -2,14 +2,9 @@
+ #ifndef QTYPES_H
+ #define QTYPES_H
+ 
+-#undef true
+-#undef false
++#include <stdbool.h>
+ 
+-#ifndef __cplusplus
+-typedef enum qboolean_e {false, true} qboolean;
+-#else
+ typedef bool qboolean;
+-#endif
+ 
+ #ifndef NULL
+ #define NULL ((void *)0)
+-- 
+2.50.1
+

diff --git a/games-fps/xonotic/xonotic-0.8.6.ebuild 
b/games-fps/xonotic/xonotic-0.8.6.ebuild
index 9848e246cedb..fcd361080d33 100644
--- a/games-fps/xonotic/xonotic-0.8.6.ebuild
+++ b/games-fps/xonotic/xonotic-0.8.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -49,6 +49,10 @@ BDEPEND="app-arch/unzip"
 CHECKREQS_DISK_BUILD="1500M"
 CHECKREQS_DISK_USR="1200M"
 
+PATCHES=(
+       "${FILESDIR}/${P}-fix-c23.patch"
+)
+
 src_prepare() {
        default
 

Reply via email to