summaryrefslogtreecommitdiff
blob: 2e1a5aec34ed89a0d1a5fe0f1e0299b5221251fd (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
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/xjump/xjump-2.7.5.ebuild,v 1.7 2006/02/03 17:52:56 mr_bones_ Exp $

inherit eutils games

DEBIAN_PATCH="1.2"
DESCRIPTION="An X game where one tries to jump up as many levels as possible."
HOMEPAGE="http://packages.debian.org/stable/games/xjump"
SRC_URI="mirror://debian/pool/main/x/${PN}/${PN}_${PV}.orig.tar.gz
	mirror://debian/pool/main/x/${PN}/${PN}_${PV}-${DEBIAN_PATCH}.diff.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"
IUSE=""

DEPEND="|| (
		( x11-libs/libX11
		x11-libs/libXaw
		x11-libs/libXpm
		x11-libs/libXt
		x11-proto/xproto )
		virtual/x11
	)"

RDEPEND="|| (
		( x11-libs/libX11
		x11-libs/libXaw
		x11-libs/libXext
		x11-libs/libXmu
		x11-libs/libXpm
		x11-libs/libXt )
		virtual/x11
	)"


S=${WORKDIR}/${P}.orig

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

	# Where we will keep the highscore file:
	HISCORE_FILENAME=xjump.hiscores
	HISCORE_FILE="${GAMES_STATEDIR}/${HISCORE_FILENAME}"

	epatch "${WORKDIR}/${PN}_${PV}-${DEBIAN_PATCH}.diff"
	epatch "${S}/debian/patches/"*.dpatch

	# set up where we will keep the highscores file:
	sed -i \
		-e "/^CC/d" \
		-e "/^CFLAGS/d" \
		-e "s,/var/games/xjump,${GAMES_STATEDIR}," \
		-e "s,/record,/${HISCORE_FILENAME}," \
		Makefile \
		|| die "sed failed"
}

src_install() {
	dogamesbin xjump || die "dogamesbin failed"
	dodoc README.euc

	# Set up the hiscores file:
	dodir "${GAMES_STATEDIR}"
	touch "${D}/${HISCORE_FILE}"
	fperms 660 "${HISCORE_FILE}" || die "setting permissions failed"
	prepgamesdirs
}