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

# Autogenerated by pycargoebuild 0.15.0

EAPI=8

CRATES="
	ahash@0.7.8
	ahash@0.8.11
	aho-corasick@1.1.3
	allocator-api2@0.2.18
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.14
	anstyle-parse@0.2.4
	anstyle-query@1.0.3
	anstyle-wincon@3.0.3
	anstyle@1.0.10
	anyhow@1.0.97
	ariadne@0.5.1
	arrayvec@0.7.6
	autocfg@1.3.0
	base64@0.13.1
	base64@0.21.7
	base64@0.22.1
	beef@0.5.2
	bit-set@0.5.3
	bit-vec@0.6.3
	bitflags@1.3.2
	bitflags@2.9.0
	bitvec@1.0.1
	blanket@0.4.0
	borsh-derive@1.5.0
	borsh@1.5.0
	bstr@1.9.1
	bumpalo@3.16.0
	bytecheck@0.6.12
	bytecheck_derive@0.6.12
	byteorder@1.5.0
	bytes@1.6.0
	calendrical_calculations@0.1.3
	cc@1.0.97
	cfg-if@1.0.0
	cfg_aliases@0.1.1
	cfg_aliases@0.2.1
	chrono@0.4.40
	chumsky@1.0.0-alpha.8
	clap@4.5.32
	clap_builder@4.5.32
	clap_derive@4.5.32
	clap_lex@0.7.4
	clipboard-win@5.4.0
	colorchoice@1.0.1
	condtype@1.3.0
	console@0.15.8
	core-foundation-sys@0.8.6
	core_maths@0.1.0
	crossterm@0.28.1
	crossterm_winapi@0.9.1
	displaydoc@0.2.4
	divan-macros@0.1.17
	divan@0.1.17
	either@1.13.0
	encode_unicode@0.3.6
	encoding_rs@0.8.34
	endian-type@0.1.2
	enum_dispatch@0.3.13
	equivalent@1.0.1
	errno@0.3.10
	error-code@3.3.1
	fastrand@2.3.0
	fd-lock@4.0.2
	fixed_decimal@0.5.6
	fnv@1.0.7
	foldhash@0.1.5
	funty@2.0.0
	fxhash@0.2.1
	genawaiter-macro@0.99.1
	genawaiter-proc-macro@0.99.1
	genawaiter@0.99.1
	getrandom@0.2.15
	getrandom@0.3.1
	glob@0.3.1
	globset@0.4.16
	hashbrown@0.12.3
	hashbrown@0.15.2
	heck@0.5.0
	hex@0.4.3
	home@0.5.9
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.60
	ibig@0.3.6
	icu@1.5.0
	icu_calendar@1.5.2
	icu_calendar_data@1.5.0
	icu_casemap@1.5.1
	icu_casemap_data@1.5.0
	icu_collator@1.5.0
	icu_collator_data@1.5.0
	icu_collections@1.5.0
	icu_datetime@1.5.1
	icu_datetime_data@1.5.0
	icu_decimal@1.5.0
	icu_decimal_data@1.5.0
	icu_experimental@0.1.0
	icu_experimental_data@0.1.0
	icu_list@1.5.0
	icu_list_data@1.5.0
	icu_locid@1.5.0
	icu_locid_transform@1.5.0
	icu_locid_transform_data@1.5.0
	icu_normalizer@1.5.0
	icu_normalizer_data@1.5.0
	icu_pattern@0.2.0
	icu_plurals@1.5.0
	icu_plurals_data@1.5.0
	icu_properties@1.5.1
	icu_properties_data@1.5.0
	icu_provider@1.5.0
	icu_provider_adapters@1.5.0
	icu_provider_macros@1.5.0
	icu_segmenter@1.5.0
	icu_segmenter_data@1.5.0
	icu_timezone@1.5.0
	icu_timezone_data@1.5.0
	indexmap@2.8.0
	indextree-macros@0.1.1
	indextree@4.7.2
	insta@1.42.2
	iri-string@0.7.7
	is_terminal_polyfill@1.70.0
	itertools@0.13.0
	itertools@0.14.0
	itoa@1.0.11
	js-sys@0.3.69
	json@0.12.4
	lazy_static@1.4.0
	lexical-core@1.0.5
	lexical-parse-float@1.0.5
	lexical-parse-integer@1.0.5
	lexical-util@1.0.6
	lexical-write-float@1.0.5
	lexical-write-integer@1.0.5
	lexical@7.0.4
	libc@0.2.171
	libm@0.2.8
	linked-hash-map@0.5.6
	linux-raw-sys@0.4.13
	linux-raw-sys@0.9.3
	litemap@0.7.5
	lock_api@0.4.12
	log@0.4.26
	logos-codegen@0.15.0
	logos-derive@0.15.0
	logos@0.15.0
	memchr@2.7.2
	mio@1.0.3
	next-gen-proc_macros@0.1.1
	next-gen@0.1.1
	nibble_vec@0.1.0
	nix@0.29.0
	num-bigint@0.4.5
	num-complex@0.4.6
	num-derive@0.4.2
	num-integer@0.1.46
	num-iter@0.1.45
	num-rational@0.4.2
	num-traits@0.2.19
	num@0.4.3
	once_cell@1.21.1
	ordered-float@5.0.0
	parking_lot@0.12.2
	parking_lot_core@0.9.10
	percent-encoding@2.3.1
	pin-project-internal@1.1.10
	pin-project@1.1.10
	ppv-lite86@0.2.17
	proc-macro-crate@3.3.0
	proc-macro-error-attr@0.4.12
	proc-macro-error-attr@1.0.4
	proc-macro-error@0.4.12
	proc-macro-error@1.0.4
	proc-macro-hack@0.5.20+deprecated
	proc-macro2@0.4.30
	proc-macro2@1.0.86
	proptest@1.4.0
	psm@0.1.21
	ptr_meta@0.1.4
	ptr_meta_derive@0.1.4
	quick-error@1.2.3
	quote@0.6.13
	quote@1.0.40
	radium@0.7.0
	radix_trie@0.2.1
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	rand_xorshift@0.3.0
	redox_syscall@0.5.1
	regex-automata@0.2.0
	regex-automata@0.3.9
	regex-automata@0.4.9
	regex-lite@0.1.6
	regex-syntax@0.7.5
	regex-syntax@0.8.5
	regex@1.11.1
	regexml@0.2.1
	rend@0.4.2
	rkyv@0.7.44
	rkyv_derive@0.7.44
	ron@0.7.1
	ron@0.8.1
	rust_decimal@1.36.0
	rust_decimal_macros@1.36.0
	rustc_version@0.4.1
	rustix@0.38.34
	rustix@1.0.2
	rustversion@1.0.16
	rusty-fork@0.3.0
	rustyline@15.0.0
	ryu@1.0.18
	same-file@1.0.6
	scopeguard@1.2.0
	seahash@4.1.0
	semver@1.0.26
	serde@1.0.201
	serde_derive@1.0.201
	serde_json@1.0.117
	signal-hook-mio@0.2.4
	signal-hook-registry@1.4.2
	signal-hook@0.3.17
	simdutf8@0.1.4
	similar@2.5.0
	smallvec@1.13.2
	stable_deref_trait@1.2.0
	stacker@0.1.15
	static_assertions@1.1.0
	strsim@0.11.1
	strum@0.26.3
	strum@0.27.1
	strum_macros@0.26.4
	strum_macros@0.27.1
	syn-mid@0.5.4
	syn@0.15.44
	syn@1.0.109
	syn@2.0.87
	syn_derive@0.1.8
	synstructure@0.13.1
	tap@1.0.1
	tempfile@3.19.0
	terminal_size@0.4.1
	test-generator@0.3.1
	thiserror-impl@1.0.63
	thiserror-impl@2.0.12
	thiserror@1.0.63
	thiserror@2.0.12
	tinystr@0.7.5
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	toml_datetime@0.6.8
	toml_edit@0.22.24
	unarray@0.1.4
	unicode-ident@1.0.18
	unicode-segmentation@1.12.0
	unicode-width@0.1.12
	unicode-width@0.2.0
	unicode-xid@0.1.0
	unwind_safe@0.1.0
	utf16_iter@1.0.5
	utf8_iter@1.0.4
	utf8parse@0.2.1
	uuid@1.8.0
	v_jsonescape@0.7.8
	version_check@0.9.4
	wait-timeout@0.2.0
	walkdir@2.5.0
	wasi@0.11.0+wasi-snapshot-preview1
	wasi@0.13.3+wasi-0.2.2
	wasm-bindgen-backend@0.2.92
	wasm-bindgen-macro-support@0.2.92
	wasm-bindgen-macro@0.2.92
	wasm-bindgen-shared@0.2.92
	wasm-bindgen@0.2.92
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.8
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-core@0.52.0
	windows-link@0.1.0
	windows-sys@0.52.0
	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
	winnow@0.7.4
	wit-bindgen-rt@0.33.0
	write16@1.0.0
	writeable@0.5.5
	wyz@0.5.1
	xhtmlchardet@2.2.0
	xmlparser@0.13.6
	xot@0.29.0
	yansi@1.0.1
	yoke-derive@0.7.5
	yoke@0.7.5
	zerocopy-derive@0.7.34
	zerocopy@0.7.34
	zerofrom-derive@0.1.3
	zerofrom@0.1.3
	zerotrie@0.1.3
	zerovec-derive@0.10.3
	zerovec@0.10.4
"

inherit cargo

DESCRIPTION="Xee CLI. Swiss Army knife for XML. XPath and XSLT"
HOMEPAGE="https://github.com/Paligo/xee"
SRC_URI="
	${CARGO_CRATE_URIS}
	https://github.com/Paligo/${PN}/archive/refs/tags/${PN}-v${PV}.tar.gz -> ${P}.tar.gz
"
S="${WORKDIR}/xee-xee-v${PV}"

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

# the v0.1.5 tarball released broken. See https://github.com/Paligo/xee/issues/60
PATCHES=(
	"${FILESDIR}"/0001-Removed-build-script-from-xee.patch
	"${FILESDIR}"/0002-Using-CommandFactory-interface-for-retrieving-versio.patch
	"${FILESDIR}"/0003-Readd-git-date-and-commit-info-to-version.patch
)

DOCS=( "${S}/xee/README.md" )

src_prepare() {
	default
	cargo_update_crates
}

src_install() {
	cargo_src_install --path ./xee
	default
}