diff options
| author | John Kehayias <john@guixotic.coop> | 2026-02-03 17:46:58 -0500 |
|---|---|---|
| committer | John Kehayias <john@guixotic.coop> | 2026-02-04 12:31:20 -0500 |
| commit | d752617287f3dbf94c049b68e61d8cac7a3bd7ad (patch) | |
| tree | 7fd339230f4dc6abe92dd3fa861851ade163bab1 /gnu/packages | |
| parent | 726510888ad4f4c621a2aa380aec59d6e61d7300 (diff) | |
gnu: godot: Update to 4.6.
* gnu/packages/game-development.scm (godot): Update to 4.6.
[source]: Remove libjpeg-turbo patch and add glslang patch. Update snippet to
preserve dr_libs and re-spirv and remove glslang.
[arguments]<#:scons-flags>: Disable builtin glslang.
<#:phases>: Add unpack-mesa and use-system-spirv phases. Add file from mesa
to unbundle-wayland phase.
[inputs]: Add spirv-headers and change zstd to zstd-1.5.7.
* gnu/packages/patches/godot-glslang.patch: New file.
* gnu/local.mk (dist_patch_DATA): Update to current patch for godot.
Change-Id: I9b0daf4d25d317f2de3333a9adeaafbf548e0e2f
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/game-development.scm | 42 | ||||
| -rw-r--r-- | gnu/packages/patches/godot-glslang.patch | 23 |
2 files changed, 48 insertions, 17 deletions
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 5cecbf69636..26dd7489b82 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -29,7 +29,7 @@ ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com> ;;; Copyright © 2022 dan <i@dan.games> ;;; Copyright © 2022 Cairn <cairn@pm.me> -;;; Copyright © 2023, 2024 John Kehayias <john.kehayias@protonmail.com> +;;; Copyright © 2023-2026 John Kehayias <john.kehayias@protonmail.com> ;;; Copyright © 2022-2023, 2025 Adam Faiz <adam.faiz@disroot.org> ;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2024-2025 Maxim Cournoyer <maxim@guixotic.coop> @@ -2547,7 +2547,7 @@ scripted in a Python-like language.") (define-public godot (package (name "godot") - (version "4.5") + (version "4.6") (source (origin (method git-fetch) (uri (git-reference @@ -2556,10 +2556,10 @@ scripted in a Python-like language.") (file-name (git-file-name name version)) (sha256 (base32 - "0s9ymgy9cwnk4v35qpn9fm993pn64h1i5k9khpd7mqs6023hl8i4")) - ;; TODO: Remove this patch on next update as it was merged post - ;; 4.5 release. - (patches (search-patches "godot-libjpeg-turbo-unbundle.patch")) + "1lwjydaa4cvnfrllxlryppcfmba3qq1518zi4qr5580n731xfg10")) + ;; TODO: Remove on next release; see + ;; <https://github.com/godotengine/godot/pull/93478>. + (patches (search-patches "godot-glslang.patch")) (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) @@ -2582,17 +2582,12 @@ scripted in a Python-like language.") "certs" "clipper2" "cvtt" + "dr_libs" "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" ;; This is part of the simdjson package though ;; modified by Godot. "grisu2" @@ -2612,6 +2607,7 @@ scripted in a Python-like language.") "oidn" "openxr" "pvrtccompressor" + "re-spirv" "recastnavigation" "rvo2" "smaa" @@ -2639,9 +2635,7 @@ scripted in a Python-like language.") "builtin_embree=no" "builtin_enet=no" "builtin_freetype=no" - ;; TODO: Uncomment this option when the todo for - ;; glslang in the snippet is resolved. - ;; "builtin_glslang=no" + "builtin_glslang=no" "builtin_graphite=no" "builtin_harfbuzz=no" "builtin_icu4c=no" @@ -2734,7 +2728,12 @@ scripted in a Python-like language.") (("./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-keysyms.h") (string-append (search-input-file inputs "include/xkbcommon/xkbcommon-keysyms.h")))))) - (add-after 'unbundle-xkbcommon 'unbundle-wayland + (add-after 'unbundle-xkbcommon 'unpack-mesa + (lambda _ + (mkdir "mesa-src") + (invoke "tar" "--strip-components=1" "-C" + "mesa-src" "-xf" #$(package-source mesa)))) + (add-after 'unpack-mesa 'unbundle-wayland (lambda* (#:key inputs #:allow-other-keys) (substitute* "platform/linuxbsd/wayland/SCsub" ;; This first file does not exist in a "protocol" directory of @@ -2742,6 +2741,9 @@ scripted in a Python-like language.") ;; other substitutions. (("#thirdparty/wayland/protocol/wayland.xml") (search-input-file inputs "share/wayland/wayland.xml")) + ;; And this one is from the mesa source. + (("#thirdparty/wayland-protocols/mesa/wayland-drm.xml") + "../../../mesa-src/src/egl/wayland/wayland-drm/wayland-drm.xml") (("#thirdparty/wayland-protocols") (string-append #$(this-package-input "wayland-protocols") "/share/wayland-protocols")) @@ -2755,6 +2757,11 @@ scripted in a Python-like language.") (copy-recursively (string-append #$(this-package-input "vulkan-volk") "/include") volk-dir)))) + (add-after 'unbundle-volk 'use-system-spirv + (lambda _ + (substitute* "thirdparty/spirv-reflect/spirv_reflect.h" + (("#if defined\\(SPIRV_REFLECT_USE_SYSTEM_SPIRV_H\\)") + "#if 1")))) (replace 'install (lambda* (#:key inputs #:allow-other-keys) (let ((zenity (search-input-file inputs "bin/zenity"))) @@ -2823,13 +2830,14 @@ scripted in a Python-like language.") pulseaudio sdl3 speech-dispatcher + spirv-headers vulkan-volk wayland wayland-protocols wslay zenity zlib - `(,zstd "lib"))) + `(,zstd-1.5.7 "lib"))) (home-page "https://godotengine.org/") (synopsis "Advanced 2D and 3D game engine") (description diff --git a/gnu/packages/patches/godot-glslang.patch b/gnu/packages/patches/godot-glslang.patch new file mode 100644 index 00000000000..e9105540466 --- /dev/null +++ b/gnu/packages/patches/godot-glslang.patch @@ -0,0 +1,23 @@ +From 4011d426468eda71e11e13ad3232ad252a141b93 Mon Sep 17 00:00:00 2001 +From: Sertonix <sertonix@posteo.net> +Date: Sat, 22 Jun 2024 17:14:11 +0000 +Subject: [PATCH] Fix missing lib with builtin_glslang=false + +The `GetDefaultResource` function is in separate library file. +--- + platform/linuxbsd/detect.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py +index e1e6886ac0d8..35415dc269c2 100644 +--- a/platform/linuxbsd/detect.py ++++ b/platform/linuxbsd/detect.py +@@ -514,7 +514,7 @@ def configure(env: "SConsEnvironment"): + env.ParseConfig("pkg-config vulkan --cflags --libs") + if not env["builtin_glslang"]: + # No pkgconfig file so far, hardcode expected lib name. +- env.Append(LIBS=["glslang", "SPIRV"]) ++ env.Append(LIBS=["glslang", "SPIRV", "glslang-default-resource-limits"]) + + if env["opengl3"]: + env.Append(CPPDEFINES=["GLES3_ENABLED"]) |
