[packages/gtk4] - fix build with Vulkan

qboosh qboosh at pld-linux.org
Tue May 5 18:27:04 CEST 2026


commit 29fda28eaa6adc79eb5fbdeb51e939e30a083f31
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue May 5 18:26:56 2026 +0200

    - fix build with Vulkan

 gtk4-vk.patch | 11 +++++++++++
 gtk4.spec     |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/gtk4.spec b/gtk4.spec
index beeef28..2c7b1a4 100644
--- a/gtk4.spec
+++ b/gtk4.spec
@@ -30,6 +30,7 @@ Source0:	https://download.gnome.org/sources/gtk/4.22/gtk-%{version}.tar.xz
 # Source0-md5:	2420b9b289937c1c9f97332470db1889
 Patch0:		%{name}-print-backends.patch
 Patch1:		%{name}-x32.patch
+Patch2:		%{name}-vk.patch
 URL:		https://www.gtk.org/
 %{?with_vulkan:BuildRequires:	Vulkan-Loader-devel >= 1.3}
 %{?with_accesskit:BuildRequires:	accesskit-c-devel >= 0.18}
@@ -341,6 +342,7 @@ GTK - przykładowe programy.
 %setup -q -n gtk-%{version}
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
 
 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' demos/gtk-demo/geninclude.py
 %{__sed} -i -e '1s,/usr/bin/env .* gjs,/usr/bin/gjs,' examples/labels.js
diff --git a/gtk4-vk.patch b/gtk4-vk.patch
new file mode 100644
index 0000000..44a2546
--- /dev/null
+++ b/gtk4-vk.patch
@@ -0,0 +1,11 @@
+--- gtk-4.22.4/gsk/gpu/gskvulkanimage.c.orig	2026-04-30 00:39:35.000000000 +0200
++++ gtk-4.22.4/gsk/gpu/gskvulkanimage.c	2026-05-05 17:58:53.247016177 +0200
+@@ -1275,7 +1275,7 @@ gsk_vulkan_image_new_for_dmabuf (GskVulk
+     {
+       GDK_DEBUG (DMABUF, "Vulkan failed to dup() fd: %s", g_strerror (errno));
+       vkDestroyImage (vk_device, self->vk_image, NULL);
+-      self->vk_image = NULL;
++      self->vk_image = VK_NULL_HANDLE;
+       g_object_unref (self);
+       return NULL;
+     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gtk4.git/commitdiff/29fda28eaa6adc79eb5fbdeb51e939e30a083f31



More information about the pld-cvs-commit mailing list