games-arcade/spacerider: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 18:14:08 +0000 (20:14 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 24 Apr 2018 19:26:09 +0000 (21:26 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-arcade/spacerider/files/spacerider-0.13-font.patch
games-arcade/spacerider/files/spacerider-0.13-gcc41.patch
games-arcade/spacerider/files/spacerider-0.13-gcc49.patch
games-arcade/spacerider/files/spacerider-0.13-gentoo.patch
games-arcade/spacerider/files/spacerider-0.13-ovflfix.patch
games-arcade/spacerider/spacerider-0.13-r1.ebuild [new file with mode: 0644]

index 914a0466c7fe68c26819ab6ae9db5ecffed97387..87732a106633637020b14a2f6d14ddf271b625e7 100644 (file)
@@ -1,8 +1,8 @@
 Ugly brute-force method for avoiding a double-free segfault on exit.
 Better patch welcome.
 
---- spacerider.cpp.orig        2015-03-31 23:24:17.770966147 -0400
-+++ spacerider.cpp     2015-03-31 23:24:41.592174463 -0400
+--- a/spacerider.cpp.orig      2015-03-31 23:24:17.770966147 -0400
++++ b/spacerider.cpp   2015-03-31 23:24:41.592174463 -0400
 @@ -306,8 +306,6 @@
                /* free screen */
                SDL_FreeSurface(screen);
index 1a08d715ac5bc707e2ac8c76a959c408697e5a40..e5524b6e6430bcbd831e8715f354d10e8d14a2aa 100644 (file)
@@ -1,5 +1,5 @@
---- spacerider.cpp.old 2007-02-18 11:25:38.000000000 +0100
-+++ spacerider.cpp     2007-02-18 11:27:00.000000000 +0100
+--- a/spacerider.cpp.old       2007-02-18 11:25:38.000000000 +0100
++++ b/spacerider.cpp   2007-02-18 11:27:00.000000000 +0100
 @@ -17,6 +17,7 @@
  #include <unistd.h>
  }
index d057e7bab73011c83cd09086e51cba850ba0a4f4..b4d5ca6d57649ee55ea98bf54962e69907810542 100644 (file)
@@ -1,5 +1,5 @@
---- effect.cpp.orig    2015-03-31 22:36:53.336131373 -0400
-+++ effect.cpp 2015-03-31 22:37:04.359755281 -0400
+--- a/effect.cpp.orig  2015-03-31 22:36:53.336131373 -0400
++++ b/effect.cpp       2015-03-31 22:37:04.359755281 -0400
 @@ -18,7 +18,7 @@
  void Effect::add(const int x, const int y)
  {
@@ -9,8 +9,8 @@
        {
                return;
        }
---- object.h.orig      2015-03-31 22:35:22.939214561 -0400
-+++ object.h   2015-03-31 22:37:19.654233441 -0400
+--- a/object.h.orig    2015-03-31 22:35:22.939214561 -0400
++++ b/object.h 2015-03-31 22:37:19.654233441 -0400
 @@ -172,7 +172,7 @@
        return object->next;
  }
index d692f87632b0e955001f1fba1c6ab67ac0e7ef2b..ecfdcc513cd0f44b15cda498f43dba5e60a8320a 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -3,12 +3,12 @@
  BINDIR=/usr/bin/
  MANDIR=/usr/share/man/man1/
index 5ed73c348cf248187f2a3a99eb31839d3c49f914..c590400f649f8564a81973b4c5c4f8ffac399c67 100644 (file)
@@ -1,5 +1,5 @@
---- spacerider.cpp.old 2010-10-29 10:12:19.000000000 +0200
-+++ spacerider.cpp     2010-10-29 10:13:47.000000000 +0200
+--- a/spacerider.cpp.old       2010-10-29 10:12:19.000000000 +0200
++++ b/spacerider.cpp   2010-10-29 10:13:47.000000000 +0200
 @@ -112,7 +112,7 @@
                                break;
                        case 'n':
diff --git a/games-arcade/spacerider/spacerider-0.13-r1.ebuild b/games-arcade/spacerider/spacerider-0.13-r1.ebuild
new file mode 100644 (file)
index 0000000..8cf24d9
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Space-shooter written in C++, using the SDL"
+HOMEPAGE="http://www.hackl.dhs.org/spacerider/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2" # stupid php script
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[sound,video]
+       media-libs/sdl-gfx
+       media-libs/sdl-mixer
+       media-libs/sdl-image[jpeg]
+       media-libs/sdl-net
+       media-libs/sdl-ttf"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       default
+       eapply "${FILESDIR}/${P}"-gentoo.patch \
+               "${FILESDIR}/${P}"-gcc41.patch \
+               "${FILESDIR}"/${P}-ovflfix.patch \
+               "${FILESDIR}"/${P}-gcc49.patch \
+               "${FILESDIR}"/${P}-font.patch
+       sed -i \
+               -e "s:/usr/share/games/spacerider:/usr/share/${PN}:" \
+               globals.cpp || die
+}
+
+src_install() {
+       dobin ${PN}
+       insinto "/usr/share/${PN}"
+       doins -r data
+       einstalldocs
+       newman ${PN}.{1,6}
+       newicon data/sprites/star_monster1/1.bmp ${PN}.bmp
+       make_desktop_entry ${PN} Spacerider /usr/share/pixmaps/${PN}.bmp
+}