summaryrefslogtreecommitdiff
blob: 534b60795cbfdadb9b3e0713604644a839c72419 (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
71
72
73
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-sports/ultimatestunts/ultimatestunts-0.6.1-r1.ebuild,v 1.3 2006/12/06 20:30:06 wolf31o2 Exp $

inherit eutils versionator games

MY_PV=$(replace_all_version_separators '')1
MY_P=${PN}-srcdata-${MY_PV}

DESCRIPTION="Remake of the famous Stunts game"
HOMEPAGE="http://www.ultimatestunts.nl"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

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

DEPEND="media-libs/libsdl
	media-libs/openal
	media-libs/freealut
	virtual/opengl
	virtual/glu
	x11-libs/libSM
	x11-libs/libICE
	x11-libs/libX11
	x11-libs/libXi
	x11-libs/libXext
	x11-libs/libXmu
	x11-libs/libXt"

S=${WORKDIR}/${MY_P}

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

	sed -i \
		-e "s:/etc/ultimatestunts.conf:${GAMES_SYSCONFDIR}/ultimatestunts.conf:" \
		shared/usmisc.cpp \
		|| die "sed failed"

	sed -i \
		-e '302,306s#${usdatadir}#$(DESTDIR)${usdatadir}#' \
		data/Makefile.in \
		|| die "sed failed"

	#fix up install paths (bug #130513)
	sed -i \
		-e "s:\${prefix}/share/ultimatestunts/:${GAMES_DATADIR}/ultimatestunts/:" \
		configure \
		|| die "sed failed"

	epatch \
		"${FILESDIR}/${P}"-64bits.patch \
		"${FILESDIR}/${P}"-gcc41.patch \
		"${FILESDIR}/${P}"-freealut.patch
}

src_install() {
	make DESTDIR="${D}" install || die "install failed"
	make_desktop_entry ustunts "Ultimate Stunts"
	dodoc AUTHORS README TODO
	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst
	echo
	einfo "Please update or remove ~/.ultimatestunts/ultimatestunts.conf"
	einfo "if you have it to update the path for the data files."
	echo
}