diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-10-14 07:49:00 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-10-14 07:56:25 -0400 |
commit | ed192a5ae0261aa59a25677fa29bce0f29fe5bcf (patch) | |
tree | e06153b612a7ae8551d79a3925fa56a32809981f /games-arcade | |
parent | app-crypt/coolkey: fix build w/ upcoming clang16 (diff) | |
download | gentoo-ed192a5ae0261aa59a25677fa29bce0f29fe5bcf.tar.gz gentoo-ed192a5ae0261aa59a25677fa29bce0f29fe5bcf.tar.bz2 gentoo-ed192a5ae0261aa59a25677fa29bce0f29fe5bcf.zip |
games-arcade/netris: fix build w/ upcoming clang16 + pass std=gnu89
Tests silently failed (errors to /dev/null, and no confirmation),
then it silently skip including the header it didn't find.
(just a quick fix, this could use cleanups, better patches, and no sed)
Closes: https://bugs.gentoo.org/874021
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r-- | games-arcade/netris/files/netris-0.52-clang16.patch | 31 | ||||
-rw-r--r-- | games-arcade/netris/netris-0.52-r4.ebuild (renamed from games-arcade/netris/netris-0.52-r3.ebuild) | 9 |
2 files changed, 38 insertions, 2 deletions
diff --git a/games-arcade/netris/files/netris-0.52-clang16.patch b/games-arcade/netris/files/netris-0.52-clang16.patch new file mode 100644 index 000000000000..7d13d02975bf --- /dev/null +++ b/games-arcade/netris/files/netris-0.52-clang16.patch @@ -0,0 +1,31 @@ +https://bugs.gentoo.org/874021 +--- a/Configure ++++ b/Configure +@@ -78,3 +78,3 @@ + echo "Checking for libraries" +-echo 'main(){}' > test.c ++echo 'int main(void){return 0;}' > test.c + LFLAGS="" +@@ -96,4 +96,5 @@ + cat << END > test.c +-void handler(void) {} +-main() { on_exit(handler, (void *)0); } ++#include <stdlib.h> ++void handler(int a, void *b) {} ++int main(void) { on_exit(handler, (void *)0); return 0; } + END +@@ -108,3 +109,3 @@ + #include <signal.h> +-main() { sigset_t set; sigprocmask(SIG_BLOCK, &set, &set); } ++int main(void) { sigset_t set; sigprocmask(SIG_BLOCK, &set, &set); return 0; } + END +@@ -119,3 +120,3 @@ + #include <getopt.h> +-main(){} ++int main(void){return 0;} + END +@@ -131,3 +132,3 @@ + #include <memory.h> +-main(){} ++int main(void){return 0;} + END diff --git a/games-arcade/netris/netris-0.52-r3.ebuild b/games-arcade/netris/netris-0.52-r4.ebuild index 54f80a22be4d..6f5c8b733523 100644 --- a/games-arcade/netris/netris-0.52-r3.ebuild +++ b/games-arcade/netris/netris-0.52-r4.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit toolchain-funcs +inherit flag-o-matic toolchain-funcs DEB_VER="10" DESCRIPTION="Classic networked version of T*tris" @@ -26,6 +26,7 @@ src_prepare() { eapply "${S}"/../debian/patches/[01]* eapply "${FILESDIR}"/${P}-tinfo.patch + eapply "${FILESDIR}"/${P}-clang16.patch # bug #185332 sed -i \ @@ -53,6 +54,10 @@ src_prepare() { } src_configure() { + append-cflags -std=gnu89 # old codebase, incompatible with c2x + append-cppflags -D_DEFAULT_SOURCE #874021, for on_exit() + append-cflags ${CPPFLAGS} + bash ./Configure -O || die } |