summaryrefslogtreecommitdiff
blob: 13f7175135ae2686d830978edb43deefdebf0208 (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
73
74
75
76
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-action/armagetronad/armagetronad-0.2.8.3.2.ebuild,v 1.1 2013/11/07 18:48:05 hasufell Exp $

EAPI=5

inherit eutils gnome2-utils games

DESCRIPTION="Fast-paced 3D lightcycle game based on Tron"
HOMEPAGE="http://armagetronad.org/"
SRC_URI="http://launchpad.net/armagetronad/${PV:0:5}/${PV}/+download/armagetronad-${PV}.src.tar.bz2"

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

RDEPEND="
	dev-libs/libxml2
	!dedicated? (
		media-libs/libpng:0
		media-libs/sdl-image[jpeg,png]
		virtual/glu
		virtual/opengl
		sound? (
			media-libs/libsdl[X,audio,opengl,video]
			media-libs/sdl-mixer
		)
		!sound? ( media-libs/libsdl[X,opengl,video] )
	)"
DEPEND="${RDEPEND}"

src_prepare() {
	sed -i \
		-e 's/"png_check_sig"/"png_sig_cmp"/' \
		-e 's#aa_docdir=.*$#aa_docdir=${docdir}#' \
		configure || die
}

src_configure() {
	# --enable-games just messes up paths
	egamesconf \
		--docdir=/usr/share/doc/${PF} \
		$(use_enable dedicated) \
		$(use_enable sound music) \
		--disable-sysinstall \
		--disable-useradd \
		--disable-uninstall \
		--disable-games
}

src_install() {
	emake -j1 DESTDIR="${D}" install
	einstalldocs

	# misplaced desktop-file/icons
	rm -rf "${ED%/}${GAMES_DATADIR}"/armagetronad/desktop
	doicon -s 48 desktop/icons/large/armagetronad.png
	make_desktop_entry ${PN}

	prepgamesdirs
}

pkg_preinst() {
	games_pkg_preinst
	gnome2_icon_savelist
}

pkg_postinst() {
	games_pkg_postinst
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}