summaryrefslogtreecommitdiff
blob: 92fda6dda0552a676e0abe2853291f72b87f89c0 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit eutils games

DESCRIPTION="laser game entry for ludum dare 10"
HOMEPAGE="http://xout.blackened-interactive.com/OldGames.html"
SRC_URI="http://xout.blackened-interactive.com/dump/new/LD10.zip"

LICENSE="public-domain"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

RDEPEND="virtual/opengl
	virtual/glu
	media-libs/libsdl
	media-libs/devil
	media-libs/fmod"
DEPEND="${RDEPEND}"

S=${WORKDIR}/LD10/Src

src_prepare(){
	edos2unix *.{cpp,h}
	epatch ${FILESDIR}/"${P}-makefile.patch"
	epatch ${FILESDIR}/"${P}-includes.patch"
	epatch ${FILESDIR}/"${P}-misc.patch"
	epatch ${FILESDIR}/"${P}-sound.patch"
	sed -i -e "s:Data/:"${GAMES_DATADIR}"/"${PN}"/:g" -i Game.cpp

}

src_install() {
	dogamesbin ../LaserReaction/${PN} || die "dogamesbin ${PN} failed"

	local datadir="${GAMES_DATADIR}"/"${PN}"
	dodir ${datadir}
	insinto "${datadir}"
	doins -r ../LaserReaction/Data/* || die "doins resources failed"
	make_desktop_entry "${PN}" "${PN}"
	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst
}