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

EAPI=8

CRATES=""

RUST_MIN_VER="1.87.0"

inherit cargo git-r3

DESCRIPTION="Tool to freeze the screen of a Wayland compositor "
HOMEPAGE="https://github.com/Jappie3/wayfreeze"
EGIT_REPO_URI="https://github.com/Jappie3/wayfreeze.git"

DOCS=(README.md)

LICENSE="AGPL-3"
SLOT="0"

RDEPEND="x11-libs/libxkbcommon"

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

src_unpack() {
	git-r3_src_unpack
	cargo_live_src_unpack
}

src_compile() {
	cargo_src_compile
}

src_install() {
	dobin "$(cargo_target_dir)/wayfreeze"
	einstalldocs
}