diff options
Diffstat (limited to 'dev-util/unifdef')
-rw-r--r-- | dev-util/unifdef/Manifest | 3 | ||||
-rw-r--r-- | dev-util/unifdef/files/unifdef-2.12-c23.patch | 51 | ||||
-rw-r--r-- | dev-util/unifdef/unifdef-2.12-r1.ebuild | 7 |
3 files changed, 58 insertions, 3 deletions
diff --git a/dev-util/unifdef/Manifest b/dev-util/unifdef/Manifest index 8ac6906a56ba..7a3b06d9c754 100644 --- a/dev-util/unifdef/Manifest +++ b/dev-util/unifdef/Manifest @@ -1,4 +1,5 @@ +AUX unifdef-2.12-c23.patch 1822 BLAKE2B 9af6961cdded00053b6de12616c0a0ecbede675d8cb8c69dad8e392f83ad8cd0f175ca0e06ec113b8cd4194a829ba2a72254b1e2cfee1716fdccad722ee45b07 SHA512 688c10e6190e11ecd7db596cf906ef137dd2f00be478f784591e6553d5632c2690f607b9bcb1d598dbe6c965eecac7f716379033935dbc782696fc5322293871 AUX unifdef-2.12-tests.patch 677 BLAKE2B 67ea52814b0a993df4f639262332b462f62f38b257a28a97c2a0cc8cd115c41638cfec27ebe0ffab98e99787c8ee3700da33f4d5bed3fb8a3234a6741092a8b5 SHA512 ab8b6dbab6c4122a15551b881e715bd33dff9d500dfffee065851da983bc43331c2cdea56bee6a2b7b45f0b0847cf9c807430f497b1d83f5fb90e1dce83d09f5 DIST unifdef-2.12.tar.xz 66912 BLAKE2B c56069f92921f7a994c759d9cb1d271c1d8da0b5faf0acd84c2add13622e1240e4d3aea3fa4a9e082739cc1999bcacbf255dfeb0c5ec6a183e2a3e1bb599dbc4 SHA512 df78cf931989b5e604e68e0bf00490782d385a575b51584e4be44535b6bde5f9e2abff14510f8f426670d9f6f1abfb5768da5e108bdefd6c9d0c8356a05164b5 -EBUILD unifdef-2.12-r1.ebuild 621 BLAKE2B f2f36f582d76a821d73b74cc053ca8efee8675c16fe64801ad5f6e72872104b19e63458539981464e793b88e5611d2dea2356f9c8f4ea966a75dfda7b705df76 SHA512 234b5b94afc80fedd2fbe7607cd6f0eea31d75a19621168438a071979e9dc0b83c098d78f796ecf824290de27d66e9fa084ce55c9afacda12e4abb049ae8ec7f +EBUILD unifdef-2.12-r1.ebuild 652 BLAKE2B 8c5e9995210b0681fc8be0e3b5a270d01724e16b78fef1d2553a8ff63f673ce6887af51c2dc19fc31e1c7a9a0d7024d0ee148a889e83a9aab170e8f48949ddb0 SHA512 09728079be68a1a11ae753d87571eb08561e063994c00a46bb6055aa44824c9510079425ff1efc3286562783a481810901c89aa20752fc65a4c06729ae22917c MISC metadata.xml 246 BLAKE2B e371bdda99f18de9d4959b40af5e1f7db0bff64ab41b6dbc969b7164ea72e37dc2ad2bfff677d36b0bc3611aa8c13f7a37eca8794af46f545e906b2397576d23 SHA512 1b64b2fd4bfcaa4429bb6c99bc4006dd4151ca8a054469acd90f2035144caba993498ec8954b100b698972c3006915072be35358bb3454de59cf2928b4d08a2e diff --git a/dev-util/unifdef/files/unifdef-2.12-c23.patch b/dev-util/unifdef/files/unifdef-2.12-c23.patch new file mode 100644 index 000000000000..f95ecd38e5c0 --- /dev/null +++ b/dev-util/unifdef/files/unifdef-2.12-c23.patch @@ -0,0 +1,51 @@ +https://github.com/fanf2/unifdef/pull/19 + +From d616741e6b0d5b57b66447e85ad32b283b28adde Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sun, 17 Nov 2024 01:26:27 +0000 +Subject: [PATCH] Don't use C23 constexpr keyword + +This fixes building with upcoming GCC 15 which defaults to -std=gnu23. +--- a/unifdef.c ++++ b/unifdef.c +@@ -202,7 +202,7 @@ static int depth; /* current #if nesting */ + static int delcount; /* count of deleted lines */ + static unsigned blankcount; /* count of blank lines */ + static unsigned blankmax; /* maximum recent blankcount */ +-static bool constexpr; /* constant #if expression */ ++static bool is_constexpr; /* constant #if expression */ + static bool zerosyms; /* to format symdepth output */ + static bool firstsym; /* ditto */ + +@@ -1086,7 +1086,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp) + *valp = (value[sym] != NULL); + lt = *valp ? LT_TRUE : LT_FALSE; + } +- constexpr = false; ++ is_constexpr = false; + } else if (!endsym(*cp)) { + debug("eval%d symbol", prec(ops)); + sym = findsym(&cp); +@@ -1103,7 +1103,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp) + lt = *valp ? LT_TRUE : LT_FALSE; + cp = skipargs(cp); + } +- constexpr = false; ++ is_constexpr = false; + } else { + debug("eval%d bad expr", prec(ops)); + return (LT_ERROR); +@@ -1170,10 +1170,10 @@ ifeval(const char **cpp) + long val = 0; + + debug("eval %s", *cpp); +- constexpr = killconsts ? false : true; ++ is_constexpr = killconsts ? false : true; + ret = eval_table(eval_ops, &val, cpp); + debug("eval = %d", val); +- return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); ++ return (is_constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); + } + + /* + diff --git a/dev-util/unifdef/unifdef-2.12-r1.ebuild b/dev-util/unifdef/unifdef-2.12-r1.ebuild index 732ab1e3c37a..a65c8b893bcc 100644 --- a/dev-util/unifdef/unifdef-2.12-r1.ebuild +++ b/dev-util/unifdef/unifdef-2.12-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,10 @@ LICENSE="BSD" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -PATCHES=( "${FILESDIR}"/${P}-tests.patch ) +PATCHES=( + "${FILESDIR}"/${P}-tests.patch + "${FILESDIR}"/${P}-c23.patch +) DOCS=( README ) |