mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
dev-games/t4k-common: EAPI 7 -> 8, port to C23
Double-wrap bool in case it's a keyword, not macro, for C23. As typedef enum bool was guarded before and downstream user tuxmath package takes care to use bool type only internally, without exposing it over the network or to filesystem, I act under presumption that this is ok to do in this installable header. Closes: https://bugs.gentoo.org/943953 Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com> Part-of: https://github.com/gentoo/gentoo/pull/40844 Closes: https://github.com/gentoo/gentoo/pull/40844 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
This commit is contained in:
parent
b1d99949f8
commit
c36701c842
33
dev-games/t4k-common/files/t4k-common-0.1.1-bool.patch
Normal file
33
dev-games/t4k-common/files/t4k-common-0.1.1-bool.patch
Normal file
@ -0,0 +1,33 @@
|
||||
Double-wrap bool in case it's a keyword, not macro, for C23.
|
||||
As typedef enum bool was guarded before and downstream user
|
||||
tuxmath package takes care to use bool type only internally,
|
||||
without exposing it over the network or to filesystem,
|
||||
I act under presumption that this is ok to do in this
|
||||
installable header.
|
||||
https://bugs.gentoo.org/943953
|
||||
--- a/src/t4k_common.h
|
||||
+++ b/src/t4k_common.h
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <stdbool.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
@@ -124,6 +125,7 @@
|
||||
// #define _(String) gettext (String)
|
||||
|
||||
#ifndef bool
|
||||
+#if __STDC_VERSION__ <= 201710L
|
||||
typedef enum
|
||||
{
|
||||
false,
|
||||
@@ -131,6 +133,7 @@
|
||||
}
|
||||
bool;
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
// Debug macros
|
||||
#define DEBUGCODE(mask) if((mask) & debug_status)
|
||||
@ -1,7 +1,7 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
EAPI=8
|
||||
|
||||
inherit autotools
|
||||
|
||||
@ -41,6 +41,7 @@ PATCHES=(
|
||||
"${FILESDIR}"/${P}-missing-text.patch
|
||||
"${FILESDIR}"/${P}-svg-libxml2.patch
|
||||
"${FILESDIR}"/${P}-gcc14-build-fix.patch
|
||||
"${FILESDIR}"/${P}-bool.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
@ -54,7 +55,6 @@ src_configure() {
|
||||
# note: sdlpango<->sdlttf breaks ABI, prefer default pango
|
||||
local econfargs=(
|
||||
$(usex svg '' --without-rsvg)
|
||||
--disable-static
|
||||
)
|
||||
econf "${econfargs[@]}"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user