summaryrefslogtreecommitdiff
blob: 7228458a6ed8aa3dfe2f7931492b5274c262eab3 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-simulation/flightgear/flightgear-0.9.5.ebuild,v 1.5 2005/04/19 13:26:39 seemant Exp $

inherit flag-o-matic games

MY_PN=FlightGear
MY_P=${MY_PN}-${PV}
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Open Source Flight Simulator"
HOMEPAGE="http://www.flightgear.org/"
SRC_URI="mirror://flightgear/Source/${MY_P}.tar.gz
	mirror://flightgear/Shared/fgfs-base-${PV}.tar.bz2"

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

RDEPEND="virtual/glut
	=dev-games/simgear-0.3.6*
	>=media-libs/plib-1.7.0"
DEPEND="${RDEPEND}
	>=sys-apps/sed-4"

src_unpack() {
	unpack ${A}
	cd ${S}
	sed -i \
		's:\(#include <simgear/screen/jpgfactory.hxx\)>:\1-faile-include>:g' \
		configure || die "sed configure failed"
}

src_compile() {
	use hppa && replace-flags -march=2.0 -march=1.0
	egamesconf \
		--with-multiplayer \
		--with-network-olk \
		--with-threads \
		--with-x || die
	emake -j1 || die "emake failed"
}

src_install() {
	egamesinstall || die

	dodir "${GAMES_DATADIR}/${MY_PN}"
	cp -a ${WORKDIR}/data/* "${D}/${GAMES_DATADIR}/${MY_PN}" || die "cp failed"

	dodir /usr/share/games
	dosym /usr/games/lib/FlightGear /usr/share/games/FlightGear

	dodoc README* ChangeLog AUTHORS NEWS Thanks

	prepgamesdirs
}