From patchwork Fri Jun 11 00:55:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 30105 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 7743927BC78; Fri, 11 Jun 2021 01:58:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3E55E27BC83 for ; Fri, 11 Jun 2021 01:58:10 +0100 (BST) Received: from localhost ([::1]:58072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrVUv-0005p2-8q for patchwork@mira.cbaines.net; Thu, 10 Jun 2021 20:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrVTw-0005md-Pv for guix-patches@gnu.org; Thu, 10 Jun 2021 20:57:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrVTq-0006l6-Ux for guix-patches@gnu.org; Thu, 10 Jun 2021 20:57:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lrVTq-000072-VT for guix-patches@gnu.org; Thu, 10 Jun 2021 20:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48952] [PATCH 2/3] gnu: superstarfighter: Use godot-build-system. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Jun 2021 00:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48952 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48952@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48952-submit@debbugs.gnu.org id=B48952.1623372980360 (code B ref 48952); Fri, 11 Jun 2021 00:57:02 +0000 Received: (at 48952) by debbugs.gnu.org; 11 Jun 2021 00:56:20 +0000 Received: from localhost ([127.0.0.1]:37856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrVT9-00005k-Md for submit@debbugs.gnu.org; Thu, 10 Jun 2021 20:56:20 -0400 Received: from mout01.posteo.de ([185.67.36.65]:60335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrVT7-00005K-FW for 48952@debbugs.gnu.org; Thu, 10 Jun 2021 20:56:18 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id D20D4240026 for <48952@debbugs.gnu.org>; Fri, 11 Jun 2021 02:56:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1623372971; bh=iqyZ/OfT/AFNeyMgP4tx8cVTOLJ58QqNQQ2NPdSQqw4=; h=From:To:Cc:Subject:Date:From; b=I9F04xmcJWmCDaXP+UHbnWtDKo5ECs1teYD72nbxeHXqf93DugyrEUTfQA3PwmDQV OBxZR1t+Ixlrlhi+cur+pOwkspKdXIbH+sVZIajyVibMgc/uGQMg5mdONoCP9qIaDE elM9vPna2eOdNt2yEbhwKPGZo+rxQ9ds/2/8FDhlKPRMcgvpNqSGsgW6Q2W0q5lsgT dqYuUqSIpaBXkruxPrQ6yVl0Eo4aEgYKvCBGkLR+fo0G9dK7f8fleLZ9Y/HeZmOWI5 +BqpidMbT5Otr5I1+4A+rEfrwQJK7HHJ0jWLqhNOUkKQOpIeS3+wkfcaW3xgnSircD yR5bBfo9GrGdg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4G1Mpy3XvNz9rxK; Fri, 11 Jun 2021 02:56:10 +0200 (CEST) From: Vinicius Monego Date: Fri, 11 Jun 2021 00:55:45 +0000 Message-Id: <20210611005546.429055-2-monego@posteo.net> In-Reply-To: <20210611005546.429055-1-monego@posteo.net> References: <20210611005546.429055-1-monego@posteo.net> MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/games.scm (superstarfighter)[build-system]: Use godot-build-system. [arguments]: Remove #:tests?. <#:game, #:project-directory>: New fields. <#:phases>: Do not replace configure, build and install. Add phase 'install-desktop-file after 'install. --- gnu/packages/games.scm | 61 +++++++++--------------------------------- 1 file changed, 12 insertions(+), 49 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 2eaea5868e..55f468da2c 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -62,6 +62,7 @@ ;;; Copyright © 2021 David Pflug ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Solene Rapenne +;;; Copyright © 2021 Vinicius Monego ;;; ;;; This file is part of GNU Guix. ;;; @@ -199,6 +200,7 @@ #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) #:use-module (guix build-system go) + #:use-module (guix build-system godot) #:use-module (guix build-system meson) #:use-module (guix build-system perl) #:use-module (guix build-system python) @@ -2464,62 +2466,23 @@ modify quests for the Solarus engine."))) (file-name (git-file-name name version)) (sha256 (base32 "1fly63yf5ls1xwm15if4lxwy67wi84k4gvjllljpykrl18vw2y0y")))) - (build-system gnu-build-system) + (build-system godot-build-system) (arguments - `(#:tests? #f ;there are no tests + `(#:game ,name + #:project-directory "godot" #:phases (modify-phases %standard-phases - (replace 'configure - (lambda _ - (chdir "godot") - (setenv "HOME" (getcwd)) - (with-output-to-file "export_presets.cfg" - (lambda () - (display - "[preset.0] -name=\"Guix\" -platform=\"Linux/X11\" -runnable=true -[preset.0.options]"))) - #t)) - (replace 'build - (lambda _ - (let ((godot (assoc-ref %build-inputs "godot-headless"))) - (invoke (string-append godot "/bin/godot_server") - "--export-pack" "Guix" - "superstarfighter.pck" "project.godot")) - #t)) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) + (add-after 'install 'install-desktop-file + (lambda* (#:key inputs outputs game #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (share (string-append out "/share")) - (data (string-append share "/superstarfighter")) - (icons (string-append share "/icons/hicolor/256x256/apps"))) - (install-file "superstarfighter.pck" data) - (mkdir-p bin) - (call-with-output-file (string-append bin "/superstarfighter") - (lambda (port) - (format port - "#!/bin/sh~@ - exec ~a/bin/godot --main-pack ~a/superstarfighter.pck~%" - (assoc-ref inputs "godot") - data) - (chmod port #o755))) - (mkdir-p icons) - (copy-file "icon.png" (string-append icons "/" ,name ".png")) + (share (string-append out "/share"))) (make-desktop-entry-file - (string-append share "/applications/" ,name ".desktop") + (string-append share "/applications/" game ".desktop") #:name "SuperStarfighter" #:comment "Fast-paced arcade combat game" - #:exec ,name - #:icon ,name - #:categories '("Game" "ArcadeGame"))) - #t))))) - (native-inputs - `(("godot-headless" ,godot "headless"))) - (inputs - `(("godot" ,godot))) + #:exec game + #:icon game + #:categories '("Game" "ArcadeGame")))))))) (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