Install this version:
emerge -a =games-fps/assaultcube-reloaded-2.18.2
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =games-fps/assaultcube-reloaded-2.18.2
Or alternatively:
emerge --autounmask-write -a =games-fps/assaultcube-reloaded-2.18.2
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 2.18.2 | 8 | ~amd64 | 0 |
# 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
virtual/opengl
X? ( x11-libs/libX11 )
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
newbin - ${PN}_client <<EOF
#!/bin/sh
cd "/usr/share/${PN}" || exit 1
"/usr/libexec/${PN}/ac_client" \
--home="\${XDG_CONFIG_HOME:-\$HOME/.config}/${PN}" \
--init="\${XDG_CONFIG_HOME:-\$HOME/.config}/${PN}/init.cfg" \
"\$@"
EOF
newbin - ${PN}_server <<EOF
#!/bin/sh
cd "/usr/share/${PN}" || exit 1
"/usr/libexec/${PN}/ac_server" "\$@"
EOF
exeinto "/usr/libexec/${PN}"
doexe ac_server ac_client
cd "${WORKDIR}/acr-${PV}" || die
insinto "/usr/share/${PN}"
doins -r bot config packages acr/packages
}
Manage flags for this package:
euse -i <flag> -p games-fps/assaultcube-reloaded |
euse -E <flag> -p games-fps/assaultcube-reloaded |
euse -D <flag> -p games-fps/assaultcube-reloaded
media-libs/libsdl media-libs/sdl-image media-libs/openal media-libs/libvorbis net-misc/curl virtual/opengl X? ( x11-libs/libX11 ) system-enet? ( net-libs/enet:= )
media-libs/libsdl media-libs/sdl-image media-libs/openal media-libs/libvorbis net-misc/curl virtual/opengl X? ( x11-libs/libX11 ) system-enet? ( net-libs/enet:= )
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | assaultcube-reloaded-2.18.2.tar.gz | 72411326 bytes | https://github.com/acreloaded/acr/archive/refs/tags/v2.18.2.tar.gz |
| DIST | assaultcube-reloaded-PR201-system-enet.patch | 3598 bytes | https://github.com/acreloaded/acr/pull/201/commits/7dad5c8a1a66ade36ca9d8612b3f0b93f6c990a4.patch |