# Copyright 2017-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.13.2

EAPI=8

CRATES="
	adler@1.0.2
	aho-corasick@1.0.1
	android_system_properties@0.1.5
	ansi_term@0.12.1
	anstream@0.3.0
	anstyle-parse@0.2.0
	anstyle-query@1.0.0
	anstyle-wincon@1.0.0
	anstyle@1.0.0
	async-channel@1.8.0
	atty@0.2.14
	autocfg@1.1.0
	base64@0.13.1
	bit_field@0.10.2
	bitflags@1.3.2
	bitflags@2.5.0
	bumpalo@3.12.0
	byteorder@1.4.3
	bytes@1.4.0
	castaway@0.1.2
	cc@1.0.79
	cfg-if@1.0.0
	cfg_aliases@0.1.1
	chrono@0.4.24
	clap@4.2.4
	clap_builder@4.2.4
	clap_derive@4.2.0
	clap_lex@0.4.1
	codespan-reporting@0.11.1
	colorchoice@1.0.0
	colored@2.0.0
	concurrent-queue@2.2.0
	core-foundation-sys@0.8.4
	core_affinity@0.8.1
	crc32fast@1.3.2
	crossbeam-channel@0.5.8
	crossbeam-deque@0.8.3
	crossbeam-epoch@0.9.14
	crossbeam-utils@0.8.15
	ctrlc@3.4.4
	curl-sys@0.4.61+curl-8.0.1
	curl@0.4.44
	cxx-build@1.0.94
	cxx@1.0.94
	cxxbridge-flags@1.0.94
	cxxbridge-macro@1.0.94
	dirs-sys@0.3.7
	dirs@3.0.2
	docker-sync@0.1.2
	docopt@1.1.1
	either@1.8.1
	encoding_rs@0.8.32
	errno-dragonfly@0.1.2
	errno@0.3.1
	event-listener@2.5.3
	fastrand@1.9.0
	flate2@1.0.25
	fnv@1.0.7
	foreign-types-shared@0.1.1
	foreign-types@0.3.2
	form_urlencoded@1.1.0
	futures-channel@0.3.28
	futures-core@0.3.28
	futures-io@0.3.28
	futures-lite@1.13.0
	futures-sink@0.3.28
	futures-task@0.3.28
	futures-util@0.3.28
	getrandom@0.2.9
	h2@0.3.18
	hashbrown@0.12.3
	heck@0.4.1
	hermit-abi@0.1.19
	hermit-abi@0.2.6
	hermit-abi@0.3.1
	hex@0.4.3
	hostname@0.3.1
	http-body@0.4.5
	http@0.2.9
	httparse@1.8.0
	httpdate@1.0.2
	hyper@0.14.26
	iana-time-zone-haiku@0.1.1
	iana-time-zone@0.1.56
	idna@0.3.0
	indexmap@1.9.3
	instant@0.1.12
	io-lifetimes@1.0.10
	is-terminal@0.4.7
	isahc@1.7.2
	itoa@1.0.6
	js-sys@0.3.61
	k8s-openapi@0.13.1
	k8s-sync@0.2.3
	lazy_static@1.4.0
	libc@0.2.153
	libnghttp2-sys@0.1.7+1.45.0
	libz-sys@1.1.8
	link-cplusplus@1.0.8
	linked-hash-map@0.5.6
	linux-raw-sys@0.1.4
	linux-raw-sys@0.3.3
	lock_api@0.4.9
	log@0.4.17
	loggerv@0.7.2
	match_cfg@0.1.0
	memchr@2.5.0
	memoffset@0.8.0
	mime@0.3.17
	miniz_oxide@0.6.2
	mio@0.8.6
	nix@0.28.0
	ntapi@0.4.1
	num-integer@0.1.45
	num-traits@0.2.15
	num_cpus@1.15.0
	once_cell@1.17.1
	openssl-macros@0.1.1
	openssl-probe@0.1.5
	openssl-sys@0.9.86
	openssl@0.10.51
	ordered-float@2.10.0
	parking@2.1.0
	parking_lot@0.12.1
	parking_lot_core@0.9.7
	percent-encoding@2.2.0
	pin-project-internal@1.0.12
	pin-project-lite@0.2.9
	pin-project@1.0.12
	pin-utils@0.1.0
	pkg-config@0.3.26
	polling@2.8.0
	proc-macro2@1.0.56
	procfs@0.15.1
	protobuf@2.28.0
	quote@1.0.26
	raw-cpuid@10.7.0
	rayon-core@1.11.0
	rayon@1.7.0
	redox_syscall@0.2.16
	redox_syscall@0.3.5
	redox_users@0.4.3
	regex-syntax@0.7.0
	regex@1.8.0
	riemann_client@0.9.0
	ring@0.16.20
	rustix@0.36.12
	rustix@0.37.13
	rustls-pemfile@0.2.1
	rustls@0.19.1
	ryu@1.0.13
	schannel@0.1.21
	scopeguard@1.1.0
	scratch@1.0.5
	sct@0.6.1
	serde-value@0.7.0
	serde@1.0.160
	serde_derive@1.0.160
	serde_json@1.0.96
	serde_yaml@0.8.26
	signal-hook-registry@1.4.1
	slab@0.4.8
	sluice@0.5.5
	smallvec@1.10.0
	socket2@0.4.9
	spin@0.5.2
	strsim@0.10.0
	syn@1.0.109
	syn@2.0.15
	sysinfo@0.28.4
	tempfile@3.5.0
	termcolor@1.2.0
	thiserror-impl@1.0.40
	thiserror@1.0.40
	time-core@0.1.0
	time@0.1.45
	time@0.3.20
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tokio-macros@2.0.0
	tokio-util@0.7.7
	tokio@1.27.0
	tower-service@0.3.2
	tracing-attributes@0.1.23
	tracing-core@0.1.30
	tracing-futures@0.2.5
	tracing@0.1.37
	try-lock@0.2.4
	unicode-bidi@0.3.13
	unicode-ident@1.0.8
	unicode-normalization@0.1.22
	unicode-width@0.1.10
	untrusted@0.7.1
	url@2.3.1
	utf8parse@0.2.1
	vcpkg@0.2.15
	waker-fn@1.1.0
	want@0.3.0
	warp10@2.0.0
	wasi@0.10.0+wasi-snapshot-preview1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.84
	wasm-bindgen-macro-support@0.2.84
	wasm-bindgen-macro@0.2.84
	wasm-bindgen-shared@0.2.84
	wasm-bindgen@0.2.84
	web-sys@0.3.61
	webpki-roots@0.21.1
	webpki@0.21.4
	widestring@1.0.2
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.5
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-service@0.6.0
	windows-sys@0.27.0
	windows-sys@0.42.0
	windows-sys@0.45.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.42.2
	windows-targets@0.48.0
	windows-targets@0.52.5
	windows@0.27.0
	windows@0.48.0
	windows_aarch64_gnullvm@0.42.2
	windows_aarch64_gnullvm@0.48.0
	windows_aarch64_gnullvm@0.52.5
	windows_aarch64_msvc@0.27.0
	windows_aarch64_msvc@0.42.2
	windows_aarch64_msvc@0.48.0
	windows_aarch64_msvc@0.52.5
	windows_i686_gnu@0.27.0
	windows_i686_gnu@0.42.2
	windows_i686_gnu@0.48.0
	windows_i686_gnu@0.52.5
	windows_i686_gnullvm@0.52.5
	windows_i686_msvc@0.27.0
	windows_i686_msvc@0.42.2
	windows_i686_msvc@0.48.0
	windows_i686_msvc@0.52.5
	windows_x86_64_gnu@0.27.0
	windows_x86_64_gnu@0.42.2
	windows_x86_64_gnu@0.48.0
	windows_x86_64_gnu@0.52.5
	windows_x86_64_gnullvm@0.42.2
	windows_x86_64_gnullvm@0.48.0
	windows_x86_64_gnullvm@0.52.5
	windows_x86_64_msvc@0.27.0
	windows_x86_64_msvc@0.42.2
	windows_x86_64_msvc@0.48.0
	windows_x86_64_msvc@0.52.5
	x86@0.52.0
	yaml-rust@0.4.5
"

RUST_MIN_VER="1.85.0"

inherit cargo linux-info

DESCRIPTION="Electrical power consumption measurement agent"
HOMEPAGE="https://github.com/hubblo-org/scaphandre"
SRC_URI="
	https://github.com/hubblo-org/scaphandre/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="Apache-2.0"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
# restricting test because '/proc/modules' does not appear to be present in the CI
RESTRICT="test"

DEPEND="
	dev-libs/openssl:=
	virtual/zlib:=
"
RDEPEND="${DEPEND}"

QA_FLAGS_IGNORED="usr/bin/scaphandre"

pkg_setup() {
	if use amd64; then
		CONFIG_CHECK="~INTEL_RAPL"
		linux-info_pkg_setup
	fi
	rust_pkg_setup
}