summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-09 19:30:22 +0000
committerSam James <sam@gentoo.org>2021-04-09 19:31:32 +0000
commit83ae860555aa38b6219428e7d7351aa297b6e673 (patch)
tree1354f7e2c55bdbd19b90d7ec336627201c34a75d /games-fps/ut2003-demo
parentgames-fps/ut2003-bonuspack-epic: port to EAPI 7, games.eclass-- (diff)
downloadgentoo-83ae860555aa38b6219428e7d7351aa297b6e673.tar.gz
gentoo-83ae860555aa38b6219428e7d7351aa297b6e673.tar.bz2
gentoo-83ae860555aa38b6219428e7d7351aa297b6e673.zip
games-fps/ut2003-demo: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-fps/ut2003-demo')
-rw-r--r--games-fps/ut2003-demo/ut2003-demo-2206-r5.ebuild (renamed from games-fps/ut2003-demo/ut2003-demo-2206-r4.ebuild)41
1 files changed, 21 insertions, 20 deletions
diff --git a/games-fps/ut2003-demo/ut2003-demo-2206-r4.ebuild b/games-fps/ut2003-demo/ut2003-demo-2206-r5.ebuild
index 2f1817e72c8e..707039fffb5b 100644
--- a/games-fps/ut2003-demo/ut2003-demo-2206-r4.ebuild
+++ b/games-fps/ut2003-demo/ut2003-demo-2206-r5.ebuild
@@ -1,15 +1,16 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils unpacker games
+inherit desktop unpacker
DESCRIPTION="Demo for the sequel to the 1999 multi-player first-person shooter"
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
https://dev.gentoo.org/~wolf31o2/sources/${PN}/${PN}-misc.tar.bz2"
+S="${WORKDIR}"
LICENSE="ut2003-demo"
SLOT="0"
@@ -26,17 +27,16 @@ RDEPEND="
x11-libs/libXext[abi_x86_32(-)]
"
-S=${WORKDIR}
+dir=opt/${PN}
+Ddir="${ED}"/${dir}
-dir=${GAMES_PREFIX_OPT}/${PN}
-Ddir=${D}/${dir}
-
-QA_PREBUILT="${dir:1}/*.so ${dir:1}/*-bin ${dir:1}/System/libSDL-1.2.so.0"
+QA_PREBUILT="${dir}/*.so ${dir}/*-bin ${dir}/System/libSDL-1.2.so.0"
src_unpack() {
unpack_makeself "${DISTDIR}"/ut2003demo-lnx-${PV}.sh.bin || die
unzip "${DISTDIR}"/UT2003CrashFix.zip || die
- cd "${S}"
+
+ cd "${S}" || die
unpack ./setupstuff.tar.gz || die
unpack ./ut2003lnx_demo.tar.bz2 || die
unpack ${PN}-misc.tar.bz2 || die
@@ -48,16 +48,14 @@ src_install() {
local i
for i in Animations Benchmark Help KarmaData Maps Music Sounds \
- StaticMeshes System Textures Web extras
- do
+ StaticMeshes System Textures Web extras ; do
dodir "${dir}"/${i}
- cp -pPR "${S}"/${i}/* "${Ddir}"/${i}
+ cp -pPR "${S}"/${i}/* "${Ddir}"/${i} || die
done
# Fix the benchmark configurations to use SDL rather than the Windows driver
local f
- for f in MaxDetail.ini MinDetail.ini
- do
+ 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/' \
@@ -74,11 +72,13 @@ src_install() {
done
# Wrapper and benchmark-scripts
- dogamesbin "${FILESDIR}"/ut2003-demo
+ dobin "${FILESDIR}"/ut2003-demo
exeinto "${dir}"/Benchmark
doexe "${FILESDIR}/"{benchmark,results.sh}
- sed -i -e "s:GAMES_PREFIX_OPT:${GAMES_PREFIX_OPT}:" \
- "${ED}/${GAMES_BINDIR}/${PN}" "${ED}/${dir}"/Benchmark/benchmark || die
+ sed -i \
+ -e "s:GAMES_PREFIX_OPT:/opt:" \
+ "${ED}/usr/bin/${PN}" \
+ "${ED}/${dir}"/Benchmark/benchmark || die
# Here we apply DrSiN's crash patch
cp "${S}"/CrashFix/System/crashfix.u "${Ddir}"/System || die
@@ -99,25 +99,26 @@ EOT
doexe ucc ut2003_demo
newicon Unreal.xpm ut2003-demo.xpm
make_desktop_entry ut2003-demo "Unreal Tournament 2003 (Demo)" ${PN}
-
- prepgamesdirs
}
pkg_postinst() {
- games_pkg_postinst
elog "You can run benchmarks by typing 'ut2003-demo --bench' (MinDetail seems"
elog "to not be working for some unknown reason :/)"
+
echo
elog "Read ${dir}/README.linux for instructions on how to run a"
elog "dedicated server."
+
echo
ewarn "If you are not installing for the first time and you plan on running"
ewarn "a server, you will probably need to edit your"
ewarn "~/.ut2003demo/System/UT2003.ini file and add a line that says"
ewarn "AccessControlClass=crashfix.iaccesscontrolini to your"
ewarn "[Engine.GameInfo] section to close a security issue."
+
echo
elog "To play the demo run:"
elog " ut2003-demo"
+
echo
}