gentoo/dev-libs/dynolog/dynolog-0.3.2-r1.ebuild
Alfredo Tupone 088b2d015b
dev-libs/dynolog: require gtest also for 3.2 version
Bug: https://bugs.gentoo.org/961897
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
2025-08-23 06:59:40 +02:00

136 lines
2.9 KiB
Bash

# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Partially auto-Generated by cargo-ebuild 0.5.4-r1
EAPI=8
CRATES="
anyhow@1.0.75
atty@0.2.14
autocfg@1.1.0
bitflags@1.3.2
clap@3.2.25
clap_derive@3.2.25
clap_lex@0.2.4
hashbrown@0.12.3
heck@0.4.1
hermit-abi@0.1.19
indexmap@1.9.3
itoa@1.0.9
libc@0.2.150
once_cell@1.18.0
os_str_bytes@6.6.1
proc-macro-error@1.0.4
proc-macro-error-attr@1.0.4
proc-macro2@1.0.70
quote@1.0.33
ryu@1.0.15
serde@1.0.193
serde_derive@1.0.193
serde_json@1.0.108
strsim@0.10.0
syn@1.0.109
syn@2.0.39
termcolor@1.4.0
textwrap@0.16.0
unicode-ident@1.0.12
version_check@0.9.4
winapi@0.3.9
winapi-i686-pc-windows-gnu@0.4.0
winapi-util@0.1.6
winapi-x86_64-pc-windows-gnu@0.4.0
"
inherit cargo cmake dot-a
DcgmCommitId=ffde4e54bc7249a6039a5e6b45b395141e1217f9
DESCRIPTION="Performance monitoring daemon for heterogeneous CPU-GPU systems"
HOMEPAGE="https://github.com/facebookincubator/dynolog"
SRC_URI="https://github.com/facebookincubator/${PN}/archive/refs/tags/v${PV}.tar.gz
-> ${P}.tar.gz
https://github.com/NVIDIA/DCGM/archive/${DcgmCommitId}.tar.gz
-> ${P}_dcgm.tar.gz
${CARGO_CRATE_URIS}"
LICENSE="BSD Apache-2.0 Boost-1.0 MIT Unicode-DFS-2016 Unlicense"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
IUSE="perf-events test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-cpp/gflags
dev-cpp/glog:=
dev-libs/libfmt:=
dev-libs/pfs
"
DEPEND="
${RDEPEND}
dev-cpp/nlohmann_json:=
"
BDEPEND="dev-cpp/gtest"
# Partially rust build
QA_FLAGS_IGNORED=/usr/bin/dyno
PATCHES=(
"${FILESDIR}"/${PN}-0.3.1_p20230126-gcc13.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-unbundling.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-riscv.patch
"${FILESDIR}"/${P}-musl.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-libcxx.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-nofmt.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-nojson.patch
"${FILESDIR}"/${PN}-0.3.1-gentoo.patch
)
CMAKE_SKIP_TESTS=( "Defs.CpuSet" "KernelCollecterTest.NetworkStatsTest" )
src_prepare() {
mv "${WORKDIR}"/DCGM-${DcgmCommitId}/* third_party/DCGM/ || die
sed -i \
-e "s:__u64:ino_t:g" \
hbt/src/common/System.h \
|| die
cmake_src_prepare
cmake_comment_add_subdirectory third_party/fmt
cmake_comment_add_subdirectory third_party/gflags
cmake_comment_add_subdirectory third_party/glog
cmake_comment_add_subdirectory third_party/json
cmake_comment_add_subdirectory third_party/pfs
}
src_configure() {
lto-guarantee-fat
local mycmakeargs=(
-DBUILD_SHARED_LIBS=OFF
-DBUILD_TESTS=$(usex test)
-DUSE_JSON_GENERATED_PERF_EVENTS=$(usex perf-events)
)
cmake_src_configure
cd cli
cargo_src_configure
}
src_compile() {
cmake_src_compile
cd cli
cargo_src_compile
}
src_install() {
mkdir -p headers/dynolog/src/ipcfabric
cp dynolog/src/ipcfabric/FabricManager.h \
headers/dynolog/src/ipcfabric || die
doheader -r dynolog
einstalldocs
cd cli
cargo_src_install
strip-lto-bytecode
dobin "${BUILD_DIR}"/${PN}/src/${PN}
}