# Copyright 2024 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.2
	adler2@2.0.0
	aho-corasick@1.1.3
	anstream@0.6.18
	anstyle-parse@0.2.6
	anstyle-query@1.1.2
	anstyle-wincon@3.0.6
	anstyle@1.0.10
	anyhow@1.0.93
	arraydeque@0.4.5
	arrayvec@0.4.12
	ashpd@0.10.2
	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
	bitflags@1.3.2
	bitflags@2.6.0
	blocking@1.6.1
	byteorder@1.5.0
	bytes@1.8.0
	cairo-rs@0.20.5
	cairo-sys-rs@0.20.0
	cc@1.1.36
	cfg-expr@0.17.0
	cfg-if@1.0.0
	cfg_aliases@0.2.1
	clap@4.5.20
	clap_builder@4.5.20
	clap_derive@4.5.18
	clap_lex@0.7.2
	colorchoice@1.0.3
	concurrent-queue@2.5.0
	core-foundation-sys@0.8.7
	core-foundation@0.10.0
	core-graphics-types@0.2.0
	core-graphics@0.24.0
	crossbeam-utils@0.8.20
	data-encoding@2.6.0
	displaydoc@0.2.5
	dlib@0.5.2
	downcast-rs@1.2.1
	endi@1.1.0
	enum-as-inner@0.6.1
	enumflags2@0.7.10
	enumflags2_derive@0.7.10
	env_filter@0.1.2
	env_logger@0.11.5
	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
	foreign-types-macros@0.2.3
	foreign-types-shared@0.3.1
	foreign-types@0.5.0
	form_urlencoded@1.2.1
	futures-channel@0.3.31
	futures-core@0.3.31
	futures-executor@0.3.31
	futures-io@0.3.31
	futures-lite@2.4.0
	futures-macro@0.3.31
	futures-sink@0.3.31
	futures-task@0.3.31
	futures-util@0.3.31
	futures@0.3.31
	gdk-pixbuf-sys@0.20.4
	gdk-pixbuf@0.20.4
	gdk4-sys@0.9.3
	gdk4@0.9.3
	getrandom@0.2.15
	gimli@0.31.1
	gio-sys@0.20.5
	gio@0.20.5
	glib-build-tools@0.20.0
	glib-macros@0.20.5
	glib-sys@0.20.5
	glib@0.20.5
	gobject-sys@0.20.4
	graphene-rs@0.20.4
	graphene-sys@0.20.4
	gsk4-sys@0.9.3
	gsk4@0.9.3
	gtk4-macros@0.9.3
	gtk4-sys@0.9.3
	gtk4@0.9.3
	hashbrown@0.15.1
	heck@0.3.3
	heck@0.5.0
	hermit-abi@0.3.9
	hermit-abi@0.4.0
	hex@0.4.3
	hickory-proto@0.24.1
	hickory-resolver@0.24.1
	hostname@0.3.1
	hostname@0.4.0
	humantime@2.1.0
	icu_collections@1.5.0
	icu_locid@1.5.0
	icu_locid_transform@1.5.0
	icu_locid_transform_data@1.5.0
	icu_normalizer@1.5.0
	icu_normalizer_data@1.5.0
	icu_properties@1.5.1
	icu_properties_data@1.5.0
	icu_provider@1.5.0
	icu_provider_macros@1.5.0
	idna@0.4.0
	idna@1.0.3
	idna_adapter@1.2.0
	indexmap@2.6.0
	ipconfig@0.3.2
	ipnet@2.10.1
	is_terminal_polyfill@1.70.1
	itoa@1.0.11
	keycode@0.4.0
	keycode_macro@0.4.0
	libadwaita-sys@0.7.1
	libadwaita@0.7.1
	libc@0.2.161
	libloading@0.8.5
	linked-hash-map@0.5.6
	linux-raw-sys@0.4.14
	litemap@0.7.3
	local-channel@0.1.5
	local-waker@0.1.4
	lock_api@0.4.12
	log@0.4.22
	lru-cache@0.1.2
	match_cfg@0.1.0
	memchr@2.7.4
	memmap@0.7.0
	memoffset@0.9.1
	miniz_oxide@0.8.0
	mio@1.0.2
	nix@0.29.0
	nodrop@0.1.14
	num_enum@0.7.3
	num_enum_derive@0.7.3
	object@0.36.5
	once_cell@1.20.2
	ordered-stream@0.2.0
	pango-sys@0.20.4
	pango@0.20.4
	parking@2.2.1
	parking_lot@0.12.3
	parking_lot_core@0.9.10
	paste@1.0.15
	percent-encoding@2.3.1
	pin-project-lite@0.2.15
	pin-utils@0.1.0
	piper@0.2.4
	pkg-config@0.3.31
	polling@3.7.3
	ppv-lite86@0.2.20
	proc-macro-crate@3.2.0
	proc-macro2@1.0.89
	quick-error@1.2.3
	quick-xml@0.36.2
	quote@1.0.37
	rand@0.8.5
	rand_chacha@0.3.1
	rand_core@0.6.4
	redox_syscall@0.5.7
	regex-automata@0.4.8
	regex-syntax@0.8.5
	regex@1.11.1
	reis@0.4.0
	resolv-conf@0.7.0
	rustc-demangle@0.1.24
	rustc_version@0.4.1
	rustix@0.38.39
	ryu@1.0.18
	scoped-tls@1.0.1
	scopeguard@1.2.0
	semver@1.0.23
	serde@1.0.214
	serde_derive@1.0.214
	serde_json@1.0.132
	serde_repr@0.1.19
	serde_spanned@0.6.8
	shlex@1.3.0
	signal-hook-registry@1.4.2
	slab@0.4.9
	smallvec@1.13.2
	socket2@0.5.7
	stable_deref_trait@1.2.0
	static_assertions@1.1.0
	strsim@0.11.1
	syn@2.0.87
	synstructure@0.13.1
	system-deps@7.0.3
	target-lexicon@0.12.16
	tempfile@3.13.0
	thiserror-impl@1.0.68
	thiserror-impl@2.0.0
	thiserror@1.0.68
	thiserror@2.0.0
	tinystr@0.7.6
	tinyvec@1.8.0
	tinyvec_macros@0.1.1
	tokio-macros@2.4.0
	tokio-stream@0.1.16
	tokio-util@0.7.12
	tokio@1.41.0
	toml@0.8.19
	toml_datetime@0.6.8
	toml_edit@0.22.22
	tracing-attributes@0.1.27
	tracing-core@0.1.32
	tracing@0.1.40
	uds_windows@1.1.0
	unicode-bidi@0.3.17
	unicode-ident@1.0.13
	unicode-normalization@0.1.24
	unicode-segmentation@1.12.0
	url@2.5.3
	utf16_iter@1.0.5
	utf8_iter@1.0.4
	utf8parse@0.2.2
	version-compare@0.2.0
	wasi@0.11.0+wasi-snapshot-preview1
	wayland-backend@0.3.7
	wayland-client@0.31.7
	wayland-protocols-misc@0.3.5
	wayland-protocols-wlr@0.3.5
	wayland-protocols@0.32.5
	wayland-scanner@0.31.5
	wayland-sys@0.31.5
	widestring@1.1.0
	winapi-i686-pc-windows-gnu@0.4.0
	winapi-x86_64-pc-windows-gnu@0.4.0
	winapi@0.3.9
	windows-core@0.52.0
	windows-core@0.58.0
	windows-implement@0.58.0
	windows-interface@0.58.0
	windows-result@0.2.0
	windows-strings@0.1.0
	windows-sys@0.48.0
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-targets@0.48.5
	windows-targets@0.52.6
	windows@0.52.0
	windows@0.58.0
	windows_aarch64_gnullvm@0.48.5
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.48.5
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.48.5
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.48.5
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.48.5
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.48.5
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.48.5
	windows_x86_64_msvc@0.52.6
	winnow@0.6.20
	winreg@0.50.0
	write16@1.0.0
	writeable@0.5.5
	x11@2.21.0
	xdg-home@1.3.0
	yoke-derive@0.7.4
	yoke@0.7.4
	zbus@5.1.0
	zbus_macros@5.1.0
	zbus_names@4.1.0
	zerocopy-derive@0.7.35
	zerocopy@0.7.35
	zerofrom-derive@0.1.4
	zerofrom@0.1.4
	zerovec-derive@0.10.3
	zerovec@0.10.4
	zvariant@5.1.0
	zvariant_derive@5.1.0
	zvariant_utils@3.0.2
"

inherit cargo desktop systemd xdg

DEPEND="
	dev-libs/glib:2
	gui-libs/gtk:4
	gui-libs/libadwaita:1
	x11-libs/cairo
	x11-libs/libX11
	x11-libs/libXtst
	x11-libs/pango
	x11-themes/hicolor-icon-theme
"
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-with-LLVM-exceptions ISC MIT Unicode-3.0 Unicode-DFS-2016
	|| ( Apache-2.0 Boost-1.0 )
"
SLOT="0"
KEYWORDS="~amd64"

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
}