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

EAPI=8

LUA_COMPAT=( lua5-4 lua5-5 )

DESCRIPTION="HyprExpo is an overview plugin like Gnome, KDE or wf. colonelpanic8's fork."
HOMEPAGE="https://github.com/colonelpanic8/hyprexpo"
LICENSE="BSD"
SLOT="0"

HYPRPM_REPO_URI="https://github.com/colonelpanic8/hyprexpo.git"

inherit lua-single hyprpm flag-o-matic

REQUIRED_USE="${LUA_REQUIRED_USE}"

BDEPEND="
	virtual/pkgconfig
"

RDEPEND="
	!hyprland-plugin/hyprexpo
	!hyprland-plugin/hyprexpo-sandwichfarm
"

DEPEND="
	x11-libs/pixman
	x11-libs/libdrm
	dev-libs/glib
	x11-libs/pango
	dev-libs/libinput
	virtual/libudev
	dev-libs/wayland
	x11-libs/libxkbcommon
	${LUA_DEPS}
"

pkg_setup() {
	lua-single_pkg_setup
}

src_compile() {
	append-cxxflags $(lua_get_CFLAGS)

	emake all
}

src_install() {
	hyprpm_doplugin hyprexpo.so
}