repo/gentoo:master commit in: games-fps/unreal-tournament/, games-fps/unreal-tournament/files/
"James Le Cuirot" <[email protected]> Mon, 03 Aug 2026 22:29:15 +0000 (UTC)
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1785796113.0f7bd620431160dff13fb9e145f3f3696c80f776.chewi@gentoo> |
commit: 0f7bd620431160dff13fb9e145f3f3696c80f776
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 30 22:15:06 2026 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Aug 3 22:28:33 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f7bd620
games-fps/unreal-tournament: Restore dead package with new OldUnreal 469e build
These new builds now support amd64 and arm64. 32-bit x86 is still supported.
Unlike the old package, this one only covers the engine. A new package has been
created for the data.
Bug: https://bugs.gentoo.org/134156
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
games-fps/unreal-tournament/Manifest | 4 +
.../files/unreal-tournament-ded.confd | 6 +
.../files/unreal-tournament-ded.initd | 13 +++
.../files/unreal-tournament-wasd.patch | 35 ++++++
games-fps/unreal-tournament/files/wrapper.sh | 20 ++++
games-fps/unreal-tournament/metadata.xml | 11 ++
.../unreal-tournament-469e.ebuild | 122 +++++++++++++++++++++
7 files changed, 211 insertions(+)
diff --git a/games-fps/unreal-tournament/Manifest b/games-fps/unreal-tournament/Manifest
new file mode 100644
index 000000000000..fe32dbcf430a
--- /dev/null
+++ b/games-fps/unreal-tournament/Manifest
@@ -0,0 +1,4 @@
+DIST OldUnreal-UTPatch469e-Linux-amd64.tar.bz2 75316202 BLAKE2B e8d64e9a80e542c7a6215b9752bb10c2d5279160f96d3a8bc2327911c1a398ed01e30a635292ed466e936c493773d4592a8831c7520300e1d0ae399f04d479f8 SHA512 bd0875a06d6df2ac35bf3edc42f4b8cc16564aa1b8a57668d4c63cf6602ab697dc238b7f4d320f08a30d68ca4cdd0135f9cb24e27364918eef895b97ff43c14e
+DIST OldUnreal-UTPatch469e-Linux-arm64.tar.bz2 74481975 BLAKE2B 810bd74cfe464136d86dff5d1297a1f9f36ab3950c8a6da3710af7d2fe4ccc952a7a18df19d3c840248c095470c4d6bc9628addcbc21b9718deb368002eca75c SHA512 4357c714f37250a514fbfd8669bed54712a7ad1f0d798e6efea2b51757eba1d67d67f64e9004cdc788e63c30f4139737aa1806192c311d2825291d21d5f507b8
+DIST OldUnreal-UTPatch469e-Linux-x86.tar.bz2 74791363 BLAKE2B 24cfb57a5cd6801abecfd7da108d36862ead378040d7a2d0808024e736a21dfa63c300e770efbbdca7e993401f3019cca60f5ee4460c5ce430fb531fd32d5a6a SHA512 1db5eff6926ec811a31cc3a551c41f2b7fcefe041fd6b6f81841d8d79bcc1149d29f74aaf9622c1a9a7a5cc13549b4699f9830067e3dd941466a644af5544f6a
+DIST unreal-tournament.png 24699 BLAKE2B 23845c5076c3a2146bbcc6718a3461f7e8acb08abea1e93ccd80668efd1ab5e96a10a72b7217ce5a30056dabba1fb515bec391389842ac950d18461d2d440096 SHA512 773723ea0a2589562a5a66615a16446cd9d72f6ff65fc879e93b068d9c41bf108d015a5de1911b64f4c28e358dc7f04abfaf71dce3939a303ef711e724ddc582
diff --git a/games-fps/unreal-tournament/files/unreal-tournament-ded.confd b/games-fps/unreal-tournament/files/unreal-tournament-ded.confd
new file mode 100644
index 000000000000..43b07365be1b
--- /dev/null
+++ b/games-fps/unreal-tournament/files/unreal-tournament-ded.confd
@@ -0,0 +1,6 @@
+# User and group the server should run as. A valid HOME is required.
+ut_ded_user="unreal"
+ut_ded_group="unreal"
+
+# Any extra options you want to pass to the server.
+ut_ded_opts="DM-Deck16]["
diff --git a/games-fps/unreal-tournament/files/unreal-tournament-ded.initd b/games-fps/unreal-tournament/files/unreal-tournament-ded.initd
new file mode 100644
index 000000000000..a6434c5f1f54
--- /dev/null
+++ b/games-fps/unreal-tournament/files/unreal-tournament-ded.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/var/run/${RC_SVCNAME}.pid"
+command_background="true"
+command_user="${ut_ded_user}:${ut_ded_group}"
+command="unreal-tournament-ucc"
+command_args="server ${ut_ded_opts}"
+
+depend() {
+ need net
+}
diff --git a/games-fps/unreal-tournament/files/unreal-tournament-wasd.patch b/games-fps/unreal-tournament/files/unreal-tournament-wasd.patch
new file mode 100644
index 000000000000..48d5a9b04508
--- /dev/null
+++ b/games-fps/unreal-tournament/files/unreal-tournament-wasd.patch
@@ -0,0 +1,35 @@
+It's not 1999 anymore. Let's make WASD work out of the box. Apologies to AZERTY
+users, but I didn't want to change the binding for Q (Translocator).
+
+--- System/DefUser.ini
++++ System/DefUser.ini
+@@ -81,7 +81,7 @@
+ L=Taunt wave
+ M=Look
+ O=
+-S=Axis aUp Speed=+300.0
++S=MoveBackward
+ T=Talk
+ Z=Strafe
+ F1=ShowScores
+@@ -117,9 +117,9 @@
+ Execute=
+ PrintScrn=
+ Help=
+-A=
++A=StrafeLeft
+ B=
+-D=
++D=StrafeRight
+ E=
+ f=Feigndeath
+ H=Taunt Thrust
+@@ -132,7 +132,7 @@
+ R=TeamTalk
+ U=
+ V=
+-W=
++W=MoveForward
+ X=
+ NumPad0=ViewPlayerNum 0
+ NumPad1=ViewPlayerNum 1
diff --git a/games-fps/unreal-tournament/files/wrapper.sh b/games-fps/unreal-tournament/files/wrapper.sh
new file mode 100644
index 000000000000..96ac802415ac
--- /dev/null
+++ b/games-fps/unreal-tournament/files/wrapper.sh
@@ -0,0 +1,20 @@
+#!/bin/bash -eu
+
+System="@EPREFIX@/opt/unreal-tournament/@System@"
+MyIni="${HOME}"/.utpg/System/UnrealTournament.ini
+GameRenderDevice="@GameRenderDevice@"
+
+mkdir -p "${HOME}"/.utpg/System
+cp --update=none "${System}/Default.ini" "${MyIni}"
+
+[[ -n ${GameRenderDevice} ]] &&
+ sed -i "/^\[Engine\.Engine\]/,/^\[/s:^GameRenderDevice=.*:GameRenderDevice=${GameRenderDevice}:" "${MyIni}"
+
+lang=${LC_MESSAGES:-${LC_ALL:-${LANG:-in}}}
+[[ ${lang} == en* ]] && lang=in
+sed -i "/^\[Engine\.Engine\]/,/^\[/s:^Language=.*:Language=${lang:0:2}t:" "${MyIni}"
+
+exe=${0##*/}
+exe=${exe#unreal-tournament}
+exe=${exe#-}
+exec "${System}/${exe:-ut}-bin" "${@}"
diff --git a/games-fps/unreal-tournament/metadata.xml b/games-fps/unreal-tournament/metadata.xml
new file mode 100644
index 000000000000..abeac5c4f3a1
--- /dev/null
+++ b/games-fps/unreal-tournament/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>[email protected]</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">OldUnreal/UnrealTournamentPatches</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-fps/unreal-tournament/unreal-tournament-469e.ebuild b/games-fps/unreal-tournament/unreal-tournament-469e.ebuild
new file mode 100644
index 000000000000..326dc8d77277
--- /dev/null
+++ b/games-fps/unreal-tournament/unreal-tournament-469e.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop xdg
+
+DESCRIPTION="Modern build of the Unreal Tournament (99) engine"
+HOMEPAGE="https://www.oldunreal.com/downloads/unrealtournament/oldunreal-patches-for-unrealtournament-version-469/"
+SRC_URI="
+ amd64? ( https://github.com/OldUnreal/UnrealTournamentPatches/releases/download/v${PV}/OldUnreal-UTPatch${PV}-Linux-amd64.tar.bz2 )
+ arm64? ( https://github.com/OldUnreal/UnrealTournamentPatches/releases/download/v${PV}/OldUnreal-UTPatch${PV}-Linux-arm64.tar.bz2 )
+ x86? ( https://github.com/OldUnreal/UnrealTournamentPatches/releases/download/v${PV}/OldUnreal-UTPatch${PV}-Linux-x86.tar.bz2 )
+ mirror+https://dev.gentoo.org/~chewi/distfiles/${PN}.png
+"
+S="${WORKDIR}"
+
+LICENSE="Epic-TOS Apache-2.0 BSD BSD-2 libpng2 MIT OFL-1.1 ZLIB" # See LICENSE.md
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm64 ~x86"
+IUSE="dedicated l10n_ca l10n_de l10n_el l10n_es l10n_fr l10n_it l10n_nl l10n_pt l10n_ru opengl vulkan"
+RESTRICT="bindist mirror strip"
+
+UT_DEPEND="games-fps/unreal-tournament-data-436_p4"
+
+BDEPEND="
+ dev-util/patchelf
+"
+RDEPEND="
+ media-libs/libsdl2[opengl,video]
+ media-libs/libsndfile
+ media-libs/libxmp
+ media-libs/openal
+ media-sound/mpg123-base
+ dedicated? ( acct-user/unreal )
+ opengl? ( media-libs/libglvnd )
+ vulkan? ( media-libs/vulkan-loader )
+"
+PDEPEND="
+ >=${UT_DEPEND}
+"
+
+DIR="/opt/${PN}"
+QA_PREBUILT="*"
+
+declare -gA SYSTEMS=(
+ [amd64]="64"
+ [arm64]="ARM64"
+ [x86]=""
+)
+
+src_prepare() {
+ declare -g System="System${SYSTEMS[${ARCH}]}"
+ default
+
+ # Fix NEEDED entry for libmpg123.
+ # https://github.com/OldUnreal/UnrealTournamentPatches/issues/2053
+ patchelf --replace-needed libmpg123.so{,.0} "${System}"/ALAudio.so || die
+
+ # Remove bundled libraries. SDL2_ttf doesn't seem to be used at all.
+ # https://github.com/OldUnreal/UnrealTournamentPatches/issues/2052
+ rm -v "${System}"/lib{mpg123,sndfile,xmp}.so* || die
+ use arm64 || { rm -v "${System}"/libSDL2*.so* || die; }
+
+ # Make WASD work out of the box.
+ patch -p0 "${System}"/DefUser.ini "${FILESDIR}"/${PN}-wasd.patch || die
+
+ # Drop unwanted localisation files.
+ local dir lang
+ for dir in SystemLocalized/*; do
+ lang=${dir#*/}
+ lang=${lang:0:2}
+ [[ ${lang} == in ]] && continue
+ [[ ${lang} == ct ]] && lang=ca # Catalan
+ use "l10n_${lang}" || rm -rv "${dir}" || die
+ done
+}
+
+src_configure() {
+ if use vulkan; then
+ declare -g GameRenderDevice="VulkanDrv.VulkanRenderDevice"
+ elif use opengl; then
+ # XOpenGLDrv.XOpenGLRenderDevice is broken right now.
+ # https://github.com/OldUnreal/UnrealTournamentPatches/issues/1970
+ declare -g GameRenderDevice="OpenGLDrv.OpenGLRenderDevice"
+ else
+ unset GameRenderDevice
+ fi
+
+ if [[ -n ${GameRenderDevice} ]]; then
+ einfo "Enforcing the ${GameRenderDevice} renderer."
+ else
+ einfo "Not enforcing the renderer. Change the USE flags to enforce it."
+ fi
+}
+
+src_install() {
+ insinto "${DIR}"
+ doins -r */
+
+ local exes=( "${System}"/{*-bin,*.so*} )
+ fperms a+x "${exes[@]/#/${DIR}/}"
+
+ sed \
+ -e "s:@EPREFIX@:${EPREFIX}:g" \
+ -e "s:@System@:${System}:g" \
+ -e "s:@GameRenderDevice@:${GameRenderDevice}:g" \
+ "${FILESDIR}/wrapper.sh" | newbin - ${PN}
+
+ dosym ${PN} /usr/bin/${PN}-ucc
+
+ doicon -s 128 "${DISTDIR}/${PN}.png"
+ make_desktop_entry --eapi9 ${PN} -n "Unreal Tournament" \
+ -C "Epic's popular first-person shooter"
+
+ if use dedicated; then
+ newconfd "${FILESDIR}"/${PN}-ded.confd ${PN}-ded
+ newinitd "${FILESDIR}"/${PN}-ded.initd ${PN}-ded
+ fi
+
+ dodoc ReleaseNotes.md
+}