]> Pileus Git - ~andy/sunrise/blob - games-util/bsp/bsp-5.2.ebuild
0b2fee2fe900d5ef7735886243ebe3159848caa5
[~andy/sunrise] / games-util / bsp / bsp-5.2.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit autotools eutils games
6
7 DESCRIPTION="BSP nodebuilder for DooM engine games."
8 HOMEPAGE="http://games.moria.org.uk/doom/bsp/"
9 SRC_URI="http://games.moria.org.uk/doom/bsp/download/${P}.tar.bz2"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~x86"
14 IUSE="debug dmalloc profile"
15
16 DEPEND="dmalloc? ( dev-libs/dmalloc )"
17 RDEPEND=${DEPEND}
18
19 src_unpack() {
20         unpack ${A}
21         cd "${S}"
22         # The configure script clobbers CFLAGS and doesn't handle
23         # --enable-{debug,profile} correctly. Fix it.
24         sed -i \
25                 -e '/^CFLAGS="-O2 -fomit-frame-pointer"$/d' \
26                 -e '/^AC_C_COMPILE_FLAGS(.*)$/d' \
27                 -e 's:^CFLAGS="-g"$:if test "${enableval}" = "yes"; then CFLAGS="${CFLAGS} -g"; fi:' \
28                 -e 's:^CFLAGS="-pg"$:if test "${enableval}" = "yes"; then CFLAGS="${CFLAGS} -pg"; fi:' \
29                 configure.in || die "sed configure.in failed"
30         # We want documentation to be installed only through dodoc
31         sed -i \
32                 -e '/^docdir =.*/d' \
33                 -e '/^doc_DATA =.*/d' \
34                 Makefile.am || die "sed Makefile.am failed"
35
36         eautoreconf
37 }
38
39 src_compile() {
40         egamesconf \
41                 $(use_enable debug) \
42                 $(use_enable dmalloc) \
43                 $(use_enable profile) \
44                 || die "egamesconf failed"
45         emake || die "emake failed"
46 }
47
48 src_install() {
49         emake DESTDIR="${D}" install || die "emake install failed"
50         dodoc AUTHORS NEWS README visplane.txt
51         prepgamesdirs
52 }