summaryrefslogtreecommitdiff
blob: 306351783dd98cce52b06ef32572d97a41b5cd0b (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-action/armagetron/armagetron-0.2.4-r1.ebuild,v 1.1 2003/09/10 19:29:16 vapier Exp $

inherit games

IUSE="`echo " ${IUSE} " | sed 's/ dedicated //'`"
	# drop 'dedicated' as it is always enabled

S=${WORKDIR}/${PN}-${PV}
DESCRIPTION="armagetron: 3d tron lightcycles, just like the movie"
SRC_URI="mirror://sourceforge/armagetron/${P}.tar.bz2
	http://armagetron.sourceforge.net/addons/moviesounds_fq.zip
	http://armagetron.sourceforge.net/addons/moviepack.zip"

HOMEPAGE="http://armagetron.sourceforge.net/"
KEYWORDS="x86 ppc"
LICENSE="GPL-2"
SLOT="0"
CXXFLAGS=${CXXFLAGS/-fno-exceptions/}
RDEPEND="virtual/x11
	virtual/opengl
	media-libs/libsdl
	media-libs/sdl-image
	sys-libs/zlib
	media-libs/libpng"

DEPEND="$RDEPEND app-arch/unzip"

src_unpack() {
	unpack ${PN}-${PV}.tar.bz2
	unpack moviesounds_fq.zip
	unpack moviepack.zip
	set > /tmp/emerge-env.txt
	cd ${S}
	# Uses $SYNC which which conflicts with emerge
	cp Makefile.global.in Makefile.global.in.old
	sed 's/$(SYNC)/$(SYNCDISK)/' < Makefile.global.in.old > \
		Makefile.global.in || die 'Makefile edit failed'
}

src_compile() {
	egamesconf || die "config failed"
	emake || die "Make Failed"
}

src_install () {
	# make install for armagetron is non-existant
	dodir ${GAMES_BINDIR}
	dodir ${GAMES_LIBDIR}/${PN}
	dodir ${GAMES_DATADIR}/${PN}
	dodir /usr/share/fonts
	cp src/tron/armagetron ${D}/${GAMES_LIBDIR}/${PN} || die "No Armagetron Executable"
	cp -r arenas models sound textures language config \
		${D}/${GAMES_DATADIR}/${PN}/
	# maybe convert this to a .png or something
	#cp tron.ico ${D}/${GAMES_DATADIR}/${PN}
	dohtml doc
	newgamesbin ${FILESDIR}/${P}-r1.sh ${PN}
	dosed "s:DATADIR:${GAMES_DATADIR}/${PN}:" ${GAMES_BINDIR}/${PN}
	dosed "s:BINDIR:${GAMES_LIBDIR}/${PN}:" ${GAMES_BINDIR}/${PN}
	cp -r ../moviepack ${D}/${GAMES_DATADIR}/${PN}
	cp -r ../moviesounds ${D}/${GAMES_DATADIR}/${PN}
	chmod -R a+r ${D}
	chmod a+rx ${D}/${GAMES_BINDIR}/${PN}
	chmod a+rx ${D}/${GAMES_LIBDIR}/${PN}/${PN}
}