From patchwork Fri Jul 7 16:27:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 51624 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B9E3127BBE2; Fri, 7 Jul 2023 17:28:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0A0CD27BBE9 for ; Fri, 7 Jul 2023 17:28:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHoJS-0005xR-Jq; Fri, 07 Jul 2023 12:28:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHoJP-0005x7-EA for guix-patches@gnu.org; Fri, 07 Jul 2023 12:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHoJO-0006Tq-Su for guix-patches@gnu.org; Fri, 07 Jul 2023 12:28:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qHoJO-0003Ls-FM for guix-patches@gnu.org; Fri, 07 Jul 2023 12:28:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64519] [PATCH] gnu: godot: Update to 4.1. Rename godot@3 to godot-lts. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Jul 2023 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64519 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64519@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.168874725112846 (code B ref -1); Fri, 07 Jul 2023 16:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jul 2023 16:27:31 +0000 Received: from localhost ([127.0.0.1]:43677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHoIs-0003L7-9H for submit@debbugs.gnu.org; Fri, 07 Jul 2023 12:27:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:35694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHoIo-0003Kx-Cw for submit@debbugs.gnu.org; Fri, 07 Jul 2023 12:27:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHoIn-0005uF-DJ for guix-patches@gnu.org; Fri, 07 Jul 2023 12:27:26 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHoIk-0006Lc-1o for guix-patches@gnu.org; Fri, 07 Jul 2023 12:27:25 -0400 Date: Fri, 07 Jul 2023 16:27:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1688747236; x=1689006436; bh=I5KjhMc2gjxM/rXU9sP+aVjti+40iPanx26oGMGpXs0=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=AVh5G4arhwLamPapvW+EofAAa37YCG0KVSQZcOFn4TQCYPrJzMeiAPXTFSMzJsx5+ 3kVdNuz4hjSTqDDZK1atC8DQI8Pkkz1Styz6tPv8zoEk0/Sq/aU8Pc7JXWRY6hk5od HVhIJTeXFrkVaTAQ9vsgXVwQgS/CCMHir5zRmuF672QKG4XQjL4zRVJ5qf7lTmjouZ xX2FEriMjIV9pu3fpu0ngzfO1s+S6lBzWKChFjFuw+dIwhucmR7fvvj+0czZS1yLaV qF9XegMYJom6FFkZj4ELGbDimbnlf26vxOshtfmHJFITuuWkgWWA6zPwkHhUtVPDvh NFf0gQCN9ayJg== Message-ID: <875y6vlmaw.fsf@protonmail.com> Feedback-ID: 7805494:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.134; envelope-from=john.kehayias@protonmail.com; helo=mail-40134.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hi Guixers, Here's a patch to add Godot 4! I've tested it builds and can load some sophisticated examples, working with the new Vulkan support. There is no longer a headless build so that has been removed as an output. The previous version, godot@3 is an LTS release now (and in need of an update I see) so I kept that as godot-lts. I wasn't sure how best to break this up in commits, let me know if these should be separate and how (1. rename godot to godot-lts and 2. add godot@4?). I did my best to put in all the changes in the package definition from 3 to 4 in the changelog, but please do check. Due to the amount and scope of changes I didn't think godot-lts could easily inherit from godot. Thanks! John From 287373c727c5292e5778f60aacf3685a4feddeca Mon Sep 17 00:00:00 2001 Message-Id: <287373c727c5292e5778f60aacf3685a4feddeca.1688747031.git.john.kehayias@protonmail.com> From: John Kehayias Date: Fri, 7 Jul 2023 12:05:39 -0400 Subject: [PATCH] gnu: godot: Update to 4.1. Rename godot@3 to godot-lts. * gnu/packages/game-development.scm (godot): Update to 4.1. [source]: Update snippet: remove embree and enet; add amd-fsr, astcenc, basis_universal, brotli, linuxbsd_headers, etcpak, meshoptimizer, msdfgen, noise, openxr, rvo2, spirv-reflect, thorvg, volk, vulkan. [arguments]: Remove #:scons. Update #:scons-flags to unbundle more libraries. [phases]: Remove 'build-headless phase (headless is no longer has a separate build). Add 'fix-dl-open-paths and 'unbundle-xkbcommon phases. In 'install phase, remove headless output. Update 'wrap phase to remove eudev. [outputs]: Remove headless. [inputs]: Add dbus, embree, enet, fontconfig, glslang, libpng, harfbuzz, icu4c, libxkbcommon, openxr, speech-dispatcher, vulkan-loader, zlib. Remove bullet. Rename freetype to freetype-brotli. (godot-lts): New variable. godot@3 is the LTS release. * gnu/packages/games.scm (superstarfighter)[native-inputs]: Use it. [inputs]: Use it. --- gnu/packages/game-development.scm | 255 +++++++++++++++++++++++++++++- gnu/packages/games.scm | 4 +- 2 files changed, 256 insertions(+), 3 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index aa99109cca..e40beacb60 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2022 Felix Gruber ;;; Copyright © 2022 Jai Vetrivelan ;;; Copyright © 2022 dan +;;; Copyright © 2023 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,6 +55,7 @@ (define-module (gnu packages game-development) #:use-module (guix git-download) #:use-module (guix svn-download) #:use-module (guix utils) + #:use-module (guix build utils) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -86,6 +88,7 @@ (define-module (gnu packages game-development) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) @@ -95,6 +98,7 @@ (define-module (gnu packages game-development) #:use-module (gnu packages multiprecision) #:use-module (gnu packages music) #:use-module (gnu packages ncurses) + #:use-module (gnu packages networking) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) @@ -105,12 +109,14 @@ (define-module (gnu packages game-development) #:use-module (gnu packages readline) #:use-module (gnu packages qt) #:use-module (gnu packages sdl) + #:use-module (gnu packages speech) #:use-module (gnu packages sphinx) #:use-module (gnu packages stb) #:use-module (gnu packages texinfo) #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages video) + #:use-module (gnu packages vulkan) #:use-module (gnu packages web) #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) @@ -1812,7 +1818,7 @@ (define-public openmw (home-page "https://openmw.org") (license license:gpl3))) -(define-public godot +(define-public godot-lts (package (name "godot") (version "3.4.2") @@ -1982,6 +1988,253 @@ (define-public godot scripted in a Python-like language.") (license license:expat))) +(define-public godot + (package + (name "godot") + (version "4.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/godotengine/godot") + (commit (string-append version "-stable")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rc34w4nb1qwmxk7ijcm689kk4gdxrmgzbj4qqz8gkqhysn8mnmz")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + (snippet + '(begin + ;; Keep only those bundled files we have not (yet) replaced + ;; with Guix versions. Note that some of these may be + ;; modified; see "thirdparty/README.md". + (with-directory-excursion "thirdparty" + (let* ((preserved-files + '("README.md" + "amd-fsr" + "assimp" + "astcenc" + "basis_universal" + ;; TODO: Can unbundle once + ;; + ;; is merged + "brotli" + ;; Godot needs ca-certificates.crt, but that is + ;; not available in build environment + "certs" + "cvtt" + "linuxbsd_headers" + "etc2comp" + "etcpak" + "fonts" + "glad" + "jpeg-compressor" + "libsimplewebm" + "meshoptimizer" + "minimp3" + "miniupnpc" + "minizip" + "misc" + "msdfgen" + "nanosvg" + "noise" + "oidn" + "openxr" + "pvrtccompressor" + "recastnavigation" + "rvo2" + "spirv-reflect" + "squish" + "stb_rect_pack" + "thorvg" + "tinyexr" + "vhacd" + "volk" + "vulkan" + "xatlas"))) + (for-each delete-file-recursively + (lset-difference string=? + (scandir ".") + (cons* "." ".." preserved-files))))))))) + (build-system scons-build-system) + (arguments + (list + #:scons-flags #~`("platform=linuxbsd" "target=editor" "production=yes" + ;; XXX: There may be advantages to enabling volk, + ;; requiring unbundling and patching to use our input. + "use_volk=no" + ;; Avoid using many of the bundled libs. + ;; Note: These options can be found in the SConstruct file. + "builtin_embree=no" + "builtin_enet=no" + "builtin_freetype=no" + "builtin_glslang=no" + "builtin_graphite=no" + "builtin_harfbuzz=no" + "builtin_icu4c=no" + "builtin_libogg=no" + "builtin_libpng=no" + "builtin_libtheora=no" + "builtin_libvorbis=no" + "builtin_libwebp=no" + "builtin_mbedtls=no" + "builtin_pcre2=no" + "builtin_pcre2_with_jit=no" + "builtin_wslay=no" + "builtin_zlib=no" + "builtin_zstd=no") + #:tests? #f ; There are no tests + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'scons-use-env + (lambda _ + ;; Scons does not use the environment variables by default, + ;; but this substitution makes it do so. + (substitute* "SConstruct" + (("env_base = Environment\\(tools=custom_tools\\)") + (string-append + "env_base = Environment(tools=custom_tools)\n" + "env_base = Environment(ENV=os.environ)"))))) + (add-after 'scons-use-env 'fix-dlopen-paths + (lambda* (#:key inputs #:allow-other-keys) + (let ((files '("drivers/alsa/asound-so_wrap.c" + "drivers/pulseaudio/pulse-so_wrap.c" + "platform/linuxbsd/dbus-so_wrap.c" + "platform/linuxbsd/fontconfig-so_wrap.c" + "platform/linuxbsd/libudev-so_wrap.c" + "platform/linuxbsd/speechd-so_wrap.c" + "platform/linuxbsd/x11/display_server_x11.cpp" + "platform/linuxbsd/x11/dynwrappers/xcursor-so_wrap.c" + "platform/linuxbsd/x11/dynwrappers/xext-so_wrap.c" + "platform/linuxbsd/x11/dynwrappers/xinerama-so_wrap.c" + "platform/linuxbsd/x11/dynwrappers/xinput2-so_wrap.c" + "platform/linuxbsd/x11/dynwrappers/xlib-so_wrap.c" + "platform/linuxbsd/x11/dynwrappers/xrandr-so_wrap.c" + "platform/linuxbsd/x11/dynwrappers/xrender-so_wrap.c" + "platform/linuxbsd/xkbcommon-so_wrap.c" + "thirdparty/volk/volk.c" + "thirdparty/volk/volk.c")) + (libs '("libasound.so.2" + "libpulse.so.0" + "libdbus-1.so.3" + "libfontconfig.so.1" + "libudev.so.1" + "libspeechd.so.2" + "libXrandr.so.2" + "libXcursor.so.1" + "libXext.so.6" + "libXinerama.so.1" + "libXi.so.6" + "libX11.so.6" + "libXrandr.so.2" + "libXrender.so.1" + "libxkbcommon.so.0" + "libvulkan.so.1" + "libvulkan.so"))) + (for-each (lambda (file lib) + (substitute* file + (((string-append "dlopen\\(\"" lib "\"")) + (string-append "dlopen(\"" + (search-input-file + inputs (string-append "lib/" lib)) + "\"")))) + files libs)) + (substitute* "thirdparty/glad/gl.c" + (("libGL.so") ; for both .so and .so.1 + (string-append (search-input-file inputs "lib/libGL.so")))) + (substitute* "thirdparty/glad/glx.c" + (("libGL.so") ; for both .so and .so.1 + (string-append (search-input-file inputs "lib/libGL.so")))))) + (add-after 'fix-dlopen-paths 'unbundle-xkbcommon + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "platform/linuxbsd/xkbcommon-so_wrap.c" + (("./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon.h") + (string-append + (search-input-file inputs "include/xkbcommon/xkbcommon.h"))) + (("./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-compose.h") + (string-append + (search-input-file inputs "include/xkbcommon/xkbcommon-compose.h"))) + (("./thirdparty/linuxbsd_headers/xkbcommon/xkbcommon-keysyms.h") + (string-append + (search-input-file inputs "include/xkbcommon/xkbcommon-keysyms.h")))))) + (replace 'install + (lambda* (#:key inputs #:allow-other-keys) + (let ((zenity (search-input-file inputs "bin/zenity"))) + ;; Strip build info from filenames. + (with-directory-excursion "bin" + (for-each + (lambda (file) + (let ((dest (car (string-split (basename file) #\.)))) + (rename-file file dest))) + (find-files "." "godot.*\\.linuxbsd\\.editor.*")) + (install-file "godot" (string-append #$output "/bin"))) + ;; Tell the editor where to find zenity for OS.alert(). + ;; TODO: This could be changed in + ;; platform/linuxbsd/os_linuxbsd.cpp directly, along with the + ;; other alert programs. + (wrap-program (string-append #$output "/bin/godot") + `("PATH" ":" prefix (,(string-append zenity "/bin"))))))) + (add-after 'install 'install-godot-desktop + (lambda _ + (let ((applications (string-append #$output "/share/applications")) + (icons (string-append #$output "/share/icons/hicolor"))) + (mkdir-p applications) + (copy-file "misc/dist/linux/org.godotengine.Godot.desktop" + (string-append applications "/godot.desktop")) + (for-each (lambda (icon dest) + (mkdir-p (dirname dest)) + (copy-file icon dest)) + '("icon.png" "icon.svg") + `(,(string-append icons "/256x256/apps/godot.png") + ,(string-append icons "/scalable/apps/godot.svg"))))))))) + (native-inputs + (list pkg-config)) + (inputs + (list alsa-lib + dbus + embree + enet + eudev + fontconfig + freetype-brotli + glew + glslang + glu + libpng + harfbuzz + icu4c + libtheora + libvorbis + libvpx + libwebp + libx11 + libxcursor + libxi + libxinerama + libxkbcommon + libxrandr + mbedtls-apache + mesa + openxr + opusfile + pcre2 + pulseaudio + speech-dispatcher + vulkan-loader + wslay + zenity + zlib + `(,zstd "lib"))) + (home-page "https://godotengine.org/") + (synopsis "Advanced 2D and 3D game engine") + (description + "Godot is an advanced multi-platform game engine written in C++. If +features design tools such as a visual editor, can import 3D models and +provide high-quality 3D rendering, it contains an animation editor, and can be +scripted in a Python-like language.") + (license license:expat))) + (define-public entt (package (name "entt") diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 7e36c66b6a..f0bfd0f9d5 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2823,9 +2823,9 @@ (define-public superstarfighter #:categories '("Game" "ArcadeGame"))) #t))))) (native-inputs - `(("godot-headless" ,godot "headless"))) + `(("godot-headless" ,godot-lts "headless"))) (inputs - (list godot)) + (list godot-lts)) (home-page "https://notapixel.itch.io/superstarfighter") (synopsis "Fast-paced local multiplayer arcade game") (description "In SuperStarfighter, up to four local players compete in a base-commit: 67c276a870b9d6be69c2a9e867683e58928c38ef prerequisite-patch-id: e282a1c5d3286b7715cad72962f494d2d56d8fcc prerequisite-patch-id: 656485c99b42352c0eedb241af948bd19ef1857c prerequisite-patch-id: 89c7181debe0bc9d94a4035c5ddfc2e495becd65 prerequisite-patch-id: 7da573a9b135e39c3c1c6128ea8f2b9433bef949 prerequisite-patch-id: 7d38c3df34cc98d2d71e984cf4eb72d20a86f694 prerequisite-patch-id: 89c7181debe0bc9d94a4035c5ddfc2e495becd65 prerequisite-patch-id: 0f7d5306c9953ff425c1b5d44807c43d0908f5ff prerequisite-patch-id: bf6e8bbc7adbef9dfeaa237b57806f0e051a1588 prerequisite-patch-id: d9b03fadf4e0617ae9fd99e2a4569088fa138cb0 prerequisite-patch-id: 89c7181debe0bc9d94a4035c5ddfc2e495becd65 prerequisite-patch-id: 3edd9b05dbcaf02b276087982465fc292fd23c95 prerequisite-patch-id: 5cefe6598904cb7ba36ccae9309084438d84069d prerequisite-patch-id: eb2f92015e487fe1fb9e1f0803cb1c9614c05af7 prerequisite-patch-id: bf6e8bbc7adbef9dfeaa237b57806f0e051a1588 prerequisite-patch-id: 970c3e5af1d647a77c104cdaf487c986cf6660f3 prerequisite-patch-id: 81c8e47534c6523fa1c10f713bf6b10ae05e9b54 prerequisite-patch-id: a088a24f20373d230ed54818b1405ac76a336537 prerequisite-patch-id: ae0750f361cb74b38d61b705511e18b847791e9a prerequisite-patch-id: f63b0379f89a9d6249b1270eec4042b7918ab8eb prerequisite-patch-id: 99dbf414e972f019b3e6b2602932cfb6fa9a505f prerequisite-patch-id: 4e19cc41474d02a2836ac745de1d6e565867fd55 prerequisite-patch-id: 00d8c76f452dad9009e90fce0dc8d1859ab51a0b prerequisite-patch-id: eca1fb4c330a3925e55db95b18ae8ca7403569e5 prerequisite-patch-id: a9f671bd2505225d4ad1cb4a165ff18fa14f3302 -- 2.40.1