dev-python/numpydoc: arm64 keyworded (bug #721130)
[gentoo.git] / gui-libs / wlroots / wlroots-0.10.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit fcaps meson
7
8 DESCRIPTION="Pluggable, composable, unopinionated modules for building a Wayland compositor"
9 HOMEPAGE="https://github.com/swaywm/wlroots"
10
11 if [[ ${PV} == 9999 ]]; then
12         EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
13         inherit git-r3
14 else
15         SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
16         KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
17 fi
18
19 LICENSE="MIT"
20 SLOT="0/10"
21 IUSE="elogind icccm systemd x11-backend X"
22 REQUIRED_USE="?? ( elogind systemd )"
23
24 DEPEND="
25         >=dev-libs/libinput-1.9.0:0=
26         >=dev-libs/wayland-1.17.0
27         media-libs/mesa[egl,gles2,gbm]
28         virtual/libudev
29         x11-libs/libdrm
30         x11-libs/libxkbcommon
31         x11-libs/pixman
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= )
36         X? (
37                 x11-base/xorg-server[wayland]
38                 x11-libs/libxcb:0=
39                 x11-libs/xcb-util-image
40         )
41 "
42 RDEPEND="
43         ${DEPEND}
44 "
45 BDEPEND="
46         >=dev-libs/wayland-protocols-1.17
47         virtual/pkgconfig
48 "
49
50 # Patch is in upstream master. Probably drop on 0.10.2 or 0.11.
51 PATCHES=("${FILESDIR}"/${PN}-gcc-10.patch)
52
53 src_configure() {
54         # xcb-util-errors is not on Gentoo Repository (and upstream seems inactive?)
55         local emesonargs=(
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)
61                 "-Dexamples=false"
62                 "-Dwerror=false"
63         )
64         if use systemd; then
65                 emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
66         elif use elogind; then
67                 emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
68         else
69                 emesonargs+=("-Dlogind=disabled")
70         fi
71
72         meson_src_configure
73 }
74
75 pkg_postinst() {
76         elog "You must be in the input group to allow your compositor"
77         elog "to access input devices via libinput."
78 }