# 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
	aho-corasick@1.1.3
	autocfg@1.4.0
	base64@0.21.7
	binfarce@0.2.1
	bitflags@1.3.2
	bitflags@2.6.0
	byteorder@0.5.3
	camino@1.1.9
	cargo-platform@0.1.8
	cargo_metadata@0.18.1
	cfg-if@1.0.0
	crc32fast@1.4.2
	cyclonedx-bom@0.8.0
	cyclonedx-bom-macros@0.1.0
	deranged@0.3.11
	dyn-clone@1.0.17
	either@1.13.0
	equivalent@1.0.1
	errno@0.3.9
	fluent-uri@0.1.4
	foldhash@0.1.3
	getrandom@0.2.15
	hashbrown@0.15.1
	heck@0.5.0
	hex@0.4.3
	home@0.5.9
	indexmap@2.6.0
	itoa@1.0.13
	leb128@0.2.5
	libc@0.2.164
	linux-raw-sys@0.4.14
	memchr@2.7.4
	miniz_oxide@0.8.0
	num-conv@0.1.0
	num-traits@0.2.19
	object@0.36.5
	once_cell@1.20.2
	ordered-float@4.5.0
	percent-encoding@2.3.1
	pico-args@0.5.0
	powerfmt@0.2.0
	proc-macro2@1.0.92
	purl@0.1.3
	quote@1.0.37
	regex@1.11.1
	regex-automata@0.4.9
	regex-syntax@0.8.5
	rustix@0.38.41
	rustversion@1.0.18
	ryu@1.0.18
	schemars@0.8.21
	schemars_derive@0.8.21
	semver@1.0.23
	serde@1.0.215
	serde_derive@1.0.215
	serde_derive_internals@0.29.1
	serde_json@1.0.133
	smallvec@1.13.2
	spdx@0.10.7
	strum@0.26.3
	strum_macros@0.26.4
	syn@2.0.89
	thiserror@1.0.69
	thiserror-impl@1.0.69
	time@0.3.36
	time-core@0.1.2
	time-macros@0.2.18
	topological-sort@0.2.2
	unicode-ident@1.0.14
	uuid@1.11.0
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-gen@0.1.4
	wasmparser@0.207.0
	which@4.4.2
	windows-sys@0.52.0
	windows-targets@0.52.6
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.52.6
	xml-rs@0.8.23
"

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-3.0 ZLIB
"
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"
}