blob: d68fd937e951f0218dc7b22b30341458a40c3bf6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# 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=""
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
BDEPEND="
dev-libs/wayland
dev-libs/wayland-protocols
virtual/pkgconfig
"
DEPEND="
dev-libs/json-c:=
dev-libs/wayland
>=gui-wm/wayfire-0.11.0-r2:0=
media-libs/freetype:2
media-libs/mesa[egl(+),gles2(+)]
"
RDEPEND="
${DEPEND}
media-libs/fontconfig
!gui-apps/oledsaver-cursor
"
S="${WORKDIR}/${P}"
src_unpack() {
mkdir -p "${S}" || die
cp "${FILESDIR}"/Makefile \
"${FILESDIR}"/oledsaver.c \
"${FILESDIR}"/oledsaver.conf.default \
"${FILESDIR}"/adaptive-rendering.md \
"${FILESDIR}"/oledsaver-cursor.cpp \
"${FILESDIR}"/oledsaver-cursor.xml \
"${FILESDIR}"/oledsaver-idle.cpp \
"${FILESDIR}"/oledsaver-idle.xml \
"${FILESDIR}"/oledsaver-sampler.cpp \
"${FILESDIR}"/oledsaver-sampler.xml \
"${FILESDIR}"/wlr-layer-shell-unstable-v1.xml \
"${S}"/ || die
}
src_compile() {
emake \
CC="$(tc-getCC)" \
CXX="$(tc-getCXX)" \
CFLAGS="${CPPFLAGS} ${CFLAGS} -std=c11" \
CXXFLAGS="${CPPFLAGS} ${CXXFLAGS} -std=c++17" \
LDFLAGS="${LDFLAGS}" \
PREFIX="${EPREFIX}/usr" \
WLR_LAYER_SHELL_XML="${S}/wlr-layer-shell-unstable-v1.xml"
}
src_install() {
emake \
CC="$(tc-getCC)" \
CXX="$(tc-getCXX)" \
CFLAGS="${CPPFLAGS} ${CFLAGS} -std=c11" \
CXXFLAGS="${CPPFLAGS} ${CXXFLAGS} -std=c++17" \
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
dodoc adaptive-rendering.md
}
pkg_postinst() {
elog "Configuration file installed to ${EROOT}/etc/oledsaver.conf"
elog "Set OLEDSAVER_CONFIG to use a different config file."
elog "Without OLEDSAVER_CONFIG, per-user configs are preferred over /etc/oledsaver.conf."
elog "Manager mode uses the Wayland output registry for outputs and Wayfire IPC for focus."
elog "Duplicate manager starts are ignored. Stop older managers once when upgrading from <1.0.16."
elog "Enable ipc, ipc-rules, oledsaver-idle, oledsaver-cursor and oledsaver-sampler in Wayfire."
elog "Restart Wayfire after upgrading it and rebuilding its plugins."
elog "Adaptive sampling interval is in seconds; ADAPTIVE_HUE_INTERVAL is in minutes."
elog "[matrix] BLACK_RAIN_TIMEOUT sets additional seconds of rain on black, then solid black; 0 disables."
elog "Renderer mode requires wlr-layer-shell and xdg-output. Manager idle events require ext-idle-notify-v1."
}
|