mate-screensaver-1.16.0.ebuild 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit mate multilib readme.gentoo-r1
  5. if [[ ${PV} != 9999 ]]; then
  6. KEYWORDS="~amd64 ~arm ~x86"
  7. fi
  8. DESCRIPTION="Replaces xscreensaver, integrating with the MATE desktop"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. IUSE="X debug consolekit gtk3 kernel_linux libnotify opengl pam systemd"
  12. DOC_CONTENTS="
  13. Information for converting screensavers is located in
  14. /usr/share/doc/${PF}/xss-conversion.txt*
  15. "
  16. COMMON_DEPEND="
  17. >=dev-libs/dbus-glib-0.71:0
  18. >=dev-libs/glib-2.36:2
  19. gnome-base/dconf:0
  20. >=mate-base/libmatekbd-1.7.1[gtk3(-)=]
  21. >=mate-base/mate-desktop-1.9.4[gtk3(-)=]
  22. >=mate-base/mate-menus-1.6
  23. >=sys-apps/dbus-0.30:0
  24. >=x11-libs/gdk-pixbuf-2.14:2
  25. >=x11-libs/libX11-1:0
  26. x11-libs/cairo:0
  27. x11-libs/libXext:0
  28. x11-libs/libXrandr:0
  29. x11-libs/libXScrnSaver:0
  30. x11-libs/libXxf86misc:0
  31. x11-libs/libXxf86vm:0
  32. x11-libs/libxklavier:0
  33. x11-libs/pango:0
  34. virtual/libintl:0
  35. consolekit? ( sys-auth/consolekit:0 )
  36. !gtk3? ( >=x11-libs/gtk+-2.24:2 )
  37. gtk3? ( >=x11-libs/gtk+-3.0:3 )
  38. libnotify? ( >=x11-libs/libnotify-0.7:0 )
  39. opengl? ( virtual/opengl:0 )
  40. pam? ( gnome-base/gnome-keyring:0 virtual/pam:0 )
  41. !pam? ( kernel_linux? ( sys-apps/shadow:0 ) )
  42. systemd? ( sys-apps/systemd:0= )
  43. !!<gnome-extra/gnome-screensaver-3:0"
  44. RDEPEND="${COMMON_DEPEND}
  45. >=mate-base/mate-session-manager-1.6"
  46. DEPEND="${COMMON_DEPEND}
  47. >=dev-util/intltool-0.50.1:*
  48. sys-devel/gettext:*
  49. x11-proto/randrproto:0
  50. x11-proto/scrnsaverproto:0
  51. x11-proto/xextproto:0
  52. x11-proto/xf86miscproto:0
  53. virtual/pkgconfig:*"
  54. src_configure() {
  55. mate_src_configure \
  56. --enable-locking \
  57. --with-kbd-layout-indicator \
  58. --with-xf86gamma-ext \
  59. --with-xscreensaverdir=/usr/share/xscreensaver/config \
  60. --with-xscreensaverhackdir=/usr/$(get_libdir)/misc/xscreensaver \
  61. --with-gtk=$(usex gtk3 3.0 2.0) \
  62. $(use_with X x) \
  63. $(use_with consolekit console-kit) \
  64. $(use_with libnotify) \
  65. $(use_with opengl libgl) \
  66. $(use_with systemd) \
  67. $(use_enable debug) \
  68. $(use_enable pam)
  69. }
  70. src_install() {
  71. mate_src_install
  72. # Install the conversion script in the documentation.
  73. dodoc "${S}"/data/migrate-xscreensaver-config.sh
  74. dodoc "${S}"/data/xscreensaver-config.xsl
  75. dodoc "${FILESDIR}"/xss-conversion.txt
  76. # Non PAM users will need this suid to read the password hashes.
  77. # OpenPAM users will probably need this too when
  78. # http://bugzilla.gnome.org/show_bug.cgi?id=370847
  79. # is fixed.
  80. if ! use pam ; then
  81. fperms u+s /usr/libexec/mate-screensaver-dialog
  82. fi
  83. readme.gentoo_create_doc
  84. }
  85. pkg_postinst() {
  86. mate_pkg_postinst
  87. if has_version "<x11-base/xorg-server-1.5.3-r4" ; then
  88. ewarn "You have a too old xorg-server installation. This will cause"
  89. ewarn "mate-screensaver to eat up your CPU. Please consider upgrading."
  90. echo
  91. fi
  92. if has_version "<x11-misc/xscreensaver-4.22-r2" ; then
  93. ewarn "You have xscreensaver installed, you probably want to disable it."
  94. ewarn "To prevent a duplicate screensaver entry in the menu, you need to"
  95. ewarn "build xscreensaver with -gnome in the USE flags."
  96. ewarn "echo \"x11-misc/xscreensaver -gnome\" >> /etc/portage/package.use"
  97. echo
  98. fi
  99. readme.gentoo_print_elog
  100. }