# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 inherit git-r3 eutils meson DESCRIPTION="A modular Wayland compositor library" HOMEPAGE="https://swaywm.org" EGIT_REPO_URI="https://github.com/swaywm/wlroots.git" EGIT_BRANCH="master" LICENSE="MIT" SLOT="0" KEYWORDS="" IUSE="systemd elogind xwayland x11-backend rootston examples libcap" REQUIRED_USE="systemd? ( !elogind ) elogind? ( !systemd )" RDEPEND="dev-libs/wayland dev-libs/wayland-protocols media-libs/mesa[gbm,gles2,wayland] x11-libs/libdrm dev-libs/libinput x11-libs/libxkbcommon virtual/udev x11-libs/pixman systemd? ( sys-apps/systemd ) elogind? ( sys-auth/elogind ) x11-backend? ( x11-libs/libxcb x11-libs/libXfixes x11-libs/libXcomposite x11-libs/libXrender x11-libs/xcb-util-image ) xwayland? ( x11-base/xorg-server[wayland] ) libcap? ( sys-libs/libcap )" DEPEND="${RDEPEND} >=dev-util/meson-0.47 dev-util/ninja" src_configure() { local emesonargs=( -Dxwayland=$(usex xwayland enabled disabled) -Dlibcap=$(usex libcap enabled disabled) -Dx11-backend=$(usex x11-backend enabled disabled) $(meson_use rootston) $(meson_use examples) ) if use systemd ; then emesonargs+=( -Dlogind=enabled -Dlogind-provider=systemd ) elif use elogind ; then emesonargs+=( -Dlogind=enabled -Dlogind-provider=elogind ) else emesonargs+=( -Dlogind=disabled ) fi meson_src_configure }