# Copyright 2023-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
	adler32@1.2.0
	adler@1.0.2
	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.83
	autocfg@1.3.0
	backtrace@0.3.71
	base64@0.21.7
	bitflags@1.3.2
	bitflags@2.5.0
	bumpalo@3.16.0
	byteorder@1.5.0
	bytes@1.6.0
	camino@1.1.6
	cargo-platform@0.1.8
	cargo_metadata@0.18.1
	cc@1.0.97
	cfg-if@1.0.0
	cfg_aliases@0.1.1
	chrono@0.4.38
	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
	core-foundation@0.9.4
	coveralls-api@0.6.0
	crc32fast@1.4.0
	deflate@1.0.0
	derive_more@0.99.17
	encoding_rs@0.8.34
	equivalent@1.0.1
	errno@0.3.8
	fallible-iterator@0.3.0
	fastrand@2.1.0
	flate2@1.0.30
	fnv@1.0.7
	foreign-types-shared@0.1.1
	foreign-types@0.3.2
	form_urlencoded@1.2.1
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-io@0.3.30
	futures-sink@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	gimli@0.28.1
	gimli@0.29.0
	git2@0.18.3
	glob@0.3.1
	gzip-header@1.0.0
	h2@0.3.26
	hashbrown@0.11.2
	hashbrown@0.14.5
	heck@0.5.0
	hermit-abi@0.3.9
	hex@0.4.3
	http-body@0.4.6
	http@0.2.12
	httparse@1.8.0
	httpdate@1.0.3
	humantime-serde@1.1.1
	humantime@2.1.0
	hyper-tls@0.5.0
	hyper@0.14.28
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.60
	idna@0.5.0
	indexmap@1.8.2
	indexmap@2.2.6
	ipnet@2.9.0
	is_terminal_polyfill@1.70.0
	itoa@1.0.11
	jobserver@0.1.31
	js-sys@0.3.69
	lazy_static@1.4.0
	lcov@0.8.1
	leb128@0.2.5
	libc@0.2.154
	libgit2-sys@0.16.2+1.7.2
	libssh2-sys@0.3.0
	libz-sys@1.1.16
	linux-raw-sys@0.4.13
	llvm_profparser@0.5.0
	log@0.4.21
	matchers@0.1.0
	md5@0.7.0
	memchr@2.7.2
	mime@0.3.17
	mime_guess@2.0.4
	minimal-lexical@0.2.1
	miniz_oxide@0.7.2
	mio@0.8.11
	native-tls@0.2.11
	nix@0.28.0
	nom@7.1.3
	nu-ansi-term@0.46.0
	num-traits@0.2.19
	num_cpus@1.16.0
	object@0.26.2
	object@0.32.2
	object@0.35.0
	once_cell@1.19.0
	openssl-macros@0.1.1
	openssl-probe@0.1.5
	openssl-src@300.2.3+3.2.1
	openssl-sys@0.9.102
	openssl@0.10.64
	overload@0.1.1
	percent-encoding@2.3.1
	pin-project-lite@0.2.14
	pin-utils@0.1.0
	pkg-config@0.3.30
	proc-macro2@1.0.82
	procfs-core@0.16.0
	procfs@0.16.0
	quick-error@1.2.3
	quick-xml@0.31.0
	quote@1.0.36
	regex-automata@0.1.10
	regex-automata@0.4.6
	regex-syntax@0.6.29
	regex-syntax@0.8.3
	regex@1.10.4
	reqwest@0.11.27
	rustc-demangle@0.1.24
	rustc_version@0.4.0
	rustix@0.38.34
	rustls-pemfile@1.0.4
	rusty-fork@0.3.0
	ruzstd@0.6.0
	ryu@1.0.18
	same-file@1.0.6
	schannel@0.1.23
	security-framework-sys@2.11.0
	security-framework@2.11.0
	semver@1.0.23
	serde@1.0.201
	serde_derive@1.0.201
	serde_json@1.0.117
	serde_spanned@0.6.5
	serde_urlencoded@0.7.1
	sharded-slab@0.1.7
	slab@0.4.9
	smallvec@1.13.2
	socket2@0.5.7
	stable_deref_trait@1.2.0
	static_assertions@1.1.0
	strsim@0.11.1
	syn@1.0.109
	syn@2.0.61
	sync_wrapper@0.1.2
	system-configuration-sys@0.5.0
	system-configuration@0.5.1
	tempfile@3.10.1
	thiserror-impl@1.0.60
	thiserror@1.0.60
	thread_local@1.1.8
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tokio-native-tls@0.3.1
	tokio-util@0.7.11
	tokio@1.37.0
	toml@0.8.12
	toml_datetime@0.6.5
	toml_edit@0.22.12
	tower-service@0.3.2
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing-log@0.2.0
	tracing-subscriber@0.3.18
	tracing-test-macro@0.2.4
	tracing-test@0.2.4
	tracing@0.1.40
	try-lock@0.2.5
	twox-hash@1.6.3
	unicase@2.7.0
	unicode-bidi@0.3.15
	unicode-ident@1.0.12
	unicode-normalization@0.1.23
	url@2.5.0
	utf8parse@0.2.1
	valuable@0.1.0
	vcpkg@0.2.15
	version_check@0.9.4
	wait-timeout@0.2.0
	walkdir@2.5.0
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.92
	wasm-bindgen-futures@0.4.42
	wasm-bindgen-macro-support@0.2.92
	wasm-bindgen-macro@0.2.92
	wasm-bindgen-shared@0.2.92
	wasm-bindgen@0.2.92
	web-sys@0.3.69
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.8
	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
	winnow@0.6.8
	winreg@0.50.0
"

RUST_MIN_VER="1.76.0"

inherit cargo

DESCRIPTION="Cargo-Tarpaulin is a tool to determine code coverage achieved via tests"
HOMEPAGE="https://github.com/xd009642/tarpaulin"
SRC_URI="
	https://github.com/xd009642/tarpaulin/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz
	${CARGO_CRATE_URIS}
"
S="${WORKDIR}/${P#cargo-}"

LICENSE="|| ( Apache-2.0 MIT )"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD MIT Unicode-DFS-2016 ZLIB"
SLOT="0"
KEYWORDS="~amd64"

QA_FLAGS_IGNORED="/usr/bin/cargo-tarpaulin"

PATCHES=(
	# integration tests require internet access
	"${FILESDIR}/cargo-tarpaulin-0.20.1-tests.patch"
	# test fails when not in a git repo
	"${FILESDIR}/cargo-tarpaulin-0.25.0-tests.patch"
)

DOCS=(
	CHANGELOG.md
	CONTRIBUTING.md
	README.md
)

src_install() {
	cargo_src_install

	dodoc "${DOCS[@]}"
}