summaryrefslogtreecommitdiff
path: root/games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild
reinit the tree, so we can have metadata
Diffstat (limited to 'games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild')
-rw-r--r--games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild67
1 files changed, 67 insertions, 0 deletions
diff --git a/games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild b/games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild
new file mode 100644
index 000000000000..5a3b9c6f4cb7
--- /dev/null
+++ b/games-fps/soldieroffortune-demo/soldieroffortune-demo-0.57-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils unpacker games
+
+MY_PN=${PN/soldieroffortune/sof}
+
+DESCRIPTION="First-person shooter based on the mercenary trade"
+HOMEPAGE="http://www.lokigames.com/products/sof/"
+SRC_URI="mirror://lokigames/loki_demos/${MY_PN}.run"
+
+LICENSE="LOKI-EULA"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RESTRICT="strip"
+
+DEPEND="games-util/loki_patch"
+RDEPEND="virtual/opengl[abi_x86_32(-)]
+ media-libs/libsdl[X,opengl,sound,abi_x86_32(-)]
+ x11-libs/libXrender[abi_x86_32(-)]
+ x11-libs/libXrandr[abi_x86_32(-)]
+ x11-libs/libXcursor[abi_x86_32(-)]
+ media-libs/smpeg[abi_x86_32(-)]"
+
+S=${WORKDIR}
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+QA_PREBUILT="${dir:1}/* ${dir:1}/base/*so"
+
+src_install() {
+ local demo="data/demos/sof_demo"
+ local exe="sof-bin.x86"
+
+ loki_patch patch.dat data/ || die
+
+ insinto "${dir}"
+ exeinto "${dir}"
+ doins -r "${demo}"/*
+ doexe "${demo}/${exe}"
+
+ # Replace bad library
+ dosym /usr/$(use amd64 && echo lib32 || echo lib)/libSDL.so "${dir}"/libSDL-1.1.so.0
+
+ games_make_wrapper ${PN} "./${exe}" "${dir}" "${dir}"
+
+ # fix buffer overflow
+ sed -i \
+ -e '/^exec/i \
+export MESA_EXTENSION_MAX_YEAR=2003 \
+export __GL_ExtensionStringVersion=17700' "${ED}"${GAMES_BINDIR}/${PN} || die
+
+ newicon "${demo}"/launch/box.png ${PN}.png
+ make_desktop_entry ${PN} "Soldier of Fortune (Demo)"
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ ewarn "This game requires OSS sound device /dev/dsp ; make sure the module"
+ ewarn "snd_pcm_oss is loaded and/or built into your kernel or there will be no sound"
+ elog
+ elog "Run '${PN}' to start the game"
+}