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

# shellcheck disable=SC2086

EAPI=8

CRATES="
	addr2line-0.17.0
	adler-1.0.2
	aho-corasick-0.7.18
	ansi_term-0.12.1
	anyhow-1.0.56
	arc-swap-1.5.0
	arrayvec-0.5.2
	ascii_utils-0.9.3
	assert-json-diff-2.0.1
	assert_cmd-2.0.4
	async-channel-1.6.1
	async-compression-0.3.8
	async-executor-1.4.1
	async-global-executor-2.0.2
	async-io-1.6.0
	async-lock-2.4.0
	async-mutex-1.4.0
	async-native-tls-0.3.3
	async-process-1.3.0
	async-recursion-1.0.0
	async-smtp-0.4.0
	async-std-1.10.0
	async-std-resolver-0.20.4
	async-stream-0.3.3
	async-stream-impl-0.3.3
	async-task-4.0.3
	async-trait-0.1.52
	async_once-0.2.6
	atomic-waker-1.0.0
	atty-0.2.14
	autocfg-1.0.1
	backtrace-0.3.64
	base64-0.12.3
	base64-0.13.0
	bitflags-1.3.2
	block-buffer-0.10.2
	blocking-1.1.0
	bstr-0.2.17
	bufstream-0.1.4
	bumpalo-3.9.1
	by_address-1.0.4
	bytes-1.1.0
	cache-padded-1.2.0
	cached-0.34.0
	cached_proc_macro-0.12.0
	cached_proc_macro_types-0.1.0
	cast-0.2.7
	cc-1.0.72
	cfg-if-1.0.0
	check-if-email-exists-0.8.29
	chrono-0.4.19
	clap-2.34.0
	concurrent-queue-1.2.2
	console-0.15.0
	const_format-0.2.22
	const_format_proc_macros-0.2.22
	core-foundation-0.9.2
	core-foundation-sys-0.8.3
	cpufeatures-0.2.1
	crc32fast-1.3.0
	criterion-0.3.5
	criterion-plot-0.4.4
	crossbeam-0.8.1
	crossbeam-channel-0.5.2
	crossbeam-deque-0.8.1
	crossbeam-epoch-0.9.6
	crossbeam-queue-0.3.3
	crossbeam-utils-0.8.6
	crypto-common-0.1.3
	csv-1.1.6
	csv-core-0.1.10
	ctor-0.1.21
	darling-0.13.1
	darling_core-0.13.1
	darling_macro-0.13.1
	dashmap-5.2.0
	data-encoding-2.3.2
	deadpool-0.9.2
	deadpool-runtime-0.1.2
	derivative-2.2.0
	diff-0.1.12
	difflib-0.4.0
	digest-0.10.3
	dirs-next-2.0.0
	dirs-sys-next-0.1.2
	doc-comment-0.3.3
	either-1.6.1
	encode_unicode-0.3.6
	encoding_rs-0.8.30
	enum-as-inner-0.3.3
	event-listener-2.5.1
	fast-socks5-0.4.3
	fast_chemail-0.9.6
	fastrand-1.6.0
	flate2-1.0.22
	float-cmp-0.9.0
	flume-0.10.11
	fnv-1.0.7
	foreign-types-0.3.2
	foreign-types-shared-0.1.1
	form_urlencoded-1.0.1
	futf-0.1.4
	futures-0.3.21
	futures-channel-0.3.21
	futures-core-0.3.21
	futures-executor-0.3.21
	futures-io-0.3.21
	futures-lite-1.12.0
	futures-macro-0.3.21
	futures-sink-0.3.21
	futures-task-0.3.21
	futures-timer-3.0.2
	futures-util-0.3.21
	generic-array-0.14.5
	getopts-0.2.21
	getrandom-0.1.16
	getrandom-0.2.3
	gimli-0.26.1
	glob-0.3.0
	gloo-timers-0.2.2
	h2-0.3.10
	half-1.8.2
	hashbrown-0.11.2
	hashbrown-0.12.0
	headers-0.3.7
	headers-core-0.2.0
	heck-0.3.3
	hermit-abi-0.1.19
	hostname-0.1.5
	hostname-0.3.1
	html5ever-0.25.1
	html5gum-0.4.0
	http-0.2.6
	http-body-0.4.4
	http-types-2.12.0
	httparse-1.5.1
	httpdate-1.0.2
	humantime-2.1.0
	hyper-0.14.16
	hyper-tls-0.5.0
	hyperx-1.4.0
	ident_case-1.0.1
	idna-0.2.3
	indexmap-1.8.0
	indicatif-0.16.2
	infer-0.2.3
	instant-0.1.12
	ip_network-0.4.1
	ipconfig-0.2.2
	ipnet-2.3.1
	itertools-0.10.3
	itoa-0.4.8
	itoa-1.0.1
	jetscii-0.5.1
	js-sys-0.3.55
	jsonwebtoken-7.2.0
	jwalk-0.6.0
	kv-log-macro-1.0.7
	language-tags-0.3.2
	lazy_static-1.4.0
	lexical-core-0.7.6
	libc-0.2.112
	linked-hash-map-0.5.4
	linkify-0.8.0
	lock_api-0.4.6
	log-0.4.15
	lru-cache-0.1.2
	mac-0.1.1
	mailchecker-4.1.13
	markup5ever-0.10.1
	match_cfg-0.1.0
	matchers-0.1.0
	matches-0.1.9
	memchr-2.4.1
	memoffset-0.6.5
	mime-0.3.16
	miniz_oxide-0.4.4
	mio-0.7.14
	miow-0.3.7
	nanorand-0.6.1
	native-tls-0.2.8
	new_debug_unreachable-1.0.4
	nom-5.1.2
	normalize-line-endings-0.3.0
	ntapi-0.3.6
	num-bigint-0.2.6
	num-integer-0.1.44
	num-traits-0.2.14
	num_cpus-1.13.1
	number_prefix-0.4.0
	object-0.27.1
	octocrab-0.15.4
	once_cell-1.10.0
	oorandom-11.1.3
	openssl-0.10.38
	openssl-probe-0.1.4
	openssl-src-111.17.0+1.1.1m
	openssl-sys-0.9.72
	output_vt100-0.1.2
	pad-0.1.6
	papergrid-0.2.1
	par-stream-0.10.2
	parking-2.0.0
	parking_lot-0.11.2
	parking_lot-0.12.0
	parking_lot_core-0.8.5
	parking_lot_core-0.9.1
	path-clean-0.1.0
	pem-0.8.3
	percent-encoding-2.1.0
	phf-0.8.0
	phf_codegen-0.8.0
	phf_generator-0.8.0
	phf_shared-0.8.0
	pin-project-1.0.10
	pin-project-internal-1.0.10
	pin-project-lite-0.2.8
	pin-utils-0.1.0
	pkg-config-0.3.24
	plotters-0.3.1
	plotters-backend-0.3.2
	plotters-svg-0.3.1
	polling-2.2.0
	ppv-lite86-0.2.16
	precomputed-hash-0.1.1
	predicates-2.1.1
	predicates-core-1.0.2
	predicates-tree-1.0.4
	pretty_assertions-1.1.0
	proc-macro-error-1.0.4
	proc-macro-error-attr-1.0.4
	proc-macro2-1.0.36
	pulldown-cmark-0.9.1
	quick-error-1.2.3
	quote-1.0.14
	rand-0.7.3
	rand-0.8.5
	rand_chacha-0.2.2
	rand_chacha-0.3.1
	rand_core-0.5.1
	rand_core-0.6.3
	rand_hc-0.2.0
	rand_pcg-0.2.1
	rayon-1.5.1
	rayon-core-1.9.1
	redox_syscall-0.2.10
	redox_users-0.4.0
	regex-1.5.5
	regex-automata-0.1.10
	regex-syntax-0.6.25
	remove_dir_all-0.5.3
	reqwest-0.11.10
	resolv-conf-0.7.0
	ring-0.16.20
	rustc-demangle-0.1.21
	rustc_version-0.4.0
	ryu-1.0.9
	same-file-1.0.6
	schannel-0.1.19
	scopeguard-1.1.0
	secrecy-0.8.0
	security-framework-2.4.2
	security-framework-sys-2.4.2
	semver-1.0.4
	serde-1.0.136
	serde_cbor-0.11.2
	serde_derive-1.0.136
	serde_json-1.0.79
	serde_path_to_error-0.1.7
	serde_qs-0.8.5
	serde_urlencoded-0.7.1
	sha-1-0.10.0
	sharded-slab-0.1.4
	shellexpand-2.1.0
	signal-hook-0.3.13
	signal-hook-registry-1.4.0
	simple_asn1-0.4.1
	siphasher-0.3.7
	slab-0.4.5
	smallvec-1.7.0
	snafu-0.7.0
	snafu-derive-0.7.0
	socket2-0.3.19
	socket2-0.4.2
	spin-0.5.2
	spin-0.9.2
	static_assertions-1.1.0
	string_cache-0.8.2
	string_cache_codegen-0.5.1
	strsim-0.8.0
	strsim-0.10.0
	structopt-0.3.26
	structopt-derive-0.4.18
	syn-1.0.85
	tabled-0.5.0
	tabled_derive-0.2.0
	tempfile-3.3.0
	tendril-0.4.2
	terminal_size-0.1.17
	termtree-0.2.4
	textwrap-0.11.0
	thiserror-1.0.30
	thiserror-impl-1.0.30
	thread_local-1.1.4
	time-0.1.44
	tinytemplate-1.2.1
	tinyvec-1.5.1
	tinyvec_macros-0.1.0
	tokio-1.16.1
	tokio-macros-1.7.0
	tokio-native-tls-0.3.0
	tokio-socks-0.5.1
	tokio-stream-0.1.8
	tokio-util-0.6.9
	toml-0.5.8
	tower-service-0.3.1
	tracing-0.1.29
	tracing-core-0.1.22
	tracing-subscriber-0.3.9
	trust-dns-proto-0.20.4
	trust-dns-resolver-0.20.4
	try-lock-0.2.3
	typed-builder-0.10.0
	typenum-1.15.0
	unicase-2.6.0
	unicode-bidi-0.3.7
	unicode-normalization-0.1.19
	unicode-segmentation-1.8.0
	unicode-width-0.1.9
	unicode-xid-0.2.2
	untrusted-0.7.1
	url-2.2.2
	utf-8-0.7.6
	uuid-0.8.2
	valuable-0.1.0
	value-bag-1.0.0-alpha.8
	vcpkg-0.2.15
	vec_map-0.8.2
	version_check-0.9.4
	wait-timeout-0.2.0
	waker-fn-1.1.0
	walkdir-2.3.2
	want-0.3.0
	wasi-0.9.0+wasi-snapshot-preview1
	wasi-0.10.0+wasi-snapshot-preview1
	wasm-bindgen-0.2.78
	wasm-bindgen-backend-0.2.78
	wasm-bindgen-futures-0.4.28
	wasm-bindgen-macro-0.2.78
	wasm-bindgen-macro-support-0.2.78
	wasm-bindgen-shared-0.2.78
	web-sys-0.3.55
	wepoll-ffi-0.1.2
	widestring-0.4.3
	winapi-0.3.9
	winapi-i686-pc-windows-gnu-0.4.0
	winapi-util-0.1.5
	winapi-x86_64-pc-windows-gnu-0.4.0
	windows-sys-0.32.0
	windows_aarch64_msvc-0.32.0
	windows_i686_gnu-0.32.0
	windows_i686_msvc-0.32.0
	windows_x86_64_gnu-0.32.0
	windows_x86_64_msvc-0.32.0
	winreg-0.6.2
	winreg-0.10.1
	winutil-0.1.1
	wiremock-0.5.11
	zeroize-1.5.2
"

inherit cargo

DESCRIPTION="Fast, async, stream-based link checker"
HOMEPAGE="https://github.com/lycheeverse/lychee"
SRC_URI="https://github.com/lycheeverse/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
	$(cargo_crate_uris ${CRATES})"

LICENSE="AGPL-3 Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0 ZLIB"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="test"
PROPERTIES="test_network"

DOCS=( {docs/TROUBLESHOOTING,README}.md lychee.example.toml )

QA_FLAGS_IGNORED="usr/bin/lychee"

src_install() {
	einstalldocs
	cargo_src_install --path lychee-bin
}