summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-06-21 21:59:22 +0200
committerDavid Seifert <soap@gentoo.org>2020-06-21 21:59:22 +0200
commit5f7dd61886b3dc3fe878a0671af551d3b2caa060 (patch)
tree63044105eea47e3fa1a0849cc0bc80b5f008054a /games-puzzle
parentgames-puzzle/mures: [QA] Run AM_PROG_AR (diff)
downloadgentoo-5f7dd61886b3dc3fe878a0671af551d3b2caa060.tar.gz
gentoo-5f7dd61886b3dc3fe878a0671af551d3b2caa060.tar.bz2
gentoo-5f7dd61886b3dc3fe878a0671af551d3b2caa060.zip
games-puzzle/mures: Fix building against GCC 10
Closes: https://bugs.gentoo.org/706716 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/mures/files/mures-0.5-fix-fno-common.patch114
-rw-r--r--games-puzzle/mures/mures-0.5-r1.ebuild2
2 files changed, 116 insertions, 0 deletions
diff --git a/games-puzzle/mures/files/mures-0.5-fix-fno-common.patch b/games-puzzle/mures/files/mures-0.5-fix-fno-common.patch
new file mode 100644
index 000000000000..b07be91c0175
--- /dev/null
+++ b/games-puzzle/mures/files/mures-0.5-fix-fno-common.patch
@@ -0,0 +1,114 @@
+--- a/src/client.c
++++ b/src/client.c
+@@ -37,7 +37,7 @@
+
+ int client_initialized = 0;
+ UDPsocket local_socket = NULL;
+-UDPpacket *packet;
++extern UDPpacket *packet;
+
+ #define PACKET_POOL_SIZE 20
+
+--- a/src/game_output.c
++++ b/src/game_output.c
+@@ -31,6 +31,11 @@
+ #include "go_sdl.h"
+ #include "go_gl.h"
+
++void (*game_output_handle_event)(game *g, int event, float x, float y, direction dir);
++void (*game_output_refresh)(game *g, SDL_Surface *out);
++void (*game_output_bigchange)(game *g);
++void (*game_output_exit)(game *g);
++
+ void game_output_init(game *g, int type)
+ {
+ switch(type) {
+--- a/src/game_output.h
++++ b/src/game_output.h
+@@ -38,10 +38,10 @@
+ GL
+ };
+
+-void (*game_output_handle_event)(game *g, int event, float x, float y, direction dir);
+-void (*game_output_refresh)(game *g, SDL_Surface *out);
+-void (*game_output_bigchange)(game *g);
+-void (*game_output_exit)(game *g);
++extern void (*game_output_handle_event)(game *g, int event, float x, float y, direction dir);
++extern void (*game_output_refresh)(game *g, SDL_Surface *out);
++extern void (*game_output_bigchange)(game *g);
++extern void (*game_output_exit)(game *g);
+
+ void game_output_init(game *g, int type);
+
+--- a/src/gi_sdl.c
++++ b/src/gi_sdl.c
+@@ -60,6 +60,7 @@
+ #define GI (*(gi_sdl_data*)g->input)
+
+ SDL_Joystick *js;
++gi_sdl_settings ks;
+
+ int gi_sdl_player_exists(game *g, int p)
+ {
+--- a/src/gi_sdl.h
++++ b/src/gi_sdl.h
+@@ -88,7 +88,7 @@
+ int joy_y[MAX_JOY];
+ } gi_sdl_settings;
+
+-gi_sdl_settings ks;
++extern gi_sdl_settings ks;
+
+ int gi_sdl_player_exists(game *g, int p);
+ grid_int_position gi_sdl_player_grid_pos(game *g, int p);
+--- a/src/gui.h
++++ b/src/gui.h
+@@ -47,6 +47,6 @@
+ void gui_remove_object(int i);
+ void gui_clear();
+
+-int factor_h, factor_w;
++extern int factor_h, factor_w;
+
+ #endif
+--- a/src/lua.c
++++ b/src/lua.c
+@@ -22,6 +22,7 @@
+ }
+ */
+
++lua_State *L;
+
+ static int lua_write(lua_State *L)
+ {
+--- a/src/lua.h
++++ b/src/lua.h
+@@ -4,7 +4,7 @@
+ #include "lua/lua.h"
+
+
+-lua_State *L;
++extern lua_State *L;
+
+ int lua_init();
+ void lua_exit();
+--- a/src/main.c
++++ b/src/main.c
+@@ -44,6 +44,7 @@
+ #include "lua.h"
+
+ root_type root;
++int opengl;
+
+ void root_quit()
+ {
+--- a/src/main.h
++++ b/src/main.h
+@@ -44,6 +44,6 @@
+
+ void root_quit();
+
+-int opengl;
++extern int opengl;
+
+ #endif
diff --git a/games-puzzle/mures/mures-0.5-r1.ebuild b/games-puzzle/mures/mures-0.5-r1.ebuild
index dcc81b4134a8..6a16b35658b0 100644
--- a/games-puzzle/mures/mures-0.5-r1.ebuild
+++ b/games-puzzle/mures/mures-0.5-r1.ebuild
@@ -40,6 +40,8 @@ src_prepare() {
src/maps/battle/Makefile.am \
|| die "sed failed"
+ # GCC 10 / -fno-common
+ eapply "${FILESDIR}"/${P}-fix-fno-common.patch
eapply "${FILESDIR}"/${P}-underlink.patch
mv configure.{in,ac} || die