Line 0
Link Here
|
0 |
- |
1 |
# Copyright 1999-2020 Gentoo Authors |
|
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
4 |
EAPI=7 |
5 |
|
6 |
PLOCALES="ar bn ca cs da de es et fi fr hi_IN hu is it ja kk ko lt lv nb nl nn pl pt_BR pt_PT ro ru sk sr sr@ijekavian sr@ijekavianlatin sr@latin sv tr uk zh_CN zh_TW" |
7 |
inherit cmake l10n systemd user |
8 |
|
9 |
DESCRIPTION="Simple Desktop Display Manager" |
10 |
HOMEPAGE="https://github.com/sddm/sddm" |
11 |
SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz" |
12 |
|
13 |
LICENSE="GPL-2+ MIT CC-BY-3.0 CC-BY-SA-3.0 public-domain" |
14 |
SLOT="0" |
15 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
16 |
IUSE="consolekit elogind +pam systemd test" |
17 |
RESTRICT="!test? ( test )" |
18 |
|
19 |
REQUIRED_USE="?? ( elogind systemd )" |
20 |
|
21 |
BDEPEND=" |
22 |
dev-python/docutils |
23 |
>=dev-qt/linguist-tools-5.9.4:5 |
24 |
kde-frameworks/extra-cmake-modules:5 |
25 |
virtual/pkgconfig |
26 |
" |
27 |
RDEPEND=" |
28 |
>=dev-qt/qtcore-5.9.4:5 |
29 |
>=dev-qt/qtdbus-5.9.4:5 |
30 |
>=dev-qt/qtdeclarative-5.9.4:5 |
31 |
>=dev-qt/qtgui-5.9.4:5 |
32 |
>=dev-qt/qtnetwork-5.9.4:5 |
33 |
>=x11-base/xorg-server-1.15.1 |
34 |
x11-libs/libxcb[xkb] |
35 |
consolekit? ( >=sys-auth/consolekit-0.9.4 ) |
36 |
elogind? ( sys-auth/elogind ) |
37 |
pam? ( sys-libs/pam ) |
38 |
systemd? ( sys-apps/systemd:= ) |
39 |
!systemd? ( sys-power/upower ) |
40 |
" |
41 |
DEPEND="${RDEPEND} |
42 |
test? ( >=dev-qt/qttest-5.9.4:5 ) |
43 |
" |
44 |
|
45 |
PATCHES=( |
46 |
"${FILESDIR}/${PN}-0.12.0-respect-user-flags.patch" |
47 |
"${FILESDIR}/${PN}-0.18.0-Xsession.patch" # bug 611210 |
48 |
"${FILESDIR}/${PN}-0.18.0-sddmconfdir.patch" |
49 |
# fix for groups: https://github.com/sddm/sddm/issues/1159 |
50 |
"${FILESDIR}/${P}-revert-honor-PAM-supplemental-groups.patch" |
51 |
"${FILESDIR}/${P}-honor-PAM-supplemental-groups-v2.patch" |
52 |
# fix for ReuseSession=true |
53 |
"${FILESDIR}/${P}-only-reuse-online-sessions.patch" |
54 |
# TODO: fix properly |
55 |
"${FILESDIR}/${PN}-0.16.0-ck2-revert.patch" # bug 633920 |
56 |
) |
57 |
|
58 |
src_prepare() { |
59 |
cmake_src_prepare |
60 |
|
61 |
disable_locale() { |
62 |
sed -e "/${1}\.ts/d" -i data/translations/CMakeLists.txt || die |
63 |
} |
64 |
l10n_find_plocales_changes "data/translations" "" ".ts" |
65 |
l10n_for_each_disabled_locale_do disable_locale |
66 |
|
67 |
if ! use test; then |
68 |
sed -e "/^find_package/s/ Test//" -i CMakeLists.txt || die |
69 |
cmake_comment_add_subdirectory test |
70 |
fi |
71 |
|
72 |
# fix for pam-1.4 and later, https://bugs.gentoo.org/728550 |
73 |
# https://github.com/sddm/sddm/issues/1265 |
74 |
sed -i '/^auth/ s/include/substack/' services/sddm.pam || die |
75 |
} |
76 |
|
77 |
src_configure() { |
78 |
local mycmakeargs=( |
79 |
-DENABLE_PAM=$(usex pam) |
80 |
-DNO_SYSTEMD=$(usex '!systemd') |
81 |
-DUSE_ELOGIND=$(usex 'elogind') |
82 |
-DBUILD_MAN_PAGES=ON |
83 |
-DDBUS_CONFIG_FILENAME="org.freedesktop.sddm.conf" |
84 |
) |
85 |
cmake_src_configure |
86 |
} |
87 |
|
88 |
src_install() { |
89 |
cmake_src_install |
90 |
|
91 |
# Create a default.conf as upstream dropped /etc/sddm.conf w/o replacement |
92 |
local confd="/usr/share/sddm/sddm.conf.d" |
93 |
dodir ${confd} |
94 |
"${D}"/usr/bin/sddm --example-config > "${D}/${confd}"/00default.conf \ |
95 |
|| die "Failed to create 00default.conf" |
96 |
|
97 |
sed -e "/^InputMethod/s/qtvirtualkeyboard//" \ |
98 |
-e "/^ReuseSession/s/false/true/" \ |
99 |
-e "/^EnableHiDPI/s/false/true/" \ |
100 |
-i "${D}/${confd}"/00default.conf || die |
101 |
} |
102 |
|
103 |
pkg_postinst() { |
104 |
elog "Starting with 0.18.0, SDDM no longer installs /etc/sddm.conf" |
105 |
elog "Use it to override specific options. SDDM defaults are now" |
106 |
elog "found in: /usr/share/sddm/sddm.conf.d/00default.conf" |
107 |
|
108 |
enewgroup ${PN} |
109 |
enewuser ${PN} -1 -1 /var/lib/${PN} ${PN},video |
110 |
|
111 |
systemd_reenable sddm.service |
112 |
} |