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

# Generated by zig-ebuilder 0.3.0

EAPI=8

ZIG_SLOT="0.17"

if [[ ${PV} == 9999 ]]; then
	EGIT_REPO_URI="https://github.com/jedisct1/turbocrypt.git"
	inherit git-r3
else
	declare -g -r -A ZBS_DEPENDENCIES=(
		[hctr2-0.1.9-mu7McRKLAwDyKHlYpPYq2mvyHVjF-unjZ1e4AEqcxZPG.tar.gz]='https://github.com/jedisct1/zig-hctr2/archive/3ad105c1fd9417bb3f70b717e0d3e6f47d3d16ed.tar.gz'
		[base84-0.2.0-Pe665lpYAADUkY5wwdPFV5ex9oBvE7ZtcileYeWJSA2_.tar.gz]='https://github.com/jedisct1/zig-base84/archive/abf64430414ee462fcd2847c7f694151c5e47caf.tar.gz'
		[N-V-__8AAH7hpQBGgn_WYJ7zWhp38R2aFrmFmmYqDUpTz_D7.tar.gz]='https://github.com/libfuse/libfuse/releases/download/fuse-3.18.3/fuse-3.18.3.tar.gz'
		[aegis_raf-0.3.0-uXR9I6bFAQB9UfWFHxQPitvZBqUa9runRBk6c3CfI6mW.tar.gz]='https://github.com/jedisct1/zig-aegis-raf/archive/2b70241b624be8a7c42bd51d49f1bbb4c21c6b1d.tar.gz'
	)
	S="${WORKDIR}/${P}"
	KEYWORDS="~amd64"
fi

inherit zig

DESCRIPTION="A fast, easy-to-use, and secure command-line tool for encryption and decryption"
HOMEPAGE="https://github.com/jedisct1/turbocrypt"

if [[ ${PV} != 9999 ]]; then
	SRC_URI="
		https://github.com/jedisct1/turbocrypt/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
		${ZBS_DEPENDENCIES_SRC_URI}
	"
fi

LICENSE="MIT"
SLOT="0"

src_unpack() {
	if [[ ${PV} == 9999 ]]; then
		git-r3_src_unpack
		zig_live_src_unpack
	else
		zig_src_unpack
	fi
}