1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="First person shooter from 3D Realms"
8 HOMEPAGE="http://icculus.org/prey/ http://www.3drealms.com/prey/"
9 UPSTREAM_PV=${PV:4:2}${PV:6}${PV::4}
10 SRC_URI="http://icculus.org/prey/downloads/prey-installer-${UPSTREAM_PV}.bin"
15 IUSE="cdinstall dedicated openal opengl"
16 PROPERTIES="interactive"
18 # mirror restriction might be needed as well
21 UIDEPEND="virtual/opengl
22 openal? ( x86? ( media-libs/openal )
23 amd64? ( app-emulation/emul-linux-x86-sdl ) )"
24 DEPEND="app-arch/unzip"
26 opengl? ( ${UIDEPEND} )
27 !dedicated? ( !opengl? ( ${UIDEPEND} ) )
28 cdinstall? ( games-fps/prey-data )"
32 GAMES_CHECK_LICENSE="yes"
33 dir=${GAMES_PREFIX_OPT}/${PN}
36 QA_TEXTRELS="${dir:1}/pb/pbcl.so
43 # This is a binary x86 package => ABI=x86
44 has_multilib_profile && ABI="x86"
48 unzip "${DISTDIR}/prey-installer-${UPSTREAM_PV}.bin"
52 # installation of files that goes to ${dir}
56 # >common (both dedicated and graphical client) files
57 doins -r data/punkbuster-linux-x86/pb || die "doins punkbuster"
59 # >graphical game client files
60 if use opengl || ! use dedicated ; then
61 doexe data/prey-linux-x86/prey{,.x86} \
62 data/prey-linux-x86/libNvidiaVidMemTest.so || \
63 die "doexe client executables"
65 dosym "/usr/$(get_libdir)/libSDL-1.2.so.0" "${dir}" || \
69 dosym "/usr/$(get_libdir)/libopenal.so" "${dir}/openal.so" || \
73 newicon data/prey-linux-data/prey.png ${PN}.png
75 games_make_wrapper ${PN} ./prey "${dir}" "${dir}"
76 make_desktop_entry ${PN} "Prey"
79 # >dedicated server files
80 if use dedicated ; then
81 doexe data/prey-linux-x86/preyded{,.x86} || \
82 die "doexe dedicated executables"
84 games_make_wrapper ${PN}-ded ./preyded "${dir}" "${dir}"
87 # installation of files that goes to ${dir}/base
90 doexe data/prey-linux-x86/base/gamex86.so || die "doexe base/gamex86.so"
91 doins -r data/prey-linux-data/base/* || die "doins data"
94 dodoc data/prey_readme.txt || die "dodoc readme"
102 if ! use cdinstall ; then
103 elog "You need to copy pak000.pk4 through pak004.pk4 from either your"
104 elog "installation media or your hard drive to ${dir}/base before"
105 elog "running the game."