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

EAPI=8

inherit edo git-r3 toolchain-funcs

DESCRIPTION="zuki's river window manager"
HOMEPAGE="https://sr.ht/~zuki/zrwm/"
EGIT_REPO_URI="https://git.sr.ht/~zuki/zrwm"

LICENSE="GPL-3"
SLOT="0"

DEPEND="
	dev-libs/wayland
	x11-libs/libxkbcommon
"
RDEPEND="${DEPEND}"
BDEPEND="dev-util/wayland-scanner"

src_compile() {
	edo "$(tc-getCC)" "-Dnob_cc(cmd)=nob_cmd_append(cmd, \"$(tc-getCC)\")" nob.c -o nob
	edo ./nob cc ${CFLAGS}
}

src_install() {
	einstalldocs
	dobin zrwm
	dobin zrwm-msg
}