games-roguelike/angband: tweak for gcc-10, bug #707770
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 29 Feb 2020 11:39:27 +0000 (11:39 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 29 Feb 2020 11:40:07 +0000 (11:40 +0000)
Closes: https://bugs.gentoo.org/707770
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
games-roguelike/angband/angband-4.2.0.ebuild
games-roguelike/angband/files/angband-4.2.0-gcc-10.patch [new file with mode: 0644]

index acb1f3d093cab1f5134324f9c0a514ee2af27389..f9dfb300662f2e81d3b96ff65c132e3a06558c05 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -48,6 +48,8 @@ RDEPEND="X? (
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=("${FILESDIR}"/${P}-gcc-10.patch)
+
 src_prepare() {
        default
 
diff --git a/games-roguelike/angband/files/angband-4.2.0-gcc-10.patch b/games-roguelike/angband/files/angband-4.2.0-gcc-10.patch
new file mode 100644 (file)
index 0000000..6aeb1f7
--- /dev/null
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/707770
+
+--- a/src/mon-blows.h
++++ b/src/mon-blows.h
+@@ -41,7 +41,7 @@ struct blow_method {
+       struct blow_method *next;
+ };
+-struct blow_method *blow_methods;
++extern struct blow_method *blow_methods;
+ /**
+  * Storage for context information for effect handlers called in
+@@ -83,7 +83,7 @@ struct blow_effect {
+       struct blow_effect *next;
+ };
+-struct blow_effect *blow_effects;
++extern struct blow_effect *blow_effects;
+ /* Functions */
+ int blow_index(const char *name);