blob: 51a32fd1e9954f1fbe08992b2e57c6cd675de147 (
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
|
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=9
DESCRIPTION="Gentoo defaults for SDDM (Simple Desktop Display Manager)"
HOMEPAGE="https://wiki.gentoo.org/wiki/SDDM"
SRC_URI=""
S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv ~x86"
IUSE="custom-compositor kwin systemd weston"
REQUIRED_USE="?? ( custom-compositor kwin weston )"
RDEPEND="
!<gui-apps/sddm-0.21.0_p20250818
kwin? ( kde-plasma/kwin:6 )
weston? ( dev-libs/weston[kiosk] )
!custom-compositor? ( !kwin? ( !weston? ( x11-base/xorg-server ) ) )
"
GEN2CONF=01gentoo.conf
src_prepare() {
touch "${T}"/${GEN2CONF} || die
_displayserver() {
if use custom-compositor || use kwin || use weston; then
echo "wayland"
else
echo "x11"
fi
}
_compositorcommand() {
local cc=()
if use kwin; then
cc=( kwin_wayland --drm )
has_version "kde-plasma/kwin[lock]" && cc+=( --no-lockscreen )
has_version "kde-plasma/kwin[shortcuts]" && cc+=( --no-global-shortcuts )
use systemd && cc+=( --locale1 )
elif use weston; then
cc=( weston --shell=kiosk )
else
cc=( " # must be set by user" )
fi
echo "${cc[@]}"
}
cat >> "${T}"/${GEN2CONF} <<- _EOF_ || die
[General]
# Remove qtvirtualkeyboard as InputMethod default
InputMethod=
# Which display server should be used (default: x11)
DisplayServer=$(_displayserver)
_EOF_
if use custom-compositor || use kwin || use weston; then
if use kwin; then
cat >> "${T}"/${GEN2CONF} <<- _EOF_ || die
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
_EOF_
fi
cat >> "${T}"/${GEN2CONF} <<- _EOF_ || die
[Wayland]
CompositorCommand=$(_compositorcommand)
_EOF_
fi
default
}
src_install() {
insinto /etc/sddm.conf.d/
doins "${T}"/${GEN2CONF}
}
|