# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-fps/ut2004/ut2004-3355-r2.ebuild,v 1.4 2005/09/21 20:51:10 wolf31o2 Exp $ inherit eutils games MY_P="${PN}-lnxpatch${PV}.tar.bz2" DESCRIPTION="Unreal Tournament 2004 - Editor's Choice Edition" HOMEPAGE="http://www.unrealtournament2004.com/" SRC_URI="mirror://3dgamers/unrealtourn2k4/${MY_P} http://speculum.twistedgamer.com/pub/0day.icculus.org/${PN}/${MY_P} experimental? ( http://icculus.org/~icculus/tmp/${PN}-lnx-${PV}-with-rendertargets.tar.bz2 )" LICENSE="ut2003" SLOT="0" KEYWORDS="~x86" RESTRICT="nostrip nomirror" IUSE="opengl dedicated experimental" RDEPEND="games-fps/ut2004-data games-fps/ut2004-bonuspack-ece opengl? ( virtual/opengl ) dedicated? ( app-misc/screen )" S=${WORKDIR}/UT2004-Patch dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} pkg_setup() { check_license ut2003 if use experimental then ewarn "You are enabling support for an experimental patch from icculus." ewarn "This patch solves some missing issues with the Linux version of" ewarn "the game. Please report all bugs you find with this version to" ewarn "https://bugzilla.icculus.org" ebeep epause fi games_pkg_setup } src_install() { # moving patched binary into proper location use experimental && mv -f ${WORKDIR}/ut2004-bin ${S}/System # Installing patch files for p in {Animations,Help,Speech,System,Textures,Web} do dodir ${dir}/${p} cp -r ${S}/${p}/* ${Ddir}/${p} \ || die "copying ${p} from patch" done use amd64 && rm ${Ddir}/System/u{cc,t2004}-bin \ && mv ${Ddir}/System/ucc-bin-linux-amd64 ${Ddir}/System/ucc-bin \ && mv ${Ddir}/System/ut2004-bin-linux-amd64 ${Ddir}/System/ut2004-bin \ && chmod ug+x ${Ddir}/System/ucc-bin ${Ddir}/System/ut2004-bin use x86 && rm ${Ddir}/System/ucc-bin-linux-amd64 \ ${Ddir}/System/ut2004-bin-linux-amd64 # creating .manifest files insinto ${dir}/.manifest doins ${FILESDIR}/${PN}.xml # creating .loki/installed links mkdir -p ${D}/root/.loki/installed dosym ${dir}/.manifest/${PN}.xml ${ROOT}/root/.loki/installed/${PN}.xml # Here we edit the Default.ini to enable support for the experimentla patch # if use experimental # then # ed ${Ddir}/System/Default.ini >/dev/null 2>&1 < ${dir}/System/cdkey einfo "Thank you!" break else eerror "Your CD key entries do not match. Try again." fi fi done }