summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-03-28 22:50:16 +0200
committerDavid Seifert <soap@gentoo.org>2023-03-28 22:50:16 +0200
commit47a3d74dc5c3f919f857429dbbc95a11c1496fdf (patch)
tree4b701450862159cb334bd563add855afd8fe4f60 /sys-apps/xdg-desktop-portal-gnome
parentsys-apps/accountsservice: disable tests when USE="-test" (diff)
downloadgentoo-47a3d74dc5c3f919f857429dbbc95a11c1496fdf.tar.gz
gentoo-47a3d74dc5c3f919f857429dbbc95a11c1496fdf.tar.bz2
gentoo-47a3d74dc5c3f919f857429dbbc95a11c1496fdf.zip
sys-apps/xdg-desktop-portal-gnome: fix USE="-wayland" build
Closes: https://bugs.gentoo.org/903189 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-apps/xdg-desktop-portal-gnome')
-rw-r--r--sys-apps/xdg-desktop-portal-gnome/files/xdg-desktop-portal-gnome-44.0-x11-only.patch36
-rw-r--r--sys-apps/xdg-desktop-portal-gnome/xdg-desktop-portal-gnome-44.0.ebuild6
2 files changed, 42 insertions, 0 deletions
diff --git a/sys-apps/xdg-desktop-portal-gnome/files/xdg-desktop-portal-gnome-44.0-x11-only.patch b/sys-apps/xdg-desktop-portal-gnome/files/xdg-desktop-portal-gnome-44.0-x11-only.patch
new file mode 100644
index 000000000000..0c7af9253bae
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal-gnome/files/xdg-desktop-portal-gnome-44.0-x11-only.patch
@@ -0,0 +1,36 @@
+From d19e5a66fbba22274a774ac603d2ecb3ff528779 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Tue, 28 Mar 2023 20:42:32 +0200
+Subject: [PATCH] Do not reference wayland routines without wayland support
+
+* If GTK4 is built without Wayland support, there will be no
+ `init_external_window_wayland_display` symbol.
+
+Bug: https://bugs.gentoo.org/903189
+---
+ src/externalwindow.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/externalwindow.c b/src/externalwindow.c
+index c3ea3d7..f7372bb 100644
+--- a/src/externalwindow.c
++++ b/src/externalwindow.c
+@@ -90,10 +90,14 @@ init_external_window_display (GError **error)
+ const char *session_type;
+
+ session_type = getenv ("XDG_SESSION_TYPE");
++#ifdef HAVE_GTK_WAYLAND
+ if (g_strcmp0 (session_type, "wayland") == 0)
+ return init_external_window_wayland_display (error);
+- else if (g_strcmp0 (session_type, "x11") == 0)
++#endif
++#ifdef HAVE_GTK_X11
++ if (g_strcmp0 (session_type, "x11") == 0)
+ return init_external_window_x11_display (error);
++#endif
+
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ "Unsupported or missing session type '%s'",
+--
+GitLab
+
diff --git a/sys-apps/xdg-desktop-portal-gnome/xdg-desktop-portal-gnome-44.0.ebuild b/sys-apps/xdg-desktop-portal-gnome/xdg-desktop-portal-gnome-44.0.ebuild
index ef62dd2dfcc4..e902e5b3a415 100644
--- a/sys-apps/xdg-desktop-portal-gnome/xdg-desktop-portal-gnome-44.0.ebuild
+++ b/sys-apps/xdg-desktop-portal-gnome/xdg-desktop-portal-gnome-44.0.ebuild
@@ -34,6 +34,12 @@ BDEPEND="
wayland? ( dev-util/wayland-scanner )
"
+PATCHES=(
+ # backport
+ # https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/83
+ "${FILESDIR}"/${P}-x11-only.patch
+)
+
src_configure() {
local emesonargs=(
-Dsystemduserunitdir="$(systemd_get_userunitdir)"