summaryrefslogtreecommitdiff
path: root/games-fps/ut2004
diff options
context:
space:
mode:
Diffstat (limited to 'games-fps/ut2004')
-rw-r--r--games-fps/ut2004/Manifest4
-rw-r--r--games-fps/ut2004/files/ut2004-ded.confd6
-rw-r--r--games-fps/ut2004/files/ut2004-ded.initd13
-rw-r--r--games-fps/ut2004/ut2004-3369.3-r1.ebuild140
-rw-r--r--games-fps/ut2004/ut2004-3369.3-r2.ebuild124
5 files changed, 146 insertions, 141 deletions
diff --git a/games-fps/ut2004/Manifest b/games-fps/ut2004/Manifest
index 03d6b8dda77f..4de8f70355bc 100644
--- a/games-fps/ut2004/Manifest
+++ b/games-fps/ut2004/Manifest
@@ -1,4 +1,6 @@
+AUX ut2004-ded.confd 175 BLAKE2B 7384ec15a4dd1ea03ddf06068032a69d32a8bfb7536bbfc5ea91ef369ee2668c1f3c9c66d249d6b24dec60dfe22fe4a91522e5a6958e75df568d132f062eb6d8 SHA512 96bf28c03faf04736f9447e3e6c549e5ec77e477683f805847b53f0ae2b5280863876fd49c787d63d4f3d2019b9379d3fa4573c32f4ebf3be636b0a272321a93
+AUX ut2004-ded.initd 320 BLAKE2B 34e3fdf38eb9e5bc2623581c73fea3af040f9dca829c8c46d649b5124472989931278a93c5a2a52acc2faf7c53df74dfaf772a35e52d127b357097070e3c3c12 SHA512 a307105dc110ec1009eabfe61777b33ad89c9e22cebc199ab7e990e9b170b97ab8e176865e62ebed40f4a80f7e5ddee6f248a1e73f25bac1a61c32f0c90a126d
DIST ut2004-lnxpatch3369-2.tar.bz2 22465217 BLAKE2B 9852f9d55804b7f2927a31be86aee1552aaebeb38d2a40fb206154c236e9d6eff47f7594024c0d9b25c7216d3ca62571b1f89f23f72ee9e135b2e6451bcb006a SHA512 0d6f26d5a811efd64be8c304e928e03f546d9a8eaba6b074843e2b7e76e0670b39df95200a2fe2040d72bbd204c7157ed0115649a5c85396a76d9e0b7ec284b1
DIST ut2004-v3369-3-linux-dedicated.7z 5013927 BLAKE2B 72d24d7bc37c777f3697b767a03e052ad9b547005dd6da73833e439496e87a9c1ebbe01f88d62b29a41b2bf6380a3b3bd745e6883fbb6d0f2b7e52998d4af276 SHA512 3b2a7b64934a3647c02c9fec48565c5c2c35370d635b2af4059eb76587bfa13f46e6a4e14fdb0494ba7a4182497ed5963601986f4fcfa318e69a8a8a8c0178cf
-EBUILD ut2004-3369.3-r1.ebuild 3952 BLAKE2B 36a6f69cd43754cfc961ea72916c8cdcdb7f9e21410d8e2f0180a0594f67982f4e91bc518a049d3f47fa3a880304f091bbfb7c74bcb9c69ab0d85ebb5198fcd8 SHA512 b14f5efb5d101948d049122a663df3dadec37bf2a05475427a145fe3eb483ba272e8f07505ec0e5342997b0c0d7bb8f1f51affb4971100ccea4866b5e92261a8
+EBUILD ut2004-3369.3-r2.ebuild 3593 BLAKE2B 97af1ebfaa24333d94348b7c31ca8f8cf99852fb0256abd417ccdb65e828efd657662f2a18d62c74177c41eaf3a6d241d109e4deef4b1063a64d36d12c5c8859 SHA512 c41289fd46d31382804251be538031c024cf4c64aa80f4b196fbffe7549879a5c9f77753ef88183852791a8a860c65cb3743ecfb5a4f4a45171d0fe9a58c05ef
MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-fps/ut2004/files/ut2004-ded.confd b/games-fps/ut2004/files/ut2004-ded.confd
new file mode 100644
index 000000000000..e82238b93de0
--- /dev/null
+++ b/games-fps/ut2004/files/ut2004-ded.confd
@@ -0,0 +1,6 @@
+# User and group the server should run as.
+ut2004_ded_user="nobody"
+ut2004_ded_group="nobody"
+
+# Any extra options you want to pass to the server.
+ut2004_ded_opts="DM-Deck17"
diff --git a/games-fps/ut2004/files/ut2004-ded.initd b/games-fps/ut2004/files/ut2004-ded.initd
new file mode 100644
index 000000000000..c4cf9810cd15
--- /dev/null
+++ b/games-fps/ut2004/files/ut2004-ded.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/var/run/${RC_SVCNAME}.pid"
+command_background="true"
+command_user="${ut2004_ded_user}:${ut2004_ded_group}"
+command="ut2004-ded"
+command_args="${ut2004_ded_opts}"
+
+depend() {
+ need net
+}
diff --git a/games-fps/ut2004/ut2004-3369.3-r1.ebuild b/games-fps/ut2004/ut2004-3369.3-r1.ebuild
deleted file mode 100644
index 1daedb39a999..000000000000
--- a/games-fps/ut2004/ut2004-3369.3-r1.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils multilib games
-
-MY_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
-DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter"
-HOMEPAGE="http://www.unrealtournament2004.com/"
-SRC_URI="
- http://treefort.icculus.org/${PN}/${MY_P}
- http://storage.guntoo.de/downs/downloads/Patch/ut2004-v${PV/./-}-linux-dedicated.7z
- mirror://gentoo/ut2004-v${PV/./-}-linux-dedicated.7z"
-
-LICENSE="ut2003"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="dedicated opengl"
-RESTRICT="bindist mirror strip"
-
-UIDEPEND="=virtual/libstdc++-3.3
- virtual/opengl
- x11-libs/libXext
- x11-libs/libX11
- x11-libs/libXau
- x11-libs/libXdmcp
- media-libs/libsdl
- media-libs/openal"
-RDEPEND="sys-libs/glibc
- games-fps/ut2004-data
- games-fps/ut2004-bonuspack-ece
- games-fps/ut2004-bonuspack-mega
- dedicated? ( !games-server/ut2004-ded )
- opengl? ( ${UIDEPEND} )
- !dedicated? ( !opengl? ( ${UIDEPEND} ) )"
-DEPEND="app-arch/p7zip"
-
-S=${WORKDIR}/UT2004-Patch
-dir=${GAMES_PREFIX_OPT}/${PN}
-
-# The executable pages are required #114733
-QA_PREBUILT="${dir:1}/System/ut2004-bin
- ${dir:1}/System/ucc-bin"
-
-src_prepare() {
- 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
-
- if use dedicated && ! use opengl ; then
- rm -f "${S}"/System/ut2004-bin || die
- fi
-}
-
-src_install() {
- insinto "${dir}"
- doins -r *
- fperms +x "${dir}"/System/ucc-bin
-
- if use opengl || ! use dedicated ; then
- fperms +x "${dir}"/System/ut2004-bin
-
- dosym /usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so
- dosym /usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0
-
- games_make_wrapper ut2004 ./ut2004 "${dir}" "${dir}"
- make_desktop_entry ut2004 "Unreal Tournament 2004"
- fi
-
- if use dedicated ; then
- games_make_wrapper ut2004-ded "./ucc-bin server" "${dir}"/System
- fi
-
- prepgamesdirs
-}
-
-pkg_postinst() {
- games_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
-}
diff --git a/games-fps/ut2004/ut2004-3369.3-r2.ebuild b/games-fps/ut2004/ut2004-3369.3-r2.ebuild
new file mode 100644
index 000000000000..77ba2877605a
--- /dev/null
+++ b/games-fps/ut2004/ut2004-3369.3-r2.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop eutils
+
+PATCH_P="${PN}-lnxpatch${PV%.*}-2.tar.bz2"
+DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter"
+HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
+SRC_URI="
+ https://ut2004.ut-files.com/Patches/Linux/${PATCH_P}
+ https://dev.gentoo.org/~chewi/distfiles/ut2004-v${PV/./-}-linux-dedicated.7z
+"
+
+LICENSE="ut2003"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="bindist mirror strip"
+
+RDEPEND="
+ !games-server/ut2004-ded
+ games-fps/ut2004-bonuspack-ece
+ games-fps/ut2004-bonuspack-mega
+ >=games-fps/ut2004-data-3186-r5
+ media-libs/libsdl
+ media-libs/openal
+ sys-libs/glibc
+ ~virtual/libstdc++-3.3
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+"
+
+BDEPEND="app-arch/p7zip"
+
+S="${WORKDIR}/${PN^^}-Patch"
+DIR="/opt/${PN}"
+
+# The executable pages are required. Bug #114733.
+QA_PREBUILT="*"
+
+src_prepare() {
+ default
+
+ if use amd64; then
+ mv System/${PN}-bin{-linux-amd64,} || die
+ mv ../${PN}-ucc-bin-09192008/ucc-bin-linux-amd64 System/ucc-bin || die
+ else
+ rm System/${PN}-bin-linux-amd64 || die
+ mv ../${PN}-ucc-bin-09192008/ucc-bin System/ucc-bin || die
+ fi
+
+ # In ut2004-bonuspack-mega.
+ rm System/{Manifest.in[it],Packages.md5} || die
+}
+
+src_install() {
+ insinto "${DIR}"
+ doins -r .
+ fperms +x "${DIR}"/System/{ucc,${PN}}-bin
+
+ dosym ../../../usr/$(get_libdir)/libopenal.so "${DIR}"/System/openal.so
+ dosym ../../../usr/$(get_libdir)/libSDL-1.2.so.0 "${DIR}"/System/libSDL-1.2.so.0
+
+ make_wrapper ${PN} ./${PN}-bin "${DIR}"/System "${DIR}"
+ make_wrapper ${PN}-ded "./ucc-bin server" "${DIR}"/System
+
+ make_desktop_entry ${PN} "Unreal Tournament 2004"
+
+ newconfd "${FILESDIR}"/${PN}-ded.confd ${PN}-ded
+ newinitd "${FILESDIR}"/${PN}-ded.initd ${PN}-ded
+}
+
+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 "${EROOT}${DIR}"/System/cdkey ]] ; then
+ einfo "A cdkey file is already present in ${EPREFIX}${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 ${EROOT}${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!"
+ ewarn
+ 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^^}" > "${EROOT}${DIR}"/System/cdkey || die
+ einfo "Thank you!"
+ break
+ else
+ eerror "Your CD key entries do not match. Try again."
+ fi
+ fi
+ done
+}