summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-11-22 15:37:43 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-22 15:37:43 +0100
commit39ff15626bbf6ce5bf0bf9af6baec95e6f67b8d4 (patch)
tree526fd384d29fd9d68adc0cd2778658ce6e28ea90 /games-arcade/sdlroids
parentapp-benchmarks/sysbench: migrate to lua-single eclass (diff)
downloadgentoo-39ff15626bbf6ce5bf0bf9af6baec95e6f67b8d4.tar.gz
gentoo-39ff15626bbf6ce5bf0bf9af6baec95e6f67b8d4.tar.bz2
gentoo-39ff15626bbf6ce5bf0bf9af6baec95e6f67b8d4.zip
games-arcade/sdlroids: Port to EAPI 7
Closes: https://bugs.gentoo.org/708388 Closes: https://bugs.gentoo.org/730834 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-arcade/sdlroids')
-rw-r--r--games-arcade/sdlroids/files/sdlroids-1.3.4-Makefile.patch15
-rw-r--r--games-arcade/sdlroids/files/sdlroids-1.3.4-fno-common.patch140
-rw-r--r--games-arcade/sdlroids/files/sdlroids-1.3.4-sound.patch (renamed from games-arcade/sdlroids/files/1.3.4-sound.patch)0
-rw-r--r--games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild30
4 files changed, 172 insertions, 13 deletions
diff --git a/games-arcade/sdlroids/files/sdlroids-1.3.4-Makefile.patch b/games-arcade/sdlroids/files/sdlroids-1.3.4-Makefile.patch
new file mode 100644
index 000000000000..9577d4cb6582
--- /dev/null
+++ b/games-arcade/sdlroids/files/sdlroids-1.3.4-Makefile.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -23,9 +23,9 @@
+ GFXDIR="$(datadir)/sdlroids/bmp/"
+
+ install-data-local:
+- @/bin/sh $(srcdir)/mkinstalldirs $(SOUNDSDIR) $(GFXDIR)
+- $(INSTALL_DATA) $(srcdir)/sounds/*.wav $(SOUNDSDIR)
+- $(INSTALL_DATA) $(srcdir)/bmp/*.bmp $(GFXDIR)
++ @/bin/sh $(srcdir)/mkinstalldirs $(DESTDIR)$(SOUNDSDIR) $(DESTDIR)$(GFXDIR)
++ $(INSTALL_DATA) $(srcdir)/sounds/*.wav $(DESTDIR)$(SOUNDSDIR)
++ $(INSTALL_DATA) $(srcdir)/bmp/*.bmp $(DESTDIR)$(GFXDIR)
+
+ # Data directories
+ INCLUDES=-Wall -Wcast-align -DDATADIR=\"$(datadir)/sdlroids/\"
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
new file mode 100644
index 000000000000..6288adf913b1
--- /dev/null
+++ b/games-arcade/sdlroids/files/sdlroids-1.3.4-fno-common.patch
@@ -0,0 +1,140 @@
+--- a/getargs.h
++++ b/getargs.h
+@@ -37,4 +37,4 @@
+
+ /* getargs() prototype */
+ void getargs(int, char *[]);
+-int flagargs[NUMARGS];
++extern int flagargs[NUMARGS];
+--- a/sdl.c
++++ b/sdl.c
+@@ -282,7 +282,7 @@
+ #define SGN(a) (((a)<0) ? -1 : 1)
+
+ /* Draw an horizontal line in the current color */
+-inline void draw_horzline(Sint16 x1, Sint16 x2, Sint32 y)
++void draw_horzline(Sint16 x1, Sint16 x2, Sint32 y)
+ {
+ int i;
+ if (x1 < x2) {
+@@ -296,7 +296,7 @@
+ }
+
+ /* Draw an vertical line in the current color */
+-inline void draw_vertline(Sint16 x, Sint16 y1, Sint32 y2)
++void draw_vertline(Sint16 x, Sint16 y1, Sint32 y2)
+ {
+ int i;
+ if (y1 < y2) {
+@@ -310,7 +310,7 @@
+ }
+
+ /* Draw a line between two coordinates */
+-inline void drawline(int x1,int y1,int x2,int y2)
++void drawline(int x1,int y1,int x2,int y2)
+ {
+ int d, x, y, ax, ay, sx, sy, dx, dy;
+ if((dx = x2 - x1) == 0) { /* vertical line */
+@@ -358,7 +358,7 @@
+ }
+ }
+
+-inline void MoveTo(int x,int y)
++void MoveTo(int x,int y)
+ {
+ current_x = convx(x);
+ current_y = convy(y);
+@@ -366,12 +366,12 @@
+
+
+ /* Scaling blit function by Greg Velichansky */
+-inline Uint32 ifloor(Uint32 i)
++Uint32 ifloor(Uint32 i)
+ {
+ return i & 0xFFFF0000;
+ }
+
+-inline Uint32 iceil(Uint32 i)
++Uint32 iceil(Uint32 i)
+ {
+ return (i & 0xFFFF) ? i : ifloor(i) + (1<<16);
+ }
+@@ -379,7 +379,7 @@
+
+ /* The most pedantic-a%& getpixel and putpixel ever, hopefully. */
+ /* There may still be endianness bugs! These will be fixed after adequte testing. XXX XXX XXX */
+-inline int SDL_GetPixel (SDL_Surface *f, Uint32 x, Uint32 y,
++int SDL_GetPixel (SDL_Surface *f, Uint32 x, Uint32 y,
+ Uint8 *r, Uint8 *g, Uint8 *b)
+ {
+ /*const Uint32 mask[] = {0x0, 0xff, 0xffff, 0xffffff, 0xffffffff};*/
+@@ -515,7 +515,7 @@
+ SDL_UnlockSurface(screen);
+ }
+ }
+-inline void lock_graphics() {
++void lock_graphics() {
+ if ( SDL_MUSTLOCK(screen) ) {
+ if ( SDL_LockSurface(screen) < 0 ) {
+ return;
+@@ -523,13 +523,13 @@
+ }
+ }
+
+-inline void ResetRefreshCoords()
++void ResetRefreshCoords()
+ {
+ minx = miny = -1;
+ maxx = maxy = 0;
+ }
+
+-inline void RedrawObject() {
++void RedrawObject() {
+ if(minx >= 0) {
+ rects[rec_counter].x = minx;
+ rects[rec_counter].y = miny;
+@@ -540,7 +540,7 @@
+ }
+
+ static int is_poly=0;
+-inline void LineTo(int x,int y)
++void LineTo(int x,int y)
+ {
+ x = convx(x); y = convy(y);
+ drawline(current_x,current_y,x,y);
+@@ -549,7 +549,7 @@
+ }
+
+
+-inline void Polyline(POINT *pts,int n)
++void Polyline(POINT *pts,int n)
+ {
+ int f;
+ if(n<2) return;
+@@ -560,7 +560,7 @@
+ LineTo(pts->x, pts->y);
+ }
+
+-inline void Circle(Sint16 x, Sint16 y, Sint32 r)
++void Circle(Sint16 x, Sint16 y, Sint32 r)
+ {
+ x = convx(x);
+ y = convy(y);
+@@ -569,7 +569,7 @@
+ }
+
+ /* doesn't set current_[xy] because hyperoid.c doesn't need it to */
+-inline void SetPixel(Sint16 x, Sint16 y,Uint32 c)
++void SetPixel(Sint16 x, Sint16 y,Uint32 c)
+ {
+ current_color = c;
+ x = convx(x);
+@@ -578,7 +578,7 @@
+ }
+
+
+-inline void set_colour(int c)
++void set_colour(int c)
+ {
+ current_color = c;
+ }
diff --git a/games-arcade/sdlroids/files/1.3.4-sound.patch b/games-arcade/sdlroids/files/sdlroids-1.3.4-sound.patch
index eb2eb0c2ada4..eb2eb0c2ada4 100644
--- a/games-arcade/sdlroids/files/1.3.4-sound.patch
+++ b/games-arcade/sdlroids/files/sdlroids-1.3.4-sound.patch
diff --git a/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild b/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild
index 5500d6870314..30d2f85a7f33 100644
--- a/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild
+++ b/games-arcade/sdlroids/sdlroids-1.3.4-r4.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit desktop
+EAPI=7
+
+inherit autotools desktop
DESCRIPTION="Asteroids Clone for X using SDL"
HOMEPAGE="http://david.hedbor.org/projects/sdlroids/"
@@ -11,24 +12,27 @@ SRC_URI="mirror://sourceforge/sdlroids/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~x86"
-IUSE=""
-DEPEND="media-libs/libsdl
- media-libs/sdl-mixer
-"
-RDEPEND="${DEPEND}"
+RDEPEND="
+ media-libs/libsdl
+ media-libs/sdl-mixer"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-sound.patch
+ "${FILESDIR}"/${P}-Makefile.patch
+ "${FILESDIR}"/${P}-fno-common.patch
+)
src_prepare() {
default
- sed -i \
- -e 's/$(SOUNDSDIR)/$(DESTDIR)$(SOUNDSDIR)/' \
- -e 's/$(GFXDIR)/$(DESTDIR)$(GFXDIR)/' Makefile.in \
- || die "sed failed"
- eapply "${FILESDIR}"/${PV}-sound.patch
+ mv configure.{in,ac} || die
+ eautoreconf
}
src_install() {
default
+
newicon icons/sdlroids-48x48.xpm ${PN}.xpm
make_desktop_entry ${PN} SDLRoids ${PN}
}