# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

RUST_MIN_VER="1.88.0"

inherit cargo git-r3

DESCRIPTION="Tools for working with, parsing and using command-line interfaces"
HOMEPAGE="https://usage.jdx.dev/
	https://github.com/jdx/usage/"

EGIT_REPO_URI="https://github.com/jdx/${PN}"
EGIT_BRANCH="main"

LICENSE="MIT"
SLOT="0"

src_unpack() {
	git-r3_src_unpack
	cargo_live_src_unpack
}

src_compile() {
	cargo_src_compile --frozen --verbose --bin "${PN}"
}

src_install() {
	dobin "target/$(usex debug debug release)/${PN}"
	einstalldocs
}