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

# Autogenerated by pycargoebuild 0.13.2

EAPI=8

CRATES="
"

inherit cargo flag-o-matic

DESCRIPTION="The front-end to your dev env"
HOMEPAGE="https://mise.jdx.dev"
SRC_URI="
https://github.com/jdx/mise/archive/refs/tags/v${PV}.tar.gz
https://gentoo.rgst.io/updater_artifacts/${CATEGORY}/${PN}/${PV}/crates.tar.xz -> crates-${PV}.tar.xz
${CARGO_CRATE_URIS}"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 BSD-2 BSD CC0-1.0 CDLA-Permissive-2.0 ISC MIT MPL-2.0
	openssl Unicode-3.0 ZLIB BZIP2
"
RUST_MIN_VER="1.85.0"
BDEPEND="
virtual/pkgconfig
dev-libs/openssl
app-arch/zstd
"
SLOT="0"
KEYWORDS="amd64 arm64 x86"

src_configure() {
	export OPENSSL_NO_VENDOR=1
	export ZSTD_SYS_USE_PKG_CONFIG=1

	# aws-lc-sys 0.45.0 + cc 1.6.0 leak user -O flags into the jitterentropy
	# build, which hard-errors unless compiled at -O0. Drop once aws-lc-sys
	# > 0.45.0, ref: https://github.com/aws/aws-lc-rs/issues/1252
	filter-flags '-O*'

	cargo_src_configure
}