Verified Commit 74cd43ae authored by flussence's avatar flussence

games-fps/ut2004: new ebuild

EAPI7 and IPFS URLs, like the previous ones.

This is moderately changed from the original ebuild, the pointless
dedicated/opengl USE flags have been thrown away. If you want a headless
server then just install ut2004-ded, and you don't really need a wrapper
to type "cd /opt/ut2004/System && ./ucc-bin server", do you?
parent e3972a3f
DIST ut2004-lnxpatch3369-2.tar.bz2 22465217 BLAKE2B 9852f9d55804b7f2927a31be86aee1552aaebeb38d2a40fb206154c236e9d6eff47f7594024c0d9b25c7216d3ca62571b1f89f23f72ee9e135b2e6451bcb006a SHA512 0d6f26d5a811efd64be8c304e928e03f546d9a8eaba6b074843e2b7e76e0670b39df95200a2fe2040d72bbd204c7157ed0115649a5c85396a76d9e0b7ec284b1
DIST ut2004-v3369-3-linux-dedicated.7z 5013927 BLAKE2B 72d24d7bc37c777f3697b767a03e052ad9b547005dd6da73833e439496e87a9c1ebbe01f88d62b29a41b2bf6380a3b3bd745e6883fbb6d0f2b7e52998d4af276 SHA512 3b2a7b64934a3647c02c9fec48565c5c2c35370d635b2af4059eb76587bfa13f46e6a4e14fdb0494ba7a4182497ed5963601986f4fcfa318e69a8a8a8c0178cf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ant+gentoo.bugs@flussence.eu</email>
<name>Anthony Parsons</name>
</maintainer>
</pkgmetadata>
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils multilib desktop
MY_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
MY_P=(ut2004-lnxpatch${PV%.*}-2.tar.bz2 ut2004-v${PV/./-}-linux-dedicated.7z)
DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter"
HOMEPAGE="http://www.unrealtournament2004.com/"
SRC_URI="
mirror://ipfs/ipfs/QmaaQUGbUAx1nJTuoGmmsX9Vmw55BCfRPq3v3SQuo66c8p -> ${MY_P[0]}
mirror://ipfs/ipfs/QmUe7zL7umztdNrmoNSMB6EFX4WHJWJfzxuCcqn1ZM7PhP -> ${MY_P[1]}"
LICENSE="ut2003"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="mirror strip"
DEPEND="app-arch/p7zip"
RDEPEND="!games-server/ut2004-ded
=virtual/libstdc++-3.3
games-fps/ut2004-bonuspack-ece
games-fps/ut2004-bonuspack-mega
games-fps/ut2004-data
media-libs/libsdl
media-libs/openal
sys-libs/glibc
virtual/opengl
x11-libs/libX11
x11-libs/libXau
x11-libs/libXdmcp
x11-libs/libXext"
S=${WORKDIR}/UT2004-Patch
dir=/opt/${PN}
# The executable pages are required #114733
QA_PREBUILT="${dir:1}/System/ut2004-bin
${dir:1}/System/ucc-bin"
src_prepare() {
default
cd "${S}"/System
# These files are owned by ut2004-bonuspack-mega
rm -f Manifest.in{i,t} Packages.md5 ucc-bin* || die
if use amd64 ; then
mv -f ut2004-bin-linux-amd64 ut2004-bin || die
else
rm -f ut2004-bin-linux-amd64 || die
fi
cd "${WORKDIR}"/ut2004-ucc-bin-09192008
if use amd64 ; then
mv -f ucc-bin-linux-amd64 "${S}"/System/ucc-bin || die
else
mv -f ucc-bin "${S}"/System/ || die
fi
}
src_install() {
insinto "${dir}"
doins -r *
fperms +x "${dir}"/System/ucc-bin
fperms +x "${dir}"/System/ut2004-bin
dosym "${ED}"/usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so
dosym "${ED}"/usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0
make_wrapper ut2004 ./ut2004 "${dir}"
make_desktop_entry ut2004 "Unreal Tournament 2004"
}
pkg_postinst() {
# Here is where we check for the existence of a cdkey...
# If we don't find one, we ask the user for it
if [[ -f ${dir}/System/cdkey ]] ; then
einfo "A cdkey file is already present in ${dir}/System"
else
ewarn "You MUST run this before playing the game:"
ewarn "emerge --config =${CATEGORY}/${PF}"
ewarn "That way you can [re]enter your cdkey."
fi
elog "Starting with 3369, the game supports render-to-texture. To enable"
elog "it, you will need the Nvidia drivers of at least version 7676 and"
elog "you should edit the following:"
elog 'Set "UseRenderTargets=True" in the "[OpenGLDrv.OpenGLRenderDevice]"'
elog 'section of your UT2004.ini or Default.ini and set "bPlayerShadows=True"'
elog 'and "bBlobShadow=False" in the "[UnrealGame.UnrealPawn]" section of'
elog 'your User.ini or DefUser.ini.'
}
pkg_postrm() {
ewarn "This package leaves a cdkey file in ${dir}/System that you need"
ewarn "to remove to completely get rid of this game's files."
}
pkg_config() {
ewarn "Your CD key is NOT checked for validity here so"
ewarn "make sure you type it in correctly."
ewarn "If you CTRL+C out of this, the game will not run!"
echo
einfo "CD key format is: XXXXX-XXXXX-XXXXX-XXXXX"
while true ; do
einfo "Please enter your CD key:"
read CDKEY1
einfo "Please re-enter your CD key:"
read CDKEY2
if [[ -z ${CDKEY1} ]] || [[ -z ${CDKEY2} ]] ; then
echo "You entered a blank CD key. Try again."
else
if [[ ${CDKEY1} == ${CDKEY2} ]] ; then
echo "${CDKEY1}" | tr [:lower:] [:upper:] > "${dir}"/System/cdkey
einfo "Thank you!"
break
else
eerror "Your CD key entries do not match. Try again."
fi
fi
done
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment