aboutsummaryrefslogtreecommitdiff
blob: fe93f8fcb426762e5d4f47e9c3d8cff987def58e (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit autotools eutils

DESCRIPTION="2D multiple-robot simulator"
HOMEPAGE="http://playerstage.sourceforge.net/index.php?src=stage"
SRC_URI="mirror://sourceforge/playerstage/stage-${PV}.tar.bz2"

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

IUSE="doc"

RDEPEND="
	x11-libs/gtk+:2
	>=sci-electronics/player-2.0.2
	x11-apps/rgb"
DEPEND="${RDEPEND}
	doc? ( app-doc/doxygen )"

src_prepare() {
	epatch "${FILESDIR}"/${P}-docdst-fix.patch
	sed -i \
		-e 's;/usr/X11R6/lib/X11/rgb.txt;/usr/share/X11/rgb.txt;' \
		configure.ac || die "sed failed"
	eautoreconf
}

src_configure() {
	#Disable gnome-canvas since its experimental
	econf --disable-gnomecanvas
}

src_compile() {
	default

	if use doc; then
		pushd docsrc
		doxygen -u stage.dox || die "doxygen failed"
		touch header.html || die
		emake "doc"
		popd
	fi
}

src_install() {
	default

	if use doc; then
		pushd docsrc
		emake DESTDIR="${D}" "doc-install"
		popd
	fi

	dodoc AUTHORS ChangeLog NEWS README
}