# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ # Source is hosted on sourceforge # From the source web page dependancies: # OpenGL 1.2. for all game graphics # Cross Platform (Win32, Linux, Solaris) # Simple DirectMedia Layer - SDL for cross platform game windowing # SDL Network layer for cross platform socket library # SDL Mixer for cross platform sound mixing # wxWindows for cross platform setup dialogs # Open Dynamics Engine - ODE for the physics engine # ZLib compression for COMS compression inherit games S=${WORKDIR}/scorched DESCRIPTION="Multi-player tank battle in 3D (OpenGL)" HOMEPAGE="http://www.scorched3d.co.uk/" SRC_URI="mirror://sourceforge/scorched3d/Scorched3D-35-src.tar.gz" LICENSE="gpl-2" SLOT="0" KEYWORDS="x86" IUSE="X" DEPEND=">=media-libs/libsdl-1.0.1 media-libs/sdl-net media-libs/sdl-mixer >=x11-libs/wxGTK-2.3.4 dev-games/ode >=sys-libs/zlib-1.1.4" INSTALLPREFIX="/usr/share/games" INSTALLDIR="${INSTALLPREFIX}/scorched3d" EXECDIR="/usr/games/bin" EXECSCRIPT="${EXECDIR}/scorched3d" src_compile() { # scorched3d is a bit wierd about installdir; --infodir and --mandir are ignored # and everything is installed under ${prefix}/scorched3d sh -x autogen.sh \ --host=${CHOST} \ --prefix=${INSTALLPREFIX} \ --infodir=/usr/share/info \ --mandir=/usr/share/man || die emake || die } src_install() { # Unfortunately, the install in the makefile is rather stupid; everything is installed # to ${pkgdir} using cp. pkgdir is ${prefix}/scorched3d. # To support this, we'll install to /usr/share/games/scorched3d and then install # a custom script - that supports automagic detection of artsd - to # /usr/games/bin. make prefix=${D}${INSTALLPREFIX} install || die # fixup permissions in install tree since scorched3d uses cp # (permissions may get mangled by umask) chown -R ${D}${INSTALLDIR} root.games chmod -R 0440 ${D}${INSTALLDIR} find ${D}${INSTALLDIR} -type d | xargs chmod u+x,g+x chmod u+x,g+x ${D}${INSTALLDIR}/scorched3d # install the wrapper script mkdir -p ${D}${EXECDIR} cat >${D}${EXECSCRIPT} </dev/null;then PREEXEC="artsdsp" fi exec \${PREEXEC} ${INSTALLDIR}/scorched3d \$@ EOF # fixup permissons on the wrapper script chown root.games ${D}${EXECSCRIPT} || die chmod 0550 ${D}${EXECSCRIPT} || die }