1 |
commit: 35da04f7cbcc863140405bff2922f1d296f0c32b |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 3 20:32:32 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 3 20:32:57 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35da04f7 |
7 |
|
8 |
games-puzzle/neverball: tweak for gcc-10 |
9 |
|
10 |
Reported-by: Toralf Förster |
11 |
Closes: https://bugs.gentoo.org/708050 |
12 |
Package-Manager: Portage-2.3.87, Repoman-2.3.20 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
.../neverball/files/neverball-1.6.0-gcc-10.patch | 42 ++++++++++++++++++++++ |
16 |
games-puzzle/neverball/neverball-1.6.0-r1.ebuild | 4 ++- |
17 |
2 files changed, 45 insertions(+), 1 deletion(-) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 00000000000..54bd211080c |
22 |
--- /dev/null |
23 |
+++ b/games-puzzle/neverball/files/neverball-1.6.0-gcc-10.patch |
24 |
@@ -0,0 +1,42 @@ |
25 |
+From a42492b8db06934c7a794630db92e3ff6ebaadaa Mon Sep 17 00:00:00 2001 |
26 |
+From: Sergei Trofimovich <slyfox@g.o> |
27 |
+Date: Mon, 3 Feb 2020 20:25:57 +0000 |
28 |
+Subject: [PATCH] share/text.h: fix build failure against gcc-10 |
29 |
+MIME-Version: 1.0 |
30 |
+Content-Type: text/plain; charset=UTF-8 |
31 |
+Content-Transfer-Encoding: 8bit |
32 |
+ |
33 |
+On gcc-10 (and gcc-9 -fno-common) build fails as: |
34 |
+ |
35 |
+``` |
36 |
+cc .. -o neverball ... |
37 |
+ld: ball/st_save.o:(.bss+0x0): |
38 |
+ multiple definition of `text_input'; share/text.o:(.bss+0x0): first defined here |
39 |
+``` |
40 |
+ |
41 |
+gcc-10 will change the default from -fcommon to fno-common: |
42 |
+https://gcc.gnu.org/PR85678. |
43 |
+ |
44 |
+The error also happens if CFLAGS=-fno-common passed explicitly. |
45 |
+ |
46 |
+Reported-by: Toralf Förster |
47 |
+Bug: https://bugs.gentoo.org/708050 |
48 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
49 |
+--- |
50 |
+ share/text.h | 2 +- |
51 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
52 |
+ |
53 |
+--- a/share/text.h |
54 |
++++ b/share/text.h |
55 |
+@@ -15,7 +15,7 @@ int text_length(const char *); |
56 |
+ |
57 |
+ /*---------------------------------------------------------------------------*/ |
58 |
+ |
59 |
+-char text_input[MAXSTR]; |
60 |
++extern char text_input[MAXSTR]; |
61 |
+ |
62 |
+ void text_input_start(void (*cb)(int typing)); |
63 |
+ void text_input_stop(void); |
64 |
+-- |
65 |
+2.25.0 |
66 |
+ |
67 |
|
68 |
diff --git a/games-puzzle/neverball/neverball-1.6.0-r1.ebuild b/games-puzzle/neverball/neverball-1.6.0-r1.ebuild |
69 |
index f2991bb60a7..de40b601028 100644 |
70 |
--- a/games-puzzle/neverball/neverball-1.6.0-r1.ebuild |
71 |
+++ b/games-puzzle/neverball/neverball-1.6.0-r1.ebuild |
72 |
@@ -1,4 +1,4 @@ |
73 |
-# Copyright 1999-2018 Gentoo Foundation |
74 |
+# Copyright 1999-2020 Gentoo Authors |
75 |
# Distributed under the terms of the GNU General Public License v2 |
76 |
|
77 |
EAPI=6 |
78 |
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND} |
79 |
sys-devel/gettext |
80 |
" |
81 |
|
82 |
+PATCHES=("${FILESDIR}"/${P}-gcc-10.patch) |
83 |
+ |
84 |
src_prepare() { |
85 |
default |
86 |
sed -i \ |