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

# Autogenerated by pycargoebuild 0.13.3

EAPI=8

CRATES="
	Inflector@0.11.4
	addr2line@0.21.0
	adler@1.0.2
	aead@0.5.2
	aho-corasick@1.1.2
	alloc-no-stdlib@2.0.4
	alloc-stdlib@0.2.2
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.5
	anstyle-parse@0.2.3
	anstyle-query@1.0.2
	anstyle-wincon@3.0.2
	anstyle@1.0.4
	anyhow@1.0.79
	async-trait@0.1.77
	atk-sys@0.15.1
	atk@0.15.1
	autocfg@1.1.0
	axum-core@0.4.2
	axum@0.7.3
	backtrace@0.3.69
	base64@0.13.1
	base64@0.21.5
	base64@0.22.1
	bitflags@1.3.2
	bitflags@2.4.1
	block-buffer@0.10.4
	block@0.1.6
	brotli-decompressor@2.5.1
	brotli@3.4.0
	bstr@1.9.0
	bumpalo@3.14.0
	bytemuck@1.14.0
	byteorder@1.5.0
	bytes@1.5.0
	cairo-rs@0.15.12
	cairo-sys-rs@0.15.1
	cargo_toml@0.15.3
	cc@1.0.83
	cesu8@1.1.0
	cfb@0.7.3
	cfg-expr@0.15.6
	cfg-expr@0.9.1
	cfg-if@1.0.0
	chacha20@0.9.1
	chacha20poly1305@0.10.1
	chrono@0.4.31
	cipher@0.4.4
	clap@4.4.13
	clap_builder@4.4.12
	clap_derive@4.4.7
	clap_lex@0.6.0
	cocoa-foundation@0.1.2
	cocoa@0.24.1
	color_quant@1.1.0
	colorchoice@1.0.0
	combine@4.6.6
	compile-time@0.2.0
	convert_case@0.4.0
	core-foundation-sys@0.8.6
	core-foundation@0.9.4
	core-graphics-types@0.1.3
	core-graphics@0.22.3
	cpufeatures@0.2.12
	crc32fast@1.3.2
	crossbeam-channel@0.5.10
	crossbeam-deque@0.8.4
	crossbeam-epoch@0.9.17
	crossbeam-utils@0.8.18
	crossterm@0.25.0
	crossterm_winapi@0.9.1
	crypto-common@0.1.6
	cssparser-macros@0.6.1
	cssparser@0.27.2
	ctor@0.2.6
	darling@0.20.3
	darling_core@0.20.3
	darling_macro@0.20.3
	data-encoding@2.5.0
	deranged@0.3.11
	derive_more@0.99.17
	digest@0.10.7
	directories@5.0.1
	dirs-next@2.0.0
	dirs-sys-next@0.1.2
	dirs-sys@0.4.1
	dispatch@0.2.0
	dns-lookup@2.0.4
	document-features@0.2.8
	dtoa-short@0.3.4
	dtoa@1.0.9
	dunce@1.0.4
	dyn-clone@1.0.16
	either@1.9.0
	embed-resource@2.4.1
	embed_plist@1.2.2
	encoding_rs@0.8.33
	env_logger@0.10.1
	equivalent@1.0.1
	errno@0.3.8
	fastrand@2.0.1
	fdeflate@0.3.3
	field-offset@0.3.6
	filetime@0.2.23
	flate2@1.0.28
	fnv@1.0.7
	foreign-types-shared@0.1.1
	foreign-types@0.3.2
	form_urlencoded@1.2.1
	futf@0.1.5
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-executor@0.3.30
	futures-io@0.3.30
	futures-macro@0.3.30
	futures-sink@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	futures@0.3.30
	fxhash@0.2.1
	gdk-pixbuf-sys@0.15.10
	gdk-pixbuf@0.15.11
	gdk-sys@0.15.1
	gdk@0.15.4
	gdkwayland-sys@0.15.3
	gdkx11-sys@0.15.1
	generator@0.7.5
	generic-array@0.14.7
	getrandom@0.1.16
	getrandom@0.2.11
	gimli@0.28.1
	gio-sys@0.15.10
	gio@0.15.12
	glib-macros@0.15.13
	glib-sys@0.15.10
	glib@0.15.12
	glob@0.3.1
	globset@0.4.14
	gobject-sys@0.15.10
	gtk-sys@0.15.3
	gtk3-macros@0.15.6
	gtk@0.15.5
	h2@0.3.26
	h2@0.4.4
	hashbrown@0.12.3
	hashbrown@0.14.3
	heck@0.3.3
	heck@0.4.1
	hermit-abi@0.3.3
	hex@0.4.3
	home@0.5.9
	html-escape@0.2.13
	html5ever@0.26.0
	http-body-util@0.1.0
	http-body@0.4.6
	http-body@1.0.0
	http-range@0.1.5
	http@0.2.11
	http@1.0.0
	httparse@1.8.0
	httpdate@1.0.3
	humantime@2.1.0
	hyper-tls@0.5.0
	hyper-util@0.1.2
	hyper@0.14.28
	hyper@1.1.0
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.59
	ico@0.3.0
	ident_case@1.0.1
	idna@0.5.0
	ignore@0.4.22
	image@0.24.7
	indexmap@1.9.3
	indexmap@2.1.0
	indoc@1.0.9
	infer@0.13.0
	inout@0.1.3
	inquire@0.6.2
	instant@0.1.12
	ipnet@2.9.0
	is-docker@0.2.0
	is-terminal@0.4.10
	is-wsl@0.4.0
	is_executable@1.0.1
	itertools@0.10.5
	itoa@0.4.8
	itoa@1.0.10
	javascriptcore-rs-sys@0.4.0
	javascriptcore-rs@0.16.0
	jni-sys@0.3.0
	jni@0.20.0
	js-sys@0.3.66
	json-patch@1.2.0
	kuchikiki@0.8.2
	lazy_static@1.4.0
	libc@0.2.155
	libredox@0.0.1
	line-wrap@0.1.1
	linux-raw-sys@0.4.12
	litrs@0.4.1
	lock_api@0.4.11
	log@0.4.20
	loom@0.5.6
	lzma-sys@0.1.20
	mac@0.1.1
	malloc_buf@0.0.6
	markup5ever@0.11.0
	matchers@0.1.0
	matches@0.1.10
	matchit@0.7.3
	md5@0.7.0
	memchr@2.7.1
	memoffset@0.9.0
	mime@0.3.17
	miniz_oxide@0.7.1
	mio@0.8.11
	native-tls@0.2.11
	ndk-context@0.1.1
	ndk-sys@0.3.0
	ndk@0.6.0
	new_debug_unreachable@1.0.4
	newline-converter@0.2.2
	nodrop@0.1.14
	ntapi@0.4.1
	nu-ansi-term@0.46.0
	num-conv@0.1.0
	num-integer@0.1.45
	num-rational@0.4.1
	num-traits@0.2.17
	num_cpus@1.16.0
	num_enum@0.5.11
	num_enum_derive@0.5.11
	objc@0.2.7
	objc_exception@0.1.2
	objc_id@0.1.1
	object@0.32.2
	once_cell@1.19.0
	opaque-debug@0.3.0
	open@5.0.1
	openssl-macros@0.1.1
	openssl-probe@0.1.5
	openssl-src@300.2.1+3.2.0
	openssl-sys@0.9.103
	openssl@0.10.66
	option-ext@0.2.0
	overload@0.1.1
	pango-sys@0.15.10
	pango@0.15.10
	parking_lot@0.12.1
	parking_lot_core@0.9.9
	paste@1.0.14
	pathdiff@0.2.1
	pem@3.0.4
	percent-encoding@2.3.1
	phf@0.10.1
	phf@0.11.2
	phf@0.8.0
	phf_codegen@0.10.0
	phf_codegen@0.8.0
	phf_generator@0.10.0
	phf_generator@0.11.2
	phf_generator@0.8.0
	phf_macros@0.11.2
	phf_macros@0.8.0
	phf_shared@0.10.0
	phf_shared@0.11.2
	phf_shared@0.8.0
	pin-project-internal@1.1.3
	pin-project-lite@0.2.13
	pin-project@1.1.3
	pin-utils@0.1.0
	pkg-config@0.3.28
	plist@1.6.0
	png@0.17.10
	poly1305@0.8.0
	powerfmt@0.2.0
	ppv-lite86@0.2.17
	precomputed-hash@0.1.1
	proc-macro-crate@1.3.1
	proc-macro-error-attr@1.0.4
	proc-macro-error@1.0.4
	proc-macro-hack@0.5.20+deprecated
	proc-macro2@1.0.76
	quick-xml@0.31.0
	quote@1.0.35
	rand@0.7.3
	rand@0.8.5
	rand_chacha@0.2.2
	rand_chacha@0.3.1
	rand_core@0.5.1
	rand_core@0.6.4
	rand_hc@0.2.0
	rand_pcg@0.2.1
	raw-window-handle@0.5.2
	rayon-core@1.12.0
	rayon@1.8.0
	redact-engine@0.1.2
	redox_syscall@0.4.1
	redox_users@0.4.4
	regex-automata@0.1.10
	regex-automata@0.4.3
	regex-syntax@0.6.29
	regex-syntax@0.8.2
	regex@1.10.2
	reqwest@0.11.23
	roxmltree@0.18.1
	rustc-demangle@0.1.23
	rustc_version@0.4.0
	rustix@0.38.34
	rustversion@1.0.14
	ryu@1.0.16
	safemem@0.3.3
	same-file@1.0.6
	schannel@0.1.23
	scoped-tls@1.0.1
	scopeguard@1.2.0
	security-framework-sys@2.9.1
	security-framework@2.9.2
	selectors@0.22.0
	semver@1.0.21
	serde@1.0.195
	serde_derive@1.0.195
	serde_json@1.0.111
	serde_path_to_error@0.1.15
	serde_regex@1.1.0
	serde_repr@0.1.18
	serde_spanned@0.6.5
	serde_urlencoded@0.7.1
	serde_with@3.4.0
	serde_with_macros@3.4.0
	serialize-to-javascript-impl@0.1.1
	serialize-to-javascript@0.1.1
	servo_arc@0.1.1
	sha1@0.10.6
	sha256@1.5.0
	sha2@0.10.8
	sharded-slab@0.1.7
	signal-hook-mio@0.2.3
	signal-hook-registry@1.4.1
	signal-hook@0.3.17
	simd-adler32@0.3.7
	siphasher@0.3.11
	slab@0.4.9
	smallvec@1.11.2
	socket2@0.5.5
	soup2-sys@0.2.0
	soup2@0.2.1
	specta-macros@2.0.0-rc.1
	specta@2.0.0-rc.1
	stable_deref_trait@1.2.0
	state@0.5.3
	string_cache@0.8.7
	string_cache_codegen@0.5.2
	strsim@0.10.0
	subtle@2.5.0
	syn@1.0.109
	syn@2.0.48
	sync_wrapper@0.1.2
	sysinfo@0.29.11
	system-configuration-sys@0.5.0
	system-configuration@0.5.1
	system-deps@5.0.0
	system-deps@6.2.0
	tao-macros@0.1.2
	tao@0.16.5
	tar@0.4.40
	target-lexicon@0.12.13
	tauri-build@1.5.1
	tauri-codegen@1.4.2
	tauri-macros@1.4.3
	tauri-runtime-wry@0.14.3
	tauri-runtime@0.14.2
	tauri-utils@1.5.2
	tauri-winres@0.1.1
	tauri@1.5.4
	tempfile@3.9.0
	tendril@0.4.3
	termcolor@1.4.0
	thin-slice@0.1.1
	thiserror-impl@1.0.56
	thiserror@1.0.56
	thread_local@1.1.7
	time-core@0.1.2
	time-macros@0.2.18
	time@0.3.36
	tinyvec@1.6.0
	tinyvec_macros@0.1.1
	tokio-macros@2.2.0
	tokio-native-tls@0.3.1
	tokio-tungstenite@0.21.0
	tokio-util@0.7.10
	tokio@1.36.0
	toml@0.5.11
	toml@0.7.8
	toml@0.8.8
	toml_datetime@0.6.5
	toml_edit@0.19.15
	toml_edit@0.21.0
	tower-layer@0.3.2
	tower-service@0.3.2
	tower@0.4.13
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing-log@0.2.0
	tracing-subscriber@0.3.18
	tracing@0.1.40
	treediff@4.0.2
	try-lock@0.2.5
	tungstenite@0.21.0
	typenum@1.17.0
	unicode-bidi@0.3.14
	unicode-ident@1.0.12
	unicode-normalization@0.1.22
	unicode-segmentation@1.10.1
	unicode-width@0.1.11
	universal-hash@0.5.1
	url@2.5.0
	urlencoding@2.1.3
	utf-8@0.7.6
	utf8-width@0.1.7
	utf8parse@0.2.1
	uuid@1.6.1
	uzers@0.11.3
	valuable@0.1.0
	vcpkg@0.2.15
	version-compare@0.0.11
	version-compare@0.1.1
	version_check@0.9.4
	vswhom-sys@0.1.2
	vswhom@0.1.0
	walkdir@2.4.0
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasi@0.9.0+wasi-snapshot-preview1
	wasite@0.1.0
	wasm-bindgen-backend@0.2.89
	wasm-bindgen-futures@0.4.39
	wasm-bindgen-macro-support@0.2.89
	wasm-bindgen-macro@0.2.89
	wasm-bindgen-shared@0.2.89
	wasm-bindgen@0.2.89
	wasm-streams@0.3.0
	web-sys@0.3.66
	webkit2gtk-sys@0.18.0
	webkit2gtk@0.18.2
	webview2-com-macros@0.6.0
	webview2-com-sys@0.19.0
	webview2-com@0.19.1
	which@6.0.2
	whoami@1.5.1
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.6
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-bindgen@0.39.0
	windows-core@0.52.0
	windows-implement@0.39.0
	windows-metadata@0.39.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.48.5
	windows-targets@0.52.0
	windows-tokens@0.39.0
	windows-version@0.1.0
	windows@0.39.0
	windows@0.48.0
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.0
	windows_aarch64_msvc@0.39.0
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.0
	windows_i686_gnu@0.39.0
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.0
	windows_i686_msvc@0.39.0
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.0
	windows_x86_64_gnu@0.39.0
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.0
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.0
	windows_x86_64_msvc@0.39.0
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.0
	winnow@0.5.33
	winreg@0.50.0
	winreg@0.51.0
	winsafe@0.0.19
	wry@0.24.7
	x11-dl@2.21.0
	x11@2.21.0
	xattr@1.2.0
	xmlparser@0.13.6
	xz2@0.1.7
	zeroize@1.7.0
"

inherit cargo

DESCRIPTION="GlobalProtect VPN GUI based on Openconnect with SAML auth mode support"
HOMEPAGE="https://github.com/yuezk/GlobalProtect-openconnect"
SRC_URI="
	https://github.com/yuezk/GlobalProtect-openconnect/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

S="${WORKDIR}/GlobalProtect-openconnect-${PV}"

LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD MIT MPL-2.0
	Unicode-DFS-2016
"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND="dev-libs/libayatana-appindicator"

cargo_src_install() {
	dobin "${S}/target/x86_64-unknown-linux-gnu/release/gpauth"
	dobin "${S}/target/x86_64-unknown-linux-gnu/release/gpclient"
	dobin "${S}/target/x86_64-unknown-linux-gnu/release/gpgui-helper"
	dobin "${S}/target/x86_64-unknown-linux-gnu/release/gpservice"
}