summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-04-11 07:22:18 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-04-11 07:43:17 -0400
commit92459213cc61a389bea58f400db82395dd91db90 (patch)
tree2793ab90cdd75cde12566735fe82b97ee411f4da
parentgui-libs/egl-wayland: drop 1.1.9_p20211123 (diff)
downloadgentoo-92459213cc61a389bea58f400db82395dd91db90.tar.gz
gentoo-92459213cc61a389bea58f400db82395dd91db90.tar.bz2
gentoo-92459213cc61a389bea58f400db82395dd91db90.zip
gui-libs/egl-wayland: fix warning w/ wayland-1.22
Hardly tested, but patch is very simple and will likely get merged. Unsure if it'd be also necessary for non-GBM egl-wayland-1.1.7, but realistically nvidia:0/470 will lose its USE=wayland in time as it's barely usable anymore (afaik still can't use 1.1.11 due to GBM changes, and just keeps getting worse, e.g. gnome flickers). Bug: https://bugs.gentoo.org/904072 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r--gui-libs/egl-wayland/egl-wayland-1.1.11_p20230202-r1.ebuild47
-rw-r--r--gui-libs/egl-wayland/files/egl-wayland-1.1.11_p20230202-destruction-order.patch25
2 files changed, 72 insertions, 0 deletions
diff --git a/gui-libs/egl-wayland/egl-wayland-1.1.11_p20230202-r1.ebuild b/gui-libs/egl-wayland/egl-wayland-1.1.11_p20230202-r1.ebuild
new file mode 100644
index 000000000000..a45f4637f69d
--- /dev/null
+++ b/gui-libs/egl-wayland/egl-wayland-1.1.11_p20230202-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson
+
+HASH_EGLWAYLAND=30c5a951a849f835acc9f11ea4ca4e1d3380b7eb
+
+DESCRIPTION="EGLStream-based Wayland external platform"
+HOMEPAGE="https://github.com/NVIDIA/egl-wayland"
+SRC_URI="https://github.com/NVIDIA/egl-wayland/archive/${HASH_EGLWAYLAND}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${HASH_EGLWAYLAND}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+RDEPEND="
+ dev-libs/wayland
+ !<x11-drivers/nvidia-drivers-470.57.02[wayland(-)]"
+DEPEND="
+ ${RDEPEND}
+ dev-libs/wayland-protocols
+ gui-libs/eglexternalplatform
+ media-libs/libglvnd
+ x11-libs/libdrm"
+BDEPEND="dev-util/wayland-scanner"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.6-remove-werror.patch
+ "${FILESDIR}"/${P}-destruction-order.patch
+)
+
+src_install() {
+ meson_src_install
+
+ insinto /usr/share/egl/egl_external_platform.d
+ doins "${FILESDIR}"/10_nvidia_wayland.json
+}
+
+pkg_postinst() {
+ if has_version "<x11-drivers/nvidia-drivers-391"; then
+ ewarn "<=nvidia-drivers-390.xx may not work properly with this version of"
+ ewarn "egl-wayland, it is recommended to use nouveau drivers for wayland."
+ fi
+}
diff --git a/gui-libs/egl-wayland/files/egl-wayland-1.1.11_p20230202-destruction-order.patch b/gui-libs/egl-wayland/files/egl-wayland-1.1.11_p20230202-destruction-order.patch
new file mode 100644
index 000000000000..9611ac7dc0da
--- /dev/null
+++ b/gui-libs/egl-wayland/files/egl-wayland-1.1.11_p20230202-destruction-order.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/904072
+https://github.com/NVIDIA/egl-wayland/pull/79
+
+From 979200d803c5ed9cb08ac752ac828f28753fc445 Mon Sep 17 00:00:00 2001
+From: q234rty <q23456yuiop@gmail.com>
+Date: Fri, 7 Apr 2023 18:08:03 +0800
+Subject: [PATCH] Fix wrong destruction order for event queue
+--- a/src/wayland-egldisplay.c
++++ b/src/wayland-egldisplay.c
+@@ -704,12 +704,12 @@ static void getServerProtocolsInfo(struct wl_display *nativeDpy,
+ }
+ }
+
++ if (wlRegistry) {
++ wl_registry_destroy(wlRegistry);
++ }
+ if (queue) {
+ wl_event_queue_destroy(queue);
+ }
+- if (wlRegistry) {
+- wl_registry_destroy(wlRegistry);
+- }
+ }
+
+ EGLDisplay wlEglGetPlatformDisplayExport(void *data,