summaryrefslogtreecommitdiff
blob: 3d717418178cce301d8441385f1479fdd7c4bd3b (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-action/xpilot/xpilot-4.5.4.ebuild,v 1.10 2006/04/07 17:14:07 mr_bones_ Exp $

DESCRIPTION="A multi-player 2D client/server space game"
HOMEPAGE="http://www.xpilot.org/"
SRC_URI="http://xpilot.org/pub/xpilot/${P}.tar.gz"

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

RDEPEND="|| (
	(
		x11-libs/libX11
		x11-libs/libXext )
	virtual/x11 )"
DEPEND="${RDEPEND}
	|| (
		(
			x11-proto/xextproto
			x11-proto/xproto
			x11-misc/gccmakedep
			x11-misc/imake
			app-text/rman )
		virtual/x11 )"

src_unpack() {
	unpack ${A}
	cd "${S}"
	sed -i \
		-e "s:/usr/local:/usr:" \
		-e "s:/man/man:/share/man/man:" \
		Local.config \
		|| die "sed failed"
}

src_compile() {
	# the stuff xpilot puts it /usr/lib should go
	# in /usr/share , but I'm leaving it for now.

	xmkmf || die "xmkmf Makefile creation failed"
	make Makefiles || die "Makefiles problem"
	local f
	for f in $(find . -type f -regex .*Makefile); do
		sed -i \
			-e "s:CDEBUGFLAGS = -O:CDEBUGFLAGS = ${CFLAGS}:" $f \
			|| die "sed $f failed"
	done
	make includes || die "includes problem"
	make depend || die "depend problem"
	emake || die "emake failed"
}

src_install() {
	make DESTDIR="${D}" install || die "install problem"
	make DESTDIR="${D}" install.man || die "install.man problem"
}