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

# Auto-Generated by cargo-ebuild 0.5.4-r1

EAPI=8

CRATES="
	adler2@2.0.0
	ahash@0.8.11
	aho-corasick@1.1.2
	autocfg@1.1.0
	base64@0.21.7
	binfarce@0.2.1
	bitflags@1.3.2
	bitflags@2.5.0
	byteorder@0.5.3
	camino@1.1.1
	cargo-platform@0.1.2
	cargo_metadata@0.18.1
	cfg-if@1.0.0
	crc32fast@1.3.2
	cyclonedx-bom@0.5.0
	deranged@0.3.11
	dyn-clone@1.0.9
	either@1.8.0
	equivalent@1.0.1
	fluent-uri@0.1.4
	getrandom@0.2.12
	hashbrown@0.12.3
	hashbrown@0.13.2
	hashbrown@0.14.3
	indexmap@1.9.1
	indexmap@2.2.3
	itoa@1.0.3
	leb128@0.2.5
	libc@0.2.153
	memchr@2.7.1
	miniz_oxide@0.8.0
	num-conv@0.1.0
	num-traits@0.2.18
	object@0.30.3
	once_cell@1.19.0
	ordered-float@4.2.0
	packageurl@0.3.0
	percent-encoding@2.2.0
	pico-args@0.5.0
	powerfmt@0.2.0
	proc-macro2@1.0.78
	quote@1.0.35
	regex@1.10.3
	regex-automata@0.4.5
	regex-syntax@0.8.2
	ryu@1.0.11
	schemars@0.8.10
	schemars_derive@0.8.10
	semver@1.0.14
	serde@1.0.197
	serde_derive@1.0.197
	serde_derive_internals@0.26.0
	serde_json@1.0.114
	smallvec@1.13.1
	spdx@0.10.3
	syn@1.0.99
	syn@2.0.50
	thiserror@1.0.57
	thiserror-impl@1.0.57
	time@0.3.36
	time-core@0.1.2
	time-macros@0.2.18
	topological-sort@0.2.2
	unicode-ident@1.0.4
	uuid@1.7.0
	version_check@0.9.4
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-gen@0.1.4
	wasmparser@0.207.0
	which@4.3.0
	xml-rs@0.8.19
	zerocopy@0.7.32
	zerocopy-derive@0.7.32
"

inherit cargo

DESCRIPTION="Make production Rust binaries auditable"
HOMEPAGE="https://github.com/rust-secure-code/cargo-auditable"
SRC_URI="
	https://github.com/rust-secure-code/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

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

# rust does not use *FLAGS from make.conf, silence portage warning
# update with proper path to binaries this crate installs, omit leading /
QA_FLAGS_IGNORED="usr/bin/${PN}"

src_compile() {
	cargo_src_compile --bin ${PN}
}

src_install() {
	cargo_src_install --path ${PN}

	einstalldocs
	doman "${PN}/${PN}.1"
}