1 |
commit: 0520784b29a0528df91d20108a6569a3f441a3e7 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 1 00:54:04 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 1 01:49:35 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0520784b |
7 |
|
8 |
x11-wm/mutter: add support for eglstream with VIDEO_CARDS=nvidia |
9 |
|
10 |
Along with support being added to >=xwayland-21.1.1.901, provides a |
11 |
reasonable experience on wayland for nvidia users (like with kwin). |
12 |
|
13 |
eglstream may have uses for non-nvidia in the future but |
14 |
realistically is only useful for nvidia right now. |
15 |
|
16 |
Acked-by: Matt Turner <mattst88 <AT> gentoo.org> |
17 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
18 |
|
19 |
x11-wm/mutter/mutter-40.2.1.ebuild | 18 +++++++++++++++--- |
20 |
1 file changed, 15 insertions(+), 3 deletions(-) |
21 |
|
22 |
diff --git a/x11-wm/mutter/mutter-40.2.1.ebuild b/x11-wm/mutter/mutter-40.2.1.ebuild |
23 |
index 36f6f75bc57..62bbdb155ee 100644 |
24 |
--- a/x11-wm/mutter/mutter-40.2.1.ebuild |
25 |
+++ b/x11-wm/mutter/mutter-40.2.1.ebuild |
26 |
@@ -10,7 +10,7 @@ HOMEPAGE="https://gitlab.gnome.org/GNOME/mutter/" |
27 |
LICENSE="GPL-2+" |
28 |
SLOT="0/8" # 0/libmutter_api_version - ONLY gnome-shell (or anything using mutter-clutter-<api_version>.pc) should use the subslot |
29 |
|
30 |
-IUSE="elogind input_devices_wacom +introspection screencast sysprof systemd test udev wayland" |
31 |
+IUSE="elogind input_devices_wacom +introspection screencast sysprof systemd test udev wayland video_cards_nvidia" |
32 |
# native backend requires gles3 for hybrid graphics blitting support, udev and a logind provider |
33 |
REQUIRED_USE=" |
34 |
wayland? ( ^^ ( elogind systemd ) udev ) |
35 |
@@ -65,6 +65,7 @@ DEPEND=" |
36 |
systemd? ( sys-apps/systemd ) |
37 |
elogind? ( sys-auth/elogind ) |
38 |
x11-base/xorg-server[wayland] |
39 |
+ video_cards_nvidia? ( gui-libs/egl-wayland ) |
40 |
) |
41 |
udev? ( >=dev-libs/libgudev-232:= |
42 |
>=virtual/libudev-232-r1:= ) |
43 |
@@ -109,8 +110,6 @@ src_configure() { |
44 |
$(meson_use wayland) |
45 |
$(meson_use wayland native_backend) |
46 |
$(meson_use screencast remote_desktop) |
47 |
- -Degl_device=false # This should be dependent on wayland,video_drivers_nvidia, once eglstream support is there |
48 |
- -Dwayland_eglstream=false # requires packages egl-wayland for wayland-eglstream-protocols.pc |
49 |
$(meson_use udev) |
50 |
-Dudev_dir=$(get_udevdir) |
51 |
$(meson_use input_devices_wacom libwacom) |
52 |
@@ -130,6 +129,19 @@ src_configure() { |
53 |
# TODO: relies on default settings, but in Gentoo we might have some more packages we want to give Xgrab access (mostly virtual managers and remote desktops) |
54 |
#xwayland_grab_default_access_rules |
55 |
) |
56 |
+ |
57 |
+ if use wayland && use video_cards_nvidia; then |
58 |
+ emesonargs+=( |
59 |
+ -Degl_device=true |
60 |
+ -Dwayland_eglstream=true |
61 |
+ ) |
62 |
+ else |
63 |
+ emsonargs+=( |
64 |
+ -Degl_device=false |
65 |
+ -Dwayland_eglstream=false |
66 |
+ ) |
67 |
+ fi |
68 |
+ |
69 |
meson_src_configure |
70 |
} |