summaryrefslogtreecommitdiff
blob: bcb75bbf16ebca93f23894a3cd06145596c09139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/insaneodyssey/insaneodyssey-000311.ebuild,v 1.4 2004/08/03 11:50:43 dholm Exp $

inherit eutils games

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="x86 ~amd64 ~ppc"
IUSE=""

RDEPEND=">=media-libs/libsdl-1.2.7
	>=media-libs/sdl-mixer-1.2.5
	>=media-libs/sdl-image-1.2.3"

DEPEND="${RDEPEND}
	>=sys-apps/sed-4"

S="${WORKDIR}/${PN}"

DEST_DIR="${GAMES_DATADIR}/${PN}"

src_unpack() {
	unpack ${A}
	cd "${S}/${PN}"

	# Modify data load code and paths to game data
	epatch "${FILESDIR}/${P}-datafiles.patch"
	sed -i \
		-e "/lvl/s:^:${DEST_DIR}/:" \
		-e "s:night:${DEST_DIR}/night:" \
		levels.dat || die "sed levels.dat failed"
	sed -i \
		-e "s:tiles.dat:${DEST_DIR}/tiles.dat:" \
		-e "s:sprites.dat:${DEST_DIR}/sprites.dat:" \
		-e "s:levels.dat:${DEST_DIR}/levels.dat:" \
		-e "s:IO_T:${DEST_DIR}/IO_T:" \
		-e "s:tiles.att:${DEST_DIR}/tiles.att:" \
		-e "s:shot:${DEST_DIR}/shot:" \
		io.cpp || die "sed io.cpp failed"
	sed -i \
		-e 's:\[32:[100:' \
		io.h || die "sed io.h failed"
}

src_install() {
	cd ${PN}
	dogamesbin insaneodyssey || die "dogamesbin failed"
	insinto "${DEST_DIR}"
	doins *bmp *png *dat *att *lvl *wav *mod *IT || die "doins failed"
	prepgamesdirs
}