commit: 232feb5ea0842788fe3b53d3cd5d10942ff257ba parent 4adbfee5e2bcebd55ca37326f2ca3c1ae5d539d4 Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Thu, 28 Sep 2023 01:18:38 +0200 games-fps/assaultcube-reloaded: new package, add 2.18.2Diffstat:
A | games-fps/assaultcube-reloaded/Manifest | 2 | ++ |
A | games-fps/assaultcube-reloaded/assaultcube-reloaded-2.18.2.ebuild | 73 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 75 insertions(+), 0 deletions(-)diff --git a/games-fps/assaultcube-reloaded/Manifest b/games-fps/assaultcube-reloaded/Manifest
@@ -0,0 +1,2 @@ +DIST assaultcube-reloaded-2.18.2.tar.gz 72411326 BLAKE2B fddfc8ec9659bd4a2783c30770fa734c0e6494a4657c28c69128f78d943739b0ea77e46687cd05abf74ffb5db0a21c008c4cd10ad38b93917d5702dfb3b324f6 SHA512 52ab56fe6cd5f87bbf9a41a066e7b3c581ccc70ec5fbaf2dcbd24f834bfe592311ee4ccb525959b6115866ca0a634fcea110ed9905b35ac885fdaa442d4336ec +DIST assaultcube-reloaded-PR201-system-enet.patch 3598 BLAKE2B 9772af4fcaac47a7c1ed733e606378dbff97e7a0a95f2deb7d35d2dad51b3e8f9af6d5969958cbb5f8d0fc14f827254599f95a36758bf0b69c20e730622a0248 SHA512 e42ce44679e8bfc5731f44148e4dd22928c5d87e4bb6ff4492bd7ec142569c2a2250315dc16fc4e33e4095e7217f8127d7a2741fed6d799e1ca4bc97b56b9cb0diff --git a/games-fps/assaultcube-reloaded/assaultcube-reloaded-2.18.2.ebuild b/games-fps/assaultcube-reloaded/assaultcube-reloaded-2.18.2.ebuild
@@ -0,0 +1,73 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic + +DESCRIPTION="AssaultCube Reloaded" +HOMEPAGE="https://acr.victorz.ca/" +SRC_URI=" + https://github.com/acreloaded/acr/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/acreloaded/acr/pull/201/commits/7dad5c8a1a66ade36ca9d8612b3f0b93f6c990a4.patch -> ${PN}-PR201-system-enet.patch +" +S="${WORKDIR}/acr-${PV}/source/src" +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64" +IUSE="system-enet +X" + +DEPEND=" + media-libs/libsdl + media-libs/sdl-image + media-libs/openal + media-libs/libvorbis + net-misc/curl + system-enet? ( net-libs/enet ) +" +RDEPEND="${DEPEND}" + +src_prepare() { + default + + # Remove windows and MacOS blobs + rm -r "${WORKDIR}/acr-${PV}/source/lib" "${WORKDIR}/acr-${PV}/bin_win32" "${WORKDIR}/acr-${PV}/source/xcode/Frameworks" || die + + if use system-enet; then + rm -r ../enet || die + eapply -p3 "${DISTDIR}/${PN}-PR201-system-enet.patch" + #sed -i \ + # -e 's;-L../enet/.libs ;;' \ + # -e 's;-I../enet/include;;' \ + # -e 's;client: libenet;client: ;' \ + # -e 's;server: libenet;server: ;' \ + # -e 's;master: libenet;master: ;' \ + # Makefile || die + fi + + sed -i 's;-lGL;-lOpenGL;' Makefile || die + + # Pulls <execinfo.h> which is glibc-specific + sed -i 's;#elif defined(linux) .*;#elif defined(__GLIBC__);' tools.cpp || die + + # Uses std::basic_string with no CPP includes + sed -i '1a#include <string>' console.h || die + + # Breaks due to features like std::clamp added in C++17 + append-cxxflags -std=c++14 + + # clipboard + if use !X; then + sed -i 's;-lX11;;' Makefile || die + sed -i \ + -e '/^#if !defined(WIN32) && !defined(__APPLE__)$/,/#endif/d' \ + -e '/^void pasteconsole/,/^}$/d' \ + -e '/struct hline/ivoid pasteconsole(char *) { }\n' \ + console.cpp || die + fi +} + +src_install() { + default + dobin ac_server ac_client +}