# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit toolchain-funcs eutils games RUNFILE="doom3-linux-${PV}-sdk.x86.run" DESCRIPTION="Software Development Kit for Doom 3" HOMEPAGE="http://www.iddevnet.com/doom3/" SRC_URI="mirror://3dgamers/doom3/${RUNFILE} ftp://ftp.idsoftware.com/idstuff/doom3/source/linux/${RUNFILE} ftp://dl.xs4all.nl/pub/mirror/idsoftware/idstuff/doom3/source/linux/${RUNFILE}" # See License.SDK.txt LICENSE="DOOM3-SDK" SLOT="0" # For amd64 see http://www.modwiki.net/wiki/Building_on_linux # Should eventually be "-* amd64 x86" to match doom3 KEYWORDS="~x86" IUSE="" S=${WORKDIR} # Info at http://www.modwiki.net/wiki/Building_on_linux DEPEND=">=dev-util/scons-0.96.1 virtual/opengl amd64? ( app-emulation/emul-linux-x86-xlibs ) || ( media-libs/mesa virtual/x11 )" pkg_setup(){ if [[ $(gcc-version) != "3.3" ]] ; then eerror "This build needs gcc-3.3 - use gcc-config to switch." die "Wrong gcc version." fi } src_unpack() { unpack_makeself ${RUNFILE} } src_compile() { cd "${S}"/src if use amd64 ; then # Untested - see http://www.modwiki.net/wiki/Building_on_linux sed -i SConstruct \ -e 's:BASELINKFLAGS = [ ]:BASELINKFLAGS = [ "-m32" ]:' scons BASEFLAGS="-m32" ${MAKEOPTS} || die "scons failed" else scons ${MAKEOPTS} || die "scons failed" fi } src_install() { insinto "${GAMES_PREFIX_OPT}"/doom3 doins -r base vehicles src/*.so EULA.Development Kit.rtf README.SDK.txt prepgamesdirs }