summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-02-03 20:32:32 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-02-03 20:32:57 +0000
commit35da04f7cbcc863140405bff2922f1d296f0c32b (patch)
tree4a6dd56358404ccaa73a6ad2b1c400feb5d81489 /games-puzzle/neverball
parentdev-lang/gnat-gpl: use the new toolchain.eclass (diff)
downloadgentoo-35da04f7cbcc863140405bff2922f1d296f0c32b.tar.gz
gentoo-35da04f7cbcc863140405bff2922f1d296f0c32b.tar.bz2
gentoo-35da04f7cbcc863140405bff2922f1d296f0c32b.zip
games-puzzle/neverball: tweak for gcc-10
Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/708050 Package-Manager: Portage-2.3.87, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'games-puzzle/neverball')
-rw-r--r--games-puzzle/neverball/files/neverball-1.6.0-gcc-10.patch42
-rw-r--r--games-puzzle/neverball/neverball-1.6.0-r1.ebuild4
2 files changed, 45 insertions, 1 deletions
diff --git a/games-puzzle/neverball/files/neverball-1.6.0-gcc-10.patch b/games-puzzle/neverball/files/neverball-1.6.0-gcc-10.patch
new file mode 100644
index 000000000000..54bd211080c6
--- /dev/null
+++ b/games-puzzle/neverball/files/neverball-1.6.0-gcc-10.patch
@@ -0,0 +1,42 @@
+From a42492b8db06934c7a794630db92e3ff6ebaadaa Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon, 3 Feb 2020 20:25:57 +0000
+Subject: [PATCH] share/text.h: fix build failure against gcc-10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On gcc-10 (and gcc-9 -fno-common) build fails as:
+
+```
+cc .. -o neverball ...
+ld: ball/st_save.o:(.bss+0x0):
+ multiple definition of `text_input'; share/text.o:(.bss+0x0): first defined here
+```
+
+gcc-10 will change the default from -fcommon to fno-common:
+https://gcc.gnu.org/PR85678.
+
+The error also happens if CFLAGS=-fno-common passed explicitly.
+
+Reported-by: Toralf Förster
+Bug: https://bugs.gentoo.org/708050
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ share/text.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/share/text.h
++++ b/share/text.h
+@@ -15,7 +15,7 @@ int text_length(const char *);
+
+ /*---------------------------------------------------------------------------*/
+
+-char text_input[MAXSTR];
++extern char text_input[MAXSTR];
+
+ void text_input_start(void (*cb)(int typing));
+ void text_input_stop(void);
+--
+2.25.0
+
diff --git a/games-puzzle/neverball/neverball-1.6.0-r1.ebuild b/games-puzzle/neverball/neverball-1.6.0-r1.ebuild
index f2991bb60a72..de40b601028e 100644
--- a/games-puzzle/neverball/neverball-1.6.0-r1.ebuild
+++ b/games-puzzle/neverball/neverball-1.6.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND}
sys-devel/gettext
"
+PATCHES=("${FILESDIR}"/${P}-gcc-10.patch)
+
src_prepare() {
default
sed -i \