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

# Autogenerated by pycargoebuild 0.13.2

EAPI=8

CRATES="
	aead@0.5.2
	aes-gcm@0.10.3
	aes@0.8.4
	aho-corasick@1.1.4
	android_system_properties@0.1.5
	anstream@1.0.0
	anstyle-parse@1.0.0
	anstyle-query@1.1.5
	anstyle-wincon@3.0.11
	anstyle@1.0.14
	anyhow@1.0.102
	arraydeque@0.5.1
	arrayvec@0.7.6
	ashpd@0.13.9
	asn1-rs-derive@0.5.1
	asn1-rs-impl@0.2.0
	asn1-rs@0.6.2
	async-broadcast@0.7.2
	async-channel@2.5.0
	async-recursion@1.1.1
	async-trait@0.1.89
	autocfg@1.5.0
	base16ct@0.2.0
	base64@0.22.1
	base64ct@1.8.3
	bincode@1.3.3
	bitflags@1.3.2
	bitflags@2.11.0
	block-buffer@0.10.4
	block-padding@0.3.3
	bumpalo@3.20.2
	byteorder@1.5.0
	bytes@1.11.1
	cairo-rs@0.20.12
	cairo-sys-rs@0.20.10
	camino@1.2.2
	cargo-platform@0.3.2
	cargo_metadata@0.23.1
	cbc@0.1.2
	cc@1.2.59
	ccm@0.5.0
	cfg-expr@0.20.7
	cfg-if@1.0.4
	cipher@0.4.4
	clap@4.6.0
	clap_builder@4.6.0
	clap_derive@4.6.0
	clap_lex@1.1.0
	colorchoice@1.0.5
	concurrent-queue@2.5.0
	const-oid@0.9.6
	const_format@0.2.35
	const_format_proc_macros@0.2.34
	core-foundation-sys@0.8.7
	core-foundation@0.10.1
	core-graphics-types@0.2.0
	core-graphics@0.25.0
	cpufeatures@0.2.17
	critical-section@1.2.0
	crossbeam-channel@0.5.15
	crossbeam-epoch@0.9.18
	crossbeam-utils@0.8.21
	crypto-bigint@0.5.5
	crypto-common@0.1.7
	ctr@0.9.2
	curve25519-dalek-derive@0.1.1
	curve25519-dalek@4.1.3
	data-encoding@2.10.0
	der-parser@9.0.0
	der@0.7.10
	deranged@0.5.8
	digest@0.10.7
	displaydoc@0.2.5
	downcast-rs@1.2.1
	ecdsa@0.16.9
	elliptic-curve@0.13.8
	endi@1.1.1
	enum-as-inner@0.6.1
	enumflags2@0.7.12
	enumflags2_derive@0.7.12
	env_filter@1.0.1
	env_logger@0.11.10
	equivalent@1.0.2
	errno@0.3.14
	event-listener-strategy@0.5.4
	event-listener@5.4.1
	fastrand@2.4.1
	ff@0.13.1
	fiat-crypto@0.2.9
	field-offset@0.3.6
	find-msvc-tools@0.1.9
	foldhash@0.1.5
	foreign-types-macros@0.2.3
	foreign-types-shared@0.3.1
	foreign-types@0.5.0
	form_urlencoded@1.2.2
	fsevent-sys@4.1.0
	futures-channel@0.3.32
	futures-core@0.3.32
	futures-executor@0.3.32
	futures-io@0.3.32
	futures-lite@2.6.1
	futures-macro@0.3.32
	futures-sink@0.3.32
	futures-task@0.3.32
	futures-util@0.3.32
	futures@0.3.32
	gdk-pixbuf-sys@0.20.10
	gdk-pixbuf@0.20.10
	gdk4-sys@0.9.6
	gdk4@0.9.6
	generic-array@0.14.7
	getrandom@0.2.17
	getrandom@0.3.4
	getrandom@0.4.2
	ghash@0.5.1
	gio-sys@0.20.10
	gio@0.20.12
	git2@0.20.4
	glib-build-tools@0.20.0
	glib-macros@0.20.12
	glib-sys@0.20.10
	glib@0.20.12
	gobject-sys@0.20.10
	graphene-rs@0.20.10
	graphene-sys@0.20.10
	group@0.13.0
	gsk4-sys@0.9.6
	gsk4@0.9.6
	gtk4-macros@0.9.5
	gtk4-sys@0.9.6
	gtk4@0.9.7
	hashbrown@0.15.5
	hashbrown@0.16.1
	heck@0.5.0
	hex@0.4.3
	hickory-proto@0.25.2
	hickory-resolver@0.25.2
	hkdf@0.12.4
	hmac@0.12.1
	hostname@0.4.2
	iana-time-zone-haiku@0.1.2
	iana-time-zone@0.1.65
	icu_collections@2.2.0
	icu_locale_core@2.2.0
	icu_normalizer@2.2.0
	icu_normalizer_data@2.2.0
	icu_properties@2.2.0
	icu_properties_data@2.2.0
	icu_provider@2.2.0
	id-arena@2.3.0
	idna@1.1.0
	idna_adapter@1.2.1
	indexmap@2.13.1
	inotify-sys@0.1.5
	inotify@0.11.1
	inout@0.1.4
	ipconfig@0.3.4
	ipnet@2.12.0
	is_debug@1.1.0
	is_terminal_polyfill@1.70.2
	itoa@1.0.18
	jiff-static@0.2.23
	jiff@0.2.23
	jobserver@0.1.34
	js-sys@0.3.94
	keycode@1.0.0
	keycode_macro@1.0.0
	kqueue-sys@1.0.4
	kqueue@1.1.1
	lazy_static@1.5.0
	leb128fmt@0.1.0
	libadwaita-sys@0.7.2
	libadwaita@0.7.2
	libc@0.2.184
	libgit2-sys@0.18.3+1.9.2
	libz-sys@1.1.28
	linux-raw-sys@0.12.1
	linux-raw-sys@0.4.15
	litemap@0.8.2
	local-channel@0.1.5
	local-waker@0.1.4
	lock_api@0.4.14
	log@0.4.29
	memchr@2.8.0
	memmap@0.7.0
	memoffset@0.7.1
	memoffset@0.9.1
	minimal-lexical@0.2.1
	mio@1.2.0
	moka@0.12.15
	nix@0.26.4
	nom@7.1.3
	notify-types@2.1.0
	notify@8.2.0
	num-bigint@0.4.6
	num-conv@0.2.1
	num-integer@0.1.46
	num-traits@0.2.19
	num_enum@0.7.6
	num_enum_derive@0.7.6
	num_threads@0.1.7
	oid-registry@0.7.1
	once_cell@1.21.4
	once_cell_polyfill@1.70.2
	opaque-debug@0.3.1
	ordered-stream@0.2.0
	p256@0.13.2
	p384@0.13.1
	pango-sys@0.20.10
	pango@0.20.12
	parking@2.2.1
	parking_lot@0.12.5
	parking_lot_core@0.9.12
	paste@1.0.15
	pem-rfc7468@0.7.0
	pem@3.0.6
	percent-encoding@2.3.2
	pin-project-lite@0.2.17
	pin-utils@0.1.0
	pkcs8@0.10.2
	pkg-config@0.3.32
	polyval@0.6.2
	portable-atomic-util@0.2.6
	portable-atomic@1.13.1
	potential_utf@0.1.5
	powerfmt@0.2.0
	ppv-lite86@0.2.21
	prettyplease@0.2.37
	primeorder@0.13.6
	proc-macro-crate@3.5.0
	proc-macro2@1.0.106
	quick-xml@0.39.2
	quote@1.0.45
	r-efi@5.3.0
	r-efi@6.0.0
	rand@0.8.5
	rand@0.9.2
	rand_chacha@0.3.1
	rand_chacha@0.9.0
	rand_core@0.6.4
	rand_core@0.9.5
	rcgen@0.13.2
	redox_syscall@0.5.18
	regex-automata@0.4.14
	regex-syntax@0.8.10
	regex@1.12.3
	reis@0.5.0
	resolv-conf@0.7.6
	rfc6979@0.4.0
	ring@0.17.14
	rustc_version@0.4.1
	rusticata-macros@4.1.0
	rustix@0.38.44
	rustix@1.1.4
	rustls-pki-types@1.14.0
	rustls-webpki@0.103.10
	rustls@0.23.37
	rustversion@1.0.22
	same-file@1.0.6
	scopeguard@1.2.0
	sec1@0.7.3
	semver@1.0.28
	serde@1.0.228
	serde_core@1.0.228
	serde_derive@1.0.228
	serde_json@1.0.149
	serde_repr@0.1.20
	serde_spanned@0.6.9
	serde_spanned@1.1.1
	sha1@0.10.6
	sha2@0.10.9
	shadow-rs@1.7.1
	shlex@1.3.0
	signal-hook-registry@1.4.8
	signature@2.2.0
	slab@0.4.12
	smallvec@1.15.1
	socket2@0.6.3
	spki@0.7.3
	stable_deref_trait@1.2.1
	strsim@0.11.1
	subtle@2.6.1
	syn@2.0.117
	synstructure@0.13.2
	system-deps@7.0.8
	tagptr@0.2.0
	target-lexicon@0.13.3
	tempfile@3.27.0
	thiserror-impl@1.0.69
	thiserror-impl@2.0.18
	thiserror@1.0.69
	thiserror@2.0.18
	time-core@0.1.8
	time-macros@0.2.27
	time@0.3.47
	tinystr@0.8.3
	tinyvec@1.11.0
	tinyvec_macros@0.1.1
	tokio-macros@2.7.0
	tokio-stream@0.1.18
	tokio-util@0.7.18
	tokio@1.51.1
	toml@0.8.23
	toml@1.1.2+spec-1.1.0
	toml_datetime@0.6.11
	toml_datetime@1.1.1+spec-1.1.0
	toml_edit@0.22.27
	toml_edit@0.25.11+spec-1.1.0
	toml_parser@1.1.2+spec-1.1.0
	toml_write@0.1.2
	toml_writer@1.1.1+spec-1.1.0
	tracing-attributes@0.1.31
	tracing-core@0.1.36
	tracing@0.1.44
	typenum@1.19.0
	tz-rs@0.7.3
	tzdb@0.7.3
	tzdb_data@0.2.4
	uds_windows@1.2.1
	unicode-ident@1.0.24
	unicode-xid@0.2.6
	universal-hash@0.5.1
	untrusted@0.9.0
	url@2.5.8
	utf8_iter@1.0.4
	utf8parse@0.2.2
	uuid@1.23.0
	vcpkg@0.2.15
	version-compare@0.2.1
	version_check@0.9.5
	walkdir@2.5.0
	wasi@0.11.1+wasi-snapshot-preview1
	wasip2@1.0.2+wasi-0.2.9
	wasip3@0.4.0+wasi-0.3.0-rc-2026-01-06
	wasm-bindgen-macro-support@0.2.117
	wasm-bindgen-macro@0.2.117
	wasm-bindgen-shared@0.2.117
	wasm-bindgen@0.2.117
	wasm-encoder@0.244.0
	wasm-metadata@0.244.0
	wasmparser@0.244.0
	wayland-backend@0.3.15
	wayland-client@0.31.14
	wayland-protocols-misc@0.3.12
	wayland-protocols-wlr@0.3.12
	wayland-protocols@0.32.12
	wayland-scanner@0.31.10
	wayland-sys@0.31.11
	webrtc-dtls@0.12.0
	webrtc-util@0.11.0
	widestring@1.2.1
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-util@0.1.11
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-collections@0.2.0
	windows-core@0.61.2
	windows-core@0.62.2
	windows-future@0.2.1
	windows-implement@0.60.2
	windows-interface@0.59.3
	windows-link@0.1.3
	windows-link@0.2.1
	windows-numerics@0.2.0
	windows-registry@0.6.1
	windows-result@0.3.4
	windows-result@0.4.1
	windows-strings@0.4.2
	windows-strings@0.5.1
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-sys@0.60.2
	windows-sys@0.61.2
	windows-targets@0.52.6
	windows-targets@0.53.5
	windows-threading@0.1.0
	windows@0.61.3
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_gnullvm@0.53.1
	windows_aarch64_msvc@0.52.6
	windows_aarch64_msvc@0.53.1
	windows_i686_gnu@0.52.6
	windows_i686_gnu@0.53.1
	windows_i686_gnullvm@0.52.6
	windows_i686_gnullvm@0.53.1
	windows_i686_msvc@0.52.6
	windows_i686_msvc@0.53.1
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnu@0.53.1
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_gnullvm@0.53.1
	windows_x86_64_msvc@0.52.6
	windows_x86_64_msvc@0.53.1
	winnow@0.7.15
	winnow@1.0.1
	wit-bindgen-core@0.51.0
	wit-bindgen-rust-macro@0.51.0
	wit-bindgen-rust@0.51.0
	wit-bindgen@0.51.0
	wit-component@0.244.0
	wit-parser@0.244.0
	writeable@0.6.3
	x11@2.21.0
	x25519-dalek@2.0.1
	x509-parser@0.16.0
	yasna@0.5.2
	yoke-derive@0.8.2
	yoke@0.8.2
	zbus@5.14.0
	zbus_macros@5.14.0
	zbus_names@4.3.1
	zerocopy-derive@0.8.48
	zerocopy@0.8.48
	zerofrom-derive@0.1.7
	zerofrom@0.1.7
	zeroize@1.8.2
	zeroize_derive@1.4.3
	zerotrie@0.2.4
	zerovec-derive@0.11.3
	zerovec@0.11.6
	zmij@1.0.21
	zvariant@5.10.0
	zvariant_derive@5.10.0
	zvariant_utils@3.3.0
"

RUST_MIN_VER="1.88"

inherit cargo desktop systemd xdg

DEPEND="
	dev-libs/glib:2
	gui-libs/gtk:4
	gui-libs/libadwaita:1
	x11-libs/libX11
	x11-libs/libXtst
	x11-themes/hicolor-icon-theme
	debug? (
		x11-libs/cairo
		x11-libs/pango
		x11-libs/gdk-pixbuf:2
		media-libs/graphene
		dev-libs/libgit2:=
	)
"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"

DESCRIPTION="Software KVM Switch / mouse & keyboard sharing software for Local Area Networks"
HOMEPAGE="https://github.com/feschber/lan-mouse"

SRC_URI="
	${CARGO_CRATE_URIS}
	https://github.com/feschber/lan-mouse/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
"

LICENSE="GPL-3+"
# Dependent crate licenses
LICENSE+="
	Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CC0-1.0 ISC MIT
	Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="~amd64"

RESTRICT="mirror"

QA_FLAGS_IGNORED="usr/bin/lan-mouse"

src_install() {
	cargo_src_install
	doicon -s scalable lan-mouse-gtk/resources/de.feschber.LanMouse.svg
	domenu de.feschber.LanMouse.desktop
	systemd_douserunit service/lan-mouse.service
}