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

# Autogenerated by pycargoebuild 0.10

EAPI=8

CRATES="
	adler32@1.2.0
	aho-corasick@1.1.4
	alloc-no-stdlib@2.0.4
	alloc-stdlib@0.2.2
	allocator-api2@0.2.21
	android_system_properties@0.1.5
	anstream@1.0.0
	anstyle-parse@1.0.0
	anstyle-query@1.1.5
	anstyle-wincon@3.0.11
	anstyle@1.0.14
	anyhow@1.0.102
	autocfg@1.5.0
	base64@0.22.1
	bindgen@0.72.1
	bitflags@2.11.1
	block-buffer@0.12.0
	brotli-decompressor@5.0.0
	brotli@8.0.2
	bstr@1.12.1
	bumpalo@3.20.2
	cc@1.2.61
	cexpr@0.6.0
	cfg-if@1.0.4
	chacha20@0.10.0
	chrono@0.4.44
	clang-sys@1.8.1
	clap@4.6.1
	clap_builder@4.6.0
	clap_lex@1.1.0
	colorchoice@1.0.5
	colored@3.1.1
	const-oid@0.10.2
	core-foundation-sys@0.8.7
	cpufeatures@0.3.0
	crc32fast@1.5.0
	crypto-common@0.2.1
	curl-sys@0.4.87+curl-8.19.0
	curl@0.4.49
	dary_heap@0.3.9
	digest@0.11.2
	displaydoc@0.2.5
	either@1.15.0
	encoding_rs@0.8.35
	equivalent@1.0.2
	errno@0.3.14
	find-msvc-tools@0.1.9
	foldhash@0.1.5
	foldhash@0.2.0
	form_urlencoded@1.2.2
	futures-core@0.3.32
	futures-task@0.3.32
	futures-util@0.3.32
	getrandom@0.4.2
	glob@0.3.3
	hashbrown@0.15.5
	hashbrown@0.16.1
	hashbrown@0.17.0
	heck@0.5.0
	hybrid-array@0.4.11
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.65
	icu_collections@2.2.0
	icu_locale_core@2.2.0
	icu_normalizer@2.2.0
	icu_normalizer_data@2.2.0
	icu_properties@2.2.0
	icu_properties_data@2.2.0
	icu_provider@2.2.0
	id-arena@2.3.0
	idna@1.1.0
	idna_adapter@1.2.2
	indexmap@2.14.0
	is_terminal_polyfill@1.70.2
	itertools@0.13.0
	itoa@1.0.18
	js-sys@0.3.97
	leb128fmt@0.1.0
	libc@0.2.186
	libflate@2.3.0
	libflate_lz77@2.3.0
	libloading@0.8.9
	libxml@0.3.9
	libz-sys@1.1.28
	linux-raw-sys@0.12.1
	litemap@0.8.2
	log@0.4.29
	md5@0.8.0
	memchr@2.8.0
	minimal-lexical@0.2.1
	no_std_io2@0.9.3
	nom@7.1.3
	num-traits@0.2.19
	once_cell@1.21.4
	once_cell_polyfill@1.70.2
	openssl-probe@0.1.6
	openssl-src@300.6.0+3.6.2
	openssl-sys@0.9.114
	percent-encoding@2.3.2
	pin-project-lite@0.2.17
	pkg-config@0.3.33
	potential_utf@0.1.5
	prettyplease@0.2.37
	proc-macro2@1.0.106
	quote@1.0.45
	r-efi@6.0.0
	rand@0.10.1
	rand_core@0.10.1
	regex-automata@0.4.14
	regex-syntax@0.8.10
	regex@1.12.3
	rle-decode-fast@1.0.3
	rustc-hash@2.1.2
	rustix@1.1.4
	rustversion@1.0.22
	schannel@0.1.29
	semver@1.0.28
	serde@1.0.228
	serde_core@1.0.228
	serde_derive@1.0.228
	serde_json@1.0.149
	sha2@0.11.0
	shlex@1.3.0
	similar@3.1.0
	slab@0.4.12
	smallvec@1.15.1
	socket2@0.6.3
	stable_deref_trait@1.2.1
	strsim@0.11.1
	syn@2.0.117
	synstructure@0.13.2
	terminal_size@0.4.4
	tinystr@0.8.3
	toml@0.5.11
	typenum@1.20.0
	unicode-ident@1.0.24
	unicode-xid@0.2.6
	url@2.5.8
	utf8_iter@1.0.4
	utf8parse@0.2.2
	uuid@1.23.1
	vcpkg@0.2.15
	wasip2@1.0.3+wasi-0.2.9
	wasip3@0.4.0+wasi-0.3.0-rc-2026-01-06
	wasm-bindgen-macro-support@0.2.120
	wasm-bindgen-macro@0.2.120
	wasm-bindgen-shared@0.2.120
	wasm-bindgen@0.2.120
	wasm-encoder@0.244.0
	wasm-metadata@0.244.0
	wasmparser@0.244.0
	windows-core@0.62.2
	windows-implement@0.60.2
	windows-interface@0.59.3
	windows-link@0.2.1
	windows-result@0.4.1
	windows-strings@0.5.1
	windows-sys@0.59.0
	windows-sys@0.61.2
	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
	winres@0.1.12
	wit-bindgen-core@0.51.0
	wit-bindgen-rust-macro@0.51.0
	wit-bindgen-rust@0.51.0
	wit-bindgen@0.51.0
	wit-bindgen@0.57.1
	wit-component@0.244.0
	wit-parser@0.244.0
	writeable@0.6.3
	xml@1.2.1
	yoke-derive@0.8.2
	yoke@0.8.2
	zerofrom-derive@0.1.7
	zerofrom@0.1.7
	zerotrie@0.2.4
	zerovec-derive@0.11.3
	zerovec@0.11.6
	zmij@1.0.21
"

RUST_MIN_VER="1.95.0"

inherit shell-completion cargo

DESCRIPTION="Hurl, run and test HTTP requests"
HOMEPAGE="https://hurl.dev"
SRC_URI="
	https://github.com/Orange-OpenSource/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="Apache-2.0"
# Dependent crate licenses
LICENSE+=" Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-3.0 ZLIB"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="
	net-misc/curl
	dev-libs/libxml2:=
"
DEPEND="${RDEPEND}"

# Rust.
QA_FLAGS_IGNORED=(
	/usr/bin/hurl
	/usr/bin/hurlfmt
)

QA_PRESTRIPPED="${QA_FLAGS_IGNORED[*]}"

src_install() {
	dobin "$(cargo_target_dir)"/hurl{,fmt}
	doman docs/manual/hurl{,fmt}.1

	dodoc CHANGELOG.md README.md LICENSE

	newbashcomp completions/hurl.bash hurl
	newbashcomp completions/hurlfmt.bash hurlfmt
	# https://github.com/Orange-OpenSource/hurl/issues/3938
	# newzshcomp completions/_hurl _hurl
	# newzshcomp completions/_hurlfmt _hurlfmt
	newfishcomp completions/hurl.fish hurl.fish
	newfishcomp completions/hurlfmt.fish hurlfmt.fish
}

# These need a local HTTP server.. and don't bother setting one up..
CARGO_SKIP_TESTS=(
	simple_sample
	runner::hurl_file::run
)
