# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.13.2

EAPI=8

CRATES="
	addr2line@0.21.0
	adler@1.0.2
	ahash@0.8.11
	aho-corasick@1.1.3
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.14
	anstyle-parse@0.2.4
	anstyle-query@1.0.3
	anstyle-wincon@3.0.3
	anstyle@1.0.7
	anyhow@1.0.86
	arrayvec@0.7.4
	autocfg@1.3.0
	bindgen@0.68.1
	bindgen@0.69.4
	bitflags@1.3.2
	bitflags@2.5.0
	bumpalo@3.16.0
	bytemuck@1.16.0
	byteorder@1.5.0
	bytes@1.6.0
	cc@1.0.98
	cexpr@0.6.0
	cfg-if@1.0.0
	cfg_aliases@0.1.1
	cfg_aliases@0.2.1
	chrono@0.4.38
	clang-sys@1.8.2
	clap@4.5.4
	clap_builder@4.5.2
	clap_derive@4.5.4
	clap_lex@0.7.0
	colorchoice@1.0.1
	core-foundation-sys@0.8.6
	cpp_demangle@0.4.3
	crc32fast@1.4.2
	crossbeam-channel@0.5.13
	crossbeam-utils@0.8.20
	ctrlc@3.4.4
	dashmap@5.5.3
	derive_more@0.99.17
	directories@5.0.1
	dirs-sys@0.4.1
	either@1.12.0
	env_filter@0.1.0
	env_logger@0.10.2
	env_logger@0.11.3
	equivalent@1.0.1
	errno@0.3.9
	fallible-iterator@0.3.0
	fastrand@2.1.0
	flate2@1.0.30
	getrandom@0.2.15
	gimli@0.28.1
	glob@0.3.1
	goblin@0.7.1
	goblin@0.8.2
	hashbrown@0.14.5
	heck@0.5.0
	hermit-abi@0.3.9
	home@0.5.9
	humantime@2.1.0
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.60
	indexmap@2.2.6
	inferno@0.11.19
	is-terminal@0.4.12
	is_terminal_polyfill@1.70.0
	itertools@0.12.1
	itoa@1.0.11
	js-sys@0.3.69
	lazy_static@1.4.0
	lazycell@1.3.0
	libc@0.2.155
	libloading@0.8.3
	libproc@0.14.8
	libredox@0.1.3
	linux-raw-sys@0.4.14
	lock_api@0.4.12
	log@0.4.21
	mach2@0.4.2
	mach@0.3.2
	mach_o_sys@0.1.1
	memchr@2.7.2
	memmap2@0.5.10
	memmap2@0.9.4
	memmap@0.7.0
	minimal-lexical@0.2.1
	miniz_oxide@0.7.3
	nix@0.26.4
	nix@0.28.0
	nix@0.29.0
	nom@7.1.3
	num-format@0.4.4
	num-traits@0.2.19
	object@0.32.2
	once_cell@1.19.0
	option-ext@0.2.0
	parking_lot_core@0.9.10
	peeking_take_while@0.1.2
	plain@0.2.3
	ppv-lite86@0.2.17
	prettyplease@0.2.20
	proc-macro2@1.0.84
	proc-maps@0.3.2
	prost-derive@0.12.6
	prost@0.12.6
	quick-xml@0.26.0
	quote@1.0.36
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	rbspy-testdata@0.2.1
	read-process-memory@0.1.6
	redox_syscall@0.5.1
	redox_users@0.4.5
	regex-automata@0.4.6
	regex-syntax@0.8.3
	regex@1.10.4
	remoteprocess@0.4.13
	rgb@0.8.37
	rustc-demangle@0.1.24
	rustc-hash@1.1.0
	rustix@0.38.34
	ruzstd@0.5.0
	ryu@1.0.18
	scopeguard@1.2.0
	scroll@0.11.0
	scroll@0.12.0
	scroll_derive@0.11.1
	scroll_derive@0.12.0
	semver@1.0.23
	serde@1.0.203
	serde_derive@1.0.203
	serde_json@1.0.117
	shlex@1.3.0
	smallvec@1.13.2
	spytools@0.2.0
	stable_deref_trait@1.2.0
	static_assertions@1.1.0
	str_stack@0.1.0
	strsim@0.11.1
	syn@1.0.109
	syn@2.0.66
	tempfile@3.10.1
	term_size@0.3.2
	thiserror-impl@1.0.61
	thiserror@1.0.61
	twox-hash@1.6.3
	unicode-ident@1.0.12
	utf8parse@0.2.1
	version_check@0.9.4
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.92
	wasm-bindgen-macro-support@0.2.92
	wasm-bindgen-macro@0.2.92
	wasm-bindgen-shared@0.2.92
	wasm-bindgen@0.2.92
	which@4.4.2
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-core@0.52.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.48.5
	windows-targets@0.52.5
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.5
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.5
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.5
	windows_i686_gnullvm@0.52.5
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.5
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.5
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.5
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.5
	zerocopy-derive@0.7.34
	zerocopy@0.7.34
"

inherit cargo

DESCRIPTION="Sampling CPU profiler for Ruby"
HOMEPAGE="https://rbspy.github.io/"
SRC_URI="
	https://github.com/rbspy/rbspy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="MIT"

# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD-2 BSD CDDL ISC MIT MPL-2.0 Unicode-DFS-2016"

SLOT="0"
KEYWORDS="~amd64"
IUSE="test"

RESTRICT="!test? ( test )"

BDEPEND="test? ( dev-lang/ruby )"

QA_FLAGS_IGNORED="usr/bin/${PN}"

src_test() {
	local skip=(
		--skip sampler::tests::test_sample_single_process
		--skip sampler::tests::test_sample_single_process_with_time_limit
		--skip core::ruby_spy::tests::test_get_trace_when_process_has_exited
		--skip core::ruby_spy::tests::test_get_trace
		--skip sampler::tests::test_sample_subprocesses
	)
	cargo_src_test -- "${skip[@]}"
}

src_install() {
	cargo_src_install
	dodoc README.md
}