From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id qL0MMwwmSmbvZwAAe85BDQ:P1 (envelope-from ) for ; Sun, 19 May 2024 18:17:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id qL0MMwwmSmbvZwAAe85BDQ (envelope-from ) for ; Sun, 19 May 2024 18:17:16 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716135436; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ukdu0KEwJ/T4zPwVVb5/trDC5vIzpzyd/Yel/lHA1Fg=; b=oFgSv+U8zrVQTERw6lqddInTCMnPjcjThD+hW3+sPxNEtYcyB26Y1trOBe+lQfaljDN+wX q/0p+JSp8P/8CxlRZkwI0D/xNEOlRe5tgwNQ6F/Gjte4CsG5XilmKzVIkEtUxU/aEEAFTm LQ/UTpzu/YC5F1LWKl6o04PTzC8oLyndmsVMoM9ElkShaidon3IPcj4uPfWdYlA2I81wgJ xLxUKe2Y6hpXa7gaDaQBdgTtzYwqO+9TNujDAG8/DA4OyWHYcayikwd8H4kuO7xzSYe8GB yuAduUwcE2miI2qBzsQNKjz6MmwRFqAsJc4QJeW4eyREkWkmUA37gl5Xi/xMBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716135436; a=rsa-sha256; cv=none; b=tY1QogSOYngS9U21pNCQPQ4Ixmzhjx08m6sdcOHo/brsUtXxs/WgSZwmuwCVXWaJZ+/qjw ujuvQQa+BoVpKHXY21TwkLAipNQujpnfMP7X3aE6MtbMl8maKyw3dwSNYiF0OLbd2HwPhw HXuV3DyM1jyVUXzw2VTGZXpGFfiI5YeJenY30TeyamYlQCeBjJ3QxDPi9LDtbz7jTdxuJk /o30yvUEQzOPEyTQbaw0blUlfcAvaTYkuhAKnAtaFHPUREXSFegaKeWNY11R5QXo4oYvPr AvoR5ISrjfi0JXNEBel9pUN3COnPcoWjT/TsEeYw/Nt0wwe798+K+PUmY6q6Jg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 25B3763999 for ; Sun, 19 May 2024 18:17:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8jDY-0000iw-0V; Sun, 19 May 2024 12:17:00 -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 1s8jDW-0000ik-Md for guix-patches@gnu.org; Sun, 19 May 2024 12:16:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8jDW-00034J-AJ for guix-patches@gnu.org; Sun, 19 May 2024 12:16:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8jDa-0003Am-9c for guix-patches@gnu.org; Sun, 19 May 2024 12:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71067] [PATCH 2/2] gnu: godot-lts: Improve package style. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 May 2024 16:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71067 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71067@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 71067-submit@debbugs.gnu.org id=B71067.171613539912172 (code B ref 71067); Sun, 19 May 2024 16:17:02 +0000 Received: (at 71067) by debbugs.gnu.org; 19 May 2024 16:16:39 +0000 Received: from localhost ([127.0.0.1]:36906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8jDC-0003AG-Pz for submit@debbugs.gnu.org; Sun, 19 May 2024 12:16:39 -0400 Received: from 2.mo561.mail-out.ovh.net ([46.105.75.36]:38923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8jDA-0003AA-Ng for 71067@debbugs.gnu.org; Sun, 19 May 2024 12:16:37 -0400 Received: from director6.ghost.mail-out.ovh.net (unknown [10.108.25.136]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4Vj5Rg10WLz1F4j for <71067@debbugs.gnu.org>; Sun, 19 May 2024 16:16:31 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-l8l4k (unknown [10.110.113.134]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id D7C3A1FD49; Sun, 19 May 2024 16:16:30 +0000 (UTC) Received: from ngraves.fr ([37.59.142.95]) by ghost-submission-6684bf9d7b-l8l4k with ESMTPSA id 4czMMN4lSmb5CAAAZ5YPGg (envelope-from ); Sun, 19 May 2024 16:16:30 +0000 X-OVh-ClientIp: 81.67.146.208 Date: Sun, 19 May 2024 18:16:06 +0200 Message-ID: <20240519161612.700-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240519161612.700-1-ngraves@ngraves.fr> References: <20240519161612.700-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 2728899900473991906 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrvdehkedgleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpedvleelgeeffeetleekueegvdfhtedvueffiefhkedtleejkeduveelgfdufeduleenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegiedrvddtkedpfeejrdehledrudegvddrleehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeejuddtieejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedupdhmohguvgepshhmthhpohhuth 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: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.86 X-Spam-Score: -6.86 X-Migadu-Queue-Id: 25B3763999 X-Migadu-Scanner: mx13.migadu.com X-TUID: 19eBOy3nYXrU * gnu/packages/game-development.scm (godot-lts): Re-indent and ensure max column length to 79. [arguments]: Use gexp. Change-Id: I0bedb66a4e7e0ebe6242df885f1e687ce3a43ce0 --- gnu/packages/game-development.scm | 166 ++++++++++++++++-------------- 1 file changed, 88 insertions(+), 78 deletions(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 9591fae7f9e..03b6f1df8b9 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -29,6 +29,7 @@ ;;; Copyright © 2022 Jai Vetrivelan ;;; Copyright © 2022 dan ;;; Copyright © 2023 John Kehayias +;;; Copyright © 2024 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -1972,86 +1973,95 @@ (define-public godot-lts "vhacd" "xatlas"))) (for-each delete-file-recursively - (lset-difference string=? - (scandir ".") - (cons* "." ".." preserved-files))))))))) + (lset-difference + string=? + (scandir ".") + (cons* "." ".." preserved-files))))))))) (build-system scons-build-system) (arguments - `(#:scons-flags (list "platform=x11" "target=release_debug" - ;; Avoid using many of the bundled libs. - ;; Note: These options can be found in the SConstruct file. - "builtin_bullet=no" - "builtin_freetype=no" - "builtin_glew=no" - "builtin_libmpdec=no" - "builtin_libogg=no" - "builtin_libpng=no" - "builtin_libtheora=no" - "builtin_libvorbis=no" - "builtin_libvpx=no" - "builtin_libwebp=no" - "builtin_mbedtls=no" - "builtin_opus=no" - "builtin_pcre2=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)"))))) - ;; Build headless tools, used for packaging games without depending on X. - (add-after 'build 'build-headless - (lambda* (#:key scons-flags #:allow-other-keys) - (apply invoke "scons" - `(,(string-append "-j" (number->string (parallel-job-count))) - "platform=server" ,@(delete "platform=x11" scons-flags))))) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (headless (assoc-ref outputs "headless")) - (zenity (assoc-ref inputs "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.*\\.x11\\.opt\\.tools.*")) - (install-file "godot" (string-append out "/bin")) - (install-file "godot_server" (string-append headless "/bin"))) - ;; Tell the editor where to find zenity for OS.alert(). - (wrap-program (string-append out "/bin/godot") - `("PATH" ":" prefix (,(string-append zenity "/bin"))))))) - (add-after 'install 'wrap-ld-path - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (pulseaudio_path (string-append (assoc-ref inputs "pulseaudio") "/lib")) - (alas_lib_path (string-append (assoc-ref inputs "alsa-lib") "/lib"))) - (wrap-program (string-append out "/bin/godot") - `("LD_LIBRARY_PATH" ":" prefix (,pulseaudio_path ,alas_lib_path)))))) - (add-after 'install 'install-godot-desktop - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (applications (string-append out "/share/applications")) - (icons (string-append out "/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"))))))))) + (list + ;; Avoid using many of the bundled libs. + ;; Note: These options can be found in the SConstruct file. + #:scons-flags #~(list "platform=x11" "target=release_debug" + "builtin_bullet=no" + "builtin_freetype=no" + "builtin_glew=no" + "builtin_libmpdec=no" + "builtin_libogg=no" + "builtin_libpng=no" + "builtin_libtheora=no" + "builtin_libvorbis=no" + "builtin_libvpx=no" + "builtin_libwebp=no" + "builtin_mbedtls=no" + "builtin_opus=no" + "builtin_pcre2=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)"))))) + ;; Build headless tools, to package games without depending on X. + (add-after 'build 'build-headless + (lambda* (#:key scons-flags #:allow-other-keys) + (apply invoke "scons" + `(,(string-append + "-j" (number->string (parallel-job-count))) + "platform=server" + ,@(delete "platform=x11" scons-flags))))) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (headless (assoc-ref outputs "headless")) + (zenity (assoc-ref inputs "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.*\\.x11\\.opt\\.tools.*")) + (install-file "godot" (string-append out "/bin")) + (install-file "godot_server" + (string-append headless "/bin"))) + ;; Tell the editor where to find zenity for OS.alert(). + (wrap-program (string-append out "/bin/godot") + `("PATH" ":" prefix (,(string-append zenity "/bin"))))))) + (add-after 'install 'wrap-ld-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pulseaudio_path (string-append + (assoc-ref inputs "pulseaudio") "/lib")) + (alas_lib_path (string-append + (assoc-ref inputs "alsa-lib") "/lib"))) + (wrap-program (string-append out "/bin/godot") + `("LD_LIBRARY_PATH" ":" prefix + (,pulseaudio_path ,alas_lib_path)))))) + (add-after 'install 'install-godot-desktop + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications")) + (icons (string-append out "/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"))))))))) (outputs '("out" "headless")) (native-inputs (list pkg-config)) -- 2.41.0