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-arcade/sdlroids/files/, games-arcade/sdlroids/
Date: Sun, 22 Nov 2020 14:38:07
Message-Id: 1606055863.39ff15626bbf6ce5bf0bf9af6baec95e6f67b8d4.soap@gentoo
1 commit: 39ff15626bbf6ce5bf0bf9af6baec95e6f67b8d4
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 22 14:37:43 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 22 14:37:43 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39ff1562
7
8 games-arcade/sdlroids: Port to EAPI 7
9
10 Closes: https://bugs.gentoo.org/708388
11 Closes: https://bugs.gentoo.org/730834
12 Package-Manager: Portage-3.0.9, Repoman-3.0.2
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 .../sdlroids/files/sdlroids-1.3.4-Makefile.patch | 15 +++
16 .../sdlroids/files/sdlroids-1.3.4-fno-common.patch | 140 +++++++++++++++++++++
17 ....3.4-sound.patch => sdlroids-1.3.4-sound.patch} | 0
18 games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild | 30 +++--
19 4 files changed, 172 insertions(+), 13 deletions(-)
20
21 diff --git a/games-arcade/sdlroids/files/sdlroids-1.3.4-Makefile.patch b/games-arcade/sdlroids/files/sdlroids-1.3.4-Makefile.patch
22 new file mode 100644
23 index 00000000000..9577d4cb658
24 --- /dev/null
25 +++ b/games-arcade/sdlroids/files/sdlroids-1.3.4-Makefile.patch
26 @@ -0,0 +1,15 @@
27 +--- a/Makefile.am
28 ++++ b/Makefile.am
29 +@@ -23,9 +23,9 @@
30 + GFXDIR="$(datadir)/sdlroids/bmp/"
31 +
32 + install-data-local:
33 +- @/bin/sh $(srcdir)/mkinstalldirs $(SOUNDSDIR) $(GFXDIR)
34 +- $(INSTALL_DATA) $(srcdir)/sounds/*.wav $(SOUNDSDIR)
35 +- $(INSTALL_DATA) $(srcdir)/bmp/*.bmp $(GFXDIR)
36 ++ @/bin/sh $(srcdir)/mkinstalldirs $(DESTDIR)$(SOUNDSDIR) $(DESTDIR)$(GFXDIR)
37 ++ $(INSTALL_DATA) $(srcdir)/sounds/*.wav $(DESTDIR)$(SOUNDSDIR)
38 ++ $(INSTALL_DATA) $(srcdir)/bmp/*.bmp $(DESTDIR)$(GFXDIR)
39 +
40 + # Data directories
41 + INCLUDES=-Wall -Wcast-align -DDATADIR=\"$(datadir)/sdlroids/\"
42
43 diff --git a/games-arcade/sdlroids/files/sdlroids-1.3.4-fno-common.patch b/games-arcade/sdlroids/files/sdlroids-1.3.4-fno-common.patch
44 new file mode 100644
45 index 00000000000..6288adf913b
46 --- /dev/null
47 +++ b/games-arcade/sdlroids/files/sdlroids-1.3.4-fno-common.patch
48 @@ -0,0 +1,140 @@
49 +--- a/getargs.h
50 ++++ b/getargs.h
51 +@@ -37,4 +37,4 @@
52 +
53 + /* getargs() prototype */
54 + void getargs(int, char *[]);
55 +-int flagargs[NUMARGS];
56 ++extern int flagargs[NUMARGS];
57 +--- a/sdl.c
58 ++++ b/sdl.c
59 +@@ -282,7 +282,7 @@
60 + #define SGN(a) (((a)<0) ? -1 : 1)
61 +
62 + /* Draw an horizontal line in the current color */
63 +-inline void draw_horzline(Sint16 x1, Sint16 x2, Sint32 y)
64 ++void draw_horzline(Sint16 x1, Sint16 x2, Sint32 y)
65 + {
66 + int i;
67 + if (x1 < x2) {
68 +@@ -296,7 +296,7 @@
69 + }
70 +
71 + /* Draw an vertical line in the current color */
72 +-inline void draw_vertline(Sint16 x, Sint16 y1, Sint32 y2)
73 ++void draw_vertline(Sint16 x, Sint16 y1, Sint32 y2)
74 + {
75 + int i;
76 + if (y1 < y2) {
77 +@@ -310,7 +310,7 @@
78 + }
79 +
80 + /* Draw a line between two coordinates */
81 +-inline void drawline(int x1,int y1,int x2,int y2)
82 ++void drawline(int x1,int y1,int x2,int y2)
83 + {
84 + int d, x, y, ax, ay, sx, sy, dx, dy;
85 + if((dx = x2 - x1) == 0) { /* vertical line */
86 +@@ -358,7 +358,7 @@
87 + }
88 + }
89 +
90 +-inline void MoveTo(int x,int y)
91 ++void MoveTo(int x,int y)
92 + {
93 + current_x = convx(x);
94 + current_y = convy(y);
95 +@@ -366,12 +366,12 @@
96 +
97 +
98 + /* Scaling blit function by Greg Velichansky */
99 +-inline Uint32 ifloor(Uint32 i)
100 ++Uint32 ifloor(Uint32 i)
101 + {
102 + return i & 0xFFFF0000;
103 + }
104 +
105 +-inline Uint32 iceil(Uint32 i)
106 ++Uint32 iceil(Uint32 i)
107 + {
108 + return (i & 0xFFFF) ? i : ifloor(i) + (1<<16);
109 + }
110 +@@ -379,7 +379,7 @@
111 +
112 + /* The most pedantic-a%& getpixel and putpixel ever, hopefully. */
113 + /* There may still be endianness bugs! These will be fixed after adequte testing. XXX XXX XXX */
114 +-inline int SDL_GetPixel (SDL_Surface *f, Uint32 x, Uint32 y,
115 ++int SDL_GetPixel (SDL_Surface *f, Uint32 x, Uint32 y,
116 + Uint8 *r, Uint8 *g, Uint8 *b)
117 + {
118 + /*const Uint32 mask[] = {0x0, 0xff, 0xffff, 0xffffff, 0xffffffff};*/
119 +@@ -515,7 +515,7 @@
120 + SDL_UnlockSurface(screen);
121 + }
122 + }
123 +-inline void lock_graphics() {
124 ++void lock_graphics() {
125 + if ( SDL_MUSTLOCK(screen) ) {
126 + if ( SDL_LockSurface(screen) < 0 ) {
127 + return;
128 +@@ -523,13 +523,13 @@
129 + }
130 + }
131 +
132 +-inline void ResetRefreshCoords()
133 ++void ResetRefreshCoords()
134 + {
135 + minx = miny = -1;
136 + maxx = maxy = 0;
137 + }
138 +
139 +-inline void RedrawObject() {
140 ++void RedrawObject() {
141 + if(minx >= 0) {
142 + rects[rec_counter].x = minx;
143 + rects[rec_counter].y = miny;
144 +@@ -540,7 +540,7 @@
145 + }
146 +
147 + static int is_poly=0;
148 +-inline void LineTo(int x,int y)
149 ++void LineTo(int x,int y)
150 + {
151 + x = convx(x); y = convy(y);
152 + drawline(current_x,current_y,x,y);
153 +@@ -549,7 +549,7 @@
154 + }
155 +
156 +
157 +-inline void Polyline(POINT *pts,int n)
158 ++void Polyline(POINT *pts,int n)
159 + {
160 + int f;
161 + if(n<2) return;
162 +@@ -560,7 +560,7 @@
163 + LineTo(pts->x, pts->y);
164 + }
165 +
166 +-inline void Circle(Sint16 x, Sint16 y, Sint32 r)
167 ++void Circle(Sint16 x, Sint16 y, Sint32 r)
168 + {
169 + x = convx(x);
170 + y = convy(y);
171 +@@ -569,7 +569,7 @@
172 + }
173 +
174 + /* doesn't set current_[xy] because hyperoid.c doesn't need it to */
175 +-inline void SetPixel(Sint16 x, Sint16 y,Uint32 c)
176 ++void SetPixel(Sint16 x, Sint16 y,Uint32 c)
177 + {
178 + current_color = c;
179 + x = convx(x);
180 +@@ -578,7 +578,7 @@
181 + }
182 +
183 +
184 +-inline void set_colour(int c)
185 ++void set_colour(int c)
186 + {
187 + current_color = c;
188 + }
189
190 diff --git a/games-arcade/sdlroids/files/1.3.4-sound.patch b/games-arcade/sdlroids/files/sdlroids-1.3.4-sound.patch
191 similarity index 100%
192 rename from games-arcade/sdlroids/files/1.3.4-sound.patch
193 rename to games-arcade/sdlroids/files/sdlroids-1.3.4-sound.patch
194
195 diff --git a/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild b/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild
196 index 5500d687031..30d2f85a7f3 100644
197 --- a/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild
198 +++ b/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild
199 @@ -1,8 +1,9 @@
200 -# Copyright 1999-2018 Gentoo Foundation
201 +# Copyright 1999-2020 Gentoo Authors
202 # Distributed under the terms of the GNU General Public License v2
203
204 -EAPI=6
205 -inherit desktop
206 +EAPI=7
207 +
208 +inherit autotools desktop
209
210 DESCRIPTION="Asteroids Clone for X using SDL"
211 HOMEPAGE="http://david.hedbor.org/projects/sdlroids/"
212 @@ -11,24 +12,27 @@ SRC_URI="mirror://sourceforge/sdlroids/${P}.tar.bz2"
213 LICENSE="GPL-2"
214 SLOT="0"
215 KEYWORDS="~alpha ~amd64 ~x86"
216 -IUSE=""
217
218 -DEPEND="media-libs/libsdl
219 - media-libs/sdl-mixer
220 -"
221 -RDEPEND="${DEPEND}"
222 +RDEPEND="
223 + media-libs/libsdl
224 + media-libs/sdl-mixer"
225 +DEPEND="${RDEPEND}"
226 +
227 +PATCHES=(
228 + "${FILESDIR}"/${P}-sound.patch
229 + "${FILESDIR}"/${P}-Makefile.patch
230 + "${FILESDIR}"/${P}-fno-common.patch
231 +)
232
233 src_prepare() {
234 default
235 - sed -i \
236 - -e 's/$(SOUNDSDIR)/$(DESTDIR)$(SOUNDSDIR)/' \
237 - -e 's/$(GFXDIR)/$(DESTDIR)$(GFXDIR)/' Makefile.in \
238 - || die "sed failed"
239 - eapply "${FILESDIR}"/${PV}-sound.patch
240 + mv configure.{in,ac} || die
241 + eautoreconf
242 }
243
244 src_install() {
245 default
246 +
247 newicon icons/sdlroids-48x48.xpm ${PN}.xpm
248 make_desktop_entry ${PN} SDLRoids ${PN}
249 }