# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games EDITION="ue" MY_PN="alienarena" RUN_FILE="${MY_PN}-2006${EDITION}-x86.run" DESCRIPTION="The ultimate freeware deathmatch fragfest!" HOMEPAGE="http://red.planetarena.org/" SRC_URI="ftp://ftp.planetmirror.com/pub/gamershell/demo/${RUN_FILE}" LICENSE="free-noncomm" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="opengl sdl" RESTRICT="strip" UIRDEPEND="media-libs/jpeg virtual/glu virtual/opengl sdl? ( >=media-libs/libsdl-1.2.8-r1 ) amd64? ( app-emulation/emul-linux-x86-xlibs ) || ( ( x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext x11-libs/libXxf86dga x11-libs/libXxf86vm ) virtual/x11 )" RDEPEND="opengl? ( ${UIRDEPEND} ) sdl? ( ${UIRDEPEND} )" DEPEND="${RDEPEND} app-arch/unzip" S=${WORKDIR} dir=${GAMES_PREFIX_OPT}/${MY_PN} QA_EXECSTACK="${dir:1}/crded ${dir:1}/crx ${dir:1}/crx.sdl" src_unpack() { unpack_makeself ${RUN_FILE} unpack ./*.bz2 local cpu_dir="x86" use amd64 && cpu_dir="x86_64" # Set up this directory to look like the install directory cp -r engine/${cpu_dir}/* . || die cp -r bin/Linux/${cpu_dir}/glibc-2.1/* . || die cp AlienArena AlienArena.sdl sed -i AlienArena.sdl -e "s:crx:crx.sdl:" \ || die } src_install() { local icon=${MY_PN}.xpm doicon "${icon}" || die # Always install the dedicated executable games_make_wrapper ${MY_PN}-ded ./AlienArenaDedicated "${dir}" "${dir}" if use opengl || use sdl ; then # SDL implies OpenGL games_make_wrapper ${MY_PN} ./AlienArena "${dir}" "${dir}" if use sdl ; then games_make_wrapper ${MY_PN}-sdl ./AlienArena.sdl "${dir}" "${dir}" # Distinguish between OpenGL and SDL versions make_desktop_entry ${MY_PN} "Alien Arena (OpenGL)" "${icon}" make_desktop_entry ${MY_PN}-sdl "Alien Arena (SDL)" "${icon}" else make_desktop_entry ${MY_PN} "Alien Arena" "${icon}" fi fi # Install insinto "${dir}" exeinto "${dir}" doins -r arena botinfo data1 *.txt || die "doins -r failed" doexe AlienArena* crded crx crx.sdl || die "doexe failed" prepgamesdirs } pkg_postinst() { games_pkg_postinst if use sdl ; then elog "To play the game, run: ${MY_PN} or ${MY_PN}-sdl" echo fi }