Install this version:
emerge -a =app-admin/ananicy-cpp-1.1.1
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =app-admin/ananicy-cpp-1.1.1
Or alternatively:
emerge --autounmask-write -a =app-admin/ananicy-cpp-1.1.1
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 1.1.1 | 8 | ~amd64 | 0 |
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Ananicy rewritten in C++ for much lower CPU and memory usage"
HOMEPAGE="https://gitlab.com/ananicy-cpp/ananicy-cpp"
SRC_URI="https://gitlab.com/ananicy-cpp/ananicy-cpp/-/archive/v${PV}/${PN}-v${PV}.tar.bz2"
S="${WORKDIR}/${PN}-v${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="bpf clang systemd"
REQUIRED_USE="
bpf? ( clang )
"
RDEPEND="
!app-admin/ananicy
>=dev-cpp/nlohmann_json-3.9
>=dev-libs/libfmt-8:=
>=dev-libs/spdlog-1.9:=
bpf? (
dev-libs/elfutils
dev-libs/libbpf
dev-util/bpftool
)
systemd? ( sys-apps/systemd:= )
"
DEPEND="
>=dev-build/cmake-3.17
clang? ( >=llvm-core/clang-10 )
${RDEPEND}
"
PATCHES=(
"${FILESDIR}/${P}-remove-debug-flags.patch"
"${FILESDIR}/${P}-clang-19.patch"
"${FILESDIR}/${P}-glibc-2.41.patch"
)
pkg_setup() {
if use bpf ; then
CONFIG_CHECK+="~BPF ~BPF_EVENTS ~BPF_SYSCALL ~HAVE_EBPF_JIT"
fi
}
src_configure() {
local mycmakeargs=(
-DENABLE_SYSTEMD=$(usex systemd)
-DUSE_BPF_PROC_IMPL=$(usex bpf)
-DUSE_EXTERNAL_FMTLIB=ON
-DUSE_EXTERNAL_JSON=ON
-DUSE_EXTERNAL_SPDLOG=ON
-DVERSION=${PV}
)
if use clang; then
local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
[[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
[[ -z ${version_clang} ]] && die "Failed to read clang version!"
CC=${CHOST}-clang-${version_clang}
CXX=${CHOST}-clang++-${version_clang}
if use bpf ; then
mycmakeargs+=( -DBPF_BUILD_LIBBPF=OFF )
fi
fi
cmake_src_configure
}
src_install() {
cmake_src_install
if ! use systemd ; then
doinitd "${FILESDIR}/${PN}.initd"
fi
keepdir /etc/ananicy.d
}
Manage flags for this package:
euse -i <flag> -p app-admin/ananicy-cpp |
euse -E <flag> -p app-admin/ananicy-cpp |
euse -D <flag> -p app-admin/ananicy-cpp
>=dev-build/cmake-3.17 clang? ( >=llvm-core/clang-10 ) !app-admin/ananicy >=dev-cpp/nlohmann_json-3.9 >=dev-libs/libfmt-8:= >=dev-libs/spdlog-1.9:= bpf? ( dev-libs/elfutils dev-libs/libbpf dev-util/bpftool ) systemd? ( sys-apps/systemd:= )
!app-admin/ananicy >=dev-cpp/nlohmann_json-3.9 >=dev-libs/libfmt-8:= >=dev-libs/spdlog-1.9:= bpf? ( dev-libs/elfutils dev-libs/libbpf dev-util/bpftool ) systemd? ( sys-apps/systemd:= )
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | ananicy-cpp-v1.1.1.tar.bz2 | 326329 bytes | https://gitlab.com/ananicy-cpp/ananicy-cpp/-/archive/v1.1.1/ananicy-cpp-v1.1.1.tar.bz2 |