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

# Autogenerated by pycargoebuild 0.13.2

EAPI=8

CRATES="
	addr2line@0.24.1
	adler2@2.0.0
	aes@0.8.4
	aho-corasick@1.1.3
	android-tzdata@0.1.1
	android_system_properties@0.1.5
	anyhow@1.0.89
	ashpd@0.9.1
	async-broadcast@0.7.1
	async-channel@2.3.1
	async-io@2.3.4
	async-lock@3.4.0
	async-process@2.3.0
	async-recursion@1.1.1
	async-signal@0.2.10
	async-task@4.7.1
	async-trait@0.1.83
	atomic-waker@1.1.2
	autocfg@1.4.0
	backtrace@0.3.74
	base64@0.13.1
	bitflags@1.3.2
	bitflags@2.6.0
	block-buffer@0.10.4
	block-padding@0.3.3
	block@0.1.6
	blocking@1.6.1
	bumpalo@3.16.0
	byteorder@1.5.0
	bytes@0.5.6
	bytes@1.7.2
	cairo-rs@0.20.1
	cairo-sys-rs@0.20.0
	cbc@0.1.2
	cc@1.1.22
	cfg-expr@0.17.0
	cfg-if@1.0.0
	cfg_aliases@0.2.1
	chrono@0.4.38
	cipher@0.4.4
	concurrent-queue@2.5.0
	containers-api@0.9.0
	core-foundation-sys@0.8.7
	cpufeatures@0.2.14
	crc32fast@1.4.2
	crossbeam-utils@0.8.20
	crypto-common@0.1.6
	deranged@0.3.11
	digest@0.10.7
	endi@1.1.0
	enumflags2@0.7.10
	enumflags2_derive@0.7.10
	equivalent@1.0.1
	errno@0.3.9
	event-listener-strategy@0.5.2
	event-listener@5.3.1
	fastrand@2.1.1
	field-offset@0.3.6
	filetime@0.2.25
	flate2@1.0.34
	fnv@1.0.7
	form_urlencoded@1.2.1
	futures-channel@0.3.30
	futures-core@0.3.30
	futures-executor@0.3.30
	futures-io@0.3.30
	futures-lite@2.3.0
	futures-macro@0.3.30
	futures-sink@0.3.30
	futures-task@0.3.30
	futures-util@0.3.30
	futures@0.3.30
	futures_codec@0.4.1
	gdk-pixbuf-sys@0.20.4
	gdk-pixbuf@0.20.4
	gdk4-sys@0.9.2
	gdk4-wayland-sys@0.9.2
	gdk4-wayland@0.9.2
	gdk4-x11-sys@0.9.2
	gdk4-x11@0.9.2
	gdk4@0.9.2
	generic-array@0.14.7
	getrandom@0.2.15
	gettext-rs@0.7.0
	gettext-sys@0.21.4
	gimli@0.31.0
	gio-sys@0.20.4
	gio@0.20.4
	glib-macros@0.20.4
	glib-sys@0.20.4
	glib@0.20.4
	gobject-sys@0.20.4
	graphene-rs@0.20.4
	graphene-sys@0.20.4
	gsk4-sys@0.9.2
	gsk4@0.9.2
	gtk4-macros@0.9.1
	gtk4-sys@0.9.2
	gtk4@0.9.2
	hashbrown@0.14.5
	heck@0.5.0
	hermit-abi@0.3.9
	hermit-abi@0.4.0
	hex@0.4.3
	hkdf@0.12.4
	hmac@0.12.1
	hostname@0.4.0
	http-body@0.4.6
	http@0.2.12
	httparse@1.9.4
	httpdate@1.0.3
	hyper@0.14.30
	hyperlocal@0.8.0
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.61
	idna@0.5.0
	indexmap@2.5.0
	inout@0.1.3
	io-lifetimes@2.0.3
	itoa@1.0.11
	js-sys@0.3.70
	lazy_static@1.5.0
	libadwaita-sys@0.7.0
	libadwaita@0.7.0
	libc@0.2.159
	libm@0.2.8
	libredox@0.1.3
	linux-raw-sys@0.4.14
	locale_config@0.3.0
	log@0.4.22
	malloc_buf@0.0.6
	md-5@0.10.6
	memchr@2.7.4
	memoffset@0.9.1
	mime@0.3.17
	miniz_oxide@0.8.0
	mio@1.0.2
	multi_log@0.1.2
	names@0.14.0
	nix@0.29.0
	num-bigint-dig@0.8.4
	num-bigint@0.4.6
	num-complex@0.4.6
	num-conv@0.1.0
	num-integer@0.1.46
	num-iter@0.1.45
	num-rational@0.4.2
	num-traits@0.2.19
	num@0.4.3
	num_threads@0.1.7
	objc-foundation@0.1.1
	objc@0.2.7
	objc_id@0.1.1
	object@0.36.4
	once_cell@1.19.0
	oo7@0.3.3
	ordered-stream@0.2.0
	pango-sys@0.20.4
	pango@0.20.4
	paris@1.5.15
	parking@2.2.1
	paste@1.0.15
	pbkdf2@0.12.2
	percent-encoding@2.3.1
	pin-project-internal@0.4.30
	pin-project-internal@1.1.5
	pin-project-lite@0.2.14
	pin-project@0.4.30
	pin-project@1.1.5
	pin-utils@0.1.0
	piper@0.2.4
	pkg-config@0.3.31
	podman-api-stubs@0.9.0
	polling@3.7.3
	powerfmt@0.2.0
	ppv-lite86@0.2.20
	proc-macro-crate@3.2.0
	proc-macro2@1.0.86
	quote@1.0.37
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	redox_syscall@0.3.5
	redox_syscall@0.5.6
	regex-automata@0.4.7
	regex-syntax@0.8.4
	regex@1.10.6
	rustc-demangle@0.1.24
	rustc_version@0.4.1
	rustix@0.38.37
	ryu@1.0.18
	semver@1.0.23
	serde@1.0.210
	serde_derive@1.0.210
	serde_json@1.0.128
	serde_repr@0.1.19
	serde_spanned@0.6.8
	sha1@0.10.6
	sha2@0.10.8
	shlex@1.3.0
	signal-hook-registry@1.4.2
	simplelog@0.12.2
	slab@0.4.9
	smallvec@1.13.2
	socket2@0.5.7
	sourceview5-sys@0.9.0
	sourceview5@0.9.0
	spin@0.9.8
	static_assertions@1.1.0
	subtle@2.6.1
	syn@1.0.109
	syn@2.0.79
	syslog@7.0.0
	system-deps@7.0.3
	tar@0.4.42
	target-lexicon@0.12.16
	temp-dir@0.1.13
	tempfile@3.12.0
	termcolor@1.4.1
	thiserror-impl@1.0.64
	thiserror@1.0.64
	time-core@0.1.2
	time-macros@0.2.18
	time@0.3.36
	tinyvec@1.8.0
	tinyvec_macros@0.1.1
	tokio-stream@0.1.16
	tokio-tar@0.3.1
	tokio@1.40.0
	toml@0.8.19
	toml_datetime@0.6.8
	toml_edit@0.22.22
	tower-service@0.3.3
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing@0.1.40
	try-lock@0.2.5
	typenum@1.17.0
	uds_windows@1.1.0
	unicode-bidi@0.3.15
	unicode-ident@1.0.13
	unicode-normalization@0.1.24
	url@2.5.2
	utf8parse@0.2.2
	version-compare@0.2.0
	version_check@0.9.5
	vte4-sys@0.8.0
	vte4@0.8.0
	vte@0.13.0
	vte_generate_state_changes@0.1.2
	want@0.3.1
	wasi@0.11.0+wasi-snapshot-preview1
	wasm-bindgen-backend@0.2.93
	wasm-bindgen-macro-support@0.2.93
	wasm-bindgen-macro@0.2.93
	wasm-bindgen-shared@0.2.93
	wasm-bindgen@0.2.93
	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.52.0
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-targets@0.52.6
	windows@0.52.0
	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
	winnow@0.6.20
	xattr@1.3.1
	xdg-home@1.3.0
	zbus@4.4.0
	zbus_macros@4.4.0
	zbus_names@3.0.0
	zerocopy-derive@0.7.35
	zerocopy@0.7.35
	zeroize@1.8.1
	zeroize_derive@1.4.2
	zvariant@4.2.0
	zvariant_derive@4.2.0
	zvariant_utils@2.1.0
