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

EAPI=8

inherit meson xdg

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://repo.dec05eba.com/gpu-screen-recorder-ui"
else
	SRC_URI="https://dec05eba.com/snapshot/${PN}.git.${PV}.tar.gz -> ${P}.tar.gz"
	S="${WORKDIR}"
	KEYWORDS="~amd64 ~arm64"
fi

DESCRIPTION="A fullscreen overlay UI for GPU Screen Recorder in the style of ShadowPlay"
HOMEPAGE="https://git.dec05eba.com/gpu-screen-recorder-ui/about/"
LICENSE=""
SLOT="0"

DEPEND="
	x11-libs/libX11
	x11-libs/libXrandr
	x11-libs/libXrender
	x11-libs/libXcomposite
	x11-libs/libXfixes
	x11-libs/libXfixes
	x11-libs/libXext
	x11-libs/libXi
	x11-libs/libXcursor
	dev-libs/wayland
	gui-libs/egl-wayland
	dev-util/wayland-scanner
	x11-libs/libxkbcommon
	sys-kernel/linux-headers
	media-libs/libpulse
	x11-libs/libdrm
	sys-apps/dbus
	x11-libs/pango
	sys-libs/libcap
	media-video/ffmpeg
	media-libs/libva
"
RDEPEND="
	media-video/gpu-screen-recorder
	${DEPEND}
"
BDEPEND=""


pkg_postinst() {
	xdg_pkg_postinst
}

pkg_postrm() {
	xdg_pkg_postrm
}