1 |
commit: 0a7a9bac3756345505ea52819f483714f259cf01 |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 13 17:27:27 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 27 16:09:43 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a7a9bac |
7 |
|
8 |
games-action/xbomber: fix building with clang |
9 |
|
10 |
Also remove deprecated games eclass |
11 |
|
12 |
Also update to EAPI 6 |
13 |
|
14 |
Gentoo-Bug: https://bugs.gentoo.org/574082 |
15 |
Gentoo-Bug: https://bugs.gentoo.org/588772 |
16 |
|
17 |
Package-Manager: portage-2.3.0 |
18 |
|
19 |
games-action/xbomber/files/xbomber-101-clang.patch | 123 +++++++++++++++++++++ |
20 |
games-action/xbomber/files/xbomber-101-gcc4.patch | 4 +- |
21 |
.../xbomber/files/xbomber-101-ldflags.patch | 4 +- |
22 |
.../xbomber/files/xbomber-101-va_list.patch | 4 +- |
23 |
games-action/xbomber/xbomber-101-r1.ebuild | 47 ++++++++ |
24 |
5 files changed, 176 insertions(+), 6 deletions(-) |
25 |
|
26 |
diff --git a/games-action/xbomber/files/xbomber-101-clang.patch b/games-action/xbomber/files/xbomber-101-clang.patch |
27 |
new file mode 100644 |
28 |
index 0000000..1771f15 |
29 |
--- /dev/null |
30 |
+++ b/games-action/xbomber/files/xbomber-101-clang.patch |
31 |
@@ -0,0 +1,123 @@ |
32 |
+--- a/bomber.c 2016-07-13 16:35:34.596802964 -0500 |
33 |
++++ b/bomber.c 2016-07-13 16:40:43.110797439 -0500 |
34 |
+@@ -350,7 +350,7 @@ |
35 |
+ inform1(i); |
36 |
+ } |
37 |
+ |
38 |
+-networktraffic() |
39 |
++void networktraffic() |
40 |
+ { |
41 |
+ int i,j,k; |
42 |
+ int length; |
43 |
+@@ -1252,7 +1252,7 @@ |
44 |
+ } |
45 |
+ } |
46 |
+ |
47 |
+-addsprite(int x,int y,figure *fig) |
48 |
++void addsprite(int x,int y,figure *fig) |
49 |
+ { |
50 |
+ sprite *sp; |
51 |
+ if(spritesused==MAXSPRITES) return; |
52 |
+@@ -1262,7 +1262,7 @@ |
53 |
+ sp->ypos=y; |
54 |
+ sp->fig=fig; |
55 |
+ } |
56 |
+-adddamage(int xpos,int ypos,int xsize,int ysize) |
57 |
++void adddamage(int xpos,int ypos,int xsize,int ysize) |
58 |
+ { |
59 |
+ damage *dm; |
60 |
+ if(damageused==MAXDAMAGES) return; |
61 |
+@@ -1375,7 +1375,7 @@ |
62 |
+ return (y>>FRACTION)+arraystarty; |
63 |
+ } |
64 |
+ |
65 |
+-int trymove(player *pl,int dx,int dy) |
66 |
++void trymove(player *pl,int dx,int dy) |
67 |
+ { |
68 |
+ int wx,wy; |
69 |
+ int sx,sy; |
70 |
+@@ -1520,7 +1520,7 @@ |
71 |
+ } |
72 |
+ } |
73 |
+ |
74 |
+-doplayer(player *pl) |
75 |
++void doplayer(player *pl) |
76 |
+ { |
77 |
+ int last; |
78 |
+ int color; |
79 |
+@@ -1640,7 +1640,7 @@ |
80 |
+ 8,14,4, |
81 |
+ }; |
82 |
+ |
83 |
+-initplayers() |
84 |
++void initplayers() |
85 |
+ { |
86 |
+ int i; |
87 |
+ unsigned char *p; |
88 |
+@@ -1794,7 +1794,7 @@ |
89 |
+ copyup(); |
90 |
+ } |
91 |
+ |
92 |
+-pulseon() |
93 |
++void pulseon() |
94 |
+ { |
95 |
+ if(havepulse) return; |
96 |
+ havepulse=1; |
97 |
+@@ -1803,7 +1803,7 @@ |
98 |
+ thandler(0); |
99 |
+ setitimer(ITIMER_REAL,&itval,NULL); |
100 |
+ } |
101 |
+-pulseoff() |
102 |
++void pulseoff() |
103 |
+ { |
104 |
+ if(!havepulse) return; |
105 |
+ havepulse=0; |
106 |
+@@ -2235,7 +2235,7 @@ |
107 |
+ failure(char *str,...) |
108 |
+ { |
109 |
+ gamemode=0; |
110 |
+- return; |
111 |
++ return 1; |
112 |
+ } |
113 |
+ drawmode3() |
114 |
+ { |
115 |
+@@ -2261,7 +2261,7 @@ |
116 |
+ } |
117 |
+ |
118 |
+ |
119 |
+-domode3() |
120 |
++void domode3() |
121 |
+ { |
122 |
+ int size; |
123 |
+ int i,j; |
124 |
+@@ -2351,7 +2351,7 @@ |
125 |
+ |
126 |
+ gamemode=0; |
127 |
+ } |
128 |
+-domode4() |
129 |
++void domode4() |
130 |
+ { |
131 |
+ unsigned char querystr[16]; |
132 |
+ long now; |
133 |
+--- a/bomber.h 2016-07-13 16:35:34.596802964 -0500 |
134 |
++++ b/bomber.h 2016-07-13 16:40:26.797797731 -0500 |
135 |
+@@ -210,6 +210,8 @@ |
136 |
+ extern void scrprintf(char *str, ...); |
137 |
+ extern int textx,texty,fontxsize,fontysize; |
138 |
+ extern void texthome(void); |
139 |
++extern void adddamage(int xpos,int ypos,int xsize,int ysize); |
140 |
++extern void addsprite(int x,int y,figure *fig); |
141 |
+ |
142 |
+ extern unsigned char field[32][32]; |
143 |
+ extern void *info[32][32]; |
144 |
+--- a/sound.c 2016-07-13 16:35:34.596802964 -0500 |
145 |
++++ b/sound.c 2016-07-13 16:40:57.702797177 -0500 |
146 |
+@@ -44,7 +44,7 @@ |
147 |
+ |
148 |
+ |
149 |
+ |
150 |
+-soundinit(char *name) |
151 |
++void soundinit(char *name) |
152 |
+ { |
153 |
+ int fd[2]; |
154 |
+ char devname[256]; |
155 |
|
156 |
diff --git a/games-action/xbomber/files/xbomber-101-gcc4.patch b/games-action/xbomber/files/xbomber-101-gcc4.patch |
157 |
index 8a5a063..0ee82d8 100644 |
158 |
--- a/games-action/xbomber/files/xbomber-101-gcc4.patch |
159 |
+++ b/games-action/xbomber/files/xbomber-101-gcc4.patch |
160 |
@@ -1,5 +1,5 @@ |
161 |
---- bomber.c.old 2006-01-28 12:06:34.000000000 -0700 |
162 |
-+++ bomber.c 2006-01-28 12:06:46.000000000 -0700 |
163 |
+--- a/bomber.c 2006-01-28 12:06:34.000000000 -0700 |
164 |
++++ b/bomber.c 2006-01-28 12:06:46.000000000 -0700 |
165 |
@@ -1699,7 +1699,7 @@ |
166 |
} |
167 |
void addtail(void *header,void *entry) |
168 |
|
169 |
diff --git a/games-action/xbomber/files/xbomber-101-ldflags.patch b/games-action/xbomber/files/xbomber-101-ldflags.patch |
170 |
index ebde164..a0bf2f8 100644 |
171 |
--- a/games-action/xbomber/files/xbomber-101-ldflags.patch |
172 |
+++ b/games-action/xbomber/files/xbomber-101-ldflags.patch |
173 |
@@ -1,5 +1,5 @@ |
174 |
---- Makefile.old 2010-10-19 09:17:43.000000000 +0200 |
175 |
-+++ Makefile 2010-10-19 09:18:12.000000000 +0200 |
176 |
+--- a/Makefile 2010-10-19 09:17:43.000000000 +0200 |
177 |
++++ b/Makefile 2010-10-19 09:18:12.000000000 +0200 |
178 |
@@ -1,10 +1,8 @@ |
179 |
-CFLAGS = -O3 |
180 |
- |
181 |
|
182 |
diff --git a/games-action/xbomber/files/xbomber-101-va_list.patch b/games-action/xbomber/files/xbomber-101-va_list.patch |
183 |
index cd15b84..5a1691a 100644 |
184 |
--- a/games-action/xbomber/files/xbomber-101-va_list.patch |
185 |
+++ b/games-action/xbomber/files/xbomber-101-va_list.patch |
186 |
@@ -1,5 +1,5 @@ |
187 |
---- bomber.c.orig 2005-11-06 16:50:04.000000000 +0100 |
188 |
-+++ bomber.c 2005-11-06 16:47:35.000000000 +0100 |
189 |
+--- a/bomber.c 2005-11-06 16:50:04.000000000 +0100 |
190 |
++++ b/bomber.c 2005-11-06 16:47:35.000000000 +0100 |
191 |
@@ -1,5 +1,6 @@ |
192 |
#include <stdio.h> |
193 |
#include <stdlib.h> |
194 |
|
195 |
diff --git a/games-action/xbomber/xbomber-101-r1.ebuild b/games-action/xbomber/xbomber-101-r1.ebuild |
196 |
new file mode 100644 |
197 |
index 0000000..d8343c2 |
198 |
--- /dev/null |
199 |
+++ b/games-action/xbomber/xbomber-101-r1.ebuild |
200 |
@@ -0,0 +1,47 @@ |
201 |
+# Copyright 1999-2016 Gentoo Foundation |
202 |
+# Distributed under the terms of the GNU General Public License v2 |
203 |
+# $Id$ |
204 |
+ |
205 |
+EAPI=6 |
206 |
+ |
207 |
+DESCRIPTION="Bomberman clone w/multiplayer support" |
208 |
+HOMEPAGE="http://www.xdr.com/dash/bomber.html" |
209 |
+SRC_URI="http://www.xdr.com/dash/${P}.tgz" |
210 |
+ |
211 |
+LICENSE="GPL-2" |
212 |
+SLOT="0" |
213 |
+KEYWORDS="~amd64 ~ppc ~x86" |
214 |
+IUSE="" |
215 |
+ |
216 |
+DEPEND="x11-libs/libX11" |
217 |
+RDEPEND=${DEPEND} |
218 |
+ |
219 |
+PATCHES=( |
220 |
+ "${FILESDIR}"/${P}-va_list.patch |
221 |
+ "${FILESDIR}"/${P}-gcc4.patch |
222 |
+ "${FILESDIR}"/${P}-ldflags.patch |
223 |
+ "${FILESDIR}"/${P}-clang.patch |
224 |
+) |
225 |
+ |
226 |
+src_prepare() { |
227 |
+ sed -i \ |
228 |
+ -e "/^CC/d" \ |
229 |
+ -e 's/gcc/$(CC)/g' \ |
230 |
+ -e "s:X386:X11R6:" \ |
231 |
+ Makefile || die |
232 |
+ |
233 |
+ # ${P}-ldflags.patch depends on the munged Makefile |
234 |
+ default |
235 |
+ |
236 |
+ sed -i \ |
237 |
+ -e "s:data/%s:/usr/share/${PN}/%s:" bomber.c || die |
238 |
+ sed -i \ |
239 |
+ -e "s:=\"data\":=\"/usr/share/${PN}\":" sound.c || die |
240 |
+} |
241 |
+ |
242 |
+src_install() { |
243 |
+ dobin matcher bomber |
244 |
+ insinto /usr/share/${PN} |
245 |
+ doins -r data/* |
246 |
+ dodoc README Changelog |
247 |
+} |