summaryrefslogtreecommitdiff
blob: 15553a7db333a1ebc3b527452021b6f70a30d4b0 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/glest-1.0.10_p7.ebuild,v 1.3 2005/04/20 02:48:52 vapier Exp $

inherit eutils games

DATAVERSION="${PV/_p?/}"
SOURCEVERSION="${PV/_p/-r}"
DESCRIPTION="Cross-platform 3D realtime strategy game"
HOMEPAGE="http://www.stud.uni-karlsruhe.de/~uxsm/glest/"
SRC_URI="http://www.stud.uni-karlsruhe.de/~uxsm/glest-${SOURCEVERSION}-source.tar.bz2
	http://www.stud.uni-karlsruhe.de/~unatc/glest/glest-${DATAVERSION}-data.tar.bz2
	linguas_de? ( http://www.stud.uni-karlsruhe.de/~uxsm/german.lng )
	linguas_ru? ( http://www.stud.uni-karlsruhe.de/~uxsm/russian.lng )
	linguas_dk? ( http://www.stud.uni-karlsruhe.de/~uxsm/dansk.lng )"

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

RDEPEND=">=media-libs/libsdl-1.2.5
	media-libs/libogg
	media-libs/libvorbis
	>=media-libs/openal-20040303
	dev-libs/xerces-c
	virtual/opengl
	virtual/x11"
DEPEND="${RDEPEND}
	>=sys-devel/gcc-3.2
	>=dev-util/jam-2.5"

S=${WORKDIR}/${PN}-${DATAVERSION}

src_unpack() {
	unpack glest-${SOURCEVERSION}-source.tar.bz2 glest-${DATAVERSION}-data.tar.bz2
	cd "${S}"
	# sometimes they package configure, sometimes they dont
	if [[ ! -e configure ]] ; then
		./autogen.sh || die "autogen failed"
	fi
}

src_compile() {
	egamesconf \
		--with-vorbis=/usr \
		--with-ogg=/usr \
		|| die
	jam || die "jam failed"
}

src_install() {
	dogamesbin "${FILESDIR}"/glest || die "couldn't install launcher"
	dosed "s:GENTOO_DATADIR:${GAMES_DATADIR}:" "${GAMES_BINDIR}"/glest

	dodir "${GAMES_DATADIR}/${PN}"
	cp -r Tech data map tileset "${D}/${GAMES_DATADIR}"/${PN}/ || die "data copy failed"
	insinto "${GAMES_DATADIR}"/${PN}/config
	doins glest.ini || die "config copy failed"
	insinto "${GAMES_DATADIR}/${PN}"/lib
	doins out/*-linux-gnu/opt/lib/sources/libglestlib.a || die "doins lib.a failed"
	exeinto "${GAMES_DATADIR}/${PN}"/lib
	doexe glest || die "doexe failed"

	use linguas_de && cp "${DISTDIR}"/german.lng "${D}/${GAMES_DATADIR}"/${PN}/data/lang/
	use linguas_ru && cp "${DISTDIR}"/russian.lng "${D}/${GAMES_DATADIR}"/${PN}/data/lang/
	use linguas_dk && cp "${DISTDIR}"/dansk.lng "${D}/${GAMES_DATADIR}"/${PN}/data/lang/

	make_desktop_entry glest Glest

	prepgamesdirs
}