Drop $Id$ per council decision in bug #611234.
[gentoo.git] / games-action / heretic2-demo / heretic2-demo-1.06a.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 inherit eutils unpacker multilib games
6
7 DESCRIPTION="Third-person classic magical action-adventure game"
8 HOMEPAGE="http://www.lokigames.com/products/heretic2/
9         http://www.hereticii.com/"
10 SRC_URI="mirror://lokigames/loki_demos/${PN}.run"
11
12 LICENSE="LOKI-EULA"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE=""
16 RESTRICT="strip"
17 QA_TEXTRELS="${GAMES_PREFIX_OPT:1}/heretic2-demo/ref_glx.so"
18
19 DEPEND="games-util/loki_patch"
20 RDEPEND="
21         x11-libs/libX11[abi_x86_32(-)]
22         x11-libs/libXext[abi_x86_32(-)]"
23
24 S=${WORKDIR}
25
26 dir=${GAMES_PREFIX_OPT}/${PN}
27 Ddir=${D}/${dir}
28 QA_PREBUILT="${dir:1}/*"
29
30 src_install() {
31         ABI=x86
32
33         local demo="data/demos/heretic2_demo"
34         local exe="heretic2_demo.x86"
35
36         loki_patch patch.dat data/ || die
37
38         # Remove bad opengl library
39         rm -r "${demo}/gl_drivers/"
40
41         # Change to safe default of 800x600 and option of normal opengl driver
42         sed -i \
43                 -e "s:fullscreen \"1\":fullscreen \"1\"\nset vid_mode \"4\":" \
44                 -e "s:libGL:/usr/$(get_libdir)/libGL:" \
45                 "${demo}"/base/default.cfg || die
46
47         insinto "${dir}"
48         exeinto "${dir}"
49         doins -r "${demo}"/*
50         doexe "${demo}/${exe}"
51
52         games_make_wrapper ${PN} "./${exe}" "${dir}" "${dir}"
53         newicon "${demo}"/icon.xpm ${PN}.xpm
54         make_desktop_entry ${PN} "Heretic 2 (Demo)" ${PN}
55
56         prepgamesdirs
57 }