aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-03-29 13:13:11 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-03-29 13:20:16 +0200
commitb32b31d2c9806032a480a90e979327ee12e5a1e8 (patch)
tree9eac8a97ff5cc8ac2fff57b0b31665c6c739812e /games-fps
parentsci-libs/dart: add gtest dep for extras (diff)
downloadguru-b32b31d2c9806032a480a90e979327ee12e5a1e8.tar.gz
guru-b32b31d2c9806032a480a90e979327ee12e5a1e8.tar.bz2
guru-b32b31d2c9806032a480a90e979327ee12e5a1e8.zip
games-fps/etlegacy: initial import
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r--games-fps/etlegacy/Manifest2
-rw-r--r--games-fps/etlegacy/etlegacy-2.79.0.ebuild161
-rw-r--r--games-fps/etlegacy/files/cmake-add-DOCDIR-variable.patch39
-rw-r--r--games-fps/etlegacy/metadata.xml17
4 files changed, 219 insertions, 0 deletions
diff --git a/games-fps/etlegacy/Manifest b/games-fps/etlegacy/Manifest
new file mode 100644
index 000000000..5ace5ac2b
--- /dev/null
+++ b/games-fps/etlegacy/Manifest
@@ -0,0 +1,2 @@
+DIST et260b.x86_full.zip 275647724 BLAKE2B ea52d1859e78c6da5a16bd3598c2b649e9f79596be93fe35858a1174b0d63ef94eaecdb24b8f749d7dc39b1a70dd38557d455238cbc4b857ed7083369fe47262 SHA512 7a9639c7a67c6c058ae1c85ca1e04e74526194a8a676eaccffa1984869251cc058f0cb79b96604ec087492003d14f7f3e96c8ebe7e527959ae47d4d25645d3e1
+DIST etlegacy-2.79.0.tar.gz 15306188 BLAKE2B e659fbef7f968cf3a4fd4cc8be3e241305ac39e4cf8366af209bef589b26a7fe11e65f0759efa11344036427d8b6603a4facff3780d65bc2080c1e63b381ba86 SHA512 04891156910ccc8e67bb946d0229dde9f05fd1307404d5e9134e3e912a41540c77600872c4ef0234cb4add98b60ff7b20f2cb412a0226941521e3541d5be1a12
diff --git a/games-fps/etlegacy/etlegacy-2.79.0.ebuild b/games-fps/etlegacy/etlegacy-2.79.0.ebuild
new file mode 100644
index 000000000..d622b4659
--- /dev/null
+++ b/games-fps/etlegacy/etlegacy-2.79.0.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake unpacker xdg
+
+DESCRIPTION="Wolfenstein: Enemy Territory 2.60b compatible client/server"
+HOMEPAGE="https://www.etlegacy.com/"
+
+# We need the game files from the original enemy-territory release
+ET_RELEASE="et260b"
+SRC_URI="https://cdn.splashdamage.com/downloads/games/wet/${ET_RELEASE}.x86_full.zip"
+
+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="mirror"
+
+# TODO add debug use for CMAKE_BUILD_TYPE=debug
+
+if [[ ${PV} == "9999" ]]; then
+ LUADEPEND="lua? ( dev-lang/lua:5.2 )"
+else
+ LUADEPEND="lua? ( >=dev-lang/lua-5.1:* )"
+fi
+
+# * 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
+ virtual/jpeg:0
+ virtual/opengl
+ sys-libs/zlib:=[minizip]
+ curl? ( net-misc/curl )
+ freetype? ( media-libs/freetype )
+ gettext? ( sys-devel/gettext )
+ renderer-gles? ( media-libs/mesa[gles1] )
+ 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
+ opengl? ( ${UIDEPEND} )
+"
+
+RDEPEND="${DEPEND}"
+BDEPEND="$(unpacker_src_uri_depends)"
+
+#QA_TEXTRELS="usr/share/games/etlegacy/legacy/omni-bot/omnibot_et.so"
+
+S="${WORKDIR}/${P/_rc/rc}"
+
+PATCHES=(
+ "${FILESDIR}/cmake-add-DOCDIR-variable.patch"
+)
+
+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
+
+ insinto /usr/share/etlegacy/legacy
+ doins "${BUILD_DIR}"/legacy/ui.mp.$(uname -m).so
+
+ # Install the game files
+ insinto /usr/share/etlegacy/etmain
+ doins "${WORKDIR}"/et/etmain/pak[012].pk3
+}
diff --git a/games-fps/etlegacy/files/cmake-add-DOCDIR-variable.patch b/games-fps/etlegacy/files/cmake-add-DOCDIR-variable.patch
new file mode 100644
index 000000000..d14f9803b
--- /dev/null
+++ b/games-fps/etlegacy/files/cmake-add-DOCDIR-variable.patch
@@ -0,0 +1,39 @@
+From 00d836686675f6495dfb91564f75c60c9e88edea Mon Sep 17 00:00:00 2001
+From: Florian Schmaus <flo@geekplace.eu>
+Date: Sun, 5 Dec 2021 12:48:42 +0100
+Subject: [PATCH] cmake: add DOCDIR variable
+
+Some distributions, e.g. Gentoo, require a particular naming scheme
+for /usr/share/doc. In case of Gentoo, the package version is also
+included, so it would be for example /usr/share/doc/etlegacy-2.78.1.
+---
+ cmake/ETLInstall.cmake | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/ETLInstall.cmake b/cmake/ETLInstall.cmake
+index c0455aa9e111..5ecea9e67e59 100644
+--- a/cmake/ETLInstall.cmake
++++ b/cmake/ETLInstall.cmake
+@@ -2,6 +2,10 @@
+ # Install
+ #-----------------------------------------------------------------
+
++if(NOT DOCDIR)
++ set(DOCDIR "${INSTALL_DEFAULT_SHAREDIR}/doc/etlegacy")
++endif()
++
+ # description file - see FS_GetModList
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/description.txt"
+ DESTINATION "${INSTALL_DEFAULT_MODDIR}/${MODNAME}"
+@@ -45,7 +49,7 @@ if(UNIX AND NOT APPLE)
+ DESTINATION "${INSTALL_DEFAULT_SHAREDIR}/man/man6"
+ )
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/docs/INSTALL.txt"
+- DESTINATION "${INSTALL_DEFAULT_SHAREDIR}/doc/etlegacy"
++ DESTINATION "${DOCDIR}"
+ )
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.txt"
+ DESTINATION "${INSTALL_DEFAULT_SHAREDIR}/licenses/etlegacy"
+--
+2.32.0
+
diff --git a/games-fps/etlegacy/metadata.xml b/games-fps/etlegacy/metadata.xml
new file mode 100644
index 000000000..cc882c885
--- /dev/null
+++ b/games-fps/etlegacy/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type='person'>
+ <name>Florian Schmaus</name>
+ <email>flow@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="autoupdate">Enable autoupdate</flag>
+ <flag name="freetype">Enable freetype</flag>
+ <flag name="gettext">Enable gettext</flag>
+ <flag name="irc">Enable built-in IRC client</flag>
+ <flag name="omnibot">Built with Omnibot</flag>
+ <flag name="renderer2">Enable renderer2</flag>
+ <flag name="renderer-gles">Enable renderer-gles</flag>
+ </use>
+</pkgmetadata>