use epatch to apply patch
[gentoo.git] / games-arcade / holotz-castle / holotz-castle-1.3.14.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit eutils toolchain-funcs games
7
8 DESCRIPTION="2D platform game"
9 HOMEPAGE="http://www.mainreactor.net/holotzcastle/en/index_en.html"
10 SRC_URI="http://www.mainreactor.net/holotzcastle/download/${P}-src.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE=""
16
17 RDEPEND="virtual/opengl
18         virtual/glu
19         media-libs/sdl-mixer
20         media-libs/libsdl
21         media-libs/sdl-ttf
22         media-libs/sdl-image"
23 DEPEND=${RDEPEND}
24
25 S=${WORKDIR}/${P}-src
26
27 src_prepare() {
28         epatch \
29                 "${FILESDIR}"/${P}-build.patch \
30                 "${FILESDIR}"/${P}-gcc44.patch \
31                 "${FILESDIR}"/${P}-underlink.patch
32 }
33
34 src_compile() {
35         tc-export AR
36         emake -C JLib
37         emake -C src HC_BASE="${GAMES_DATADIR}"/${PN}/
38 }
39
40 src_install() {
41         dogamesbin holotz-castle holotz-castle-editor
42         insinto "${GAMES_DATADIR}"/${PN}/game
43         doins -r res/*
44         insinto "${GAMES_DATADIR}"/${PN}/editor
45         doins -r HCedHome/res/*
46         newicon res/icon/icon.bmp ${PN}.bmp
47         make_desktop_entry ${PN} "Holotz's Castle" /usr/share/pixmaps/${PN}.bmp
48         make_desktop_entry ${PN}-editor "Holotz's Castle - Editor" \
49                 /usr/share/pixmaps/${PN}.bmp
50         dodoc doc/MANUAL*.txt
51         doman man/*.6
52         prepgamesdirs
53 }