Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-board/xgammon/files/, games-board/xgammon/
Date: Wed, 26 Aug 2020 22:07:51
Message-Id: 1598479642.e83b529b07bb3c1a07692dcb78d02f68822a9288.soap@gentoo
1 commit: e83b529b07bb3c1a07692dcb78d02f68822a9288
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 26 22:07:22 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 26 22:07:22 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e83b529b
7
8 games-board/xgammon: Fix building with -fno-common
9
10 Closes: https://bugs.gentoo.org/706872
11 Package-Manager: Portage-3.0.4, Repoman-3.0.1
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 .../xgammon/files/xgammon-0.98-fno-common.patch | 97 ++++++++++++++++++++++
15 games-board/xgammon/xgammon-0.98-r1.ebuild | 1 +
16 2 files changed, 98 insertions(+)
17
18 diff --git a/games-board/xgammon/files/xgammon-0.98-fno-common.patch b/games-board/xgammon/files/xgammon-0.98-fno-common.patch
19 new file mode 100644
20 index 00000000000..924f0e549c0
21 --- /dev/null
22 +++ b/games-board/xgammon/files/xgammon-0.98-fno-common.patch
23 @@ -0,0 +1,97 @@
24 +--- a/allow.c
25 ++++ b/allow.c
26 +@@ -34,6 +34,8 @@
27 + MOVE current_move[4] = {{0, 0}, {0, 0},
28 + {0, 0}, {0, 0}}; /* global only for un_do() */
29 +
30 ++MOVE possible_moves[8000], *list;
31 ++
32 + int test_move (void);
33 + int create_possible_moves (int dice_to_set, int *w, int actual_pin);
34 + int move_is_allowed (int from_pin, int to_pin);
35 +--- a/gammon.h
36 ++++ b/gammon.h
37 +@@ -117,12 +117,14 @@
38 + MoveFunc MoveFunction;
39 + BOARD board;
40 + X11SET X11Set;
41 +-} Player[2];
42 ++};
43 ++extern struct _Player Player[2];
44 +
45 + struct _PinTable {
46 + int count;
47 + int color;
48 +-} Pin[29], rollout_position[29]; /* 0, 25 = bar, 1 - 24 = board and 26, 27 finished[color] */
49 ++};
50 ++extern struct _PinTable Pin[29], rollout_position[29]; /* 0, 25 = bar, 1 - 24 = board and 26, 27 finished[color] */
51 +
52 +
53 + /* if you have the dice values 1 and 1 and all stones are on different
54 +@@ -137,7 +139,7 @@
55 + int to;
56 + } MOVE;
57 +
58 +-MOVE possible_moves[8000], *list;
59 ++extern MOVE possible_moves[8000], *list;
60 +
61 + struct _move_hist {
62 + int from [4];
63 +@@ -151,16 +153,17 @@
64 + struct _Tournament {
65 + unsigned int game_number;
66 + unsigned int winning_point;
67 +-} tournament;
68 ++};
69 ++extern struct _Tournament tournament;
70 +
71 + struct _RolloutSave {
72 + int turn;
73 + int doubler_value;
74 + int doubler_owner;
75 + int roll[2];
76 +-} rollout_save;
77 ++};
78 +
79 +-FILE *endgame_database;
80 ++extern FILE *endgame_database;
81 +
82 + extern void switch_turn();
83 +
84 +--- a/rollout.c
85 ++++ b/rollout.c
86 +@@ -48,6 +48,9 @@
87 + void rollout_roll_dice ();
88 + void exec_rollout ();
89 +
90 ++struct _PinTable Pin[29], rollout_position[29];
91 ++struct _RolloutSave rollout_save;
92 ++
93 + void RollOut (void)
94 + {
95 + Widget toplevel = Player[0].X11Set.toplevel;
96 +--- a/xgammon.c
97 ++++ b/xgammon.c
98 +@@ -178,6 +178,10 @@
99 + MOVE *compi_choice;
100 +
101 + FILE* protokol_file = NULL;
102 ++FILE* endgame_database;
103 ++struct _gammon_resource gammon_resource;
104 ++struct _Tournament tournament;
105 ++struct _Player Player[2];
106 +
107 + char * greetings = "Wellcome to xgammon version 0.98\n (C) 1994 Lambert Klasen Detlef Steuer\n We hope you enjoy it\n\n";
108 +
109 +--- a/xgammon.h
110 ++++ b/xgammon.h
111 +@@ -70,7 +70,8 @@
112 + char *server;
113 + int port;
114 + int button_move;
115 +-} gammon_resource;
116 ++};
117 ++extern struct _gammon_resource gammon_resource;
118 +
119 + /* diawin.c */
120 + extern void AppendDialogText ();
121
122 diff --git a/games-board/xgammon/xgammon-0.98-r1.ebuild b/games-board/xgammon/xgammon-0.98-r1.ebuild
123 index cdbeed6484b..330e8ff486f 100644
124 --- a/games-board/xgammon/xgammon-0.98-r1.ebuild
125 +++ b/games-board/xgammon/xgammon-0.98-r1.ebuild
126 @@ -29,6 +29,7 @@ PATCHES=(
127 "${FILESDIR}"/${P}-config.patch
128 "${FILESDIR}"/gcc33.patch
129 "${FILESDIR}"/${P}-glibc-2.32.patch
130 + "${FILESDIR}"/${P}-fno-common.patch
131 )
132
133 src_configure() {