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

# Autogenerated by pycargoebuild 0.15.0

EAPI=8

RUST_MIN_VER="1.86.0"

CRATES="
	adler2@2.0.1
	aho-corasick@1.1.3
	anyhow@1.0.100
	ar@0.9.0
	bpaf@0.9.20
	bpaf_derive@0.5.17
	camino@1.1.11
	capstone-sys@0.17.0
	capstone@0.13.0
	cargo-platform@0.3.0
	cargo_metadata@0.23.1
	cc@1.2.32
	cfg-if@1.0.1
	crc32fast@1.5.0
	flate2@1.1.2
	hermit-abi@0.5.2
	is-terminal@0.4.16
	is_ci@1.2.0
	itoa@1.0.15
	libc@0.2.174
	line-span@0.1.5
	memchr@2.7.5
	miniz_oxide@0.8.9
	nom@8.0.0
	object@0.38.0
	owo-colors@4.2.3
	proc-macro2@1.0.95
	quote@1.0.40
	regex-automata@0.4.13
	regex-syntax@0.8.5
	regex@1.12.2
	rustc-demangle@0.1.26
	ruzstd@0.8.1
	ryu@1.0.20
	same-file@1.0.6
	semver@1.0.26
	serde@1.0.219
	serde_derive@1.0.219
	serde_json@1.0.142
	shlex@1.3.0
	supports-color@2.1.0
	supports-color@3.0.2
	syn@2.0.104
	thiserror-impl@2.0.12
	thiserror@2.0.12
	twox-hash@2.1.1
	unicode-ident@1.0.18
	winapi-util@0.1.9
	windows-sys@0.59.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
"

inherit cargo shell-completion

DESCRIPTION="A cargo subcommand that displays the generated assembly of Rust source code."
HOMEPAGE="https://github.com/pacak/cargo-show-asm"
SRC_URI="
	https://github.com/pacak/cargo-show-asm/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="|| ( Apache-2.0 MIT )"
# Dependent crate licenses
LICENSE+=" Apache-2.0 ISC MIT Unicode-3.0"
SLOT="0"
KEYWORDS="~amd64"

QA_FLAGS_IGNORED="usr/bin/cargo-asm"

src_compile() {
	cargo_src_compile

	"$(cargo_target_dir)"/cargo-asm --bpaf-complete-style-bash > cargo-asm || die
	"$(cargo_target_dir)"/cargo-asm --bpaf-complete-style-fish > cargo-asm.fish || die
	"$(cargo_target_dir)"/cargo-asm --bpaf-complete-style-zsh > _cargo-asm || die
}

src_install() {
	cargo_src_install

	dobashcomp cargo-asm
	dofishcomp cargo-asm.fish
	dozshcomp _cargo-asm
}
