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

# Autogenerated by pycargoebuild 0.13.3

EAPI=8

CRATES="
	addr2line@0.19.0
	adler@1.0.2
	ahash@0.8.3
	aho-corasick@1.0.4
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anstream@0.6.7
	anstyle-parse@0.2.1
	anstyle-query@1.0.0
	anstyle-wincon@3.0.1
	anstyle@1.0.1
	async-broadcast@0.5.1
	async-channel@1.8.0
	async-executor@1.5.1
	async-fs@1.6.0
	async-io@1.13.0
	async-lock@2.7.0
	async-pidfd@0.1.4
	async-process@1.7.0
	async-recursion@1.0.4
	async-task@4.4.0
	async-trait@0.1.68
	atk-sys@0.18.0
	atk@0.18.0
	atomic-waker@1.1.1
	autocfg@1.1.0
	backtrace@0.3.67
	base64@0.21.0
	base64@0.22.0
	bitflags@1.3.2
	bitflags@2.4.0
	block-buffer@0.10.4
	blocking@1.3.1
	bstr@1.8.0
	bumpalo@3.12.0
	byteorder@1.4.3
	bytes@1.5.0
	cairo-rs@0.18.5
	cairo-sys-rs@0.18.2
	calloop-wayland-source@0.2.0
	calloop@0.12.3
	cc@1.0.79
	cfg-expr@0.14.0
	cfg-if@1.0.0
	cfg_aliases@0.1.1
	cfg_aliases@0.2.1
	chrono@0.4.38
	clap@4.5.13
	clap_builder@4.5.13
	clap_derive@4.5.13
	clap_lex@0.7.0
	color-eyre@0.6.3
	color-spantrace@0.2.0
	colorchoice@1.0.0
	concurrent-queue@2.2.0
	core-foundation-sys@0.8.4
	core-foundation@0.9.3
	cpufeatures@0.2.6
	crossbeam-channel@0.5.8
	crossbeam-deque@0.8.3
	crossbeam-epoch@0.9.14
	crossbeam-utils@0.8.15
	crypto-common@0.1.6
	ctrlc@3.4.4
	cursor-icon@1.1.0
	darling@0.14.4
	darling_core@0.14.4
	darling_macro@0.14.4
	dbus@0.9.7
	deranged@0.3.11
	derivative@2.2.0
	derive_is_enum_variant@0.1.1
	derive_more@0.99.17
	digest@0.10.6
	dirs-sys@0.4.1
	dirs@5.0.1
	discard@1.0.4
	dlib@0.5.2
	downcast-rs@1.2.0
	dyn-clone@1.0.17
	either@1.8.1
	enum-kinds@0.5.1
	enumflags2@0.7.7
	enumflags2_derive@0.7.7
	equivalent@1.0.1
	errno@0.3.8
	event-listener@2.5.3
	eyre@0.6.8
	fastrand@1.9.0
	fastrand@2.0.1
	field-offset@0.3.5
	filetime@0.2.22
	fnv@1.0.7
	foreign-types-shared@0.1.1
	foreign-types@0.3.2
	form_urlencoded@1.2.1
	from_variants@1.0.2
	from_variants_impl@1.0.2
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-executor@0.3.30
	futures-io@0.3.30
	futures-lite@1.13.0
	futures-lite@2.3.0
	futures-macro@0.3.30
	futures-signals@0.3.34
	futures-sink@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	futures@0.3.30
	gdk-pixbuf-sys@0.18.0
	gdk-pixbuf@0.18.3
	gdk-sys@0.18.0
	gdk@0.18.0
	generic-array@0.14.7
	gensym@0.1.1
	getrandom@0.2.9
	gimli@0.27.2
	gio-sys@0.18.1
	gio@0.18.4
	glib-macros@0.18.3
	glib-sys@0.18.1
	glib@0.18.5
	gobject-sys@0.18.0
	gtk-layer-shell-sys@0.7.0
	gtk-layer-shell@0.8.1
	gtk-sys@0.18.0
	gtk3-macros@0.18.0
	gtk@0.18.1
	h2@0.4.4
	hashbrown@0.14.1
	heck@0.3.3
	heck@0.4.1
	heck@0.5.0
	hermit-abi@0.2.6
	hermit-abi@0.3.9
	hex@0.4.3
	http-body-util@0.1.1
	http-body@1.0.0
	http@1.1.0
	httparse@1.8.0
	hyper-rustls@0.27.2
	hyper-tls@0.6.0
	hyper-util@0.1.3
	hyper@1.2.0
	hyprland-macros@0.4.0-alpha.1
	hyprland@0.4.0-alpha.2
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.60
	ident_case@1.0.1
	idna@0.5.0
	indenter@0.3.3
	indexmap@2.3.0
	inotify-sys@0.1.5
	inotify@0.9.6
	instant@0.1.12
	io-lifetimes@1.0.10
	ipnet@2.7.2
	itoa@1.0.6
	js-sys@0.3.61
	kqueue-sys@1.0.3
	kqueue@1.0.7
	lazy_static@1.4.0
	libc@0.2.155
	libcorn@0.9.2
	libdbus-sys@0.2.5
	libloading@0.7.4
	libpulse-binding@2.28.1
	libpulse-sys@1.21.0
	linux-raw-sys@0.3.8
	linux-raw-sys@0.4.12
	log@0.4.17
	lua-src@547.0.0
	matchers@0.1.0
	memchr@2.6.3
	memmap2@0.9.0
	memoffset@0.7.1
	memoffset@0.8.0
	mime@0.3.17
	minimal-lexical@0.2.1
	miniz_oxide@0.6.2
	mio@0.8.11
	mio@1.0.1
	mlua-sys@0.6.1
	mlua@0.9.9
	mpd-utils@0.2.1
	mpd_client@1.3.0
	mpd_protocol@1.0.1
	mpris@2.0.1
	native-tls@0.2.11
	nix@0.26.4
	nix@0.28.0
	nix@0.29.0
	nom@7.1.3
	notify@6.1.1
	ntapi@0.4.0
	nu-ansi-term@0.46.0
	num-conv@0.1.0
	num-derive@0.3.3
	num-traits@0.2.19
	num_cpus@1.15.0
	object@0.30.3
	once_cell@1.19.0
	openssl-macros@0.1.1
	openssl-probe@0.1.5
	openssl-sys@0.9.103
	openssl@0.10.66
	option-ext@0.2.0
	ordered-stream@0.2.0
	overload@0.1.1
	owo-colors@3.5.0
	pango-sys@0.18.0
	pango@0.18.3
	parking@2.2.0
	paste@1.0.14
	percent-encoding@2.3.1
	pest@2.7.2
	pest_derive@2.7.2
	pest_generator@2.7.2
	pest_meta@2.7.2
	pin-project-internal@1.1.5
	pin-project-lite@0.2.12
	pin-project@1.1.5
	pin-utils@0.1.0
	pkg-config@0.3.26
	polling@2.7.0
	polling@3.3.1
	powerfmt@0.2.0
	ppv-lite86@0.2.17
	proc-macro-crate@1.3.1
	proc-macro-crate@2.0.0
	proc-macro-error-attr@1.0.4
	proc-macro-error@1.0.4
	proc-macro2@1.0.76
	pure-rust-locales@0.8.1
	quick-xml@0.30.0
	quote@0.3.15
	quote@1.0.35
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	rayon-core@1.11.0
	rayon@1.7.0
	redox_syscall@0.2.16
	redox_syscall@0.3.5
	redox_users@0.4.3
	regex-automata@0.1.10
	regex-automata@0.4.4
	regex-syntax@0.6.29
	regex-syntax@0.8.2
	regex@1.10.6
	reqwest@0.12.5
	ring@0.17.3
	ron@0.8.1
	rustc-demangle@0.1.22
	rustc-hash@2.0.0
	rustc_version@0.4.0
	rustix@0.37.27
	rustix@0.38.28
	rustls-pemfile@2.1.2
	rustls-pki-types@1.4.1
	rustls-webpki@0.102.3
	rustls@0.23.7
	ryu@1.0.13
	same-file@1.0.6
	schannel@0.1.21
	schemars@0.8.21
	schemars_derive@0.8.21
	scoped-tls@1.0.1
	scopeguard@1.1.0
	security-framework-sys@2.8.0
	security-framework@2.8.2
	semver@1.0.17
	serde@1.0.204
	serde_derive@1.0.204
	serde_derive_internals@0.29.0
	serde_json@1.0.122
	serde_repr@0.1.12
	serde_spanned@0.6.5
	serde_urlencoded@0.7.1
	serde_yaml@0.9.34+deprecated
	sha1@0.10.5
	sha2@0.10.6
	sharded-slab@0.1.4
	signal-hook-registry@1.4.1
	signal-hook@0.3.17
	slab@0.4.8
	smallvec@1.13.2
	smithay-client-toolkit@0.18.1
	socket2@0.4.9
	socket2@0.5.5
	spin@0.9.8
	static_assertions@1.1.0
	strip-ansi-escapes@0.2.0
	strsim@0.10.0
	strsim@0.11.0
	subtle@2.6.0
	swayipc-async@2.0.1
	swayipc-types@1.3.0
	syn@0.11.11
	syn@1.0.109
	syn@2.0.48
	sync_wrapper@1.0.1
	synom@0.11.3
	sysinfo@0.29.11
	system-deps@6.0.4
	system-tray@0.2.0
	tempfile@3.5.0
	thiserror-impl@1.0.58
	thiserror@1.0.58
	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.4.0
	tokio-native-tls@0.3.1
	tokio-rustls@0.26.0
	tokio-util@0.7.7
	tokio@1.39.2
	toml@0.7.6
	toml@0.8.12
	toml_datetime@0.6.5
	toml_edit@0.19.14
	toml_edit@0.20.2
	toml_edit@0.22.9
	tower-layer@0.3.2
	tower-service@0.3.2
	tower@0.4.13
	tracing-appender@0.2.3
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing-error@0.2.0
	tracing-log@0.2.0
	tracing-subscriber@0.3.18
	tracing@0.1.40
	try-lock@0.2.4
	typenum@1.16.0
	ucd-trie@0.1.5
	uds_windows@1.0.2
	unicode-bidi@0.3.13
	unicode-ident@1.0.8
	unicode-normalization@0.1.22
	unicode-segmentation@1.10.1
	unicode-xid@0.0.4
	universal-config@0.5.0
	unsafe-libyaml@0.2.11
	untrusted@0.9.0
	upower_dbus@0.3.2
	url@2.5.2
	utf8parse@0.2.1
	uuid@1.8.0
	valuable@0.1.0
	vcpkg@0.2.15
	version-compare@0.1.1
	version_check@0.9.4
	vte@0.11.1
	vte_generate_state_changes@0.1.1
	waker-fn@1.1.0
	walkdir@2.5.0
	want@0.3.0
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.84
	wasm-bindgen-futures@0.4.34
	wasm-bindgen-macro-support@0.2.84
	wasm-bindgen-macro@0.2.84
	wasm-bindgen-shared@0.2.84
	wasm-bindgen@0.2.84
	wayland-backend@0.3.2
	wayland-client@0.31.1
	wayland-csd-frame@0.3.0
	wayland-cursor@0.31.0
	wayland-protocols-wlr@0.2.0
	wayland-protocols@0.31.2
	wayland-scanner@0.31.0
	wayland-sys@0.31.1
	web-sys@0.3.61
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.5
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-core@0.52.0
	windows-sys@0.42.0
	windows-sys@0.45.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-targets@0.42.2
	windows-targets@0.48.0
	windows-targets@0.52.0
	windows_aarch64_gnullvm@0.42.2
	windows_aarch64_gnullvm@0.48.0
	windows_aarch64_gnullvm@0.52.0
	windows_aarch64_msvc@0.42.2
	windows_aarch64_msvc@0.48.0
	windows_aarch64_msvc@0.52.0
	windows_i686_gnu@0.42.2
	windows_i686_gnu@0.48.0
	windows_i686_gnu@0.52.0
	windows_i686_msvc@0.42.2
	windows_i686_msvc@0.48.0
	windows_i686_msvc@0.52.0
	windows_x86_64_gnu@0.42.2
	windows_x86_64_gnu@0.48.0
	windows_x86_64_gnu@0.52.0
	windows_x86_64_gnullvm@0.42.2
	windows_x86_64_gnullvm@0.48.0
	windows_x86_64_gnullvm@0.52.0
	windows_x86_64_msvc@0.42.2
	windows_x86_64_msvc@0.48.0
	windows_x86_64_msvc@0.52.0
	winnow@0.5.10
	winnow@0.6.5
	winreg@0.52.0
	xcursor@0.3.4
	xdg-home@1.0.0
	xkeysym@0.2.0
	zbus@3.15.2
	zbus_macros@3.15.2
	zbus_names@2.6.0
	zeroize@1.8.1
	zvariant@3.15.0
	zvariant_derive@3.15.0
	zvariant_utils@1.0.1
