# 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 game!" HOMEPAGE="http://red.planetarena.org/" COR="http://cor.planetquake.gamespy.com/codered/files" FORSAKEN="http://www.forsakenweb.com" SRC_URI="${COR}/${RUN_FILE} ${FORSAKEN}/gamepage/loaders/games/${RUN_FILE} ${COR}/midniteskins.zip ${FORSAKEN}/battlescar.zip ${FORSAKEN}/${MY_PN}/files/femforcer.zip" LICENSE="free-noncomm" SLOT="0" # Should work on amd64 also KEYWORDS="~x86" # Why doesn't this shut the QA warning up? QA_EXECSTACK="opt/alienarena/cr*" IUSE="sdl" RESTRICT="strip" RDEPEND="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 )" DEPEND="app-arch/unzip" S=${WORKDIR} dir=${GAMES_PREFIX_OPT}/${MY_PN} src_unpack() { unpack midniteskins.zip battlescar.zip femforcer.zip 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 "sed AlienArena.sdl failed" } # The source exists, but doesn't compile src_install() { doicon ${MY_PN}.xpm games_make_wrapper ${MY_PN}-ded ./AlienArenaDedicated "${dir}" "${dir}" # Always install the OpenGL version 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" ${MY_PN}.xpm make_desktop_entry ${MY_PN}-sdl "Alien Arena - SDL" ${MY_PN}.xpm else make_desktop_entry ${MY_PN} "Alien Arena" ${MY_PN}.xpm 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 einfo "To play the game, run: ${MY_PN} or ${MY_PN}-sdl" echo fi }