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

# Autogenerated by pycargoebuild 0.10

EAPI=8

CRATES="
	adler2@2.0.0
	allocator-api2@0.2.21
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.19
	anstyle-parse@0.2.7
	anstyle-query@1.1.3
	anstyle-wincon@3.0.9
	anstyle@1.0.11
	autocfg@1.4.0
	base64@0.22.1
	bitflags@2.9.1
	bumpalo@3.17.0
	byteorder@1.5.0
	cc@1.2.25
	cfg-if@1.0.0
	chrono@0.4.41
	clap@4.5.40
	clap_builder@4.5.40
	clap_lex@0.7.5
	colorchoice@1.0.4
	core-foundation-sys@0.8.7
	crc32fast@1.4.2
	crossbeam-utils@0.8.21
	displaydoc@0.2.5
	equivalent@1.0.2
	flate2@1.1.1
	foldhash@0.1.5
	form_urlencoded@1.2.1
	fs2@0.4.3
	fuchsia-cprng@0.1.1
	gcc@0.3.55
	getrandom@0.2.16
	getrandom@0.3.3
	hashbrown@0.15.3
	hermit-abi@0.5.1
	hex@0.4.3
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.63
	icu_collections@2.0.0
	icu_locale_core@2.0.0
	icu_normalizer@2.0.0
	icu_normalizer_data@2.0.0
	icu_properties@2.0.1
	icu_properties_data@2.0.1
	icu_provider@2.0.0
	idna@1.0.3
	idna_adapter@1.2.1
	is_terminal_polyfill@1.70.1
	jobserver@0.1.33
	js-sys@0.3.77
	lazy_static@1.5.0
	libc@0.2.172
	litemap@0.8.0
	log@0.4.27
	miniz_oxide@0.8.8
	num-traits@0.2.19
	num_cpus@1.17.0
	once_cell@1.21.3
	once_cell_polyfill@1.70.1
	paste@1.0.15
	percent-encoding@2.3.1
	pkg-config@0.3.32
	potential_utf@0.1.2
	ppv-lite86@0.2.21
	proc-macro2@1.0.95
	quote@1.0.40
	r-efi@5.2.0
	rand@0.3.23
	rand@0.4.6
	rand@0.9.1
	rand_chacha@0.9.0
	rand_core@0.3.1
	rand_core@0.4.2
	rand_core@0.9.3
	rdrand@0.4.0
	ring@0.17.14
	rmp-serde@0.15.5
	rmp@0.8.14
	rust-crypto@0.2.36
	rustc-serialize@0.3.25
	rustls-pki-types@1.12.0
	rustls-webpki@0.103.3
	rustls@0.23.27
	rustversion@1.0.21
	same-file@1.0.6
	serde@1.0.219
	serde_derive@1.0.219
	shlex@1.3.0
	smallvec@1.15.0
	stable_deref_trait@1.2.0
	strsim@0.11.1
	subtle@2.6.1
	syn@2.0.101
	synstructure@0.13.2
	time@0.1.45
	tinystr@0.8.1
	unicode-ident@1.0.18
	untrusted@0.9.0
	ureq@2.12.1
	url@2.5.4
	utf8_iter@1.0.4
	utf8parse@0.2.2
	walkdir@2.5.0
	wasi@0.10.0+wasi-snapshot-preview1
	wasi@0.11.0+wasi-snapshot-preview1
	wasi@0.14.2+wasi-0.2.4
	wasm-bindgen-backend@0.2.100
	wasm-bindgen-macro-support@0.2.100
	wasm-bindgen-macro@0.2.100
	wasm-bindgen-shared@0.2.100
	wasm-bindgen@0.2.100
	webpki-roots@0.26.11
	webpki-roots@1.0.0
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.9
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-core@0.61.2
	windows-implement@0.60.0
	windows-interface@0.59.1
	windows-link@0.1.1
	windows-result@0.3.4
	windows-strings@0.4.2
	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
	wit-bindgen-rt@0.39.0
	writeable@0.6.1
	yoke-derive@0.8.0
	yoke@0.8.0
	zerocopy-derive@0.8.25
	zerocopy@0.8.25
	zerofrom-derive@0.1.6
	zerofrom@0.1.6
	zeroize@1.8.1
	zerotrie@0.2.2
	zerovec-derive@0.11.1
	zerovec@0.11.2
	zstd-safe@7.2.4
	zstd-sys@2.0.15+zstd.1.5.7
	zstd@0.13.3
"

inherit cargo

ELFSHAKER_COMMIT="3656bdefcc1d375f9a928b0fc566b16ff3362685"
DESCRIPTION="Stores binary objects efficiently"
HOMEPAGE="https://github.com/elfshaker/elfshaker"
SRC_URI="
	https://github.com/elfshaker/elfshaker/archive/${ELFSHAKER_COMMIT}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"
S="${WORKDIR}"/${PN}-${ELFSHAKER_COMMIT}

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

DEPEND="app-arch/zstd:="
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"

QA_FLAGS_IGNORED="usr/bin/elfshaker"

src_configure() {
	export ZSTD_SYS_USE_PKG_CONFIG=1

	cargo_src_configure
}