# Copyright 2022-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
	adler@1.0.2
	aho-corasick@1.0.5
	anes@0.1.6
	anstyle@1.0.4
	app_dirs2@2.5.5
	autocfg@1.1.0
	backtrace@0.3.69
	base64@0.21.5
	bincode@1.3.3
	bit-set@0.5.3
	bit-vec@0.6.3
	bitflags@1.3.2
	bitflags@2.4.1
	block@0.1.6
	bloodhound@0.5.4
	bumpalo@3.14.0
	bytecount@0.6.7
	bytes@1.5.0
	cast@0.3.0
	cc@1.0.83
	cesu8@1.1.0
	cfg-if@0.1.10
	cfg-if@1.0.0
	ciborium-io@0.2.1
	ciborium-ll@0.2.1
	ciborium@0.2.1
	clap@4.4.14
	clap_builder@4.4.14
	clap_lex@0.6.0
	cli-clipboard@0.4.0
	clipboard-win@4.5.0
	combine@4.6.6
	crc32fast@1.3.2
	criterion-plot@0.5.0
	criterion@0.5.1
	crossbeam-channel@0.5.8
	crossbeam-deque@0.8.3
	crossbeam-epoch@0.9.15
	crossbeam-utils@0.8.16
	deranged@0.3.10
	derive-new@0.5.9
	downcast-rs@1.2.0
	either@1.9.0
	equivalent@1.0.1
	errno@0.3.8
	error-chain@0.12.4
	error-code@2.3.1
	fancy-regex@0.11.0
	fastrand@2.0.1
	fixedbitset@0.4.2
	flate2@1.0.27
	fnv@1.0.7
	form_urlencoded@1.2.0
	fragment@0.3.1
	fuchsia-zircon-sys@0.3.3
	fuchsia-zircon@0.3.3
	gethostname@0.2.3
	gimli@0.28.0
	git2@0.18.1
	glob@0.2.11
	half@1.8.2
	hashbrown@0.14.3
	hermit-abi@0.3.2
	idna@0.4.0
	indexmap@2.1.0
	iovec@0.1.4
	is-terminal@0.4.10
	itertools@0.10.5
	itoa@1.0.9
	jni-sys@0.3.0
	jni@0.21.1
	jobserver@0.1.26
	js-sys@0.3.66
	kernel32-sys@0.2.2
	lazy_static@1.4.0
	libc@0.2.152
	libgit2-sys@0.16.1+1.7.1
	libz-sys@1.1.12
	line-wrap@0.1.1
	linked-hash-map@0.5.6
	linux-raw-sys@0.4.12
	log@0.4.20
	luthor@0.2.0
	malloc_buf@0.0.6
	memchr@2.6.3
	memoffset@0.6.5
	memoffset@0.9.0
	minimal-lexical@0.2.1
	miniz_oxide@0.7.1
	mio@0.6.23
	miow@0.2.2
	ndk-context@0.1.1
	net2@0.2.39
	nix@0.24.3
	nom@7.1.3
	num-traits@0.2.16
	num_cpus@1.16.0
	numtoa@0.1.0
	objc-foundation@0.1.1
	objc@0.2.7
	objc_id@0.1.1
	object@0.32.1
	once_cell@1.18.0
	onig@6.4.0
	onig_sys@69.8.1
	oorandom@11.1.3
	os_pipe@1.1.4
	percent-encoding@2.3.0
	petgraph@0.6.4
	pkg-config@0.3.27
	plist@1.6.0
	plotters-backend@0.3.5
	plotters-svg@0.3.5
	plotters@0.3.5
	powerfmt@0.2.0
	proc-macro2@1.0.66
	quick-xml@0.31.0
	quote@1.0.33
	rayon-core@1.11.0
	rayon@1.7.0
	redox_syscall@0.2.16
	redox_syscall@0.4.1
	redox_termios@0.1.2
	regex-automata@0.4.3
	regex-syntax@0.7.5
	regex-syntax@0.8.2
	regex@1.10.2
	rustc-demangle@0.1.23
	rustix@0.38.26
	ryu@1.0.15
	safemem@0.3.3
	same-file@1.0.6
	scopeguard@1.2.0
	scribe@0.8.1
	serde@1.0.188
	serde_derive@1.0.188
	serde_json@1.0.106
	signal-hook-registry@1.4.1
	signal-hook@0.1.17
	slab@0.4.9
	smallvec@1.11.2
	str-buf@1.0.6
	syn@1.0.109
	syn@2.0.32
	syntect@5.1.0
	tempfile@3.8.1
	termion@2.0.1
	thiserror-impl@1.0.50
	thiserror@1.0.50
	time-core@0.1.2
	time-macros@0.2.16
	time@0.3.31
	tinytemplate@1.2.1
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tree_magic_mini@3.0.3
	unicode-bidi@0.3.13
	unicode-ident@1.0.11
	unicode-normalization@0.1.22
	unicode-segmentation@1.10.1
	url@2.4.1
	vcpkg@0.2.15
	version_check@0.9.4
	walkdir@2.4.0
	wasm-bindgen-backend@0.2.89
	wasm-bindgen-macro-support@0.2.89
	wasm-bindgen-macro@0.2.89
	wasm-bindgen-shared@0.2.89
	wasm-bindgen@0.2.89
	wayland-client@0.29.5
	wayland-commons@0.29.5
	wayland-protocols@0.29.5
	wayland-scanner@0.29.5
	wayland-sys@0.29.5
	web-sys@0.3.66
	winapi-build@0.1.1
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.5
	winapi-wsapoll@0.1.1
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.2.8
	winapi@0.3.9
	windows-sys@0.45.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.42.2
	windows-targets@0.48.5
	windows-targets@0.52.0
	windows_aarch64_gnullvm@0.42.2
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.0
	windows_aarch64_msvc@0.42.2
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.0
	windows_i686_gnu@0.42.2
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.0
	windows_i686_msvc@0.42.2
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.0
	windows_x86_64_gnu@0.42.2
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.0
	windows_x86_64_gnullvm@0.42.2
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.0
	windows_x86_64_msvc@0.42.2
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.0
	wl-clipboard-rs@0.7.0
	ws2_32-sys@0.2.1
	x11-clipboard@0.7.1
	x11rb-protocol@0.10.0
	x11rb@0.10.1
	xdg@2.5.2
	xml-rs@0.7.0
	yaml-rust@0.4.5
"

inherit cargo

DESCRIPTION="A complete text editor for your terminal."
HOMEPAGE="https://amp.rs"
SRC_URI="
	https://github.com/jmacdonald/amp/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="GPL-3+"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD Boost-1.0 MIT Unicode-DFS-2016"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc"

DEPEND="dev-libs/libgit2:="
RDEPEND="${DEPEND}"

QA_FLAGS_IGNORED="usr/bin/amp"

src_install() {
	dobin "target/$(usex debug debug release)/amp"

	if use doc; then
		dodoc README.md CHANGELOG.md
		dodoc -r documentation/*
	fi
}
