From patchwork Fri Feb 24 03:47:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: TakeV X-Patchwork-Id: 47279 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 68ABB16BE8; Fri, 24 Feb 2023 19:56:35 +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=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 102BE16BF5 for ; Fri, 24 Feb 2023 19:56:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVeAh-0007jF-6h; Fri, 24 Feb 2023 14:55:59 -0500 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 1pVdFe-000123-IX for guix-patches@gnu.org; Fri, 24 Feb 2023 13:57:02 -0500 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 1pVdFe-00013W-3X for guix-patches@gnu.org; Fri, 24 Feb 2023 13:57:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVdFd-0006y6-O2 for guix-patches@gnu.org; Fri, 24 Feb 2023 13:57:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61768] [PATCH] gnu: packages: games: Add meritous v1.2 Resent-From: TakeV Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Feb 2023 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61768 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61768@debbugs.gnu.org Cc: TakeV X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167726497226727 (code B ref -1); Fri, 24 Feb 2023 18:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2023 18:56:12 +0000 Received: from localhost ([127.0.0.1]:38251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVdEp-0006x0-UK for submit@debbugs.gnu.org; Fri, 24 Feb 2023 13:56:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:41828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVP3S-0005Zb-0r for submit@debbugs.gnu.org; Thu, 23 Feb 2023 22:47:31 -0500 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 1pVP3R-0001iX-NJ for guix-patches@gnu.org; Thu, 23 Feb 2023 22:47:29 -0500 Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVP3O-0001Hf-N6 for guix-patches@gnu.org; Thu, 23 Feb 2023 22:47:29 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8B250414DE; Fri, 24 Feb 2023 04:47:21 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fypqNXO9ObTt; Fri, 24 Feb 2023 04:47:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1677210439; bh=fsZNyv8i6qyE56oN3WV56tWM25MIUkZmeRtM98qJZ/s=; h=From:To:Cc:Subject:Date; b=YgTQju7SiC2SzF38+hVFkDFvCj+USeC1yh5Vb8WYeFb+dbtY++9jsxL8t5Itc/WQ0 OLZglnHuUGStnlua3a9ROc6Rldksl4SYC7xCk4o1wG9kbywcUmOndzsZ8KeFYu4okN Y7IAHK3hoW/gUMw0EgKwxvchzw4j7HnkzDxIjOm7WZsn1mluOsskMud2WfgOYY6wmi ZQOdtFkQKhV4AREKDWdKvXG+GqwjI0G+Z8k5biC9kmDSyADicyiehsLMKKddx8pQIN QRphYOuF6CGO9oH99TqdJ4+FX7fODQE6BI6A4s1NAhQrz/Sd+YgtdAHapRBOMS2Blk xluB81y40KH2Q== Date: Thu, 23 Feb 2023 19:47:13 -0800 Message-Id: <20230224034713.9895-1-takev@disroot.org> MIME-Version: 1.0 Received-SPF: pass client-ip=178.21.23.139; envelope-from=takev@disroot.org; helo=knopi.disroot.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 24 Feb 2023 13:56:10 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Fri, 24 Feb 2023 14:55:46 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: TakeV X-ACL-Warn: , TakeV via Guix-patches X-Patchwork-Original-From: TakeV via Guix-patches via From: TakeV 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 Fun game from a while back, decided to package it after I saw the source was gpl3. --- gnu/packages/games.scm | 84 ++++++---- .../patches/meritous-fix-sdl-import.patch | 143 ++++++++++++++++++ 2 files changed, 195 insertions(+), 32 deletions(-) create mode 100644 gnu/packages/patches/meritous-fix-sdl-import.patch base-commit: 5d10644371abd54d0edcd638691113f0a92de743 diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index a3d093fa5e..93b3d179e9 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -75,6 +75,7 @@ ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2022 Hendursaga ;;; Copyright © 2022 Parnikkapore +;;; Copyright © 2023 TakeV ;;; ;;; This file is part of GNU Guix. ;;; @@ -1643,6 +1644,28 @@ (define-public meandmyshadow shadow mimic them to reach blocks you couldn't reach alone.") (license license:gpl3+))) +(define-public meritous + (package + (name "meritous") + (version "v12") + (source (origin + (method url-fetch) + (uri (string-append "http://www.asceai.net/files/meritous_" version "_src.tar.bz2")) + (sha256 + (base32 "07apyzg1ygwlb1kw4qfs8yncpnn9v7wj8jnfs17w046881i0ici0")) + (patches (search-patches "meritous-fix-sdl-import.patch")))) + (build-system gnu-build-system) + (arguments + `(#:tests? `#f + #:phases `(modify-phases %standard-phases + (delete `configure)))) + (inputs `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer))))) + (native-inputs pkg-config) + (home-page "http://www.asceai.net/meritous/") + (synopsis "Action Roguelike game") + (description "Meritous is an action-adventure dungeon crawl game.") + (license license:gpl3))) + (define-public opensurge (package (name "opensurge") @@ -8989,40 +9012,37 @@ (define-public meritous "0n5jm4g0arjllgqmd2crv8h02i6hs3hlh1zyc7ng7yfpg1mbd8p8")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ;no test - #:make-flags - (list "CC=gcc" - (string-append "prefix=" (assoc-ref %outputs "out"))) - #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'fix-sdl-path - ;; XXX: For some reason, `sdl-config' reports stand-alone SDL - ;; directory, not SDL-union provided as an input to the package. - ;; We force the latter with "--prefix=" option. - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "Makefile" - (("sdl-config" command) - (string-append command " --prefix=" (assoc-ref inputs "sdl")))) - #t)) - (add-after 'unpack 'fix-crash - ;; XXX: Songs are not present in the repository, due to licensing - ;; issues. Yet, the game tries to load them, and, since it cannot - ;; find them, crashes. Users cannot add them back, the store being - ;; read-only, so we turn off background music altogether. - (lambda _ - (substitute* "src/audio.c" - (("PlayBackgroundMusic\\(new_track\\);" all) - (string-append "// " all))) - #t))))) - (native-inputs - (list intltool)) - (inputs - `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer))) - ("zlib" ,zlib))) + `(#:tests? #f ;no test + #:make-flags (list "CC=gcc" + (string-append "prefix=" + (assoc-ref %outputs "out"))) + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'fix-sdl-path + ;; XXX: For some reason, `sdl-config' reports stand-alone SDL + ;; directory, not SDL-union provided as an input to the package. + ;; We force the latter with "--prefix=" option. + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile" + (("sdl-config" command) + (string-append command " --prefix=" + (assoc-ref inputs "sdl")))) #t)) + (add-after 'unpack 'fix-crash + ;; XXX: Songs are not present in the repository, due to licensing + ;; issues. Yet, the game tries to load them, and, since it cannot + ;; find them, crashes. Users cannot add them back, the store being + ;; read-only, so we turn off background music altogether. + (lambda _ + (substitute* "src/audio.c" + (("PlayBackgroundMusic\\(new_track\\);" all) + (string-append "// " all))) #t))))) + (native-inputs (list intltool)) + (inputs `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer))) + ("zlib" ,zlib))) (home-page "https://gitlab.com/meritous/meritous") (synopsis "Action-adventure dungeon crawl game") - (description "Far below the surface of the planet is a place of limitless + (description + "Far below the surface of the planet is a place of limitless power. Those that seek to control such a utopia will soon bring an end to themselves. Seeking an end to the troubles that plague him, PSI user Merit journeys into the hallowed Orcus Dome in search of answers. diff --git a/gnu/packages/patches/meritous-fix-sdl-import.patch b/gnu/packages/patches/meritous-fix-sdl-import.patch new file mode 100644 index 0000000000..9f47199bd6 --- /dev/null +++ b/gnu/packages/patches/meritous-fix-sdl-import.patch @@ -0,0 +1,143 @@ +From 53ce1153924061b52b2892a730e1ffa71b0b6b2b Mon Sep 17 00:00:00 2001 +From: TakeV +Date: Thu, 23 Feb 2023 13:53:12 -0800 +Subject: [PATCH] Fix SDL paths for guix build + +--- + Makefile | 2 +- + src/audio.c | 4 ++-- + src/boss.c | 2 +- + src/demon.c | 4 ++-- + src/ending.c | 2 +- + src/gamemap.c | 2 +- + src/help.c | 2 +- + src/levelblit.c | 4 ++-- + src/save.c | 2 +- + 9 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/Makefile b/Makefile +index c48e460..d8f4fcd 100755 +--- a/Makefile ++++ b/Makefile +@@ -18,7 +18,7 @@ + # You should have received a copy of the GNU General Public License + # along with Meritous. If not, see . + # +-LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lz ++LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lpthread -lm + CCFLAGS = -O2 -Wall `sdl-config --cflags` -g + # + OBJS = src/levelblit.o \ +diff --git a/src/audio.c b/src/audio.c +index 0e86dd2..d0e8a58 100755 +--- a/src/audio.c ++++ b/src/audio.c +@@ -23,8 +23,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + #include + + #include "levelblit.h" +diff --git a/src/boss.c b/src/boss.c +index a1423cd..89e192a 100755 +--- a/src/boss.c ++++ b/src/boss.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + + #include "levelblit.h" + #include "mapgen.h" +diff --git a/src/demon.c b/src/demon.c +index e69ea70..8e4fd5e 100755 +--- a/src/demon.c ++++ b/src/demon.c +@@ -22,8 +22,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + #include + + #include "levelblit.h" +diff --git a/src/ending.c b/src/ending.c +index d759ab1..763d3e9 100755 +--- a/src/ending.c ++++ b/src/ending.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "levelblit.h" +diff --git a/src/gamemap.c b/src/gamemap.c +index 7c13bed..59cd47e 100755 +--- a/src/gamemap.c ++++ b/src/gamemap.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + + #include "levelblit.h" + #include "mapgen.h" +diff --git a/src/help.c b/src/help.c +index cecc3fd..d47aa5f 100755 +--- a/src/help.c ++++ b/src/help.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "levelblit.h" +diff --git a/src/levelblit.c b/src/levelblit.c +index edd3a35..9c43ec6 100755 +--- a/src/levelblit.c ++++ b/src/levelblit.c +@@ -24,8 +24,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + #include + + #include "mapgen.h" +diff --git a/src/save.c b/src/save.c +index d7818d9..5b1a881 100755 +--- a/src/save.c ++++ b/src/save.c +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "levelblit.h" +-- +2.39.2 +