# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="First person shooter from 3D Realms" HOMEPAGE="http://icculus.org/prey/ http://www.3drealms.com/prey/" SRC_URI="http://icculus.org/prey/downloads/prey-installer-${PV}.bin" LICENSE="PREY" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="openal opengl dedicated cdinstall" PROPERTIES="interactive" RESTRICT="strip mirror" UIDEPEND="virtual/opengl openal? ( x86? ( media-libs/openal ) amd64? ( app-emulation/emul-linux-x86-sdl ) )" DEPEND="app-arch/unzip" RDEPEND=" opengl? ( ${UIDEPEND} ) !dedicated? ( !opengl? ( ${UIDEPEND} ) ) sys-libs/glibc cdinstall? ( games-fps/prey-data )" S=${WORKDIR} GAMES_CHECK_LICENSE="yes" dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} QA_TEXTRELS="${dir:1}/pb/pbcl.so ${dir:1}/pb/pbag.so ${dir:1}/pb/pbsv.so" pkg_setup() { games_pkg_setup # This is a binary x86 package => ABI=x86 has_multilib_profile && ABI="x86" } src_unpack() { unzip "${DISTDIR}/prey-installer-${PV}.bin" &> /dev/null } src_install() { dodir "${dir}" insinto "${dir}" doins data/prey_readme.txt data/prey_license.txt \ data/punkbuster_license.txt || die "doins texts" doins -r data/punkbuster-linux-x86/pb || die "doins punkbuster" exeinto "${dir}" # >common executables doexe data/prey-linux-x86/libgcc_s.so.1 \ data/prey-linux-x86/libstdc++.so.5 || die "doexe common executables" # >graphical game client executables if use opengl || ! use dedicated ; then doexe data/prey-linux-x86/prey{,.x86} \ data/prey-linux-x86/libSDL-1.2.so.0 \ data/prey-linux-x86/libNvidiaVidMemTest.so || \ die "doexe client executables" fi # >dedicated executables if use dedicated ; then doexe data/prey-linux-x86/preyded{,.x86} \ data/prey-linux-x86/libstdc++.so.5 || \ die "doexe dedicated executables" fi exeinto "${dir}/base" doexe data/prey-linux-x86/base/gamex86.so || die "doexe base/gamex86.so" insinto "${dir}/base" doins -r data/prey-linux-data/base/* || die "doins data" if use opengl || ! use dedicated ; then if use openal; then dosym "/usr/$(get_libdir)/libopenal.so" "${dir}/openal.so" fi newicon data/prey-linux-data/prey.png ${PN}.png games_make_wrapper ${PN} ./prey "${dir}" "${dir}" make_desktop_entry ${PN} "Prey" fi if use dedicated ; then games_make_wrapper ${PN}-ded ./preyded "${dir}" "${dir}" fi prepgamesdirs } pkg_postinst() { games_pkg_postinst if ! use cdinstall ; then elog "You need to copy pak000.pk4 through pak004.pk4 from either your" elog "installation media or your hard drive to ${dir}/base before" elog "running the game." echo fi }