From patchwork Thu Jan 13 19:02:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Aur=C3=A9lien_Coussat?= X-Patchwork-Id: 36291 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 C820027BBEA; Thu, 13 Jan 2022 20:01:39 +0000 (GMT) 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,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 4341F27BBE9 for ; Thu, 13 Jan 2022 20:01:39 +0000 (GMT) Received: from localhost ([::1]:55252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n86Hy-0003U0-AP for patchwork@mira.cbaines.net; Thu, 13 Jan 2022 15:01:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n85Vy-0004fH-Ky for guix-patches@gnu.org; Thu, 13 Jan 2022 14:12:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41706) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n85Vy-0002b9-7x for guix-patches@gnu.org; Thu, 13 Jan 2022 14:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n85Vy-0005cB-3x for guix-patches@gnu.org; Thu, 13 Jan 2022 14:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53235] [PATCH] gnu: Add brogue-ce. Resent-From: =?utf-8?b?QXVyw6lsaWVu?= Coussat Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Jan 2022 19:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53235 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53235@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164210106521492 (code B ref -1); Thu, 13 Jan 2022 19:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2022 19:11:05 +0000 Received: from localhost ([127.0.0.1]:34609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n85V2-0005aZ-Md for submit@debbugs.gnu.org; Thu, 13 Jan 2022 14:11:05 -0500 Received: from lists.gnu.org ([209.51.188.17]:40896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n85MS-0005JF-Pm for submit@debbugs.gnu.org; Thu, 13 Jan 2022 14:02:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n85MS-0008MA-Il for guix-patches@gnu.org; Thu, 13 Jan 2022 14:02:12 -0500 Received: from shout01.mail.de ([62.201.172.24]:43535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n85MP-000138-Ei for guix-patches@gnu.org; Thu, 13 Jan 2022 14:02:11 -0500 Received: from postfix01.mail.de (postfix02.bt.mail.de [10.0.121.126]) by shout01.mail.de (Postfix) with ESMTP id CB181A2192 for ; Thu, 13 Jan 2022 20:02:02 +0100 (CET) Received: from smtp02.mail.de (smtp02.bt.mail.de [10.0.121.212]) by postfix01.mail.de (Postfix) with ESMTP id B1539A03C2 for ; Thu, 13 Jan 2022 20:02:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.fr; s=mailfr201610; t=1642100522; bh=g7HiwmGC1hOI8AuJg16KXgy39IR5MUNUvJ+ReNmDNLk=; h=From:To:Subject:Date:From; b=v9pqmCtNEi+hRAlVIqYtO6fiXytl6aeafRjyhpbvkKD8pc/+PcavQfXR3GNro/K43 niiZ2B4RtGK44GDuWbWvM7Oe6mKzVNjY0ueCrmKLpWYEHl4ix9Bw9pK+zPxCcXQDOx 3wDFD+uWClz/vmi4zKnAY6djxcQhBGn1wv4edMMo= Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtp02.mail.de (Postfix) with ESMTPSA id 83806A0709 for ; Thu, 13 Jan 2022 20:02:01 +0100 (CET) From: =?utf-8?b?QXVyw6lsaWVu?= Coussat X-Priority: 3 Date: Thu, 13 Jan 2022 20:02:01 +0100 Content-Disposition: inline MIME-Version: 1.0 Message-Id: <20220113190202.83806A0709@smtp02.mail.de> X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 8776 X-purgate-ID: 154282::1642100522-0000429D-FA1F9FC7/0/0 Received-SPF: pass client-ip=62.201.172.24; envelope-from=acoussat@mail.fr; helo=shout01.mail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 13 Jan 2022 14:11:03 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Thu, 13 Jan 2022 14:58:13 -0500 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 Hello Guix, Before anything else, sorry if I made obvious mistakes: this is my first package ever, and my very first Guix contribution. This patch adds BrogueCE to games.scm. BrogueCE is the community edition of Brogue, a minimalist roguelike game released under the AGPL-3.0 license. Thank you very much! From cc67e0e0d482ab9c88cbfd8d509329ff98ec5670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Coussat?= Date: Thu, 13 Jan 2022 17:33:55 +0100 Subject: [PATCH] gnu: Add brogue-ce. --- gnu/packages/games.scm | 92 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index bfd566aac0..497d8e6002 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -68,6 +68,7 @@ ;;; Copyright © 2021 Brendan Tildesley ;;; Copyright © 2021 Christopher Baines ;;; Copyright © 2021 Foo Chuan Wei +;;; Copyright © 2022 Aurélien Coussat ;;; ;;; This file is part of GNU Guix. ;;; @@ -12588,3 +12589,94 @@ (define-public fheroes2 Magic II (aka HOMM2) game engine. It requires assets and game resources to play; it will look for them at @file{~/.local/share/fheroes2} folder.") (license license:gpl2))) + +(define-public brogue-ce + (package + (name "brogue-ce") + (version "1.10.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tmewett/BrogueCE.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0hgqr6gf0sxi9fv6ahd4rh3dgysbxm2i9yx998mdmw6my7h2756p")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'prepare-build + ;; Set correct environment for SDL. + (lambda* (#:key inputs #:allow-other-keys) + (setenv "CPATH" + (string-append (assoc-ref inputs "sdl") + "/include/SDL2:" + (or (getenv "CPATH") ""))))) + (add-before 'build 'setenv-cc + (lambda _ (setenv "CC" "gcc"))) + (add-before 'build 'fix-datadir + ;; Set path to reach the correct asset directory. + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "src/platform/tiles.c" + (("(\"%s/assets/[^\"]+\"), dataDirectory" all filepath) + (string-append filepath ", \"" + (assoc-ref outputs "out") "/bin\""))))) + (replace 'install + ;; Upstream provides no install phase. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (executable ,name) + (real-executable + (string-append "." executable "-real")) + (userdir (string-append "." ,name)) + (share (string-append out "/share")) + (apps (string-append share "/applications"))) + (copy-recursively "bin" bin) + ;; Create a "fake" executable that calls the actual + ;; executable from a good location. + (with-directory-excursion bin + (rename-file "brogue" real-executable) + (call-with-output-file executable + (lambda (p) + (format p + "#!~a~@ + cd $HOME~@ + mkdir -p ~a~@ + cd ~a~@ + exec ~a/~a $*" + (which "bash") + userdir + userdir + bin + real-executable))) + (chmod executable #o555)) + ;; Create desktop file. + (mkdir-p apps) + (make-desktop-entry-file + (string-append apps "/" ,name ".desktop") + #:name "Brogue" + #:exec ,name + #:categories '("RolePlaying" "Game") + #:keywords + '("adventure" "singleplayer") + #:comment + '((#f "Brave the Dungeons of Doom!"))) + #t)))))) + (inputs + `(("sdl" ,(sdl-union (list sdl2 sdl2-image))))) + (home-page "https://github.com/tmewett/BrogueCE") + (synopsis "Community-lead fork of the much-loved minimalist roguelike game") + (description "Brogue is a single-player strategy game set in the halls of a +mysterious and randomly-generated dungeon. The objective is simple enough -- +retrieve the fabled Amulet of Yendor from the 26th level -- but the dungeon is +riddled with danger. Horrifying creatures and devious, trap-ridden terrain +await. Yet it is also riddled with weapons, potions, and artifacts of forgotten +power. Survival demands strength and cunning in equal measure as you descend, +making the most of what the dungeon gives you. You will make sacrifices, narrow +escapes, and maybe even some friends along the way -- but will you be one of the +lucky few to return alive?") + (license license:agpl3))) -- 2.34.0