# 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. sandwichfarm's fork."
HOMEPAGE="https://github.com/sandwichfarm/hyprexpo"
LICENSE="BSD"
SLOT="0"

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

inherit lua-single hyprpm

REQUIRED_USE="${LUA_REQUIRED_USE}"

BDEPEND="
	virtual/pkgconfig
"

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

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

pkg_setup() {
	lua-single_pkg_setup
}

src_compile() {
	LUA_PKG_CONFIG="lua" emake all
}

src_install() {
	hyprpm_doplugin hyprexpo.so
}