games-fps/etlegacy: add 2.83.2

Signed-off-by: Joe Kappus <joe@wt.gd>
This commit is contained in:
Joe Kappus 2025-02-28 03:35:13 -05:00
parent 116db98de6
commit 508ae2ebd5
No known key found for this signature in database
GPG Key ID: 4612DE5F4CD18C3B
2 changed files with 157 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST et260b.x86_full.zip 275647724 BLAKE2B ea52d1859e78c6da5a16bd3598c2b649e9f79596be93fe35858a1174b0d63ef94eaecdb24b8f749d7dc39b1a70dd38557d455238cbc4b857ed7083369fe47262 SHA512 7a9639c7a67c6c058ae1c85ca1e04e74526194a8a676eaccffa1984869251cc058f0cb79b96604ec087492003d14f7f3e96c8ebe7e527959ae47d4d25645d3e1
DIST etlegacy-2.82.0.tar.gz 15179026 BLAKE2B 8821fd752e0779959ee858368280fdeca1ea3d9c230d7e93a5eee8aba40522110f8fd47dba08b1244730ac83fea7385c926f973f0a43ccf07ac39c3c5f5684f1 SHA512 7ca18da3d92e12c9aba6477646f14b57e9cfbeb267c6d19661b7f2fe2331e8b0496b55001ba3f7dbf5bc253ccdfd153223ae8767a43169dcd8df250219933ceb
DIST etlegacy-2.83.2.tar.gz 15738267 BLAKE2B 7cae3c0471a9f93ab98ebc1a57383df6f9f1ff1800c38a70d9cbc4091a7c54fbe421d7a126d2a6d3425dd9f9d0aef65402c533ce9cebab930200eb1aaae4edb3 SHA512 2d4d2f27ec522690d72836b1e3b3fcb3a9f1d43887d51e46ace01ef241a604a574a8b32e47dd4d291b9396983c19a8601359575b419cb8a9d7647d066c1f9b06

View File

