You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 line
1.4 KiB

  1. # Copyright 1999-2018 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit git-r3 eutils meson
  5. DESCRIPTION="A modular Wayland compositor library"
  6. HOMEPAGE="https://swaywm.org"
  7. EGIT_REPO_URI="https://github.com/swaywm/wlroots.git"
  8. EGIT_BRANCH="master"
  9. LICENSE="MIT"
  10. SLOT="0"
  11. KEYWORDS=""
  12. IUSE="systemd elogind xwayland x11-backend rootston examples libcap"
  13. REQUIRED_USE="systemd? ( !elogind ) elogind? ( !systemd )"
  14. RDEPEND="dev-libs/wayland
  15. dev-libs/wayland-protocols
  16. media-libs/mesa[gbm,gles2,wayland]
  17. x11-libs/libdrm
  18. dev-libs/libinput
  19. x11-libs/libxkbcommon
  20. virtual/udev
  21. x11-libs/pixman
  22. systemd? ( sys-apps/systemd )
  23. elogind? ( sys-auth/elogind )
  24. x11-backend? (
  25. x11-libs/libxcb
  26. x11-libs/libXfixes
  27. x11-libs/libXcomposite
  28. x11-libs/libXrender
  29. x11-libs/xcb-util-image
  30. )
  31. xwayland? ( x11-base/xorg-server[wayland] )
  32. libcap? ( sys-libs/libcap )"
  33. DEPEND="${RDEPEND}
  34. >=dev-util/meson-0.47
  35. dev-util/ninja"
  36. src_configure() {
  37. local emesonargs=(
  38. -Dxwayland=$(usex xwayland enabled disabled)
  39. -Dlibcap=$(usex libcap enabled disabled)
  40. -Dx11-backend=$(usex x11-backend enabled disabled)
  41. $(meson_use rootston)
  42. $(meson_use examples)
  43. )
  44. if use systemd ; then
  45. emesonargs+=(
  46. -Dlogind=enabled
  47. -Dlogind-provider=systemd
  48. )
  49. elif use elogind ; then
  50. emesonargs+=(
  51. -Dlogind=enabled
  52. -Dlogind-provider=elogind
  53. )
  54. else
  55. emesonargs+=(
  56. -Dlogind=disabled
  57. )
  58. fi
  59. meson_src_configure
  60. }