blob: 4cafec8b49475fe4481d66cc05a937ecb08d74c3 (
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
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/rockdodger/rockdodger-0.6.0a.ebuild,v 1.4 2004/06/24 22:11:05 agriffis Exp $
inherit games
DESCRIPTION="Dodge the rocks for as long as possible until you die. Kill greeblies to make the universe safe for non-greeblie life once again."
HOMEPAGE="http://spacerocks.sourceforge.net/"
SRC_URI="mirror://sourceforge/spacerocks/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 ~ppc ~amd64"
IUSE=""
RDEPEND=">=media-libs/libsdl-1.2.2
>=media-libs/sdl-image-1.2
>=media-libs/sdl-mixer-1.2"
DEPEND="${RDEPEND}
>=sys-apps/sed-4"
src_unpack() {
GAME_DEST_DIR="${GAMES_DATADIR}/${PN}"
unpack ${A}
cd ${S}
# Modify highscores & data directory and add our CFLAGS to the Makefile
sed -i \
-e "s:\./data:${GAME_DEST_DIR}:" \
-e "s:/usr/share/rockdodger/\.highscore:${GAMES_STATEDIR}/rockdodger.scores:" \
-e 's:umask(0111):umask(0117):' main.c \
|| die " sed main.c failed"
sed -i \
-e "s:-g:${CFLAGS}:" Makefile \
|| die "sed Makefile failed"
# The 512 chunksize makes the music skip
sed -i \
-e "s:512:1024:" sound.c \
|| die "sed sound.c failed"
}
src_install() {
dogamesbin rockdodger || die "dogamesbin failed"
insinto "${GAME_DEST_DIR}"
doins data/* || die "doins failed"
dodir "${GAMES_STATEDIR}"
touch "${D}/${GAMES_STATEDIR}/rockdodger.scores"
fperms 660 "${GAMES_STATEDIR}/rockdodger.scores"
prepgamesdirs
}
|