1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
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
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"
13 LICENSE="GPL-2+ MIT CC-BY-3.0 CC-BY-SA-3.0 public-domain"
15 KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
16 IUSE="consolekit elogind +pam systemd test"
17 RESTRICT="!test? ( test )"
19 REQUIRED_USE="?? ( elogind systemd )"
23 >=dev-qt/linguist-tools-5.9.4:5
24 kde-frameworks/extra-cmake-modules:5
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
35 consolekit? ( >=sys-auth/consolekit-0.9.4 )
36 elogind? ( sys-auth/elogind )
38 systemd? ( sys-apps/systemd:= )
39 !systemd? ( sys-power/upower )
42 test? ( >=dev-qt/qttest-5.9.4:5 )
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"
55 "${FILESDIR}/${PN}-0.16.0-ck2-revert.patch" # bug 633920
62 sed -e "/${1}\.ts/d" -i data/translations/CMakeLists.txt || die
64 l10n_find_plocales_changes "data/translations" "" ".ts"
65 l10n_for_each_disabled_locale_do disable_locale
68 sed -e "/^find_package/s/ Test//" -i CMakeLists.txt || die
69 cmake_comment_add_subdirectory test
75 -DENABLE_PAM=$(usex pam)
76 -DNO_SYSTEMD=$(usex '!systemd')
77 -DUSE_ELOGIND=$(usex 'elogind')
79 -DDBUS_CONFIG_FILENAME="org.freedesktop.sddm.conf"
87 # Create a default.conf as upstream dropped /etc/sddm.conf w/o replacement
88 local confd="/usr/share/sddm/sddm.conf.d"
90 "${D}"/usr/bin/sddm --example-config > "${D}/${confd}"/00default.conf \
91 || die "Failed to create 00default.conf"
93 sed -e "/^InputMethod/s/qtvirtualkeyboard//" \
94 -e "/^ReuseSession/s/false/true/" \
95 -e "/^EnableHiDPI/s/false/true/" \
96 -i "${D}/${confd}"/00default.conf || die
100 elog "Starting with 0.18.0, SDDM no longer installs /etc/sddm.conf"
101 elog "Use it to override specific options. SDDM defaults are now"
102 elog "found in: /usr/share/sddm/sddm.conf.d/00default.conf"
105 enewuser ${PN} -1 -1 /var/lib/${PN} ${PN},video
107 systemd_reenable sddm.service