"

inherit cargo

DESCRIPTION="Customisable Wayland gtk bar written in Rust"
HOMEPAGE="https://crates.io/crates/ironbar"
SRC_URI="
	https://github.com/JakeStanger/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	${CARGO_CRATE_URIS}
"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 BSD CC0-1.0 GPL-3+ ISC MIT MPL-2.0 Unicode-DFS-2016
"
SLOT="0"
KEYWORDS="~amd64"
IUSE="cairo +http +music +volume"

DEPEND="
	x11-libs/gtk+:3=[wayland]
	gui-libs/gtk-layer-shell[introspection]
	cairo? ( dev-lua/lgi[lua_targets_luajit] )
	http? ( dev-libs/openssl:0= )
	music? ( sys-apps/dbus )
	volume? ( media-libs/libpulse )
"
BDEPEND="
	virtual/pkgconfig
"

QA_FLAGS_IGNORED="usr/bin/${PN}"

src_configure() {
	# high magic to allow system-libs
	export OPENSSL_NO_VENDOR=true
	export PKG_CONFIG_ALLOW_CROSS=1

	local myfeatures=(
		"cli"
		$(usev cairo)
		"clipboard"
		"clock"
		"config+all"
		"focused"
		$(usev http)
		"ipc"
		"launcher"
		$(usex "music" "music+all" "")
		"network_manager"
		"notifications"
		"sys_info"
		"tray"
		"upower"
		$(usev volume)
		"workspaces+all"
	)
	cargo_src_configure --no-default-features
}

src_install() {
	cargo_src_install

	local DOCS=(
		CHANGELOG.md
		CONTRIBUTING.md
		README.md
		examples/
	)
	local HTML_DOCS=(
		docs/
	)
	docompress -x /usr/share/doc/${PF}/examples
	einstalldocs
}