"

declare -A GIT_CRATES=(
	[podman-api]='https://github.com/vv9k/podman-api-rs;f35e6f9f9fdb9d9023aed341252c16c0ad9796d1;podman-api-rs-%commit%'
)

inherit cargo gnome2-utils meson xdg

DESCRIPTION="Keep track of your podman containers"
HOMEPAGE="https://github.com/marhkb/pods"
SRC_URI="
	https://github.com/marhkb/pods/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz
	${CARGO_CRATE_URIS}
"

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

RDEPEND="
	>=dev-libs/glib-2.81.0:2
	>=gui-libs/gtk-4.16.0:4[wayland]
	gui-libs/gtksourceview:5
	>=gui-libs/libadwaita-1.6:1
	>=gui-libs/vte-0.70.0:2.91-gtk4
	media-libs/graphene
	x11-libs/pango
"
DEPEND="
	dev-libs/glib:2
	>=gui-libs/gtk-4.16.0:4[wayland]
	gui-libs/libadwaita
"
BDEPEND="
	app-alternatives/ninja
	dev-libs/appstream-glib
	virtual/pkgconfig
"

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

PATCHES=(
	"${FILESDIR}"/disable-clippy-test-2.1.2.patch
)

src_configure() {
	meson_src_configure
	ln -s "${CARGO_HOME}" "${BUILD_DIR}/cargo-home" || die
}

pkg_postinst() {
	xdg_pkg_postinst
	gnome2_schemas_update
}

pkg_postrm() {
	xdg_pkg_postrm
	gnome2_schemas_update
}