summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-02-08 21:33:38 +0000
committerMike Frysinger <vapier@gentoo.org>2004-02-08 21:33:38 +0000
commit31bfd0ea89f64b7f09b29cb701a91f9bbcbdd4a2 (patch)
tree8ba3ee730dabcfcde650ac4cd545303f0b1d0a2c /games-fps
parentx86 stable (diff)
downloadhistorical-31bfd0ea89f64b7f09b29cb701a91f9bbcbdd4a2.tar.gz
historical-31bfd0ea89f64b7f09b29cb701a91f9bbcbdd4a2.tar.bz2
historical-31bfd0ea89f64b7f09b29cb701a91f9bbcbdd4a2.zip
new cdrom interface
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/d1x/d1x-20040118.ebuild19
-rw-r--r--games-fps/quake2-data/quake2-data-3.20.ebuild37
-rw-r--r--games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild21
-rw-r--r--games-fps/unreal-tournament-goty/metadata.xml34
-rw-r--r--games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild118
-rw-r--r--games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild89
6 files changed, 128 insertions, 190 deletions
diff --git a/games-fps/d1x/d1x-20040118.ebuild b/games-fps/d1x/d1x-20040118.ebuild
index 811cefeb47ac..01a99b432dfe 100644
--- a/games-fps/d1x/d1x-20040118.ebuild
+++ b/games-fps/d1x/d1x-20040118.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/d1x/d1x-20040118.ebuild,v 1.2 2004/02/03 21:43:35 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/d1x/d1x-20040118.ebuild,v 1.3 2004/02/08 21:30:56 vapier Exp $
-inherit eutils games
+inherit games eutils
DESCRIPTION="Descent 1 Source Project"
HOMEPAGE="http://d1x.warpcore.org"
@@ -10,8 +10,9 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2 mirror://gentoo/descent1.5-patch.tar.bz2"
LICENSE="Descent1 D1X"
SLOT="0"
-KEYWORDS="~x86"
+KEYWORDS="x86"
IUSE="opengl"
+
DEPEND=">=dev-lang/nasm-0.97
media-libs/libsdl
opengl? (
@@ -20,11 +21,10 @@ DEPEND=">=dev-lang/nasm-0.97
sys-libs/zlib
)"
-S="${WORKDIR}/d1x"
+S=${WORKDIR}/${PN}
pkg_setup () {
- games_get_cd descent
- games_verify_cd "Descent 1"
+ cdrom_get_cds descent
games_pkg_setup
}
@@ -35,7 +35,7 @@ src_unpack () {
mkdir "${dir}" || die
# Copy data files
- local src="${GAMES_CD}/descent"
+ local src="${CDROM_ROOT}/descent"
cd "${src}" || die
for x in chaos.hog chaos.msn descent.b50 descent.dem descent.hog \
@@ -72,8 +72,7 @@ src_compile () {
make || die
}
-src_install () {
-
+src_install() {
# Install D1X documentation
cd "${S}"
dodoc d1x.faq d1x.txt d1x140.txt readme.d1x readme.org todo.txt \
@@ -130,7 +129,7 @@ src_install () {
prepgamesdirs
}
-pkg_postinst () {
+pkg_postinst() {
games_pkg_postinst
echo
einfo "You may want to install the additional map package, which contains"
diff --git a/games-fps/quake2-data/quake2-data-3.20.ebuild b/games-fps/quake2-data/quake2-data-3.20.ebuild
index cbcf6aeaf6be..b577fc081456 100644
--- a/games-fps/quake2-data/quake2-data-3.20.ebuild
+++ b/games-fps/quake2-data/quake2-data-3.20.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-data/quake2-data-3.20.ebuild,v 1.5 2004/01/08 13:47:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/quake2-data/quake2-data-3.20.ebuild,v 1.6 2004/02/08 21:32:40 vapier Exp $
-inherit games
+inherit games eutils
DESCRIPTION="iD Software's Quake 2 ... the data files"
HOMEPAGE="http://www.idsoftware.com/"
@@ -18,36 +18,39 @@ DEPEND="app-arch/unzip
S=${WORKDIR}
-src_unpack() {
- unzip -L -q ${DISTDIR}/q2-${PV}-x86-full-ctf.exe
-}
-
-src_install() {
- games_get_cd Install
- games_verify_cd Quake 2
- if [ -e ${GAMES_CD}/Install/Data ] ; then
- GAMES_CD=${GAMES_CD}/Install/Data
+pkg_setup() {
+ cdrom_get_cds Install
+ if [ -e ${CDROM_ROOT}/Install/Data ] ; then
+ export CDROM_ROOT=${CDROM_ROOT}/Install/Data
einfo "Source is the CD"
- elif [ -e ${GAMES_CD}/baseq2 ] ; then
- GAMES_CD=${GAMES_CD}
+ elif [ -e ${CDROM_ROOT}/baseq2 ] ; then
+ export CDROM_ROOT=${CDROM_ROOT}
einfo "Source is an installed copy"
else
- die "Could not determine what ${GAMES_CD} points at"
+ die "Could not determine what ${CDROM_ROOT} points at"
fi
+ games_pkg_setup
+}
+
+src_unpack() {
+ unzip -L -q ${DISTDIR}/q2-${PV}-x86-full-ctf.exe
+}
+
+src_install() {
dodoc DOCS/* 3.20_Changes.txt
newdoc ctf/readme.txt ctf-readme.txt
- dohtml -r ${GAMES_CD}/DOCS/quake2_manual/*
+ dohtml -r ${CDROM_ROOT}/DOCS/quake2_manual/*
dodir ${GAMES_DATADIR}/${PN}/baseq2
if [ `use videos` ] ; then
insinto ${GAMES_DATADIR}/${PN}/baseq2/video
- doins ${GAMES_CD}/baseq2/video/*
+ doins ${CDROM_ROOT}/baseq2/video/*
fi
insinto ${GAMES_DATADIR}/${PN}/baseq2
- doins ${GAMES_CD}/baseq2/pak0.pak || die "couldnt grab pak0.pak"
+ doins ${CDROM_ROOT}/baseq2/pak0.pak || die "couldnt grab pak0.pak"
doins baseq2/*.pak || die "couldnt grab release paks"
doins baseq2/maps.lst || die "couldnt grab maps.lst"
cp -R baseq2/players ${D}/${GAMES_DATADIR}/${PN}/baseq2/ || die "couldnt grab player models"
diff --git a/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild b/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild
index 4acb73c2fe36..2a0c6a0ca0ae 100644
--- a/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild
+++ b/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild
@@ -1,10 +1,9 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild,v 1.1 2003/09/09 18:10:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/soldieroffortune/soldieroffortune-1.06a.ebuild,v 1.2 2004/02/08 21:33:38 vapier Exp $
-inherit games
+inherit games eutils
-IUSE=""
DESCRIPTION="Soldier of Fortune - First-person shooter based on the mercinary trade"
HOMEPAGE="http://www.lokigames.com/products/sof/"
SRC_URI="ftp://ftp.planetmirror.com/pub/lokigames/updates/sof/sof-${PV}-cdrom-x86.run
@@ -26,6 +25,7 @@ Ddir=${D}/${dir}
pkg_setup() {
ewarn "The installed game takes about 725MB of space!"
+ cdrom_get_cds sof.xpm
games_pkg_setup
}
@@ -35,19 +35,17 @@ src_unpack() {
src_install() {
dodir ${dir}
- games_get_cd sof.xpm
- games_verify_cd "Soldier of Fortune"
einfo "Copying files... this may take a while..."
exeinto /opt/soldieroffortune
- doexe ${GAMES_CD}/bin/x86/glibc-2.1/sof
+ doexe ${CDROM_ROOT}/bin/x86/glibc-2.1/sof
insinto /opt/soldieroffortune
- cp ${GAMES_CD}/{README,kver.pub,sof.xpm} ${Ddir}
+ cp ${CDROM_ROOT}/{README,kver.pub,sof.xpm} ${Ddir}
cd ${Ddir}
- tar xzf ${GAMES_CD}/paks.tar.gz || die "uncompressing data"
- tar xzf ${GAMES_CD}/binaries.tar.gz || die "uncompressing binaries"
+ tar xzf ${CDROM_ROOT}/paks.tar.gz || die "uncompressing data"
+ tar xzf ${CDROM_ROOT}/binaries.tar.gz || die "uncompressing binaries"
cd ${S}
bin/Linux/x86/loki_patch --verify patch.dat
@@ -62,15 +60,14 @@ src_install() {
dogamesbin ${FILESDIR}/sof
dosed "s:GENTOO_DIR:${dir}:" ${GAMES_BINDIR}/sof
insinto /usr/share/pixmaps
- doins ${GAMES_CD}/sof.xpm
+ doins ${CDROM_ROOT}/sof.xpm
prepgamesdirs
make_desktop_entry sof "Soldier of Fortune" "sof.xpm"
}
pkg_postinst() {
+ games_pkg_postinst
einfo "To play the game run:"
einfo " sof"
-
- games_pkg_postinst
}
diff --git a/games-fps/unreal-tournament-goty/metadata.xml b/games-fps/unreal-tournament-goty/metadata.xml
new file mode 100644
index 000000000000..557cfc4abe91
--- /dev/null
+++ b/games-fps/unreal-tournament-goty/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+ <email>vapier@gentoo.org</email>
+ <name>Mike Frysinger</name>
+</maintainer>
+<longdescription>
+In the single player mode, the player squares off
+against computer controlled Bots in all the game modes
+through a tournament ladder with increasing difficulty.
+Thanks to Epic's unmatched AI coding wizardry, Unreal
+Tournament's Bots are more life like than any
+computer-controlled characters to date. They understand
+each game's unique rules. They have a firm handle on all
+the different weapons at their disposal and how best to
+use them. They can swim, use elevators, climb stairs,
+and put on Toxin suits if they have to. If they're on
+the player's team, they can take orders to attack,
+defend or freelance.
+
+Unreal Tournament's bread and butter is the online multiplayer
+mode. Squaring off against other combatants from around the world, or on
+the other end of a LAN connection, provides some of the most thrilling and
+tense battles seen on a PC. Unreal Tournament's unparalleled networking
+code makes it as easy to play the game against anyone, anytime. If the
+host server has unique content -- like custom skins or maps -- UT
+will automatically download and install that content in REAL TIME, as the
+game is connecting. And thanks to Epic Games' amazing work on Unreal
+Tournament's network play, you can be sure that even a 33.6K modem can get
+a silky smooth connection to the server.
+</longdescription>
+</pkgmetadata>
diff --git a/games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild b/games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild
index c75cc8fccc69..fe325dd67e68 100644
--- a/games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild
+++ b/games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild,v 1.2 2003/09/09 23:44:19 msterret Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/unreal-tournament-goty/unreal-tournament-goty-436.ebuild,v 1.3 2004/02/08 21:28:34 vapier Exp $
inherit games eutils
@@ -12,47 +12,16 @@ SRC_URI="ftp://ftp.lokigames.com/pub/beta/ut/ut-install-${PV}-GOTY.run
LICENSE="as-is"
SLOT="0"
KEYWORDS="x86"
-IUSE="X 3dfx S3TC nls"
+IUSE="X 3dfx S3TC nls opengl"
DEPEND="!games-fps/unreal-tournament"
-RDEPEND="X? ( virtual/x11 )"
+RDEPEND="X? ( virtual/x11 )
+ opengl? ( virtual/opengl )"
S=${WORKDIR}
-export UT_CD1=${UT_SETUP_CDROM1}
-export UT_CD2=${UT_SETUP_CDROM2}
-if [ -z "${UT_CD1}" ] ; then
- for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` ; do
- [ ! -d ${mline}/System ] && continue
- [ -d ${mline}/Help/chaosut ] \
- && UT_CD2=${mline} \
- || UT_CD1=${mline}
- done
-fi
-[ -z "${UT_CD2}" ] && UT_CD2=${UT_CD1}
-
pkg_setup() {
- if [ -z "${UT_CD1}" ] || [ -z "${UT_CD2}" ] ; then
- echo
- eerror "You must mount the first UT CD first !"
- echo
- ewarn "If you do not have the CDs, but have the data files"
- ewarn "mounted somewhere on your filesystem, just export"
- ewarn "the variable UT_SETUP_CDROM1 so that it points to the"
- ewarn "base of the Unreal Tournament GOTY data."
- echo
- einfo "If you have 2 CDROM drives you can also export the"
- einfo "variable UT_SETUP_CDROM2 to specify the 2nd cdrom."
- einfo "Otherwise you will be prompted to switch CDs in the"
- einfo "middle of the emerge."
- echo
- einfo "Also note that if you want to *just* install the game"
- einfo "and *not* install the extra GOTY stuff (Chaos mod/different"
- einfo "languages/S3TC textures) then you can use the regular"
- einfo "unreal-tournament ebuild instead."
- echo
- die "You must provide the Unreal Tournament data before running the install"
- fi
+ cdrom_get_cds System/ Help/chaosut
games_pkg_setup
}
@@ -63,17 +32,18 @@ src_unpack() {
src_install() {
local dir=${GAMES_PREFIX_OPT}/${PN/-goty/}
+ local Ddir=${D}/${dir}
dodir ${dir}
###########
### PRE ###
# System
if [ `use 3dfx` ] ; then
- tar -zxf Glide.ini.tar.gz -C ${D}/${dir} || die "install Glide ini"
+ tar -zxf Glide.ini.tar.gz -C ${Ddir} || die "install Glide ini"
else
- tar -zxf OpenGL.ini.tar.gz -C ${D}/${dir} || die "install OpenGL ini"
+ tar -zxf OpenGL.ini.tar.gz -C ${Ddir} || die "install OpenGL ini"
fi
- tar -zxf data.tar.gz -C ${D}/${dir} || die "extract System data"
+ tar -zxf data.tar.gz -C ${Ddir} || die "extract System data"
# the most important things, ucc & ut :)
exeinto ${dir}
@@ -87,99 +57,83 @@ src_install() {
### PRE ###
###########
-
###########
### CD1 ###
- export UT_CD=${UT_CD1}
-
# Help, Logs, Music, Sounds, Textures, Web
- cp -rf ${UT_CD}/{Help,Logs,Music,Textures,Web} ${D}/${dir}/ || die "copy Help, Logs, Music, Textures, Web CD1"
+ cp -rf ${CDROM_ROOT}/{Help,Logs,Music,Textures,Web} ${Ddir}/ || die "copy Help, Logs, Music, Textures, Web CD1"
dodir ${dir}/Sounds
if [ `use nls` ] ; then
- cp -rf ${UT_CD}/Sounds/* ${D}/${dir}/Sounds/ || die "copy Sounds CD1"
+ cp -rf ${CDROM_ROOT}/Sounds/* ${Ddir}/Sounds/ || die "copy Sounds CD1"
else
- cp -rf ${UT_CD}/Sounds/*.uax ${D}/${dir}/Sounds/ || die "copy Sounds CD1"
+ cp -rf ${CDROM_ROOT}/Sounds/*.uax ${Ddir}/Sounds/ || die "copy Sounds CD1"
fi
# System
dodir ${dir}/System
if [ `use nls` ] ; then
- cp ${UT_CD}/System/*.{est,frt,itt,int,u} ${D}/${dir}/System/ || die "copy System data CD1"
+ cp ${CDROM_ROOT}/System/*.{est,frt,itt,int,u} ${Ddir}/System/ || die "copy System data CD1"
else
- cp ${UT_CD}/System/*.{int,u} ${D}/${dir}/System/ || die "copy System data CD1"
+ cp ${CDROM_ROOT}/System/*.{int,u} ${Ddir}/System/ || die "copy System data CD1"
fi
# now we uncompress the maps
einfo "Uncompressing CD1 Maps ... this may take some time"
dodir ${dir}/Maps
- cd ${D}/${dir}
+ cd ${Ddir}
export HOME=${T}
- export UT_DATA_PATH=${D}/${dir}/System
- for f in `find ${UT_CD}/Maps/ -name '*.uz' -printf '%f '` ; do
- ./ucc decompress ${UT_CD}/Maps/${f} -nohomedir || die "uncompressing map CD1 ${f}"
+ export UT_DATA_PATH=${Ddir}/System
+ for f in `find ${CDROM_ROOT}/Maps/ -name '*.uz' -printf '%f '` ; do
+ ./ucc decompress ${CDROM_ROOT}/Maps/${f} -nohomedir || die "uncompressing map CD1 ${f}"
mv System/${f:0:${#f}-3} Maps/ || die "copy map CD1 ${f}"
done
### CD1 ###
###########
-
### Have user switch cds if need be ###
- if [ "${UT_CD1}" == "${UT_CD2}" ] ; then
- while :; do
- einfo "Please mount the 2nd cd at ${UT_CD2} and press return when ready (or CTRL+C to abort)"
- read
- [ -d ${UT_CD2}/System ] && break
- [ -d ${UT_CD2}/Help/chaosut ] && break
- eerror "Could not verify that ${UT_CD2} really contains the 2nd CD"
- done
- fi
-
+ cdrom_load_next_cd
###########
### CD2 ###
- export UT_CD=${UT_CD2}
-
# Help, Sounds
- cp -rf ${UT_CD}/{Help,Sounds} ${D}/${dir}/ || die "copy Help, Sounds CD2"
+ cp -rf ${CDROM_ROOT}/{Help,Sounds} ${Ddir}/ || die "copy Help, Sounds CD2"
# S3TC Textures
if [ `use S3TC` ] ; then
- cp -rf ${UT_CD}/Textures ${D}/${dir}/ || die "copy S3TC Textures CD2"
+ cp -rf ${CDROM_ROOT}/Textures ${Ddir}/ || die "copy S3TC Textures CD2"
else
- cp -rf ${UT_CD}/Textures/{JezzTex,Jezztex2,SnowDog,chaostex{,2}}.utx ${D}/${dir}/Textures/ || die "copy Textures CD2"
+ cp -rf ${CDROM_ROOT}/Textures/{JezzTex,Jezztex2,SnowDog,chaostex{,2}}.utx ${Ddir}/Textures/ || die "copy Textures CD2"
fi
# System
- cp -rf ${UT_CD}/System/*.{u,int} ${D}/${dir}/System/ || die "copy System CD2"
+ cp -rf ${CDROM_ROOT}/System/*.{u,int} ${Ddir}/System/ || die "copy System CD2"
# now we uncompress the maps
einfo "Uncompressing CD2 Maps ... this may take some time"
dodir ${dir}/Maps
- cd ${D}/${dir}
+ cd ${Ddir}
export HOME=${T}
- export UT_DATA_PATH=${D}/${dir}/System
- for f in `find ${UT_CD}/maps/ -name '*.uz' -printf '%f '` ; do
- ./ucc decompress ${UT_CD}/maps/${f} -nohomedir || die "uncompressing map CD2 ${f}"
+ export UT_DATA_PATH=${Ddir}/System
+ for f in `find ${CDROM_ROOT}/maps/ -name '*.uz' -printf '%f '` ; do
+ ./ucc decompress ${CDROM_ROOT}/maps/${f} -nohomedir || die "uncompressing map CD2 ${f}"
mv System/${f:0:${#f}-3} Maps/ || die "copy map CD2 ${f}"
done
### CD2 ###
###########
-
###########
### END ###
cd ${S}
# Textures
- tar -zxf Credits.tar.gz -C ${D}/${dir} || die "extract credits texture"
+ tar -zxf Credits.tar.gz -C ${Ddir} || die "extract credits texture"
# NetGamesUSA.com
- tar -zxf NetGamesUSA.com.tar.gz -C ${D}/${dir}/ || die "extract NetGamesUSA.com"
+ tar -zxf NetGamesUSA.com.tar.gz -C ${Ddir}/ || die "extract NetGamesUSA.com"
# Patch UT-GOTY
cd setup.data
cp patch.dat{,.orig}
sed -e 's:sh uz-maps.sh:echo:' patch.dat.orig > patch.dat
- ./bin/Linux/x86/loki_patch patch.dat ${D}/${dir} || die "failed to patch"
+ ./bin/Linux/x86/loki_patch patch.dat ${Ddir} || die "failed to patch"
cd ${S}
# now we install the IpDrv.so patch
@@ -189,6 +143,11 @@ src_install() {
# install a few random files
insinto ${dir}
doins README icon.{bmp,xpm} || die "installing random files"
+
+ # now, since these files are coming off a cd, the times/sizes/md5sums wont
+ # be different ... that means portage will try to unmerge some files (!)
+ # we run touch on ${D} so as to make sure portage doesnt do any such thing
+ find ${Ddir} -exec touch '{}' \;
### END ###
###########
@@ -196,13 +155,10 @@ src_install() {
}
pkg_postinst() {
- echo
+ games_pkg_postinst
einfo "You might want to install the bonus packs too."
einfo "Many servers on the internet use them, and the"
einfo "majority of players do too."
echo
einfo "Just run: emerge unreal-tournament-bonuspacks"
- echo
-
- games_pkg_postinst
}
diff --git a/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild b/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild
index efa4968bae42..61fe77949cc7 100644
--- a/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild
+++ b/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild,v 1.2 2003/09/09 23:44:19 msterret Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/unreal-tournament-goty/unreal-tournament-goty-451.ebuild,v 1.3 2004/02/08 21:28:34 vapier Exp $
-inherit games
+inherit games eutils
DESCRIPTION="Futuristic FPS (Game Of The Year edition)"
HOMEPAGE="http://www.unrealtournament.com/"
@@ -20,40 +20,8 @@ RDEPEND="X? ( virtual/x11 )
S=${WORKDIR}
-export UT_CD1=${UT_SETUP_CDROM1}
-export UT_CD2=${UT_SETUP_CDROM2}
-if [ -z "${UT_CD1}" ] ; then
- for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` ; do
- [ ! -d ${mline}/System ] && continue
- [ -d ${mline}/Help/chaosut ] \
- && UT_CD2=${mline} \
- || UT_CD1=${mline}
- done
-fi
-[ -z "${UT_CD2}" ] && UT_CD2=${UT_CD1}
-
pkg_setup() {
- if [ -z "${UT_CD1}" ] || [ -z "${UT_CD2}" ] ; then
- echo
- eerror "You must mount the first UT CD first !"
- echo
- ewarn "If you do not have the CDs, but have the data files"
- ewarn "mounted somewhere on your filesystem, just export"
- ewarn "the variable UT_SETUP_CDROM1 so that it points to the"
- ewarn "base of the Unreal Tournament GOTY data."
- echo
- einfo "If you have 2 CDROM drives you can also export the"
- einfo "variable UT_SETUP_CDROM2 to specify the 2nd cdrom."
- einfo "Otherwise you will be prompted to switch CDs in the"
- einfo "middle of the emerge."
- echo
- einfo "Also note that if you want to *just* install the game"
- einfo "and *not* install the extra GOTY stuff (Chaos mod/different"
- einfo "languages/S3TC textures) then you can use the regular"
- einfo "unreal-tournament ebuild instead."
- echo
- die "You must provide the Unreal Tournament data before running the install"
- fi
+ cdrom_get_cds System/ Help/chaosut
games_pkg_setup
}
@@ -91,26 +59,23 @@ src_install() {
### PRE ###
###########
-
###########
### CD1 ###
- export UT_CD=${UT_CD1}
-
# Help, Logs, Music, Sounds, Textures, Web
- cp -rf ${UT_CD}/{Help,Logs,Music,Textures,Web} ${Ddir}/ || die "copy Help, Logs, Music, Textures, Web CD1"
+ cp -rf ${CDROM_ROOT}/{Help,Logs,Music,Textures,Web} ${Ddir}/ || die "copy Help, Logs, Music, Textures, Web CD1"
dodir ${dir}/Sounds
if [ `use nls` ] ; then
- cp -rf ${UT_CD}/Sounds/* ${Ddir}/Sounds/ || die "copy Sounds CD1"
+ cp -rf ${CDROM_ROOT}/Sounds/* ${Ddir}/Sounds/ || die "copy Sounds CD1"
else
- cp -rf ${UT_CD}/Sounds/*.uax ${Ddir}/Sounds/ || die "copy Sounds CD1"
+ cp -rf ${CDROM_ROOT}/Sounds/*.uax ${Ddir}/Sounds/ || die "copy Sounds CD1"
fi
# System
dodir ${dir}/System
if [ `use nls` ] ; then
- cp ${UT_CD}/System/*.{est,frt,itt,int,u} ${Ddir}/System/ || die "copy System data CD1"
+ cp ${CDROM_ROOT}/System/*.{est,frt,itt,int,u} ${Ddir}/System/ || die "copy System data CD1"
else
- cp ${UT_CD}/System/*.{int,u} ${Ddir}/System/ || die "copy System data CD1"
+ cp ${CDROM_ROOT}/System/*.{int,u} ${Ddir}/System/ || die "copy System data CD1"
fi
# now we uncompress the maps
@@ -119,42 +84,30 @@ src_install() {
cd ${Ddir}
export HOME=${T}
export UT_DATA_PATH=${Ddir}/System
- for f in `find ${UT_CD}/Maps/ -name '*.uz' -printf '%f '` ; do
- ./ucc decompress ${UT_CD}/Maps/${f} -nohomedir || die "uncompressing map CD1 ${f}"
+ for f in `find ${CDROM_ROOT}/Maps/ -name '*.uz' -printf '%f '` ; do
+ ./ucc decompress ${CDROM_ROOT}/Maps/${f} -nohomedir || die "uncompressing map CD1 ${f}"
mv System/${f:0:${#f}-3} Maps/ || die "copy map CD1 ${f}"
done
### CD1 ###
###########
-
### Have user switch cds if need be ###
- if [ "${UT_CD1}" == "${UT_CD2}" ] ; then
- while :; do
- einfo "Please mount the 2nd cd at ${UT_CD2} and press return when ready (or CTRL+C to abort)"
- read
- [ -d ${UT_CD2}/System ] && break
- [ -d ${UT_CD2}/Help/chaosut ] && break
- eerror "Could not verify that ${UT_CD2} really contains the 2nd CD"
- done
- fi
-
+ cdrom_load_next_cd
###########
### CD2 ###
- export UT_CD=${UT_CD2}
-
# Help, Sounds
- cp -rf ${UT_CD}/{Help,Sounds} ${Ddir}/ || die "copy Help, Sounds CD2"
+ cp -rf ${CDROM_ROOT}/{Help,Sounds} ${Ddir}/ || die "copy Help, Sounds CD2"
# S3TC Textures
if [ `use S3TC` ] ; then
- cp -rf ${UT_CD}/Textures ${Ddir}/ || die "copy S3TC Textures CD2"
+ cp -rf ${CDROM_ROOT}/Textures ${Ddir}/ || die "copy S3TC Textures CD2"
else
- cp -rf ${UT_CD}/Textures/{JezzTex,Jezztex2,SnowDog,chaostex{,2}}.utx ${Ddir}/Textures/ || die "copy Textures CD2"
+ cp -rf ${CDROM_ROOT}/Textures/{JezzTex,Jezztex2,SnowDog,chaostex{,2}}.utx ${Ddir}/Textures/ || die "copy Textures CD2"
fi
# System
- cp -rf ${UT_CD}/System/*.{u,int} ${Ddir}/System/ || die "copy System CD2"
+ cp -rf ${CDROM_ROOT}/System/*.{u,int} ${Ddir}/System/ || die "copy System CD2"
# now we uncompress the maps
einfo "Uncompressing CD2 Maps ... this may take some time"
@@ -162,14 +115,13 @@ src_install() {
cd ${Ddir}
export HOME=${T}
export UT_DATA_PATH=${Ddir}/System
- for f in `find ${UT_CD}/maps/ -name '*.uz' -printf '%f '` ; do
- ./ucc decompress ${UT_CD}/maps/${f} -nohomedir || die "uncompressing map CD2 ${f}"
+ for f in `find ${CDROM_ROOT}/maps/ -name '*.uz' -printf '%f '` ; do
+ ./ucc decompress ${CDROM_ROOT}/maps/${f} -nohomedir || die "uncompressing map CD2 ${f}"
mv System/${f:0:${#f}-3} Maps/ || die "copy map CD2 ${f}"
done
### CD2 ###
###########
-
###########
### END ###
cd ${S}
@@ -206,13 +158,10 @@ src_install() {
}
pkg_postinst() {
- echo
+ games_pkg_postinst
einfo "You might want to install the bonus packs too."
einfo "Many servers on the internet use them, and the"
einfo "majority of players do too."
echo
einfo "Just run: emerge unreal-tournament-bonuspacks"
- echo
-
- games_pkg_postinst
}