summaryrefslogtreecommitdiff
blob: 6246ad77f67cda0912a83dc75f6056d30ff4177e (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/dark-oberon/dark-oberon-1.0.2_rc1.ebuild,v 1.2 2007/10/17 18:11:05 drac Exp $

inherit eutils games

MY_PV=${PV/_rc/-RC}
MY_P=${PN}-${MY_PV}

DESCRIPTION="a Warcraft like RTS game"
HOMEPAGE="http://dark-oberon.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

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

DEPEND="virtual/opengl
	virtual/glu
	media-libs/glfw
	fmod? ( =media-libs/fmod-3* )"

S="${WORKDIR}/${MY_P}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${P}"-gcc41.patch \
		"${FILESDIR}/${P}"-gentoo.patch
}

src_compile() {
	cd src
	if use fmod; then
		emake SOUND=1 ../${PN} || die "emake failed"
	else
		emake ../${PN} || die "emake failed"
	fi
}

src_install() {
	dogamesbin dark-oberon || die "dogamesbin failed"

	insinto "${GAMES_DATADIR}/${PN}"
	doins -r dat maps races schemes || die "doins failed"
	dodoc README docs/* || die "dodoc failed"

	prepgamesdirs
}