games-arcade/insaneodyssey: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 17 Apr 2018 20:28:57 +0000 (22:28 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 17 Apr 2018 21:00:44 +0000 (23:00 +0200)
Package-Manager: Portage-2.3.28, Repoman-2.3.9

games-arcade/insaneodyssey/files/insaneodyssey-000311-datafiles.patch
games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch
games-arcade/insaneodyssey/insaneodyssey-000311-r1.ebuild [new file with mode: 0644]

index 417d8396e19b9746ba583c383cd58e3bb2dd90d0..3aab4eeaf9dab8774163da2083cd929e9852b1cc 100644 (file)
@@ -1,5 +1,5 @@
---- io.cpp.orig        2004-06-01 19:11:16.000000000 +0300
-+++ io.cpp     2004-06-01 19:21:14.000000000 +0300
+--- a/io.cpp.orig      2004-06-01 19:11:16.000000000 +0300
++++ b/io.cpp   2004-06-01 19:21:14.000000000 +0300
 @@ -42,7 +42,11 @@
  {
        SDL_Surface *image, *surface;
index 74b4bf644d4900f050bcd778c627bf5d11db8add..4fd35438d24b17d7ec9f632a5715d980fc8fb360 100644 (file)
@@ -1,7 +1,7 @@
 Bug: https://bugs.gentoo.org/600894
 
---- a/insaneodyssey/io.cpp
-+++ b/insaneodyssey/io.cpp
+--- a/io.cpp
++++ b/io.cpp
 @@ -22,6 +22,7 @@
  #include <stdlib.h>
  #include <stdio.h>
diff --git a/games-arcade/insaneodyssey/insaneodyssey-000311-r1.ebuild b/games-arcade/insaneodyssey/insaneodyssey-000311-r1.ebuild
new file mode 100644 (file)
index 0000000..0383afc
--- /dev/null
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Help West Muldune escape from a futuristic mental hospital"
+HOMEPAGE="http://members.fortunecity.com/rivalentertainment/iox.html"
+# Upstream has download issues.
+#SRC_URI="http://members.fortunecity.com/rivalentertainment/io${PV}.tar.gz"
+SRC_URI="mirror://gentoo/io${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[sound,video]
+       media-libs/sdl-mixer
+       media-libs/sdl-image
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+       default
+
+       cd ${PN}
+
+       # Modify data load code and paths to game data
+       eapply "${FILESDIR}"/${P}-datafiles.patch
+
+       eapply "${FILESDIR}"/${P}-gcc6.patch
+
+       sed -i \
+               -e "/lvl/s:^:/usr/share/${PN}/:" \
+               -e "s:night:/usr/share/${PN}/night:" \
+               levels.dat || die
+       sed -i \
+               -e "s:tiles.dat:/usr/share/${PN}/tiles.dat:" \
+               -e "s:sprites.dat:/usr/share/${PN}/sprites.dat:" \
+               -e "s:levels.dat:/usr/share/${PN}/levels.dat:" \
+               -e "s:IO_T:/usr/share/${PN}/IO_T:" \
+               -e "s:tiles.att:/usr/share/${PN}/tiles.att:" \
+               -e "s:shot:/usr/share/${PN}/shot:" \
+               io.cpp || die
+       sed -i \
+               -e 's:\[32:[100:' \
+               io.h || die
+}
+
+src_install() {
+       cd ${PN}
+       dobin ${PN}
+       insinto /usr/share/${PN}
+       doins *bmp *png *dat *att *lvl *wav *mod *IT
+       newicon west00r.png ${PN}.png
+       make_desktop_entry ${PN} "Insane Odyssey"
+}