wlroots-9999.ebuild 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # Copyright 1999-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit meson
  5. DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
  6. HOMEPAGE="https://gitlab.freedesktop.org/wlroots/wlroots"
  7. if [[ ${PV} == 9999 ]]; then
  8. EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}.git"
  9. inherit git-r3
  10. SLOT="0/9999"
  11. else
  12. SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/releases/${PV}/downloads/${P}.tar.gz"
  13. KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86 ~arm"
  14. SLOT="0/$(ver_cut 2)"
  15. fi
  16. LICENSE="MIT"
  17. IUSE="liftoff +libinput +drm +session tinywl vulkan x11-backend xcb-errors X"
  18. REQUIRED_USE="
  19. drm? ( session )
  20. libinput? ( session )
  21. xcb-errors? ( || ( x11-backend X ) )
  22. "
  23. DEPEND="
  24. >=dev-libs/wayland-1.22.0
  25. media-libs/mesa[egl(+),gles2]
  26. >=x11-libs/libdrm-2.4.118
  27. x11-libs/libxkbcommon
  28. >=x11-libs/pixman-0.42.0
  29. drm? (
  30. media-libs/libdisplay-info
  31. sys-apps/hwdata
  32. liftoff? ( >=dev-libs/libliftoff-0.4 )
  33. )
  34. libinput? ( >=dev-libs/libinput-1.14.0:= )
  35. session? (
  36. sys-auth/seatd:=
  37. virtual/libudev
  38. )
  39. vulkan? (
  40. dev-util/glslang:=
  41. dev-util/vulkan-headers
  42. media-libs/vulkan-loader
  43. )
  44. xcb-errors? ( x11-libs/xcb-util-errors )
  45. x11-backend? (
  46. x11-libs/libxcb:=
  47. x11-libs/xcb-util-renderutil
  48. )
  49. X? (
  50. x11-libs/libxcb:=
  51. x11-libs/xcb-util-wm
  52. x11-base/xwayland
  53. )
  54. "
  55. RDEPEND="
  56. ${DEPEND}
  57. "
  58. BDEPEND="
  59. >=dev-libs/wayland-protocols-1.32
  60. dev-util/wayland-scanner
  61. >=dev-build/meson-1.1.0
  62. virtual/pkgconfig
  63. "
  64. RESTRICT="mirror"
  65. src_configure() {
  66. local backends=(
  67. $(usev drm)
  68. $(usev libinput)
  69. $(usev x11-backend 'x11')
  70. )
  71. local meson_backends=$(IFS=','; echo "${backends[*]}")
  72. local emesonargs=(
  73. $(meson_feature xcb-errors)
  74. $(meson_use tinywl examples)
  75. -Drenderers=$(usex vulkan 'gles2,vulkan' gles2)
  76. $(meson_feature X xwayland)
  77. -Dbackends=${meson_backends}
  78. $(meson_feature session)
  79. )
  80. meson_src_configure
  81. }
  82. src_install() {
  83. meson_src_install
  84. dodoc docs/*
  85. if use tinywl; then
  86. dobin "${BUILD_DIR}"/tinywl/tinywl
  87. fi
  88. }
  89. pkg_postinst() {
  90. elog "You must be in the input group to allow your compositor"
  91. elog "to access input devices via libinput."
  92. }