summaryrefslogtreecommitdiff
blob: 13ef6a33f3f6f8e4b776cb9655489e9b7ed3e765 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/moleinvasion/moleinvasion-0.4-r1.ebuild,v 1.5 2012/03/22 00:22:39 mr_bones_ Exp $

EAPI=2
inherit eutils games

DESCRIPTION="Mole infested 2D platform game"
HOMEPAGE="http://moleinvasion.tuxfamily.org/"
SRC_URI="ftp://download.tuxfamily.org/minvasion/packages/MoleInvasion-${PV}.tar.bz2
	music? ( mirror://gentoo/${PN}-music-20090731.tar.gz )"

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

DEPEND="media-libs/libsdl[opengl,video]
	virtual/opengl
	media-libs/sdl-image[jpeg,png]
	media-libs/sdl-mixer[vorbis]
	media-libs/sdl-ttf"

S=${WORKDIR}/${P}/src

src_prepare() {
	use music && mv -f "${WORKDIR}"/music ../
	sed -i \
		-e '/^CFLAGS/s:= -g:+=:' \
		-e '/^LDFLAGS/d' \
		-e "/^FINALEXEDIR/s:/usr.*:${GAMES_BINDIR}:" \
		-e "/^FINALDATADIR/s:/usr.*:${GAMES_DATADIR}/${PN}:" \
		Makefile \
		|| die "sed failed"
	epatch "${FILESDIR}"/${P}-opengl.patch \
		"${FILESDIR}"/${P}-underlink.patch
}

src_install() {
	emake DESTDIR="${D}" install install-data || die "emake install failed"
	newicon ../gfx/icon.xpm ${PN}.xpm
	make_desktop_entry ${PN} "Mole Invasion"
	doman ../debian/*.6
	prepgamesdirs
}