From adecd321c33bcade6467b75ceb8b377f25588e55 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Fri, 23 Feb 2024 21:41:57 -0500 Subject: [PATCH 01/33] gnu: python-pycairo: Update to 1.26.0. * gnu/packages/gtk.scm (python-pycairo): Update to 1.26.0. Change-Id: I7349bd0c68b061d0f3fe46db52b7fdc63acbd69b --- gnu/packages/gtk.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 8fabd16222..b1ce3fd80f 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1965,7 +1965,7 @@ (define-public gtksourceviewmm (define-public python-pycairo (package (name "python-pycairo") - (version "1.21.0") + (version "1.26.0") (source (origin (method url-fetch) @@ -1973,7 +1973,7 @@ (define-public python-pycairo version "/pycairo-" version ".tar.gz")) (sha256 (base32 - "0jxpyibpjadw8ah1mqbhvryr795myiznb1ikm8wgjbamibqhf695")))) + "1sybz43sj4ynjahlkidrcdpdrq8yi1avkndc2hgb5pgvfjld1p9d")))) (build-system python-build-system) (native-inputs (list pkg-config python-pytest)) From 51ae492e8bde8c5465ac1b7bab72944aaf798e3f Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Fri, 1 Mar 2024 20:06:49 -0500 Subject: [PATCH 02/33] gnu: cairo: Update to 1.18.0. With this new release of cairo many old configure options were removed and now meson is used to build it. The defaults include the tee backend which we had previously enabled while the xml backend has been dropped from cairo completely. Old configure options where were commented out to be enabled have been removed as they no longer apply to version 1.18.0. The variable 'cairo' is now a hidden package to work around a dependency cycle where gtk-doc is needed to build the documentation (which itself depends on cairo). The new variable 'cairo-with-documentation' is now the public package and the module exports 'cairo' for use in other packages. This follows what was done for glib. * gnu/packages/gtk.scm: Export 'cairo'. (cairo): Update to 1.18.0. [source]: Remove 'patches' field. [properties]: Hide package. [outputs]: Remove (doc output is now in cairo-with-documentation). [build-system]: Change to meson-build-system. [arguments]: Add #:glib-or-gtk?. Remove old flags from #:configure-flags and add '-Dtests=disabled' to match #:tests?. [propagated-inputs]: Remove commented out packages. (cairo-with-documentation): New variable. (cairo-sans-poppler)[properties]: No longer set hidden as it is now inherited from cairo. (cairo-xcb)[properties]: Unhide (inherited from cairo). [arguments]: Remove obsolete #:configure-flags and properly inherit from cairo. * gnu/packages/patches/cairo-CVE-2018-19876.patch: Remove. * gnu/packages/patches/cairo-CVE-2020-35492.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove them. Change-Id: I2f4c953b23c6b32b1fafaf03db89d7a475fc6956 --- gnu/local.mk | 2 - gnu/packages/gtk.scm | 81 ++++++++++--------- .../patches/cairo-CVE-2018-19876.patch | 37 --------- .../patches/cairo-CVE-2020-35492.patch | 49 ----------- 4 files changed, 45 insertions(+), 124 deletions(-) delete mode 100644 gnu/packages/patches/cairo-CVE-2018-19876.patch delete mode 100644 gnu/packages/patches/cairo-CVE-2020-35492.patch diff --git a/gnu/local.mk b/gnu/local.mk index f2b480bded..cf6b07995d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1009,8 +1009,6 @@ dist_patch_DATA = \ %D%/packages/patches/breezy-fix-gio.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ - %D%/packages/patches/cairo-CVE-2018-19876.patch \ - %D%/packages/patches/cairo-CVE-2020-35492.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \ %D%/packages/patches/calibre-remove-test-unrar.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index b1ce3fd80f..b463e15d48 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -36,6 +36,7 @@ ;;; Copyright © 2023 Sergiu Ivanov ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; Copyright © 2024 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -121,7 +122,11 @@ (define-module (gnu packages gtk) #:use-module (gnu packages pulseaudio) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) - #:use-module (ice-9 match)) + #:use-module (ice-9 match) + ;; Export cairo to break a dependency cycle, as gtk-doc is needed to build + ;; the documentation. Use cairo for other packages and + ;; cairo-with-documentation as the public package. + #:export (cairo)) (define-public appmenu-gtk-module (package @@ -160,10 +165,10 @@ (define-public appmenu-gtk-module (home-page "https://gitlab.com/vala-panel-project/vala-panel-appmenu") (license (list license:lgpl3)))) -(define-public cairo +(define cairo (package (name "cairo") - (version "1.16.0") + (version "1.18.0") (source (origin (method url-fetch) @@ -171,30 +176,13 @@ (define-public cairo (string-append "https://cairographics.org/releases/cairo-" version ".tar.xz")) (sha256 - (base32 "0c930mk5xr2bshbdljv005j3j8zr47gqmkry3q6qgvqky6rjjysy")) - (patches (search-patches - "cairo-CVE-2018-19876.patch" - "cairo-CVE-2020-35492.patch")))) - (build-system glib-or-gtk-build-system) - (outputs '("out" "doc")) + (base32 "0r0by563s75xyzz0d0j1nmjqmdrk2x9agk7r57p3v8vqp4v0ffi4")))) + (build-system meson-build-system) (arguments `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html + #:glib-or-gtk? #t #:configure-flags - (list - "--disable-static" - ;; XXX: To be enabled. - ;; "--enable-gallium=yes" - ;; "--enable-gl=yes" - ;; " --enable-glesv2=yes" - ;; "--enable-glesv3=yes" - ;; "--enable-cogl=yes" - ;; "--enable-directfb=yes" - ;; "--enable-vg=yes" - "--enable-tee=yes" ;needed for GNU IceCat - "--enable-xml=yes" ;for cairo-xml support - (string-append "--with-html-dir=" - (assoc-ref %outputs "doc") - "/share/gtk-doc/html")))) + (list "-Dtests=disabled"))) (native-inputs `(,@(if (target-hurd?) '() @@ -212,15 +200,10 @@ (define-public cairo '() `(("poppler" ,poppler))))) (propagated-inputs - `( ;; ("cogl" ,cogl) - ;; ("directfb" ,directfb) - ("fontconfig" ,fontconfig) + `(("fontconfig" ,fontconfig) ("freetype" ,freetype) ("glib" ,glib) - ;; ("gtk+" ,gtk+) ("libpng" ,libpng) - ;; ("librsvg" ,librsvg) - ;; ("opengl" ,mesa) ("pixman" ,pixman) ("x11" ,libx11) ("xcb" ,libxcb) @@ -236,24 +219,50 @@ (define-public cairo ;; This project is dual-licensed. (list license:lgpl2.1+ - license:mpl1.1)))) + license:mpl1.1)) + ;; Hide and have cairo-with-documentation public. + (properties '((hidden? . #t))))) + +(define-public cairo-with-documentation + ;; cairo's docs must be built in a separate package since it requires + ;; gtk-doc, which in turn depends on cairo. + (package/inherit cairo + (properties (alist-delete 'hidden? (package-properties cairo))) + (outputs (cons "doc" (package-outputs cairo))) + (native-inputs + (modify-inputs (package-native-inputs cairo) + (prepend gtk-doc))) + (arguments + (substitute-keyword-arguments (package-arguments cairo) + ((#:configure-flags flags ''()) + #~(cons "-Dgtk_doc=true" #$flags)) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'install 'move-doc + (lambda* (#:key outputs #:allow-other-keys) + (mkdir-p (string-append #$output:doc "/share")) + (rename-file + (string-append #$output "/share/gtk-doc") + (string-append #$output:doc "/share/gtk-doc")) + ;; This directory is now empty so remove it. + (rmdir (string-append #$output "/share")))))))))) (define-public cairo-sans-poppler ;; Variant used to break the dependency cycle between Poppler and Cairo. (package/inherit cairo - (inputs (alist-delete "poppler" (package-inputs cairo))) - (properties `((hidden? . #t))))) + (inputs (alist-delete "poppler" (package-inputs cairo))))) (define-public cairo-xcb (package/inherit cairo + (properties (alist-delete 'hidden? (package-properties cairo))) (name "cairo-xcb") (inputs `(("mesa" ,mesa) ,@(package-inputs cairo))) (arguments - `(#:tests? #f - #:configure-flags - '("--enable-xlib-xcb" "--enable-gl" "--enable-egl"))) + (substitute-keyword-arguments (package-arguments cairo) + ((#:configure-flags flags ''()) + #~(cons "-Dxlib-xcb=enabled" #$flags)))) (synopsis "2D graphics library (with X11 support)"))) (define-public harfbuzz diff --git a/gnu/packages/patches/cairo-CVE-2018-19876.patch b/gnu/packages/patches/cairo-CVE-2018-19876.patch deleted file mode 100644 index c0fba2ecaa..0000000000 --- a/gnu/packages/patches/cairo-CVE-2018-19876.patch +++ /dev/null @@ -1,37 +0,0 @@ -Copied from Debian. - -From: Carlos Garcia Campos -Date: Mon, 19 Nov 2018 12:33:07 +0100 -Subject: ft: Use FT_Done_MM_Var instead of free when available in - cairo_ft_apply_variations - -Fixes a crash when using freetype >= 2.9 - -[This is considered to be security-sensitive because WebKitGTK+ sets its -own memory allocator, which is not compatible with system free(), making -this a remotely triggerable denial of service or memory corruption.] - -Origin: upstream, commit:90e85c2493fdfa3551f202ff10282463f1e36645 -Bug: https://gitlab.freedesktop.org/cairo/cairo/merge_requests/5 -Bug-Debian: https://bugs.debian.org/916389 -Bug-CVE: CVE-2018-19876 ---- - src/cairo-ft-font.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c -index 325dd61..981973f 100644 ---- a/src/cairo-ft-font.c -+++ b/src/cairo-ft-font.c -@@ -2393,7 +2393,11 @@ skip: - done: - free (coords); - free (current_coords); -+#if HAVE_FT_DONE_MM_VAR -+ FT_Done_MM_Var (face->glyph->library, ft_mm_var); -+#else - free (ft_mm_var); -+#endif - } - } - diff --git a/gnu/packages/patches/cairo-CVE-2020-35492.patch b/gnu/packages/patches/cairo-CVE-2020-35492.patch deleted file mode 100644 index e8b90fa5c5..0000000000 --- a/gnu/packages/patches/cairo-CVE-2020-35492.patch +++ /dev/null @@ -1,49 +0,0 @@ -Copied from Debian. - -From 03a820b173ed1fdef6ff14b4468f5dbc02ff59be Mon Sep 17 00:00:00 2001 -From: Heiko Lewin -Date: Tue, 15 Dec 2020 16:48:19 +0100 -Subject: [PATCH] Fix mask usage in image-compositor - -[trimmed test case, since not used in Debian build] - ---- - src/cairo-image-compositor.c | 8 ++-- - ---- cairo-1.16.0.orig/src/cairo-image-compositor.c -+++ cairo-1.16.0/src/cairo-image-compositor.c -@@ -2601,14 +2601,14 @@ _inplace_src_spans (void *abstract_rende - unsigned num_spans) - { - cairo_image_span_renderer_t *r = abstract_renderer; -- uint8_t *m; -+ uint8_t *m, *base = (uint8_t*)pixman_image_get_data(r->mask); - int x0; - - if (num_spans == 0) - return CAIRO_STATUS_SUCCESS; - - x0 = spans[0].x; -- m = r->_buf; -+ m = base; - do { - int len = spans[1].x - spans[0].x; - if (len >= r->u.composite.run_length && spans[0].coverage == 0xff) { -@@ -2646,7 +2646,7 @@ _inplace_src_spans (void *abstract_rende - spans[0].x, y, - spans[1].x - spans[0].x, h); - -- m = r->_buf; -+ m = base; - x0 = spans[1].x; - } else if (spans[0].coverage == 0x0) { - if (spans[0].x != x0) { -@@ -2675,7 +2675,7 @@ _inplace_src_spans (void *abstract_rende - #endif - } - -- m = r->_buf; -+ m = base; - x0 = spans[1].x; - } else { - *m++ = spans[0].coverage; From 1d488861a07aaad5b6ba4dd0d93505cc69d93ccd Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Wed, 31 Jan 2024 10:18:26 +0100 Subject: [PATCH 03/33] gnu: libdrm: Update to 2.4.120. * gnu/packages/xdisorg.scm (libdrm): Update to 2.4.120. Signed-off-by: John Kehayias Change-Id: Ibd5be956819bbc6b7df5d5b7cdd02297dc1e2e71 --- gnu/packages/xdisorg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index ace1daca38..54fd035bdf 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -735,7 +735,7 @@ (define-public pixman (define-public libdrm (package (name "libdrm") - (version "2.4.117") + (version "2.4.120") (source (origin (method url-fetch) (uri (string-append @@ -743,7 +743,7 @@ (define-public libdrm version ".tar.xz")) (sha256 (base32 - "0ar4c4ikcbm1s4sg09ld406izq5s1yk7b2n0mmvql77bwdlqv252")))) + "0yijzgg6rdsa68bz03sw0lcfa2nclv9m3as1cja50wkcyxim7x9v")))) (build-system meson-build-system) (arguments (list #:configure-flags From 304d3d96440df25edc26419367777138e91ec5ec Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Fri, 2 Feb 2024 16:53:44 +0100 Subject: [PATCH 04/33] gnu: mesa: Hardcode libvulkan.so's dependency for zink. * gnu/packages/gl.scm (mesa): Add vulkan-loader as an input. Refer to its libvulkan.so.1 by full path in the zink gallium driver. (cherry picked from commit e2875b7bb894f3575b6e61daa9c1f5d5f4c14b84) Change-Id: I83ff787e6148a45b9403e578dd744f7eb85a221b --- gnu/packages/gl.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index f8dc8c1d9d..df1e0796cb 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -327,6 +327,7 @@ (define-public mesa libxrandr libxvmc llvm-for-mesa + vulkan-loader wayland wayland-protocols `(,zstd "lib"))) @@ -479,7 +480,7 @@ (define-public mesa (_ '((display "No tests to disable on this architecture.\n")))))) (add-before 'configure 'fix-dlopen-libnames - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) (let ((out #$output)) ;; Remain agnostic to .so.X.Y.Z versions while doing ;; the substitutions so we're future-safe. @@ -495,7 +496,12 @@ (define-public mesa ;; it's never installed since Mesa removed its ;; egl_gallium support. (("\"gbm_dri\\.so") - (string-append "\"" out "/lib/dri/gbm_dri.so")))))) + (string-append "\"" out "/lib/dri/gbm_dri.so"))) + (substitute* "src/gallium/drivers/zink/zink_screen.c" + (("util_dl_open\\(VK_LIBNAME\\)") + (format #f "util_dl_open(\"~a\")" + (search-input-file inputs + "lib/libvulkan.so.1"))))))) (add-after 'install 'split-outputs (lambda _ (let ((out #$output) From b43d36a556c1c1d75fdffbec08d8c39121a528cd Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Tue, 26 Mar 2024 20:26:23 -0400 Subject: [PATCH 05/33] gnu: mesa: Update to 24.0.3. * gnu/packages/gl.scm (mesa): Update to 24.0.3. Co-authored-by: aurtzy Change-Id: Id674e81154631daf9e8c33940c299dc1d26c62c5 --- gnu/packages/gl.scm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index df1e0796cb..c32bfad82e 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -297,17 +297,17 @@ (define libva-without-mesa (define-public mesa (package (name "mesa") - (version "23.3.2") + (version "24.0.3") (source - (origin - (method url-fetch) - (uri (list (string-append "https://archive.mesa3d.org/" - "mesa-" version ".tar.xz") - (string-append "ftp://ftp.freedesktop.org/pub/mesa/" - "mesa-" version ".tar.xz"))) - (sha256 - (base32 - "1p4swrbmz3kb1805kdj973hf8virgmix4m9qprmcb2bgl4gviz1w")))) + (origin + (method url-fetch) + (uri (list (string-append "https://archive.mesa3d.org/" + "mesa-" version ".tar.xz") + (string-append "ftp://ftp.freedesktop.org/pub/mesa/" + "mesa-" version ".tar.xz"))) + (sha256 + (base32 + "1gpx3glifdvyw2fxigiannrxkdfhag6b6h0nxab3azbvlfickbkp")))) (build-system meson-build-system) (propagated-inputs ;; The following are in the Requires.private field of gl.pc. From f7c259b2659cbd752ce5e1bcd2c2d66188295967 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 26 Mar 2024 09:28:54 +0800 Subject: [PATCH 06/33] gnu: sdl2: Update to 2.30.1. * gnu/packages/sdl.scm (sdl2): Update to 2.30.1. Change-Id: I0417cfaa0af55df63f731efad420de9f2b81a3d9 Signed-off-by: John Kehayias --- gnu/packages/sdl.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 3a4aafcaa7..d3a0e33b19 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2020 Oleg Pykhalov ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2023 Evgeny Pisemsky -;;; Copyright © 2023 dan +;;; Copyright © 2023, 2024 dan ;;; ;;; This file is part of GNU Guix. ;;; @@ -118,7 +118,7 @@ (define-public sdl2 (package (inherit sdl) (name "sdl2") - (version "2.28.5") + (version "2.30.1") (source (origin (method url-fetch) (uri @@ -126,7 +126,7 @@ (define-public sdl2 version ".tar.gz")) (sha256 (base32 - "1r36cspzv6h8abiqbbkrgm17g975p9wiziir2xabj3721dyv6b1k")))) + "0fj7gxc7rlzzrafnx9nmf7ws3paxy583fmx7bcbavi6gr3xmy881")))) (arguments (substitute-keyword-arguments (package-arguments sdl) ((#:configure-flags flags) From 5639756aa0897daca65bd160791aeb3721e6ccdc Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 27 Mar 2024 00:45:59 -0400 Subject: [PATCH 07/33] gnu: librsvg-2.40: Skip tests that fail with cairo 1.18.0. * gnu/packages/gnome.scm (librsvg-2.40)[arguments]: Skip two tests which fail after cairo was updated to version 1.18.0. Change-Id: If3867a9fdee6481da819954d77341f411e85e78b --- gnu/packages/gnome.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 42f758f8d8..5277476338 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -3728,12 +3728,15 @@ (define-public librsvg-2.40 "svg1.1/masking-mask-01-b.svg" ;; This test fails on aarch64: "bugs/777834-empty-text-children.svg" - ;; These two tests fail due to slightly different ;; text rendering (different kerning or similar), ;; nothing alarming. "bugs/340047.svg" - "bugs/749415.svg")))))))) + "bugs/749415.svg" + ;; These two tests fail with the update to cairo + ;; version 1.18.0. + "bugs/587721-text-transform.svg" + "svg1.1/masking-path-03-b.svg")))))))) (native-inputs (list pkg-config `(,glib "bin") ; glib-mkenums, etc. From ded6c9a692a9a4f5b21e7db9b75c967736bc2b34 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:43 +0800 Subject: [PATCH 08/33] gnu: spirv-headers: Update to 1.3.280.0. * gnu/packages/vulkan.scm (spirv-headers): Update to 1.3.280.0. Change-Id: I7a00d3c432a9f6901b3b91b7df2ded887b6101d1 Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 285d6be7f5..b4dfd191a9 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2020, 2023 Marius Bakke ;;; Copyright © 2021 Mathieu Othacehe ;;; Copyright © 2022 Kaelyn Takata -;;; Copyright © 2022 dan +;;; Copyright © 2022, 2024 dan ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. @@ -52,16 +52,16 @@ (define %vulkan-sdk-version "sdk-1.3.231.1") (define-public spirv-headers (package (name "spirv-headers") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/SPIRV-Headers") - (commit version))) + (commit (string-append "vulkan-sdk-" version)))) (sha256 (base32 - "0z8b485hryya2g0jxv7amwg3fjj7pchbgnsa5ldf5fwgh5js0icm")) + "17jw5gwj2vmicyd6522b1zp7x551krfj826j0fg5kl0ixv0q08wk")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments From fb5299f54cbb53dc3bf2fb8d9b0f7901ffd7e22a Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:44 +0800 Subject: [PATCH 09/33] gnu: spirv-tools: Update to 1.3.280.0. * gnu/packages/vulkan.scm (spirv-tools): Update to 1.3.280.0. Change-Id: Ie6e438849f8f59a4b7616ab05e81c4a76d64dd9e Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index b4dfd191a9..ade0f65665 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -84,15 +84,15 @@ (define-public spirv-headers (define-public spirv-tools (package (name "spirv-tools") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/SPIRV-Tools") - (commit version))) + (commit (string-append "vulkan-sdk-" version)))) (sha256 - (base32 "03d489ind2az7w7q1slj3mdc04372r3qqbnd7m9akxbg7yix1a5j")) + (base32 "1sj84ngwcgmydlj88nx1a9jfmhmxlij7wc92khp8wf1vsfplayas")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments From 408a770c8fe4e36a375ad8254231c5a9a48cafd6 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:45 +0800 Subject: [PATCH 10/33] gnu: glslang: Update to 1.3.280.0. * gnu/packages/vulkan.scm (glslang): Update to 1.3.280.0. [source]: Remove patch. [arguments]: Run tests. [inputs]: Add spirv-tools. * gnu/packages/patches/glslang-install-static-libs.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Ungerister it. Change-Id: I39ef23565e575179b292a1ab76d2d70c98f84767 Signed-off-by: John Kehayias --- gnu/local.mk | 1 - .../patches/glslang-install-static-libs.patch | 61 ------------------- gnu/packages/vulkan.scm | 17 ++++-- 3 files changed, 11 insertions(+), 68 deletions(-) delete mode 100644 gnu/packages/patches/glslang-install-static-libs.patch diff --git a/gnu/local.mk b/gnu/local.mk index cf6b07995d..f8d20e1d53 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1360,7 +1360,6 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-2.29-git-updates.patch \ %D%/packages/patches/glibc-2.29-supported-locales.patch \ %D%/packages/patches/glibc-supported-locales.patch \ - %D%/packages/patches/glslang-install-static-libs.patch \ %D%/packages/patches/gmobile-make-it-installable.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ diff --git a/gnu/packages/patches/glslang-install-static-libs.patch b/gnu/packages/patches/glslang-install-static-libs.patch deleted file mode 100644 index a155dde30e..0000000000 --- a/gnu/packages/patches/glslang-install-static-libs.patch +++ /dev/null @@ -1,61 +0,0 @@ -Install OGLCompiler et.al. even when building shared libraries. Also fix -CMake file locations. - -Patch taken from Gentoo: - - https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/glslang/files/glslang-1.3.231-Install-static-libs.patch - -diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt ---- a/OGLCompilersDLL/CMakeLists.txt -+++ b/OGLCompilersDLL/CMakeLists.txt -@@ -41,7 +41,7 @@ if(WIN32) - source_group("Source" FILES ${SOURCES}) - endif(WIN32) - --if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) -+if(ENABLE_GLSLANG_INSTALL) - install(TARGETS OGLCompiler EXPORT glslang-targets) - - # Backward compatibility -@@ -49,7 +49,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) - message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - - if (NOT TARGET glslang::OGLCompiler) -- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\") -+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") - endif() - - add_library(OGLCompiler ALIAS glslang::OGLCompiler) -diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt ---- a/glslang/CMakeLists.txt -+++ b/glslang/CMakeLists.txt -@@ -203,7 +203,7 @@ endif() - ################################################################################ - if(ENABLE_GLSLANG_INSTALL) - install(TARGETS glslang EXPORT glslang-targets) -- if(NOT BUILD_SHARED_LIBS) -+ if(BUILD_SHARED_LIBS) - install(TARGETS MachineIndependent EXPORT glslang-targets) - install(TARGETS GenericCodeGen EXPORT glslang-targets) - -diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt ---- a/glslang/OSDependent/Unix/CMakeLists.txt -+++ b/glslang/OSDependent/Unix/CMakeLists.txt -@@ -52,7 +52,7 @@ else() - target_link_libraries(OSDependent Threads::Threads) - endif() - --if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) -+if(ENABLE_GLSLANG_INSTALL) - install(TARGETS OSDependent EXPORT glslang-targets) - - # Backward compatibility -@@ -60,7 +60,7 @@ if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) - message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - - if (NOT TARGET glslang::OSDependent) -- include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/glslang-targets.cmake\") -+ include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") - endif() - - add_library(OSDependent ALIAS glslang::OSDependent) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index ade0f65665..499165f581 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -189,22 +189,27 @@ (define-public spirv-llvm-translator (define-public glslang (package (name "glslang") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/glslang") - (commit version))) - (patches (search-patches "glslang-install-static-libs.patch")) + (commit (string-append "vulkan-sdk-" version)))) (sha256 (base32 - "12a1zl8qxa28nbf6m67260c0lwdw3bqbj0jz1382wgm5px1fpqw6")) + "1vvgqvwhsimlz8wkk38b9cvp9abggq840iws8al0znzz3mnvkfdn")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments - '(#:tests? #f ;FIXME: requires bundled SPIRV-Tools - #:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) + '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" + "-DALLOW_EXTERNAL_SPIRV_TOOLS=ON") + #:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "ctest"))))))) + (inputs (list spirv-tools)) (native-inputs (list pkg-config python)) (home-page "https://github.com/KhronosGroup/glslang") From 474ed54aebbe45e7d4d2550632118dade585931b Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:46 +0800 Subject: [PATCH 11/33] gnu: spirv-cross: Update to 1.3.280.0. * gnu/packages/vulkan.scm (spirv-cross): Update to 1.3.280.0. Change-Id: Ie8e45c6892892c02e3d970a831044ff9f70a9547 Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 499165f581..038a896803 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -116,15 +116,15 @@ (define-public spirv-tools (define-public spirv-cross (package (name "spirv-cross") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/SPIRV-Cross") - (commit version))) + (commit (string-append "vulkan-sdk-" version)))) (sha256 - (base32 "1ypbc1krkr0yywa1m976g3sjyb80l7hxwrnh6gp70w6va1dlnnn9")) + (base32 "1k6fbkradknxis85akzzksz9ipm3v42xvrzaamwj2lrgfm8d6r4d")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments From 3105649b5ac66fdc142964316b1825d079e17750 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:47 +0800 Subject: [PATCH 12/33] gnu: shaderc: Update to 2024.0. * gnu/packages/vulkan.scm (shaderc): Update to 2024.0. [arguments]<#:configure-flags>: Specify python executable. <#:phases>: Remove drop-additional-glslang-deps phase. [inputs]: Move python from here ... [native-inputs]: ... to here. Change-Id: I3ca4b6560288f4b8ea9440a7fd0a7815b67471d8 Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 038a896803..ef6e4b454f 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -359,7 +359,7 @@ (define-public shaderc (package (name "shaderc") ;; shaderc doesn't follow the versioning scheme of vulkan sdk - (version "2022.3") + (version "2024.0") (source (origin (method git-fetch) @@ -369,13 +369,18 @@ (define-public shaderc (file-name (git-file-name name version)) (sha256 (base32 - "0sdbfi66zmqj0c5q5yv2zvcvry7557yzgxk2mwflyjgqh7kdhb8d")))) + "1m5jncn6y8c6g83f8nwh86hz33mvv03x7fyr5zq0ynwanrcpn2hb")))) (build-system cmake-build-system) (arguments `(;; FIXME: Skip most of the tests, because enabling system gtest breaks ;; the build: . #:configure-flags (list "-DSHADERC_SKIP_TESTS=ON" + ;; The two flags are copied from: + ;; https://sdk.lunarg.com/sdk/download/1.3.280.0/linux/config.json + "-DSHADERC_ENABLE_SHARED_CRT=ON" + "-DSHADERC_SKIP_COPYRIGHT_CHECK=ON" + "-DPYTHON_EXECUTABLE=python3" ;; Note: despite the name, this just specifies the headers. (string-append "-Dglslang_SOURCE_DIR=" (assoc-ref %build-inputs "glslang") "/include/glslang")) @@ -401,20 +406,11 @@ (define-public shaderc ,version ,(package-version spirv-tools) ,(package-version glslang)))) - #t)) - ;; see: https://github.com/google/shaderc/pull/1276 - (add-after 'do-not-look-for-bundled-sources 'drop-additional-glslang-deps - (lambda _ - (substitute* "glslc/CMakeLists.txt" - (("OSDependent OGLCompiler") "")) - (substitute* "libshaderc/CMakeLists.txt" - (("OSDependent OGLCompiler") "")) - (substitute* "libshaderc_util/CMakeLists.txt" - (("OSDependent OGLCompiler") ""))))))) + #t))))) (inputs - (list glslang python spirv-headers spirv-tools)) + (list glslang spirv-headers spirv-tools)) (native-inputs - (list pkg-config)) + (list pkg-config python)) (home-page "https://github.com/google/shaderc") (synopsis "Tools for shader compilation") (description "Shaderc is a collection of tools, libraries, and tests for From b8ab1f06367e6035168e9699d42ce08e73404682 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:48 +0800 Subject: [PATCH 13/33] gnu: vulkan-headers: Update to 1.3.280.0. * gnu/packages/vulkan.scm (vulkan-headers): Update to 1.3.280.0. Change-Id: Ie4c135fd53a9cacb36e766daba9524ce33fa5630 Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index ef6e4b454f..3324e8bf45 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -227,17 +227,17 @@ (define-public glslang (define-public vulkan-headers (package (name "vulkan-headers") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/Vulkan-Headers") - (commit version))) + (commit (string-append "vulkan-sdk-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "167zdank6pn66mzjdwgrdlmhmsy4v2k0nhw0nwg649k863rgi00j")))) + "13mmv5621z73hlfnsrccbcb4z0d7kwj92a081701vbpss45a4whj")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) ; No tests. From aea7691fdd48ac529a5544312291e4422ec43274 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:49 +0800 Subject: [PATCH 14/33] gnu: vulkan-loader: Update to 1.3.280.0. According to , the Vulkan loader searches for manifest files in several directories, like in $HOME or ones set during compile-time. So, expose XDG_DATA_DIRS, which Vulkan will search, as a search-path to find ones from other packages, like mesa. * gnu/packages/vulkan.scm (vulkan-loader): Update to 1.3.280.0. [arguments]<#:phases>: Update the use-system-googletest phase. [native-search-paths]: New search path, XDG_DATA_DIRS. Change-Id: Ib270eeeea6500691a75c36612104c7ddb1c28dfb Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 3324e8bf45..c60c179644 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -251,19 +251,17 @@ (define-public vulkan-headers (define-public vulkan-loader (package (name "vulkan-loader") - ;; XXX: Take a slightly newer commit to fix a test failure on i686: - ;; https://github.com/KhronosGroup/Vulkan-Loader/pull/1036 - (version "sdk-1.3.232") + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/Vulkan-Loader") - (commit "v1.3.232"))) + (commit (string-append "vulkan-sdk-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0w69sh669sx9pwlvv2rv92ds2hm2rbzsa6qqcmd8kcad0qfq7dz2")))) + "0glix3clqkdbi9kqcp8abmglqpgjd2r2bjqvi11r8sair0z54hnf")))) (build-system cmake-build-system) (arguments (list @@ -291,11 +289,10 @@ (define-public vulkan-loader (string-append "includedir=" vulkan-headers "\n")))))) (add-after 'unpack 'use-system-googletest (lambda _ - ;; Inform the build system that googletest is already built. - (substitute* "CMakeLists.txt" - ((".*if\\(TARGET gtest\\)") - (string-append " find_package(GTest REQUIRED)\n" - " if(true)"))) + (substitute* "tests/CMakeLists.txt" + (((string-append "message\\(FATAL_ERROR \"Could not " + "find googletest directory. See BUILD.md\"\\)")) + "find_package(GTest REQUIRED)")) ;; Use the namespaced variable. (substitute* "tests/framework/CMakeLists.txt" (("PUBLIC gtest ") @@ -308,6 +305,10 @@ (define-public vulkan-loader wayland)) (inputs (list vulkan-headers libxrandr)) + (native-search-paths + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))))) (home-page "https://github.com/KhronosGroup/Vulkan-Loader") (synopsis "Khronos official ICD loader and validation layers for Vulkan") From 083c9c010903ad42736e1fd000546042fbfafb1c Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:50 +0800 Subject: [PATCH 15/33] gnu: volk: Update to 1.3.280.0. * gnu/packages/vulkan.scm (volk): Update to 1.3.280.0. Change-Id: I4f72df2ba6784f3dae93cf60361e1bceaf61d3bb Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index c60c179644..1bd7339277 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -536,16 +536,16 @@ (define-public vulkan-validationlayers (define-public volk (package (name "volk") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/zeux/volk") - (commit version))) + (commit (string-append "vulkan-sdk-" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "0xaw3kg754mknx8lfj1p74a9npjfvdvlpicvn0hla4495zpc10rq")))) + "0x4jhc8n9c4k8svmmcaxxs613xbsav7wam94gacddlm738cwp13v")))) (build-system cmake-build-system) (arguments '(#:tests? #f ;no test From 74f849235ab453522381136ebd3b9f5f2b84f32f Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:51 +0800 Subject: [PATCH 16/33] gnu: vulkan-tools: Update to 1.3.280.0. * gnu/packages/vulkan.scm (vulkan-tools): Update to 1.3.280.0. [source]: Add snippet to disable a test. [arguments]: Remove GLSLANG_INSTALL_DIR from configure-flags. Enable tests. Replace the check phase [native-inputs]: Add googletest. Change-Id: Iadf98fc95d0d70c3780159992ebc2fdff6a2d108 Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 1bd7339277..baa2427551 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -327,26 +327,34 @@ (define-public vulkan-loader (define-public vulkan-tools (package (name "vulkan-tools") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/Vulkan-Tools") - (commit version))) + (commit (string-append "vulkan-sdk-" version)))) (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet #~(substitute* "tests/icd/mock_icd_tests.cpp" + ;; Disable driver info test since it relies on git branch info + (("ASSERT_EQ\\(std::string\\(driver_properties\\.driverInfo\\)") + "// ASSERT_EQ(std::string(driver_properties.driverInfo)"))) (sha256 (base32 - "0jzwjfx4c7y15wkwfhhc64rzljpi47bxrm5jw5blfsqjh8zsd27a")))) + "0w0m04vscr4a6vr682g3mn7mfni740cmai9ylzlgfdggb77y58xz")))) (build-system cmake-build-system) (inputs (list glslang libxrandr vulkan-loader wayland wayland-protocols)) (native-inputs - (list pkg-config python vulkan-headers)) + (list googletest pkg-config python volk vulkan-headers)) (arguments - `(#:tests? #f ;no tests - #:configure-flags (list (string-append "-DGLSLANG_INSTALL_DIR=" - (assoc-ref %build-inputs "glslang"))))) + `(#:configure-flags (list "-DBUILD_TESTS=ON") + #:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "./tests/vulkan_tools_tests"))))))) (home-page "https://github.com/KhronosGroup/Vulkan-Tools") (synopsis "Tools and utilities for Vulkan") From 1f69c19b4c4d4b770dfb69d3bf3a37e02fae8c97 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:52 +0800 Subject: [PATCH 17/33] gnu: magic-enum: Update to 0.9.5. * gnu/packages/cpp.scm (magic-enum): Update to 0.9.5. Change-Id: I8306d7ef69276e33f7daada895165a88bfc938ad Signed-off-by: John Kehayias --- gnu/packages/cpp.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index acbe3e4836..cfff141dcc 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -39,6 +39,7 @@ ;;; Copyright © 2023 Denis 'GNUtoo' Carikli ;;; Copyright © 2023 Foundation Devices, Inc. ;;; Copyright © 2023 Paul A. Patience +;;; Copyright © 2024 dan ;;; ;;; This file is part of GNU Guix. ;;; @@ -1795,7 +1796,7 @@ (define-public atomic-queue (define-public magic-enum (package (name "magic-enum") - (version "0.7.3") + (version "0.9.5") (home-page "https://github.com/Neargye/magic_enum") (source (origin (method git-fetch) @@ -1805,7 +1806,7 @@ (define-public magic-enum (file-name (git-file-name name version)) (sha256 (base32 - "1x47radgsifgz3vn2561mlvf4cq46ii33cpyqf01znm56iirwq89")))) + "14ys5sn2v1mai8bclvi81cp65g6jblqpdsi94639hphca5v8gka3")))) (build-system cmake-build-system) (synopsis "C++17 header only library for compile time reflection of enums") (description "Magic Enum offers static reflection of enums, with From 3704c64c0e1787dce6e73e4e3c3283dff57e22b5 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:53 +0800 Subject: [PATCH 18/33] gnu: Add vulkan-utility-libraries. * gnu/packages/vulkan.scm (vulkan-utility-libraries): New variable. Change-Id: I5a7c3fa51150e2181197316f6b97a54f12a24236 Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index baa2427551..26df2bf63b 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -37,6 +37,7 @@ (define-module (gnu packages vulkan) #:use-module (gnu packages bison) #:use-module (gnu packages check) #:use-module (gnu packages cmake) + #:use-module (gnu packages cpp) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) @@ -598,3 +599,27 @@ (define-public vulkan-memory-allocator (home-page "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator") (license license:expat))) + +(define-public vulkan-utility-libraries + (package + (name "vulkan-utility-libraries") + (version "1.3.280.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/KhronosGroup/Vulkan-Utility-Libraries") + (commit (string-append "vulkan-sdk-" version)))) + (sha256 + (base32 "17fmalilczs4x435f8kdx8bf0x5mnjhkmcp34xap8lanpbyzs84q")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags #~(list "-DBUILD_TESTS=ON"))) + (inputs (list vulkan-headers)) + (native-inputs (list googletest magic-enum)) + (home-page "https://github.com/KhronosGroup/Vulkan-Utility-Libraries") + (synopsis "Utility libraries for Vulkan developers") + (description "Utility libraries for Vulkan developers.") + (license license:asl2.0))) From 3440e855e60a86213aed7a119b03292b62c89dc8 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 28 Mar 2024 11:54:54 +0800 Subject: [PATCH 19/33] gnu: vulkan-validationlayers: Update to 1.3.280.0. The check phase was replaced which allows tests to actually run, but they crash on some hardware (reported in various issues upstream). * gnu/packages/vulkan.scm (vulkan-validationlayers): Update to 1.3.280.0. [source]: Add snippet to disable static library building. [inputs]: Add robin-hood-hashing and vulkan-utility-libraries. [arguments]: Remove previous configure-flags and add BUILD_TESTS, replace check phase, and update reason why tests are disabled. (%vulkan-sdk-version): Remove unused variable. Change-Id: I80ca002d8dbe71cad57f859ee34ac8f10e175907 Signed-off-by: John Kehayias --- gnu/packages/vulkan.scm | 57 +++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 26df2bf63b..d9b364dfd1 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -47,9 +47,6 @@ (define-module (gnu packages vulkan) #:use-module (gnu packages wine) #:use-module (gnu packages xorg)) -;; Note: Remember to change vulkan-loader version when bumping this. -(define %vulkan-sdk-version "sdk-1.3.231.1") - (define-public spirv-headers (package (name "spirv-headers") @@ -479,51 +476,37 @@ (define-public vkd3d (define-public vulkan-validationlayers (package (name "vulkan-validationlayers") - (version %vulkan-sdk-version) + (version "1.3.280.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/KhronosGroup/Vulkan-ValidationLayers") - (commit version))) + (commit (string-append "vulkan-sdk-" version)))) (file-name (git-file-name name version)) + (modules '((guix build utils))) + ;; We don't build static libraries in SPIRV-Tools. + (snippet '(substitute* "tests/CMakeLists.txt" + (("-static") + ""))) (sha256 (base32 - "07djrk6yym4vl2b52wr09r8y649v5lark5hnr5rwvlxwxdmd9g75")))) + "1w6fsaicrgnzkj5vz2v86a2gk1n7478q6n66ac2920avnin9a64c")))) (build-system cmake-build-system) (inputs (list glslang libxrandr mesa + robin-hood-hashing shaderc spirv-tools vulkan-loader + vulkan-utility-libraries wayland)) - (native-inputs (list pkg-config python spirv-headers vulkan-headers)) + (native-inputs (list googletest pkg-config python spirv-headers vulkan-headers)) (arguments - (list #:tests? #f ;no tests + (list #:tests? #f ; tests crash on some hardware (various upstream issues) #:configure-flags - #~(list "-DUSE_ROBIN_HOOD_HASHING=OFF" - (string-append "-DGLSLANG_INSTALL_DIR=" - (dirname (dirname - (search-input-directory - %build-inputs - "include/glslang")))) - (string-append "-DSPIRV_HEADERS_INSTALL_DIR=" - (dirname (dirname - (search-input-directory - %build-inputs - "include/spirv")))) - (string-append "-DSPIRV_TOOLS_INSTALL_DIR=" - (dirname (dirname - (search-input-directory - %build-inputs - "include/spirv-tools")))) - (string-append "-DVULKAN_HEADERS_INSTALL_DIR=" - (dirname (dirname - (search-input-directory - %build-inputs - "include/vulkan")))) - "-Wno-dev") + #~(list "-DBUILD_TESTS=ON") #:phases #~(modify-phases %standard-phases (add-after 'install 'set-layer-path-in-manifest (lambda _ @@ -533,7 +516,19 @@ (define-public vulkan-validationlayers (substitute* manifest (("\"libVkLayer_khronos_validation.so\"") (string-append "\"" #$output - "/lib/libVkLayer_khronos_validation.so\""))))))))) + "/lib/libVkLayer_khronos_validation.so\"")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "VK_LAYER_PATH" + (string-append (getcwd) "/layers")) + (setenv "LD_LIBRARY_PATH" + (string-append #$(this-package-input + "vulkan-loader") "/lib")) + (setenv "MESA_SHADER_CACHE_DIR" + (string-append (getcwd) "/shader-cache")) + (setenv "XDG_RUNTIME_DIR" (getcwd)) + (invoke "./tests/vk_layer_validation_tests"))))))) (home-page "https://github.com/KhronosGroup/Vulkan-ValidationLayers") (synopsis "Khronos official validation layers for Vulkan") (description From 23928e2d426fb63945682c2c8c60145fe4d333dd Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Mon, 1 Apr 2024 01:29:46 -0400 Subject: [PATCH 20/33] gnu: mesa: Update to 24.0.4. * gnu/packages/gl.scm (mesa): Update to 24.0.4. Change-Id: Id0c14c0ad6a45d6cdb4533053e7a116285a87e5f --- gnu/packages/gl.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index c32bfad82e..e03c73bc79 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -297,7 +297,7 @@ (define libva-without-mesa (define-public mesa (package (name "mesa") - (version "24.0.3") + (version "24.0.4") (source (origin (method url-fetch) @@ -307,7 +307,7 @@ (define-public mesa "mesa-" version ".tar.xz"))) (sha256 (base32 - "1gpx3glifdvyw2fxigiannrxkdfhag6b6h0nxab3azbvlfickbkp")))) + "1w25lwdrb0ffrx2fjk9izbvpcgf9ypfc7v32zybwvjwql0qbvzlh")))) (build-system meson-build-system) (propagated-inputs ;; The following are in the Requires.private field of gl.pc. From cc258692e00da5d70c034e5e51a677caded56060 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 3 Apr 2024 17:18:16 -0400 Subject: [PATCH 21/33] gnu: python-cairocffi: Update to 1.6.1. The previous version failed to build after the cairo update. * gnu/packages/python-xyz.scm (python-cairocffi): Update to 1.6.1. [build-system]: Switch to pyproject-build-system. [native-inputs]: Add python-flit-core and python-pikepdf. [arguments]: Remove now unneeded disable-linters phase. Change-Id: I3f3119834b7021c52fdfc810d9a3c16ee5c419f3 --- gnu/packages/python-xyz.scm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index cd10f304c8..268363f3d9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10718,7 +10718,7 @@ (define-public python-xcffib (define-public python-cairocffi (package (name "python-cairocffi") - (version "1.3.0") + (version "1.6.1") (source (origin ;; The PyPI archive does not include the documentation, so use Git. @@ -10729,13 +10729,15 @@ (define-public python-cairocffi (file-name (git-file-name name version)) (sha256 (base32 - "0lylyxyyd8csjhn5kxwzrcr6ick6pvvm1wclpmb5ni28jznxn7lb")))) - (build-system python-build-system) + "161z2bsp0ai4311mz9n0h6vmz80690jbijxx2gqkknygwm2ynjgd")))) + (build-system pyproject-build-system) (outputs '("out" "doc")) (inputs (list glib gtk+ gdk-pixbuf cairo)) (native-inputs - (list python-numpy + (list python-flit-core + python-numpy + python-pikepdf python-pytest python-pytest-cov python-pytest-runner @@ -10765,15 +10767,6 @@ (define-public python-cairocffi (search-input-file inputs "/lib/libglib-2.0.so.0")) (("libgdk-3.so.0") (search-input-file inputs "/lib/libgdk-3.so.0"))))) - (add-after 'unpack 'disable-linters - ;; Their check fails; none of our business. - (lambda _ - (substitute* "setup.cfg" - ((".*pytest-flake8.*") "") - ((".*pytest-isort.*") "") - (("--flake8") "") - (("--isort") "")) - #t)) (add-after 'install 'install-doc (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((data (string-append (assoc-ref outputs "doc") "/share")) From 31b981bdcd910527c32e0ad89276be84cb483551 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 3 Apr 2024 17:19:51 -0400 Subject: [PATCH 22/33] gnu: obs-vkcapture: Update to 1.5.0. The previous version failed to build after (presumably) the vulkan updates. * gnu/packages/video.scm (obs-vkcapture): Update to 1.5.0. Change-Id: I832c76aef5dff04b1c0ee0fe57304dd638e38194 --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 94334e0c97..ddd4b354f4 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -4186,7 +4186,7 @@ (define-public obs-wlrobs (define-public obs-vkcapture (package (name "obs-vkcapture") - (version "1.3.0") + (version "1.5.0") (source (origin (method git-fetch) (uri (git-reference @@ -4195,7 +4195,7 @@ (define-public obs-vkcapture (file-name (git-file-name name version)) (sha256 (base32 - "18v15bfzm31qkpwipvbqgzak4z6f2hhq6mnz2bvhwnv57whirln6")))) + "00a69rg1inkssccqmwp1j85vrw17j2k6d5pidvzfdq94vvad10w5")))) (build-system cmake-build-system) (arguments '(#:tests? #f)) ;no tests From 4cb7978a19637a7cb73e33a5a2d0dcb5e0c936d9 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 3 Apr 2024 17:26:40 -0400 Subject: [PATCH 23/33] gnu: godot: Update to 4.2.1. The previous version failed to build after an update to glslang. Godot looks for an include, Types.h, which is no longer included in the built glslang. Use the included glslang (which will match the included vulkan, too) for now. * gnu/packages/game-development.scm (godot): Update to 4.2.1. [source]: In snippet add (preserve) amd-fsr2, clipper2, glslang (for now), and libktx. [arguments]: Comment out "builtin_glslang=no" in #:scons-flags (for now). Change-Id: I8f6c20e3796ea96f2e6a6a167063f10a667bd4c3 --- gnu/packages/game-development.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index ae313a8edf..c65ab74832 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -2095,7 +2095,7 @@ (define-public godot-lts (define-public godot (package (name "godot") - (version "4.1.3") + (version "4.2.1") (source (origin (method git-fetch) (uri (git-reference @@ -2104,7 +2104,7 @@ (define-public godot (file-name (git-file-name name version)) (sha256 (base32 - "1mwwzf77ixkalciqakn6q42g9sl2570didfll406sfs42wz534ng")) + "0d5y678986lx4a4xjkxs5glh2dckp8wwl3r3mw72inq7gvaa18s3")) (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) @@ -2117,19 +2117,28 @@ (define-public godot (let* ((preserved-files '("README.md" "amd-fsr" + "amd-fsr2" "assimp" "astcenc" "basis_universal" ;; Godot needs ca-certificates.crt, but that is ;; not available in build environment "certs" + "clipper2" "cvtt" "linuxbsd_headers" "etc2comp" "etcpak" "fonts" "glad" + ;; TODO: Remove once Godot once again builds + ;; with our glslang package, or with a + ;; workaround. Currently it looks for a Types.h + ;; which is no longer in the glslang output + ;; after the most recent update. + "glslang" "jpeg-compressor" + "libktx" "libsimplewebm" "meshoptimizer" "minimp3" @@ -2170,7 +2179,9 @@ (define-public godot "builtin_embree=no" "builtin_enet=no" "builtin_freetype=no" - "builtin_glslang=no" + ;; TODO: Uncomment this option when the todo for + ;; glslang in the snippet is resolved. + ;; "builtin_glslang=no" "builtin_graphite=no" "builtin_harfbuzz=no" "builtin_icu4c=no" From 8ecd6af8f6d9a41651213a121e11d49a1ec40e7a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 4 Apr 2024 16:26:50 +0300 Subject: [PATCH 24/33] gnu: glslang: Fix building on riscv64-linux. * gnu/packages/vulkan.scm (glslang)[arguments]: When building for riscv64-linux add a configure-flag to link against -latomic. Change-Id: Ibf8dd0cac71e19f09ad730d88ddd5c8f7b44c14e --- gnu/packages/vulkan.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index d9b364dfd1..997e653010 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018, 2019 Rutger Helling ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice -;;; Copyright © 2018, 2023 Efraim Flashner +;;; Copyright © 2018, 2023, 2024 Efraim Flashner ;;; Copyright © 2020, 2023 Marius Bakke ;;; Copyright © 2021 Mathieu Othacehe ;;; Copyright © 2022 Kaelyn Takata @@ -200,8 +200,11 @@ (define-public glslang (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments - '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" - "-DALLOW_EXTERNAL_SPIRV_TOOLS=ON") + `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON" + "-DALLOW_EXTERNAL_SPIRV_TOOLS=ON" + ,@(if (target-riscv64?) + `("-DCMAKE_EXE_LINKER_FLAGS=-latomic") + '())) #:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) From 31411b4f3250df2d2e04480f289b199ab063cadf Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 4 Apr 2024 16:28:57 +0300 Subject: [PATCH 25/33] gnu: mesa: Don't skip extra tests on aarch64-linux. * gnu/packages/gl.scm (mesa)[arguments]: In the 'disable-failing-test phase remove the test skipped only on aarch64-linux. Change-Id: I2f6d978775887270b6374faaa48318565e393767 --- gnu/packages/gl.scm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index e03c73bc79..189a0345a6 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver ;;; Copyright © 2016 Nikita ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus -;;; Copyright © 2017-2019, 2021, 2023 Efraim Flashner +;;; Copyright © 2017-2019, 2021, 2023, 2024 Efraim Flashner ;;; Copyright © 2017 Arun Isaac ;;; Copyright © 2017, 2018, 2019 Rutger Helling ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice @@ -468,11 +468,6 @@ (define-public mesa ;; https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091). `((substitute* "src/util/meson.build" ((".*'tests/u_debug_stack_test.cpp',.*") "")))) - ("aarch64-linux" - ;; The ir3_disasm test segfaults. - ;; The simplest way to skip it is to run a different test instead. - `((substitute* "src/freedreno/ir3/meson.build" - (("disasm\\.c'") "delay.c',\n link_args: ld_args_build_id")))) ("armhf-linux" ;; Disable some of the llvmpipe tests. `((substitute* "src/gallium/drivers/llvmpipe/meson.build" From 764e5afbea5784813a001ec1ee5dbc1eed558848 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 4 Apr 2024 16:30:20 +0300 Subject: [PATCH 26/33] gnu: mesa: Enable more gallium drivers. * gnu/packages/gl.scm (mesa)[arguments]: Adjust the configure-flag to also build the svga gallium driver on aarch64 and the freedreno and svga drivers on armhf. Change-Id: I129a66184e2728e61a99bae442db908c5c0f84b0 --- gnu/packages/gl.scm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 189a0345a6..a2018222d5 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -353,14 +353,10 @@ (define-public mesa #:configure-flags #~(list #$@(cond - ((target-aarch64?) - ;; TODO: Fix svga driver for non-Intel architectures. + ;; TODO: Enable svga driver for non-Intel architectures. + ((or (target-aarch64?) (target-arm32?)) '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\ -panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl,zink")) - ((target-arm32?) - ;; Freedreno FTBFS when built on a 64-bit machine. - '("-Dgallium-drivers=etnaviv,kmsro,lima,nouveau,panfrost,\ -r300,r600,swrast,tegra,v3d,vc4,virgl,zink")) +panfrost,r300,r600,svga,swrast,tegra,v3d,vc4,virgl,zink")) ((or (target-ppc64le?) (target-ppc32?) (target-riscv64?)) '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl,zink")) (else From 1b86dfa34dfa8e7cf145c71069bfb426e4706e4b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 7 Apr 2024 09:22:23 +0300 Subject: [PATCH 27/33] gnu: mesa: Adjust skipped tests on powerpc-linux. * gnu/packages/gl.scm (mesa)[arguments]: In the 'disable-failing-test phase enable another test when building for powerpc-linux. Change-Id: Ib043b2ea77dc145b3b067496ed45662ad635dc72 --- gnu/packages/gl.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index a2018222d5..87149ebb5f 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -451,14 +451,12 @@ (define-public mesa ;; There are some tests which fail specifically on powerpc. `((substitute* '(;; LLVM ERROR: Relocation type not implemented yet! "src/gallium/drivers/llvmpipe/meson.build" - ;; This is probably a big-endian test failure. "src/gallium/targets/osmesa/meson.build") (("if with_tests") "if not with_tests")) - ;; This test times out and receives SIGTERM. + ;; This is probably a big-endian test failure. (substitute* "src/amd/common/meson.build" - (("and not with_platform_windows") "and with_platform_windows")) - (substitute* "src/compiler/nir/meson.build" - ((".*loop_unroll_tests.*") "")))) + (("and not with_platform_windows") + "and with_platform_windows")))) ("i686-linux" ;; This test is known to fail on i686 (see: ;; https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091). From 1fed3f98774d461f0d28d3fff73c6c924db81ef7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 7 Apr 2024 09:48:33 +0300 Subject: [PATCH 28/33] gnu: mesa: Enable all the video codecs. * gnu/packages/gl.scm (mesa)[arguments]: Adjust the configure-flags to enable all the video codecs. Change-Id: Id540e4d8af8b756f1d0e4978b18e22dd19dd8985 --- gnu/packages/gl.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 87149ebb5f..e3008eeab5 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -392,9 +392,9 @@ (define-public mesa ;; Enable the Vulkan overlay layer on all architectures. "-Dvulkan-layers=device-select,overlay" - ;; Enable the codecs that were built by default as part of the + ;; Enable all the codecs that were built by default as part of the ;; 21.3.x releases to avoid functionality regressions. - "-Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc" + "-Dvideo-codecs=all" ;; Enable ZSTD compression for shader cache. "-Dzstd=enabled" From 1e58b81da9958b454cd10c8aff73829f26d22392 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 7 Apr 2024 09:49:30 +0300 Subject: [PATCH 29/33] gnu: glslang: Give more information on test failures. * gnu/packages/vulkan.scm (glslang)[arguments]: Adjust the 'check phase to run the tests in parallel, rerun tests which fail and to provide information when a test fails. Change-Id: I13962bb503a20338901cdd878d356e1bcce7f2eb --- gnu/packages/vulkan.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 997e653010..4a1d5914ce 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -207,9 +207,14 @@ (define-public glslang '())) #:phases (modify-phases %standard-phases (replace 'check - (lambda* (#:key tests? #:allow-other-keys) + (lambda* (#:key tests? parallel-tests? #:allow-other-keys) (when tests? - (invoke "ctest"))))))) + (invoke "ctest" + "-j" (if parallel-tests? + (number->string (parallel-job-count)) + "1") + "--rerun-failed" + "--output-on-failure"))))))) (inputs (list spirv-tools)) (native-inputs (list pkg-config python)) From 14b256f10e11210adf8cc476c40e9ef2def37bd5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 7 Apr 2024 12:13:42 +0300 Subject: [PATCH 30/33] gnu: glslang: Skip a test on powerpc-linux. * gnu/packages/vulkan.scm (glslang)[arguments]: When building for powerpc-linux add a phase to skip a test. Change-Id: I00fd2273fcd2514c3086eee433f74f0bb4c3ebe6 --- gnu/packages/vulkan.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 4a1d5914ce..23d0c72ee3 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -206,6 +206,14 @@ (define-public glslang `("-DCMAKE_EXE_LINKER_FLAGS=-latomic") '())) #:phases (modify-phases %standard-phases + ,@(if (target-ppc32?) + `((add-after 'unpack 'skip-failing-test + (lambda _ + ;; TODO: Figure out why this test fails. + (substitute* "Test/runtests" + ((".*remap\\.invalid" all) + (string-append "# " all)))))) + '()) (replace 'check (lambda* (#:key tests? parallel-tests? #:allow-other-keys) (when tests? From b1b22cab723b199f5c65f5b3a86cd15053cc206f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 7 Apr 2024 14:24:37 +0300 Subject: [PATCH 31/33] gnu: mesa: Enable svga driver on all architectures. * gnu/packages/gl.scm (mesa)[arguments]: Adjust configure-flags so that the svga gallium-driver is enabled on all architectures. Change-Id: I0a604f1f8e4dac511c273149b95bf9b270e8e1fe --- gnu/packages/gl.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index e3008eeab5..544507fa3f 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -353,12 +353,11 @@ (define-public mesa #:configure-flags #~(list #$@(cond - ;; TODO: Enable svga driver for non-Intel architectures. ((or (target-aarch64?) (target-arm32?)) '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\ panfrost,r300,r600,svga,swrast,tegra,v3d,vc4,virgl,zink")) ((or (target-ppc64le?) (target-ppc32?) (target-riscv64?)) - '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl,zink")) + '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,svga,swrast,virgl,zink")) (else '("-Dgallium-drivers=crocus,iris,nouveau,r300,r600,radeonsi,\ svga,swrast,virgl,zink"))) From 410e699e0933653e69d03a4cdadf11854c6723f4 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 3 Apr 2024 22:45:50 -0400 Subject: [PATCH 32/33] gnu: openexr: Update to 3.2.4 [security fixes]. Previous versions, 3.2.2 and 3.1.4, fixed CVE-2023-5841 and CVE-2021-45942, respectively. * gnu/packages/graphics.scm (openexr): Update to 3.2.4. [arguments]: Remove unneeded files from patch-test-directory phase. [inputs]: Add libdeflate. Reported-by: Vinicius Monego Change-Id: I72f82e623c9b8988cae433947117cd81f40cdbc3 --- gnu/packages/graphics.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index ad08141c96..188e066766 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -1200,7 +1200,7 @@ (define-public ogre (define-public openexr (package (name "openexr") - (version "3.1.3") + (version "3.2.4") (source (origin (method git-fetch) (uri (git-reference @@ -1210,7 +1210,7 @@ (define-public openexr (file-name (git-file-name name version)) (sha256 (base32 - "0c9vla0kbsbbhkk42jlbf94nzfb1anqh7dy9b0b3nna1qr6v4bh6")))) + "00s1a05kggk71vfbnsvykyjc2j7y6yyzgl63sy4yiddshz2k2mcr")))) (build-system cmake-build-system) (arguments (list #:phases @@ -1218,8 +1218,6 @@ (define-public openexr (add-after 'unpack 'patch-test-directory (lambda _ (substitute* (list - "src/test/OpenEXRUtilTest/tmpDir.h" - "src/test/OpenEXRFuzzTest/tmpDir.h" "src/test/OpenEXRTest/tmpDir.h" "src/test/OpenEXRCoreTest/main.cpp") (("/var/tmp") @@ -1247,7 +1245,7 @@ (define-public openexr "") (("TEST \\(testOptimizedInterleavePatterns, \"basic\"\\);") ""))))))))) - (inputs (list imath zlib)) + (inputs (list imath libdeflate zlib)) (home-page "https://www.openexr.com/") (synopsis "High-dynamic-range file format library") (description From 2718616f77aace28b3962fef29b4e38b87a512ce Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 10 Apr 2024 10:52:14 -0400 Subject: [PATCH 33/33] gnu: openexr: Fix build. Two issues are fixed with this commit. First, openexr would fail to build on i686-linux due to a test which checks for SSE2. Secondly, dependents could fail to find openexr as it now has libdeflate in the Requires.private of OpenEXR.pc. * gnu/packages/graphics.scm (openexr)[arguments]: Enable SSE2 for x86_64-linux and i686-linux in configure-flags. [inputs]: Remove zlib (no longer used). Move libdeflate from here ... [propagated-inputs]: ... to here. Change-Id: Ib2e6669036033e262447ba4b1b98c20c7db13bf1 --- gnu/packages/graphics.scm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index ec1d7c9569..a5e36d6513 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2021 Ekaitz Zarraga ;;; Copyright © 2021, 2022 Vinicius Monego ;;; Copyright © 2022 Michael Rohleder -;;; Copyright © 2022, 2023 John Kehayias +;;; Copyright © 2022, 2023, 2024 John Kehayias ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2022 Tobias Kortkamp ;;; Copyright © 2022 Paul A. Patience @@ -142,7 +142,8 @@ (define-module (gnu packages graphics) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix deprecation) - #:use-module (guix utils)) + #:use-module (guix utils) + #:use-module (ice-9 match)) (define-public mmm (package @@ -1204,7 +1205,16 @@ (define-public openexr "00s1a05kggk71vfbnsvykyjc2j7y6yyzgl63sy4yiddshz2k2mcr")))) (build-system cmake-build-system) (arguments - (list #:phases + (list #:configure-flags + #~(list #$@(match (%current-system) + ;; A test explicitly checks for SSE2 (would fail on + ;; i686-linux), so make sure it is enabled for both C + ;; and CPP. + ((or "x86_64-linux" "i686-linux") + '("-DCMAKE_CXX_FLAGS=-mfpmath=sse -msse2" + "-DCMAKE_C_FLAGS=-mfpmath=sse -msse2")) + (_ '()))) + #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-test-directory (lambda _ @@ -1236,7 +1246,10 @@ (define-public openexr "") (("TEST \\(testOptimizedInterleavePatterns, \"basic\"\\);") ""))))))))) - (inputs (list imath libdeflate zlib)) + (inputs (list imath)) + (propagated-inputs + ;; Marked as Requires.private in OpenEXR.pc. + (list libdeflate)) (home-page "https://www.openexr.com/") (synopsis "High-dynamic-range file format library") (description