sddm-0.14.0-r3.ebuild 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils user
  5. DESCRIPTION="Simple Desktop Display Manager"
  6. HOMEPAGE="https://github.com/sddm/sddm"
  7. SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz"
  8. KEYWORDS="~amd64 ~arm ~x86"
  9. LICENSE="GPL-2+ MIT CC-BY-3.0 CC-BY-SA-3.0 public-domain"
  10. SLOT="0"
  11. IUSE="consolekit elogind +pam systemd"
  12. REQUIRED_USE="?? ( elogind systemd )"
  13. RDEPEND=">=dev-qt/qtcore-5.6:5
  14. >=dev-qt/qtdbus-5.6:5
  15. >=dev-qt/qtgui-5.6:5
  16. >=dev-qt/qtdeclarative-5.6:5
  17. >=dev-qt/qtnetwork-5.6:5
  18. >=x11-base/xorg-server-1.15.1
  19. x11-libs/libxcb[xkb(-)]
  20. consolekit? ( >=sys-auth/consolekit-0.9.4 )
  21. elogind? ( sys-auth/elogind )
  22. pam? ( sys-libs/pam )
  23. systemd? ( sys-apps/systemd:= )
  24. !systemd? ( || ( sys-power/upower sys-power/upower-pm-utils ) )"
  25. DEPEND="${RDEPEND}
  26. dev-python/docutils
  27. >=dev-qt/linguist-tools-5.6:5
  28. >=dev-qt/qttest-5.6:5
  29. kde-frameworks/extra-cmake-modules
  30. virtual/pkgconfig"
  31. PATCHES=(
  32. "${FILESDIR}/${PN}-0.13.0-pam_kwallet.patch"
  33. # fix for flags handling and bug 563108
  34. "${FILESDIR}/${PN}-0.12.0-respect-user-flags.patch"
  35. "${FILESDIR}/${P}-avatars.patch"
  36. "${FILESDIR}/${PN}-enable-elogind.patch"
  37. )
  38. pkg_pretend() {
  39. if [[ ${MERGE_TYPE} != binary && $(tc-getCC) == *gcc* ]]; then
  40. if [[ $(gcc-major-version) -lt 4 || $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 7 ]] ; then
  41. die 'The active compiler needs to be gcc 4.7 (or newer)'
  42. fi
  43. fi
  44. }
  45. src_prepare() {
  46. use consolekit && eapply "${FILESDIR}/${P}-consolekit.patch"
  47. cmake-utils_src_prepare
  48. }
  49. src_configure() {
  50. local mycmakeargs=(
  51. -DENABLE_PAM=$(usex pam)
  52. -DNO_SYSTEMD=$(usex '!systemd')
  53. -DUSE_ELOGIND=$(usex 'elogind')
  54. -DBUILD_MAN_PAGES=ON
  55. -DDBUS_CONFIG_FILENAME="org.freedesktop.sddm.conf"
  56. )
  57. cmake-utils_src_configure
  58. }
  59. pkg_postinst() {
  60. enewgroup ${PN}
  61. enewuser ${PN} -1 -1 /var/lib/${PN} ${PN},video
  62. if use consolekit && use pam && [[ -e "${ROOT}"/etc/pam.d/system-login ]]; then
  63. local line=$(grep "pam_ck_connector.*nox11" "${ROOT}"/etc/pam.d/system-login)
  64. if [[ -z ${line} ]]; then
  65. ewarn
  66. ewarn "Erroneous /etc/pam.d/system-login settings detected!"
  67. ewarn "Please restore 'nox11' option in the line containing pam_ck_connector:"
  68. ewarn
  69. ewarn "session optional pam_ck_connector.so nox11"
  70. ewarn
  71. ewarn "or 'emerge -1 sys-auth/pambase' and run etc-update."
  72. ewarn
  73. fi
  74. fi
  75. }