blob: 4a3345f32f2a296718b793fa9ea3c89320ecf2fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
# 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-unbundling.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-riscv.patch
"${FILESDIR}"/${P}-musl.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-nofmt.patch
"${FILESDIR}"/${PN}-0.3.1_p20230126-nojson.patch
"${FILESDIR}"/${PN}-0.3.1-gentoo.patch
"${FILESDIR}"/${P}-unbundling.patch
"${FILESDIR}"/${P}-log.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}
}
|