# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-fps/unreal/unreal-226.ebuild,v 1.12 2005/10/21 17:43:48 wolf31o2 Exp $ inherit eutils games DESCRIPTION="Futuristic FPS (a hack that runs on top of Unreal Tournament)" HOMEPAGE="http://www.unreal.com/ http://www.icculus.org/~ravage/unreal/unrealgold/" SRC_URI="http://www.icculus.org/~ravage/unreal/unrealgold/unrealgold-install-436.run ftp://ftp.lokigames.com/pub/patches/ut/ut-install-436.run ftp://ftp.lokigames.com/pub/beta/ut/ut-install-436-GOTY.run ftp://ftp.lokigames.com/pub/patches/ut/IpDrv-436-Linux-08-20-02.zip" LICENSE="as-is" SLOT="0" KEYWORDS="-* x86" IUSE="nls S3TC" DEPEND="dev-util/xdelta sys-libs/lib-compat app-arch/unzip" RDEPEND="X? ( virtual/x11 ) opengl? ( virtual/opengl )" S="${WORKDIR}" pkg_setup() { if use S3TC ; then export CDROM_NAME_1="Unreal Tournament GOTY CD1" export CDROM_NAME_2="Unreal Tournament GOTY CD2" export CDROM_NAME_3="Unreal Gold CD" cdrom_get_cds System400 UTLocalized MANUALS/Gold\ Manual\ addedum.doc ; else export CDROM_SET_NAMES=("Unreal Tournament" "Unreal Tournament GOTY CD1") export CDROM_NAME_2="Unreal Gold CD" cdrom_get_cds System:System400 MANUALS/Gold\ Manual\ addedum.doc ; fi games_pkg_setup } src_unpack() { unpack_makeself unrealgold-install-436.run mkdir ut cd ut if use S3TC ; then unpack_makeself ut-install-436-GOTY.run ; else case ${CDROM_SET} in 0) unpack_makeself ut-install-436.run ;; 1) unpack_makeself ut-install-436-GOTY.run ;; esac ; fi unpack IpDrv-436-Linux-08-20-02.zip } src_install() { local dir=${GAMES_PREFIX_OPT}/unreal-gold dodir "${dir}" # the UT part cd ut tar -zxf data.tar.gz tar -zxf OpenGL.ini.tar.gz cd .. # System files insinto "${dir}"/System doins "${CDROM_ROOT}"/System/*.{int,u} doins ut/IpDrv.so for x in ut/setup.data/data/System/*.0; do xdelta patch ${x} "${CDROM_ROOT}"/System/$(basename ${x} .0) ut/System/$(basename ${x} .0) ; done doins ut/System/*.{int,u,so,0,2} # copying Sounds insinto "${dir}"/Sounds doins "${CDROM_ROOT}"/Sounds/*.uax if use nls ; then doins "${CDROM_ROOT}"/Sounds/*.{est,frt,itt}_uax fi if use S3TC ; then # copying Textures insinto "${dir}"/Textures doins "${CDROM_ROOT}"/Textures/{AlfaFX.utx,BluffFX.utx,ChizraEFX.utx,Crypt.utx,DMeffects.utx,Detail.utx,Female1Skins.utx,Female2Skins.utx,FireEng.utx,GreatFire.utx,GreatFire2.utx,ISVFX.utx,LavaFX.utx,Liquids.utx,Male1Skins.utx,Male2Skins.utx,Male3Skins.utx,MenuGr.utx,Palettes.utx,Render.utx,SkTrooperSkins.utx,Skaarj.utx,SkyBox.utx,SkyCity.utx,SpaceFX.utx,Terranius.utx,UWindowFonts.utx,XFX.utx} cdrom_load_next_cd doins "${CDROM_ROOT}"/Textures/{Ancient.utx,DecayedS.utx,GenEarth.utx,GenFX.utx,GenFluid.utx,GenIn.utx,GenTerra.utx,GenWarp.utx,HubEffects.utx,JWSky.utx,Mine.utx,NaliCast.utx,NaliFX.utx,PlayrShp.utx,Queen.utx,ShaneDay.utx,ShaneSky.utx,Skaarj.utx,SkyBox.utx,SkyCity.utx,Starship.utx,TCrystal.utx,TrenchesFX.utx,castle1.utx} || die "copy S3TC Textures" ; # the non S3TC part else # copying Textures insinto "${dir}"/Textures doins "${CDROM_ROOT}"/Textures/{AlfaFX.utx,Ancient.utx,BluffFX.utx,castle1.utx,ChizraEFX.utx,Crypt.utx,DMeffects.utx,DecayedS.utx,Detail.utx,Female1Skins.utx,Female2Skins.utx,FireEng.utx,GenEarth.utx,GenFX.utx,GenFluid.utx,GenIn.utx,GenTerra.utx,GenWarp.utx,GreatFire.utx,GreatFire2.utx,HubEffects.utx,ISVFX.utx,JWSky.utx,LavaFX.utx,Liquids.utx,Male1Skins.utx,Male2Skins.utx,Male3Skins.utx,MenuGr.utx,Mine.utx,NaliCast.utx,NaliFX.utx,Palettes.utx,PlayrShp.utx,Queen.utx,Render.utx,ShaneDay.utx,ShaneSky.utx,SkTrooperSkins.utx,Skaarj.utx,SkyBox.utx,SkyCity.utx,SpaceFX.utx,Starship.utx,TCrystal.utx,Terranius.utx,UWindowFonts.utx,XFX.utx} ; fi # the Unreal part cdrom_load_next_cd tar -zxf data.tar.gz # Unreal System stuff insinto "${dir}"/System doins System/* || die "copy System data" exeinto "${dir}"/System doexe System/{ucc,unreal}-bin if use nls ; then cp "${CDROM_ROOT}"/System/*.{est,frt,itt,det} "${Ddir}"/System/ || die "copy language data" ; fi xdelta patch setup.data/data/System/UPak.u.0 "${CDROM_ROOT}"/SYSTEM/UPak.u UPak.u doins UPak.u doins "${CDROM_ROOT}"/SYSTEM/UDSDemo.u # copying Maps insinto "${dir}"/Maps doins "${CDROM_ROOT}"/MAPS/* insinto "${dir}"/Maps/UPak doins "${CDROM_ROOT}"/MAPS/UPak/* # copying Help insinto "${dir}"/Help doins Help/* # copying Music insinto "${dir}"/Music doins "${CDROM_ROOT}"/MUSIC/* # repairing things for f in "${D}/${dir}"/{Maps,Maps/UPak}/Dm*.unr ; do mv ${f} ${f/Dm/DM-} done dosym Maps "${dir}"/maps # copying Sounds insinto "${dir}"/Sounds/ doins "${CDROM_ROOT}"/Sounds/*.uax || die "copy Sounds CD1" insinto "${dir}"/Sounds/int doins "${CDROM_ROOT}"/Sounds/int/* || die "copy Sounds CD1" if use nls ; then for x in {det,est,frt,itt}; do insinto "${dir}"/Sounds/${x} doins "${CDROM_ROOT}"/Sounds/${x}/* || die "copy Sounds CD1" ; done fi # copying Textures from Unreal insinto "${dir}"/Textures doins "${CDROM_ROOT}"/Textures/{Credits,UGoldCredits,UPakFonts,Langs}.utx if ! use S3TC ; then doins "${CDROM_ROOT}"/Textures/Castle1.utx ; fi # the main executables exeinto "${dir}" doexe bin/Linux/x86/glibc-2.1/ucc doexe bin/Linux/x86/glibc-2.1/unrealgold # and the rest # installing documentation/icon mv icon.xpm unrealgold.xpm insinto "${dir}" doins unrealgold.xpm README dodoc README || die "Could not dodoc README.linux" doicon unrealgold.xpm || die "Could not copy pixmap" games_make_wrapper unrealgold ./unrealgold "${dir}" "${dir}" prepgamesdirs if use S3TC ; then einfo "" einfo "To use the S3TC Textures you have to set" einfo "UseS3TC=1" einfo "in homedir/.loki/unrealgold/Unreal.ini" einfo "in the sub-category" einfo "[OpenGLDrv.OpenGLRenderDevice]" einfo "" ; fi }