# Copyright 2024 Gentoo Authors # Distributed under the terms of the MIT License EAPI=8 inherit toolchain-funcs DESCRIPTION="OLED-friendly Matrix rain screensaver for wlroots Wayland compositors" HOMEPAGE="" SRC_URI="${P}.tar.gz" RESTRICT="fetch" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" BDEPEND=" dev-libs/wayland dev-libs/wayland-protocols virtual/pkgconfig " DEPEND=" dev-libs/json-c:= dev-libs/wayland media-libs/freetype:2 media-libs/mesa[egl(+),gles2(+)] " RDEPEND=" ${DEPEND} media-libs/fontconfig " src_compile() { emake \ CC="$(tc-getCC)" \ CFLAGS="${CPPFLAGS} ${CFLAGS} -std=c11" \ LDFLAGS="${LDFLAGS}" \ PREFIX="${EPREFIX}/usr" \ WLR_LAYER_SHELL_XML="${S}/wlr-layer-shell-unstable-v1.xml" } src_install() { emake \ CC="$(tc-getCC)" \ CFLAGS="${CPPFLAGS} ${CFLAGS} -std=c11" \ DESTDIR="${D}" \ LDFLAGS="${LDFLAGS}" \ PREFIX="${EPREFIX}/usr" \ WLR_LAYER_SHELL_XML="${S}/wlr-layer-shell-unstable-v1.xml" \ install insinto /etc newins oledsaver.conf.default oledsaver.conf } pkg_postinst() { elog "Configuration file installed to ${EROOT}/etc/oledsaver.conf" elog "Manager mode uses the Wayland output registry for outputs and Wayfire IPC for focus." elog "Wayfire must load the ipc and ipc-rules plugins for focused-output tracking." elog "Renderer mode requires wlr-layer-shell and xdg-output. Manager idle events require ext-idle-notify-v1." }