diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-fps/ut2003-demo |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-fps/ut2003-demo')
-rw-r--r-- | games-fps/ut2003-demo/Manifest | 11 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/benchmark | 37 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/results.py | 61 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/results.sh | 79 | ||||
-rw-r--r-- | games-fps/ut2003-demo/files/ut2003-demo | 30 | ||||
-rw-r--r-- | games-fps/ut2003-demo/metadata.xml | 11 | ||||
-rw-r--r-- | games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild | 123 |
7 files changed, 352 insertions, 0 deletions
diff --git a/games-fps/ut2003-demo/Manifest b/games-fps/ut2003-demo/Manifest new file mode 100644 index 000000000000..9d883d2b5074 --- /dev/null +++ b/games-fps/ut2003-demo/Manifest @@ -0,0 +1,11 @@ +AUX benchmark 1180 SHA256 33c890051ecab7a2d136d413c18d20078675ff0e215eb9df7b7ac6380e2db0fc SHA512 4da05b170e3b8a983d264c83e094a8084a9a9b9b58c6f7fce30ea7273f625f8e6c03794a519cdaab5cfba64fb4b5047ab73eb3190c6a076a5fde4eb0399c1785 WHIRLPOOL b928b19c75fb7fadf720bc1b8a6bbbf370d688df968ba6328f44c5d273e6659f4471543022e8888dbe37fa2e1701e3dcb217b8a4e8645632a1984c2133055973 +AUX results.py 1461 SHA256 3c492242e044921fa33e0628eb497be23c0584a0eef3f8eb1b4505ef168c92f7 SHA512 6b0e21638acda24e37105b33aaa979e18acbdd75f061a16a7a8d5109404bc1478988cad142167afe27a7ce5901e492178d2eda04c293d027048f6d873a56873a WHIRLPOOL 3a14ae12b5c1d0a26954d0a286881810a9369b1bb8202621dba46f36548e43e85e0b9b93bcb5a9a0104615cf1e89fbc9eadff1f1f7856a92c9f2ffd3b02d0938 +AUX results.sh 2107 SHA256 cc7c7fa724961d297d656e70f429d82efc1f004d0a82973f1c949882546a6eb6 SHA512 749ccf70249d848605437da43f99f0fc881ee58edc85535d6ee0bf2bf57c5642a985979d5bc048a64363f711af35cafcd53d438974a13e62f705551ba6ec3d51 WHIRLPOOL 590c571316f561db5015b25fafd8f848017e99e5d06a94fb41e06dcacc1960137b374d88a785366e0df0387f3b016bd4dea859548314f6f12b77eee8933db75a +AUX ut2003-demo 692 SHA256 a40b124f93f8f47c5823ddec5234eef4c249e7f488a69fbb0f0949921d92474b SHA512 50b927c70865ca808cd060fc1a3e1bc7549f85acdeb18e90343108823db858e3580db5e584cad2e41358e205e4b5375c4deba6990aff4227a9b7e5333dcf51a8 WHIRLPOOL 13fe3c1a21be05df45ae5a231cddd80f1dc0b7c6a4b53379f542fb3edc60b04e4e93b24318273663cbb2024561ce55026e0bbb2303c1f5db5b75ec50cb33ed13 +DIST UT2003CrashFix.zip 2764 SHA256 df1a6fdf81f388486b20abf301ef86fb72b0b12d96bec789d7cb7103da579813 SHA512 24fdaac873b08a0860c23f66b9bd93922fc4f64486adbe9bfefeb340f9d9374778b5e7bacd0e12cc79d819fb340e007ab2a7f1f45c9e4f27ab3ab6b11033d444 WHIRLPOOL ddea25bf472d5ca7f9c9dca1346820045504c10be90e914cd0c000a04c48ad4765e4b283a35cd91c2cb9f4cd8e1d2cabac660c2bfeccff05ecc42b1379242ff5 +DIST ut2003-demo-misc.tar.bz2 31851 SHA256 215a82cc4768c93a979771b1abf6250bcbe36be466d119df41acd041ac189ced SHA512 9a1e154aac7a8ccd043135e2a617a19203f6942e8e152d06ec8ed1e6877118cfb3ddbeab7ec2617670e26f13c0e394b8b8dbc747688b8b0b244a8c404f33d7f0 WHIRLPOOL 5597c0c4444de2e50cf87c23cbe4c863258da761645d41f4693a7aa774bb68cb8f8a4bf5c8b3b4e8a670f7c8ce616728d1223dd18b20c59fde60462e413db9f0 +DIST ut2003demo-lnx-2206.sh.bin 137253079 SHA256 e7664d20d6364e4f151199e3f7e111888abeb63e1d93146c88d932c6a2b94173 SHA512 8018d58999010c17198185838e42f7cbda0f55476f1e6065b4b2957db3652fe9c1af39ba65451565f54d41507413f4e0b1edf2678c9cc7c221f2ca278ec655be WHIRLPOOL b4bd520a60385d803d7d44247a48ca80a1116d9a3b9ea9f1dcdf2d1114bcc42e8705f00e228fe50fedc95d1d1c130ceaceb0c54210f51fb03da0672d13c35758 +EBUILD ut2003-demo-2206-r3.ebuild 3568 SHA256 243604a648006096b2f929672c23cb455a5f3eb6e3c8da7fe072fe6e4dc2533f SHA512 e07a649350199173ee334772c5b207fa2dc574697badda53325c15dbd8d65e8f9c68d85a6445efe223be17bd3189ab62311e00ce04ab4054fc26a55afde3f355 WHIRLPOOL 80e99be1a63ab9e761cee7571f857d51f32ec35ab3dcee7e416a4ce342a4cd658ad4a42c9d78087b74a8534a718409fb341ab4259cc76b12e819c84a0aace885 +MISC ChangeLog 2697 SHA256 4466808a76fffbf7a5e9da2d6cc6e57f7a36a3e272214009c5f149d7e2dcad2e SHA512 27289ca1d4f863db1b33e0372f0891da6a4551f0e7cdc93c313ae9f0436e7e0733b61e6b131716ca554bc159660c5992184cfd3fa171152b9aad8aa576008d70 WHIRLPOOL 77d67632a77f8bbbbd8970bdabbec80f530b08ea3800c2ede0f72a6aa96dd5f6eb84aadeafd860f1669a443e853ca472a5f145534715b54235ec037d0d7f8c3c +MISC ChangeLog-2015 8266 SHA256 46607ae6eaf0b9f71b7570b485c665c82c20efa9f46088a012ede6b1752b8b26 SHA512 afadb78533216d83cd594550682ad6ea8b7f01d8d3c50086498236d92150944b58fe2fd76887868f7c4fa380cd68eb0c49641f5f13c8c44b2255f09bb3fd57ed WHIRLPOOL fdc23004daa4a9db1e320d26d141ed022f01f2e046e1fd81b606c96d6a1b28ed8f33c553ddb1f3ffb41a68cc867931b263758b136d3f2f34aa1c1a58210d46aa +MISC metadata.xml 602 SHA256 c52b70e89f22a8b58585903312f0b2d5385f9ee6bf9dc7485c717d1c5880f868 SHA512 2c956bf66965f83b68bb0c04d79d479ae76af9b7781bca93a1ff7898f02838ee0c1cc72290943be9902dee38096f2b119f95f21e5bed781e8c04f331a60adac2 WHIRLPOOL f36c50bdc2c37b8ea081262b10198a9c9b9b08901fc57f8f592718b2925fce3f4dd0e145a844ab9ed79beed27168b73c6c4c89f8c1a169b1e9d1ef9d4c1ccf7d diff --git a/games-fps/ut2003-demo/files/benchmark b/games-fps/ut2003-demo/files/benchmark new file mode 100644 index 000000000000..2047897da9ab --- /dev/null +++ b/games-fps/ut2003-demo/files/benchmark @@ -0,0 +1,37 @@ +#!/bin/sh +# Originally from linuxforen.de +# Modified by phoen][x <phoenix@gentoo.org>, Sep/19/2002 +# Modifications, enhancements or bugs? Mail me. + +# Tweaks by Daniel Robbins <drobbins@gentoo.org> 25 Feb 2003 + +STUFF=GAMES_PREFIX_OPT/ut2003-demo/Benchmark/Stuff +MYPATH=${HOME}/.ut2003/Benchmark +TEMPLOG=${MYPATH}/benchmark.log +LOG=${MYPATH}/bench.log + +[ -d ${MYPATH} ] || mkdir -p ${MYPATH} + +rm -f ${TEMPLOG} ${LOG} +touch ${TEMPLOG} ${LOG} + +date > $LOG + +echo ">> Starting benchmark" +cd GAMES_PREFIX_OPT//ut2003-demo/System +for BENCH in GAMES_PREFIX_OPT//ut2003-demo/Benchmark/*-*.sh +do + echo "Running ${BENCH} with MinDetail" + ${BENCH} -ini=${STUFF}/MinDetail.ini -userini=${STUFF}/MinDetailUser.ini &> /dev/null + echo -n "${BENCH} / MinDetail / " >> ${LOG} + cat ${TEMPLOG} | tail -n1 >> ${LOG} + + echo "Running ${BENCH} with MaxDetail" + ${BENCH} -ini=${STUFF}/MaxDetail.ini -userini=${STUFF}/MaxDetailUser.ini &> /dev/null + echo -n "${BENCH} / MaxDetail / " >> ${LOG} + cat ${TEMPLOG} | tail -n1 >> ${LOG} +done + +echo ">> Benchmark complete" +GAMES_PREFIX_OPT/ut2003-demo/Benchmark/results.sh +echo ">> Use 'ut2003-demo --results' to show these results again (without benchmarking)" diff --git a/games-fps/ut2003-demo/files/results.py b/games-fps/ut2003-demo/files/results.py new file mode 100644 index 000000000000..3e626239129d --- /dev/null +++ b/games-fps/ut2003-demo/files/results.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# Written by phoen][x <phoenix@gentoo.org>, Sep/19/2002 +# Modifications, enhancements or bugs? Mail me. +import sys + +def help(): + print "Usage" + print " results.py logfile" + +def stats(data,mode): + print( +""">> Score for %s +MinDetail: %f (%d tests) +MaxDetail: %f (%d tests) +Average : %f (%d tests) +""" % (mode,data[0][0]/data[0][1],data[0][1],data[1][0]/data[1][1],data[1][1], + (data[0][0]+data[1][0])/(data[0][1]+data[1][1]),data[0][1]+data[1][1])) + +args = sys.argv[1:] +if "--help" in args: + help() +else: + if len(args): + file = args[0] + else: + import user + file = "%s/.ut2003/Benchmark/bench.log" % user.home + try: + myfile = open(file) + date = myfile.readline() + print(">> Results of the UT2003-demo benchmark") + print(">> created on %s" % date) + + botmatch = ([0,0],[0,0]) + flyby = ([0,0],[0,0]) + + for line in myfile.readlines(): + results = line.split() + category = results[0].split("-")[0] + + if results[2] == "MinDetail": + detail = 0 + elif results[2] == "MaxDetail": + detail = 1 + else: + assert "Neither MinDetail nor MaxDetail?" + + if category == "botmatch": + botmatch[detail][0] += float(results[13]) + botmatch[detail][1] += 1 + elif category == "flyby": + flyby[detail][0] += float(results[13]) + flyby[detail][1] += 1 + else: + assert "Neither botmach nor flyby?" + + stats(botmatch,"Botmatch") + stats(flyby,"FlyBy") + + except IOError: + print("Unable to open file %s" % file) diff --git a/games-fps/ut2003-demo/files/results.sh b/games-fps/ut2003-demo/files/results.sh new file mode 100644 index 000000000000..a74cf909c9ad --- /dev/null +++ b/games-fps/ut2003-demo/files/results.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# Written by phoen][x <phoenix@gentoo.org>, Sep/21/2002 +# Modifications, enhancements or bugs? Contact games@gentoo.org + +[[ -z "${1}" ]] \ + && FILE="${HOME}/.ut2003/Benchmark/bench.log" \ + || FILE="${1}" + +CURLINE=0 + +BM_MIN_SCORE=0 +BM_MIN_COUNT=0 +BM_MAX_SCORE=0 +BM_MAX_COUNT=0 + +FB_MIN_SCORE=0 +FB_MIN_COUNT=0 +FB_MAX_SCORE=0 +FB_MAX_COUNT=0 + +while read LINE ; do + CURLINE=`expr $CURLINE + 1` + if [[ ${CURLINE} -eq 1 ]] ; then + echo ">> Results of the UT2003-demo benchmark" + echo ">> Created on ${LINE}" + continue + fi + + set -- ${LINE} + TYPE=$(echo $(basename ${1}) | cut -d- -f1) + DETAIL=${3} + SCORE=${14} + + case ${TYPE} in + "botmatch") + case ${DETAIL} in + "MinDetail") + BM_MIN_SCORE=`echo ${BM_MIN_SCORE} + ${SCORE} | bc` + BM_MIN_COUNT=`expr ${BM_MIN_COUNT} + 1` + ;; + "MaxDetail") + BM_MAX_SCORE=`echo ${BM_MAX_SCORE} + ${SCORE} | bc` + BM_MAX_COUNT=`expr ${BM_MAX_COUNT} + 1` + ;; + esac + ;; + "flyby") + case ${DETAIL} in + "MinDetail") + FB_MIN_SCORE=`echo ${FB_MIN_SCORE} + ${SCORE} | bc` + FB_MIN_COUNT=`expr ${FB_MIN_COUNT} + 1` + ;; + "MaxDetail") + FB_MAX_SCORE=`echo ${FB_MAX_SCORE} + ${SCORE} | bc` + FB_MAX_COUNT=`expr ${FB_MAX_COUNT} + 1` + ;; + esac + ;; + esac +done < ${FILE} + +BM_MIN_AVG=`echo "scale=6; ${BM_MIN_SCORE} / ${BM_MIN_COUNT}" | bc` +BM_MAX_AVG=`echo "scale=6; ${BM_MAX_SCORE} / ${BM_MAX_COUNT}" | bc` +BM_ALL_AVG=`echo "scale=6; (${BM_MIN_SCORE} + ${BM_MAX_SCORE}) / (${BM_MIN_COUNT} + ${BM_MAX_COUNT})" | bc` + +FB_MIN_AVG=`echo "scale=6; ${FB_MIN_SCORE} / ${FB_MIN_COUNT}" | bc` +FB_MAX_AVG=`echo "scale=6; ${FB_MAX_SCORE} / ${FB_MAX_COUNT}" | bc` +FB_ALL_AVG=`echo "scale=6; (${FB_MIN_SCORE} + ${FB_MAX_SCORE}) / (${FB_MIN_COUNT} + ${FB_MAX_COUNT})" | bc` + +echo " +>> Score for Botmatch +MinDetail: ${BM_MIN_AVG} (${BM_MIN_COUNT} tests) +MaxDetail: ${BM_MAX_AVG} (${BM_MAX_COUNT} tests) +Average : ${BM_ALL_AVG} (`expr ${BM_MIN_COUNT} + ${BM_MAX_COUNT}` tests) + +>> Score for FlyBy +MinDetail: ${FB_MIN_AVG} (${FB_MIN_COUNT} tests) +MaxDetail: ${FB_MAX_AVG} (${FB_MAX_COUNT} tests) +Average : ${FB_ALL_AVG} (`expr ${FB_MIN_COUNT} + ${FB_MAX_COUNT}` tests)" diff --git a/games-fps/ut2003-demo/files/ut2003-demo b/games-fps/ut2003-demo/files/ut2003-demo new file mode 100644 index 000000000000..56d7e10e6a73 --- /dev/null +++ b/games-fps/ut2003-demo/files/ut2003-demo @@ -0,0 +1,30 @@ +#!/bin/bash +# Written by phoen][x <phoenix@gentoo.org>, Sep/19/2002 +# Modifications, enhancements or bugs? Mail me. + +INSTALL="GAMES_PREFIX_OPT//ut2003-demo" + +case ${1} in + "--results") + pushd ${INSTALL}/Benchmark &> /dev/null + ./results.sh + popd &> /dev/null + ;; + "--bench") + pushd ${INSTALL}/Benchmark &> /dev/null + ./benchmark + popd &> /dev/null + ;; + "--help") + echo "Usage:" + echo " ut2003-demo [--bench] || [--results]" + echo " Optional parameters, only one at a time." + echo " --bench : starts ut2003-demo in benchmark mode" + echo " --results : outputs the results of your last benchmark" + ;; + *) + pushd ${INSTALL} &> /dev/null + ./ut2003_demo + popd &> /dev/null + ;; +esac diff --git a/games-fps/ut2003-demo/metadata.xml b/games-fps/ut2003-demo/metadata.xml new file mode 100644 index 000000000000..a7cd2290aab2 --- /dev/null +++ b/games-fps/ut2003-demo/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> +</maintainer> +<longdescription> +Unreal Tounament 2003 is a first-person 3-D shooter and sequel to the 1999 Game of the Year, Unreal Tournament. The game was ported to Linux by Ryan "icculus" Gordon under contract from Epic Games and the Linux installer was released in the retail box. This game is a playable demo of the full commercial version. +</longdescription> +</pkgmetadata> diff --git a/games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild b/games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild new file mode 100644 index 000000000000..912bd67da1ec --- /dev/null +++ b/games-fps/ut2003-demo/ut2003-demo-2206-r3.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils unpacker games + +DESCRIPTION="Demo for the sequel to the 1999 Game of the Year 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" + +LICENSE="ut2003-demo" +SLOT="0" +KEYWORDS="-* amd64 x86" +IUSE="" +RESTRICT="strip" + +DEPEND="app-arch/unzip" +RDEPEND=" + sys-devel/bc + virtual/libstdc++:3.3 + virtual/opengl[abi_x86_32(-)] + x11-libs/libX11[abi_x86_32(-)] + x11-libs/libXext[abi_x86_32(-)] +" + +S=${WORKDIR} + +dir=${GAMES_PREFIX_OPT}/${PN} +Ddir=${D}/${dir} + +QA_PREBUILT="${dir:1}/*.so ${dir:1}/*-bin ${dir:1}/System/libSDL-1.2.so.0" + +src_unpack() { + unpack_makeself "${DISTDIR}"/ut2003demo-lnx-${PV}.sh.bin || die + unzip "${DISTDIR}"/UT2003CrashFix.zip || die + cd "${S}" + unpack ./setupstuff.tar.gz || die + unpack ./ut2003lnx_demo.tar.bz2 || die + unpack ${PN}-misc.tar.bz2 || die +} + +src_install() { + einfo "This will take a while ... go get a pizza or something" + dodir "${dir}" + + local i + for i in Animations Benchmark Help KarmaData Maps Music Sounds \ + StaticMeshes System Textures Web extras + do + dodir "${dir}"/${i} + cp -pPR "${S}"/${i}/* "${Ddir}"/${i} + done + + # Fix the benchmark configurations to use SDL rather than the Windows driver + local f + 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 + 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 + done + + # Wrapper and benchmark-scripts + dogamesbin "${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 + + # Here we apply DrSiN's crash patch + cp "${S}"/CrashFix/System/crashfix.u "${Ddir}"/System || die + +ed "${Ddir}"/System/Default.ini >/dev/null 2>&1 <<EOT +$ +?Engine.GameInfo? +a +AccessControlClass=crashfix.iaccesscontrolini +. +w +q +EOT + + exeinto "${dir}" + insinto "${dir}" + doins DemoLicense.int README.linux + 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 +} |