summaryrefslogtreecommitdiff
blob: b59e6c0a9a566f3799659f4e426deffe17f5198a (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/gaia/gaia-0.1.0.ebuild,v 1.2 2006/11/23 12:23:30 opfer Exp $

inherit eutils libtool

DESCRIPTION="opensource 3D interface to the planet, based on Google Earth data"
HOMEPAGE="http://gaia.serezhkin.com/"
SRC_URI="http://gaia.serezhkin.com/${P}.tar.bz2"


SLOT="0"
LICENSE="GPL-2"

IUSE="gps doc examples"
KEYWORDS="~x86"

RDEPEND="media-libs/jpeg
	media-libs/libpng
	>=media-libs/libsdl-1.2
	net-misc/curl
	virtual/opengl
	gps? ( sci-geosciences/gpsd )
	doc? ( app-doc/doxygen )"

DEPEND="${RDEPEND}
	dev-util/scons
	>=sys-apps/sed-4"

src_unpack() {
	unpack ${A}
	cd ${S}
	sed -i "s/\.\/data/\/usr\/share\/gaia/" src/config.h
	sed -i "/libgefetch_examples/a\SConsignFile()" SConstruct
}

src_compile() {
	local myconf=""
	if ! use gps; then
		myconf="gpsd=no"
	fi

	use examples && myconf="${myconf} libgefetch_examples=1"

	scons ${MAKEOPTS} ${myconf} || die

	use doc && doxygen
}

src_install() {
	dobin gaia
	dodoc COPYING ChangeLog README TODO

	cp -r data "${D}/usr/share/gaia/" || die
	use doc && cp -r doc/html/*.{html,css,png,gif} "${D}/usr/share/doc/${PF}/"

	if use examples; then
	   mkdir "${D}/usr/share/doc/${PF}/examples"
	   cp -r libgefetch/examples/*.c "${D}/usr/share/doc/${PF}/examples"
	   cp -r libgefetch/examples/rootmeta "${D}/usr/share/doc/${PF}/examples"
	   cp -r libgefetch/examples/zerojpg "${D}/usr/share/doc/${PF}/examples"
	   cp -r libgefetch/examples/SConscript "${D}/usr/share/doc/${PF}/examples"
	fi
}

pkg_postinst() {
	einfo
	einfo "please set color depth of X11 to 24 or 32 bpp"
	einfo
}