GNU bug report logs - #61768
[PATCH] gnu: packages: games: Add meritous v1.2

Previous Next

Package: guix-patches;

Reported by: TakeV <takev <at> disroot.org>

Date: Fri, 24 Feb 2023 18:57:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61768 in the body.
You can then email your comments to 61768 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#61768; Package guix-patches. (Fri, 24 Feb 2023 18:57:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to TakeV <takev <at> disroot.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 24 Feb 2023 18:57:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: TakeV <takev <at> disroot.org>
To: guix-patches <at> gnu.org
Cc: TakeV <takev <at> disroot.org>
Subject: [PATCH] gnu: packages: games: Add meritous v1.2
Date: Thu, 23 Feb 2023 19:47:13 -0800
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

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 <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022 Hendursaga <hendursaga <at> aol.com>
 ;;; Copyright © 2022 Parnikkapore <poomklao <at> yahoo.com>
+;;; Copyright © 2023 TakeV <takev <at> disroot.org>
 ;;;
 ;;; 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 <disroot.org>
+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 <http://www.gnu.org/licenses/>.
+ #
+-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 <stdlib.h>
+ #include <math.h>
+ #include <SDL.h>
+-#include <SDL_image.h>
+-#include <SDL_mixer.h>
++#include <SDL/SDL_image.h>
++#include <SDL/SDL_mixer.h>
+ #include <string.h>
+ 
+ #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 <math.h>
+ #include <time.h>
+ #include <SDL.h>
+-#include <SDL_image.h>
++#include <SDL/SDL_image.h>
+ 
+ #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 <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+-#include <SDL.h>
+-#include <SDL_image.h>
++#include <SDL/SDL.h>
++#include <SDL/SDL_image.h>
+ #include <assert.h>
+ 
+ #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 <stdlib.h>
+ #include <math.h>
+ #include <SDL.h>
+-#include <SDL_image.h>
++#include <SDL/SDL_image.h>
+ #include <assert.h>
+ 
+ #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 <stdlib.h>
+ #include <math.h>
+ #include <SDL.h>
+-#include <SDL_image.h>
++#include <SDL/SDL_image.h>
+ 
+ #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 <stdlib.h>
+ #include <math.h>
+ #include <SDL.h>
+-#include <SDL_image.h>
++#include <SDL/SDL_image.h>
+ #include <string.h>
+ 
+ #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 <string.h>
+ #include <math.h>
+ #include <time.h>
+-#include <SDL.h>
+-#include <SDL_image.h>
++#include <SDL/SDL.h>
++#include <SDL/SDL_image.h>
+ #include <assert.h>
+ 
+ #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 <stdlib.h>
+ #include <math.h>
+ #include <SDL.h>
+-#include <SDL_image.h>
++#include <SDL/SDL_image.h>
+ #include <zlib.h>
+ 
+ #include "levelblit.h"
+-- 
+2.39.2
+

base-commit: 5d10644371abd54d0edcd638691113f0a92de743
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#61768; Package guix-patches. (Fri, 24 Feb 2023 22:42:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: TakeV via Guix-patches via <guix-patches <at> gnu.org>
Cc: TakeV <takev <at> disroot.org>, 61768 <at> debbugs.gnu.org
Subject: Re: [bug#61768] [PATCH] gnu: packages: games: Add meritous v1.2
Date: Fri, 24 Feb 2023 23:41:16 +0100
Hello,

TakeV via Guix-patches via <guix-patches <at> gnu.org> writes:

> Fun game from a while back, decided to package it after I saw the source
> was gpl3.

Thank you but… I don't understand the point of your patch. Doesn't Guix
already ship with Meritous 1.5? What are the differences with your
package?

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#61768; Package guix-patches. (Fri, 24 Feb 2023 22:42:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#61768; Package guix-patches. (Thu, 02 Mar 2023 06:07:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: TakeV <takev <at> disroot.org>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>,
 TakeV via Guix-patches via <guix-patches <at> gnu.org>
Cc: 61768 <at> debbugs.gnu.org
Subject: Re: [bug#61768] [PATCH] gnu: packages: games: Add meritous v1.2
Date: Wed, 1 Mar 2023 16:37:57 -0800
Oops, I apparently did not search the repo first. My bad!

On 2/24/23 14:41, Nicolas Goaziou wrote:
> Hello,
>
> TakeV via Guix-patches via <guix-patches <at> gnu.org> writes:
>
>> Fun game from a while back, decided to package it after I saw the source
>> was gpl3.
> Thank you but… I don't understand the point of your patch. Doesn't Guix
> already ship with Meritous 1.5? What are the differences with your
> package?
>
> Regards,




Information forwarded to guix-patches <at> gnu.org:
bug#61768; Package guix-patches. (Thu, 02 Mar 2023 06:07:03 GMT) Full text and rfc822 format available.

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Sun, 05 Mar 2023 20:28:01 GMT) Full text and rfc822 format available.

Notification sent to TakeV <takev <at> disroot.org>:
bug acknowledged by developer. (Sun, 05 Mar 2023 20:28:02 GMT) Full text and rfc822 format available.

Message #22 received at 61768-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: TakeV <takev <at> disroot.org>
Cc: 61768-done <at> debbugs.gnu.org
Subject: Re: [bug#61768] [PATCH] gnu: packages: games: Add meritous v1.2
Date: Sun, 05 Mar 2023 21:27:02 +0100
Hello,

TakeV <takev <at> disroot.org> writes:

> Oops, I apparently did not search the repo first. My bad!

No worries. Closing the bug report.

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Apr 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.