# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild,v 1.7 2004/08/12 11:25:12 mr_bones_ Exp $ inherit games DESCRIPTION="Unreal Tournament 2003 Demo" HOMEPAGE="http://www.ut2003.com/" SRC_URI="http://unreal.epicgames.com/linux/ut2003/ut2003demo-lnx-${PV}.sh.bin http://download.factoryunreal.com/mirror/UT2003CrashFix.zip" LICENSE="ut2003-demo" SLOT="0" KEYWORDS="-* x86" IUSE="" RESTRICT="nostrip" DEPEND="virtual/opengl app-arch/unzip" S="${WORKDIR}" dir="${GAMES_PREFIX_OPT}/${PN}" Ddir="${D}/${dir}" pkg_setup() { check_license games_pkg_setup } src_unpack() { unpack_makeself ${DISTDIR}/ut2003demo-lnx-${PV}.sh.bin \ || die "unpacking demo" unzip "${DISTDIR}/UT2003CrashFix.zip" \ || die "unpacking crash-fix" tar -zxf setupstuff.tar.gz || die } src_install() { local f einfo "This will take a while ... go get a pizza or something" dodir "${dir}" tar -jxvf ut2003lnx_demo.tar.bz2 -C "${Ddir}" || die tar -jxvf "${FILESDIR}/misc.tar.bz2" -C "${Ddir}" || die # fix the benchmark configurations to use SDL rather than the Windows driver for f in MaxDetail.ini MinDetail.ini ; do sed -i \ -e 's/RenderDevice=D3DDrv.D3DRenderDevice/\;RenderDevice=D3DDrv.D3DRenderDevice/' \ -e 's/ViewportManager=WinDrv.WindowsClient/\;ViewportManager=WinDrv.WindowsClient/' \ -e 's/\;RenderDevice=OpenGLDrv.OpenGLRenderDevice/RenderDevice=OpenGLDrv.OpenGLRenderDevice/' \ -e 's/\;ViewportManager=SDLDrv.SDLClient/ViewportManager=SDLDrv.SDLClient/' \ "${Ddir}/Benchmark/Stuff/${f}" \ || die "sed ${dir}/Benchmark/Stuff/${f} failed" done # have the benchmarks run the nifty wrapper script rather than ../System/ut2003-bin directly for f in "${Ddir}/Benchmark/"*-*.sh ; do sed -i \ -e 's:\.\./System/ut2003-bin:../ut2003_demo:' "${f}" \ || die "sed ${f} failed" done # Wrapper and benchmark-scripts dogamesbin "${FILESDIR}/ut2003-demo" || die "dogamesbin failed" exeinto "${dir}/Benchmark" doexe "${FILESDIR}/"{benchmark,results.sh} || die "doexe failed" # Here we apply DrSiN's crash patch cp "${S}/CrashFix/System/crashfix.u" "${Ddir}/System" \ || die "CrashFix failed" ed "${Ddir}/System/Default.ini" >/dev/null 2>&1 <