summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-fps/xonotic/files/xonotic-0.8.6-fix-c23.patch48
-rw-r--r--games-fps/xonotic/xonotic-0.8.6.ebuild6
2 files changed, 53 insertions, 1 deletions
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 <root@example.com>
+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