1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils unpacker multilib games
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"
17 QA_TEXTRELS="${GAMES_PREFIX_OPT:1}/heretic2-demo/ref_glx.so"
19 DEPEND="games-util/loki_patch"
21 x11-libs/libX11[abi_x86_32(-)]
22 x11-libs/libXext[abi_x86_32(-)]"
26 dir=${GAMES_PREFIX_OPT}/${PN}
28 QA_PREBUILT="${dir:1}/*"
33 local demo="data/demos/heretic2_demo"
34 local exe="heretic2_demo.x86"
36 loki_patch patch.dat data/ || die
38 # Remove bad opengl library
39 rm -r "${demo}/gl_drivers/"
41 # Change to safe default of 800x600 and option of normal opengl driver
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
50 doexe "${demo}/${exe}"
52 games_make_wrapper ${PN} "./${exe}" "${dir}" "${dir}"
53 newicon "${demo}"/icon.xpm ${PN}.xpm
54 make_desktop_entry ${PN} "Heretic 2 (Demo)" ${PN}