@ -0,0 +1,156 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake unpacker xdg
# We need the game files from the original enemy-territory release
ET_RELEASE="et260b"
DESCRIPTION="Wolfenstein: Enemy Territory 2.60b compatible client/server"
HOMEPAGE="https://www.etlegacy.com/"
SRC_URI="https://cdn.splashdamage.com/downloads/games/wet/${ET_RELEASE}.x86_full.zip"
S="${WORKDIR}/${P/_rc/rc}"
if [[ ${PV} = "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="git://github.com/${PN}/${PN}.git"
else
SRC_URI+=" https://github.com/${PN}/${PN}/archive/v${PV/_rc/rc}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-3 RTCW-ETEULA"
SLOT="0"
IUSE="autoupdate +curl dedicated +freetype +gettext ipv6 irc +lua omnibot +openal +opengl +png renderer2 renderer-gles +ssl +theora +vorbis"
#REQUIRED_USE="omnibot? ( x86 )"
RESTRICT="bindist mirror"
# TODO add debug use for CMAKE_BUILD_TYPE=debug
LUADEPEND="lua? ( >=dev-lang/lua-5.4:* )"
# * media-libs/glew | media-libs/glew:=
# * media-libs/libpng:= <
# * > media-libs/libogg
# * media-libs/openal <
# * sys-devel/gettext <
UIDEPEND="
media-libs/glew:=
media-libs/libsdl2[sound,video,X]
media-libs/libogg
media-libs/libjpeg-turbo:0
virtual/opengl
sys-libs/zlib:=[minizip]
curl? ( net-misc/curl )
freetype? ( media-libs/freetype )
gettext? ( sys-devel/gettext )
renderer-gles? ( media-libs/mesa[opengl] )
openal? ( media-libs/openal )
png? ( media-libs/libpng:0= )
ssl? ( dev-libs/openssl:0= )
theora? ( media-libs/libtheora )
vorbis? ( media-libs/libvorbis )
${LUADEPEND}
"
DEPEND="
dev-db/sqlite:3
dev-libs/cJSON
opengl? ( ${UIDEPEND} )
"
RDEPEND="${DEPEND}"
BDEPEND="$(unpacker_src_uri_depends)"
#QA_TEXTRELS="usr/share/games/etlegacy/legacy/omni-bot/omnibot_et.so"
src_unpack() {
if [[ "${PV}" = 9999 ]] ; then
git-r3_src_unpack
else
default
fi
mkdir et && cd et || die
unzip "${DISTDIR}"/${ET_RELEASE}.x86_full.zip
unpack_makeself ${ET_RELEASE}.x86_keygen_V03.run
}
src_prepare() {
cmake_src_prepare
# if [[ "${PV}" != 9999 ]] ; then
# sed -e "/^set(ETLEGACY_VERSION_MINOR/s@[[:digit:]]\+@$(ver_cut 2)@" \
# -i cmake/ETLVersion.cmake || die
# fi
sed -e 's@[-_]dirty@@' -i cmake/ETLVersion.cmake || die
}
src_configure() {
mycmakeargs=(
# path and build type
#-DCMAKE_BUILD_TYPE="Release"
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
-DINSTALL_DEFAULT_BASEDIR="/usr/share/${PN}"
-DINSTALL_DEFAULT_BINDIR="/usr/bin"
-DINSTALL_DEFAULT_MODDIR="/usr/share/${PN}"
-DCMAKE_LIBRARY_PATH="/usr/$(get_libdir)"
-DCMAKE_INCLUDE_PATH="/usr/include"
-DDOCDIR="${EPREFIX}/usr/share/doc/${PF}"
-DCROSS_COMPILE32="0"
# what to build
-DBUILD_CLIENT="$(usex opengl)"
-DBUILD_MOD="1"
-DBUILD_MOD_PK3="1"
-DBUILD_SERVER="$(usex dedicated)"
# no bundled libs
-DBUNDLED_LIBS="0"
-DBUNDLED_LIBS_DEFAULT="0"
#-DBUNDLED_SDL="0"
#-DBUNDLED_CURL="0"
#-DBUNDLED_JPEG="0"
#-DBUNDLED_LUA="0"
#-DBUNDLED_OGG_VORBIS="0"
#-DBUNDLED_GLEW="0"
#-DBUNDLED_FREETYPE="0"
# features
-DFEATURE_CURL="$(usex curl)"
-DFEATURE_SSL="$(usex ssl)"
-DFEATURE_OGG_VORBIS="$(usex vorbis)"
-DFEATURE_THEORA="$(usex theora)"
-DFEATURE_OPENAL="$(usex openal)"
-DFEATURE_FREETYPE="$(usex freetype)"
-DFEATURE_PNG="$(usex png)"
-DFEATURE_LUA="$(usex lua)"
-DFEATURE_IRC_CLIENT="$(usex irc)"
-DFEATURE_IPV6="$(usex ipv6)"
-DFEATURE_GETTEXT="$(usex gettext)"
-DFEATURE_ANTICHEAT="1"
-DFEATURE_AUTOUPDATE="$(usex autoupdate)"
# renderers
-DFEATURE_RENDERER2="$(usex renderer2 ON OFF)"
-DFEATURE_RENDERER_GLES="$(usex renderer-gles)"
-DFEATURE_OMNIBOT="$(usex omnibot)"
-DINSTALL_OMNIBOT="$(usex omnibot)"
-DINSTALL_GEOIP="0"
-DINSTALL_WOLFADMIN="0"
)
cmake_src_configure
}
src_install() {
cmake_src_install
local arch=$(uname -m || die "Failed to detect architecture")
insinto /usr/share/etlegacy/legacy
doins "${BUILD_DIR}"/legacy/ui.mp.${arch}.so
# Install the game files
insinto /usr/share/etlegacy/etmain
doins "${WORKDIR}"/et/etmain/pak[012].pk3
}