diff --git a/gnu/local.mk b/gnu/local.mk index d4019b94f1..67be78e17d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1579,7 +1579,8 @@ dist_patch_DATA = \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtk-doc-respect-xml-catalog.patch \ - %D%/packages/patches/gtk-doc-mkhtml-test-fix.patch \ + %D%/packages/patches/gtk-doc-mkhtml-test-fix.patch \ + %D%/packages/patches/gtk4-needs-udmabuf.patch \ %D%/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/gtksourceview-2-add-default-directory.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index a639dfe55b..21ee73c268 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1123,7 +1123,7 @@ application suites.") (define-public gtk (package (name "gtk") - (version "4.20.3") + (version "4.22.1") (source (origin (method url-fetch) @@ -1131,9 +1131,10 @@ application suites.") (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 - (base32 "0ly1gqc6ybxv5f2a9hvjp5k6l9mfzy2yv8iy2xqnr9l8628g4wr8")) + (base32 "1z2mkmazc2d51jbg3qwwdycycqiwswm88nhw6bxscz8j86f5lyyd")) (patches - (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch")) + (search-patches "gtk4-needs-udmabuf.patch" + "gtk4-respect-GUIX_GTK4_PATH.patch")) (modules '((guix build utils))))) (build-system meson-build-system) (outputs '("out" "bin" "doc")) @@ -1257,8 +1258,10 @@ application suites.") (setenv "XDG_CACHE_HOME" (getcwd)))) (add-before 'check 'pre-check (lambda* (#:key inputs #:allow-other-keys) - ;; Tests require a running X server. - (system "Xvfb :1 +extension GLX &") + ;; Tests require a running X server. The '-noreset' option is + ;; necessary to avoid spurious "Failed to open display" test + ;; errors. + (system "Xvfb :1 +extension GLX -screen 0 1024x768x24 -noreset &") (setenv "DISPLAY" ":1") ;; Tests write to $HOME. (setenv "HOME" (getcwd)) @@ -1301,6 +1304,7 @@ application suites.") docbook-xsl gettext-minimal `(,glib "bin") + glibc-utf8-locales ;some tests require en_US.UTF-8 gobject-introspection ;for building introspection data graphene gtk-doc/stable ;for building documentation @@ -1368,8 +1372,8 @@ application suites.") (native-search-paths (list (search-path-specification - (variable "GUIX_GTK4_PATH") - (files '("lib/gtk-4.0"))))) + (variable "GUIX_GTK4_PATH") + (files '("lib/gtk-4.0"))))) (search-paths native-search-paths) (home-page "https://www.gtk.org/") (synopsis "Cross-platform widget toolkit") diff --git a/gnu/packages/patches/gtk-needs-udmabuf.patch b/gnu/packages/patches/gtk-needs-udmabuf.patch new file mode 100644 index 0000000000..7a261ed3ac --- /dev/null +++ b/gnu/packages/patches/gtk-needs-udmabuf.patch @@ -0,0 +1,35 @@ +Some udmapbuf relying tests were still selected despite using --no-suite=needs-udmabuf. + +Upstream-status: Patch prepared by upstream, not yet committed. + +diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build +index 0118304bf8..6bf4d4bb93 100644 +--- a/testsuite/gsk/meson.build ++++ b/testsuite/gsk/meson.build +@@ -275,6 +275,16 @@ compare_render_tests = [ + 'zero-length-path-stroke', + ] + ++# These tests use dmabufs and fail in testrunners that have ++# dmabuf support but no access to /dev/udmabuf. ++# For that purpose we add them to the 'needs-udmabuf' suite ++# with this list ++needs_udmabuf = [ ++ 'yuv-matrix-dmabuf-nv12', ++ 'yuv-matrix-dmabuf-rgba', ++ 'yuv-matrix-dmabuf-yuyv', ++] ++ + # These tests are either slow or need lots of memory. + # So we don't run them in parallel with other such tests to not + # cause CI failures +@@ -386,6 +396,9 @@ foreach renderer : renderers + if test_xfails.contains(variant) or (renderer_name == 'cairo' and variant == 'clip') + extra_suites += ['failing'] + endif ++ if needs_udmabuf.contains(testname) ++ extra_suites += ['needs-udmabuf'] ++ endif + test('compare ' + renderer_name + ' ' + testname + ' ' + variant, compare_render, + protocol: 'tap', + args: [ diff --git a/gnu/packages/patches/gtk4-needs-udmabuf.patch b/gnu/packages/patches/gtk4-needs-udmabuf.patch new file mode 100644 index 0000000000..7a261ed3ac --- /dev/null +++ b/gnu/packages/patches/gtk4-needs-udmabuf.patch @@ -0,0 +1,35 @@ +Some udmapbuf relying tests were still selected despite using --no-suite=needs-udmabuf. + +Upstream-status: Patch prepared by upstream, not yet committed. + +diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build +index 0118304bf8..6bf4d4bb93 100644 +--- a/testsuite/gsk/meson.build ++++ b/testsuite/gsk/meson.build +@@ -275,6 +275,16 @@ compare_render_tests = [ + 'zero-length-path-stroke', + ] + ++# These tests use dmabufs and fail in testrunners that have ++# dmabuf support but no access to /dev/udmabuf. ++# For that purpose we add them to the 'needs-udmabuf' suite ++# with this list ++needs_udmabuf = [ ++ 'yuv-matrix-dmabuf-nv12', ++ 'yuv-matrix-dmabuf-rgba', ++ 'yuv-matrix-dmabuf-yuyv', ++] ++ + # These tests are either slow or need lots of memory. + # So we don't run them in parallel with other such tests to not + # cause CI failures +@@ -386,6 +396,9 @@ foreach renderer : renderers + if test_xfails.contains(variant) or (renderer_name == 'cairo' and variant == 'clip') + extra_suites += ['failing'] + endif ++ if needs_udmabuf.contains(testname) ++ extra_suites += ['needs-udmabuf'] ++ endif + test('compare ' + renderer_name + ' ' + testname + ' ' + variant, compare_render, + protocol: 'tap', + args: [