1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
9 HOMEPAGE="https://github.com/swaywm/wlroots"
11 if [[ ${PV} == 9999 ]]; then
12 EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
15 SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
21 IUSE="elogind icccm systemd x11-backend X"
22 REQUIRED_USE="?? ( elogind systemd )"
25 >=dev-libs/libinput-1.9.0:0=
26 >=dev-libs/wayland-1.17.0
27 media-libs/mesa[egl,gles2,gbm]
32 elogind? ( >=sys-auth/elogind-237 )
33 icccm? ( x11-libs/xcb-util-wm )
34 systemd? ( >=sys-apps/systemd-237 )
35 x11-backend? ( x11-libs/libxcb:0= )
37 x11-base/xorg-server[wayland]
39 x11-libs/xcb-util-image
46 >=dev-libs/wayland-protocols-1.17
50 # Patch is in upstream master. Probably drop on 0.10.2 or 0.11.
51 PATCHES=("${FILESDIR}"/${PN}-gcc-10.patch)
54 # xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
56 "-Dxcb-errors=disabled"
57 -Dlibcap=$(usex filecaps enabled disabled)
58 -Dxcb-icccm=$(usex icccm enabled disabled)
59 -Dxwayland=$(usex X enabled disabled)
60 -Dx11-backend=$(usex x11-backend enabled disabled)
65 emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
66 elif use elogind; then
67 emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
69 emesonargs+=("-Dlogind=disabled")
76 elog "You must be in the input group to allow your compositor"
77 elog "to access input devices via libinput."