* [bug#35127] [PATCH] Add meritous.
@ 2019-04-03 17:37 Nicolas Goaziou
2019-04-03 20:07 ` Ricardo Wurmus
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2019-04-03 17:37 UTC (permalink / raw)
To: 35127
[-- Attachment #1: Type: text/plain, Size: 134 bytes --]
Hello,
The following patch adds Meritous game. See comments for the usual
gotchas.
Feedback welcome.
Regards,
--
Nicolas Goaziou
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add meritous --]
[-- Type: text/x-diff, Size: 3527 bytes --]
From 72cb4a70ecc8e8f2688dec78ece29e434e04acd1 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Mon, 1 Apr 2019 21:36:44 +0200
Subject: [PATCH] gnu: Add meritous.
* gnu/packages/games.scm (meritous): New variable.
---
gnu/packages/games.scm | 60 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8207b92dc9..050ff657a1 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -6749,3 +6749,63 @@ exec ~a --data-path=~a/share/flare --mods=empyrean_campaign~%"
(description "Flare is a single-player 2D action RPG with
fast-paced action and a dark fantasy style.")
(license license:cc-by-sa3.0)))
+
+(define-public meritous
+ (package
+ (name "meritous")
+ (version "1.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/meritous/meritous.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "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
+ ;; XXX: Songs are removed due to licensing issues. However, 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))))))))
+ (native-inputs
+ `(("intltool" ,intltool)))
+ (inputs
+ `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))
+ ("zlib" ,zlib)))
+ ;; Original home page <http://asceai.net/meritous/> has stalled.
+ (home-page "https://gitlab.com/meritous/meritous")
+ (synopsis "Action-adventure dungeon crawl game")
+ (description "Far below the surface of the planet is a secret. 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.
+
+Meritous is a action-adventure game with simple controls but a challenge to
+find a balance of power verses recovery time during real-time battles. Set in
+a procedurally generated world, the player can explore thousands of rooms in
+search of powerful artifacts, tools to help them, and to eventually free the
+Orcus Dome from evil.")
+ (license license:gpl3+)))
--
2.21.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#35127] [PATCH] Add meritous.
2019-04-03 17:37 [bug#35127] [PATCH] Add meritous Nicolas Goaziou
@ 2019-04-03 20:07 ` Ricardo Wurmus
2019-04-04 9:24 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2019-04-03 20:07 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 35127
Hi Nicolas,
> + (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))
Hmm, weird. Do you know why this happens? Is this something we can fix
in sdl-union?
> + (add-after 'unpack 'fix
> + ;; XXX: Songs are removed due to licensing issues. However, 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.
Oh :(
Where are the songs removed? Should they be removed in a snippet?
> + (lambda _
> + (substitute* "src/audio.c"
> + (("PlayBackgroundMusic\\(new_track\\);" all)
> + (string-append "// " all))))))))
Please end with #T.
> + (native-inputs
> + `(("intltool" ,intltool)))
> + (inputs
> + `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))
> + ("zlib" ,zlib)))
> + ;; Original home page <http://asceai.net/meritous/> has stalled.
I don’t think “stalled” is the right term. I think you can remove this
comment. The gitlab page is fine as a home page.
> + (description "Far below the surface of the planet is a secret. A place of
> +limitless power.
How about “a secret place of limitless power”? (“is a secret” sounds
odd to me.)
> +Meritous is a action-adventure game with simple controls but a challenge to
> +find a balance of power verses recovery time during real-time
> battles.
Should be “versus”.
--
Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#35127] [PATCH] Add meritous.
2019-04-03 20:07 ` Ricardo Wurmus
@ 2019-04-04 9:24 ` Nicolas Goaziou
2019-04-04 10:24 ` Ricardo Wurmus
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2019-04-04 9:24 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 35127
Hello,
Thank you for the review.
Ricardo Wurmus <rekado@elephly.net> writes:
>> + (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))
>
> Hmm, weird. Do you know why this happens? Is this something we can fix
> in sdl-union?
The Makefile uses "$(shell sdl-config --libs)" (see
<https://gitlab.com/meritous/meritous/blob/master/Makefile>). I tried to
replace the sdl-config executable with its full path, i.e.,
(string-append (assoc-ref inputs "sdl") "/bin/sdl-config"), to no avail.
Is there a problem in sdl-union? Is the `shell' call the issue? I don't
know.
>> + (add-after 'unpack 'fix
^^^
I replaced that with 'fix-crash
>> + ;; XXX: Songs are removed due to licensing issues. However, 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.
>
> Oh :(
>
> Where are the songs removed? Should they be removed in a snippet?
The songs are not in the repository. See
<https://gitlab.com/meritous/meritous/blob/master/dat/m/README-music.txt>
Yet, the game tries to find them, and, AFAICT, crashes when it fails.
They could be replaced with free music, but I don't think it has been
done in any distribution.
Also, this is just for background music. The game still provides ambient
sounds.
For clarity, I reworded the comment a bit:
;; 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))))))))
>
> Please end with #T.
Oops. Done.
>> + (native-inputs
>> + `(("intltool" ,intltool)))
>> + (inputs
>> + `(("sdl" ,(sdl-union (list sdl sdl-image sdl-mixer)))
>> + ("zlib" ,zlib)))
>> + ;; Original home page <http://asceai.net/meritous/> has stalled.
>
> I don’t think “stalled” is the right term. I think you can remove this
> comment. The gitlab page is fine as a home page.
OK.
>> + (description "Far below the surface of the planet is a secret. A place of
>> +limitless power.
>
> How about “a secret place of limitless power”? (“is a secret” sounds
> odd to me.)
>
>> +Meritous is a action-adventure game with simple controls but a challenge to
>> +find a balance of power verses recovery time during real-time
>> battles.
>
> Should be “versus”.
OK. I will fix those before pushing.
WDYT?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#35127] [PATCH] Add meritous.
2019-04-04 9:24 ` Nicolas Goaziou
@ 2019-04-04 10:24 ` Ricardo Wurmus
2019-04-04 12:51 ` bug#35127: " Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2019-04-04 10:24 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: 35127
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
[…]
> OK. I will fix those before pushing.
>
> WDYT?
Thanks for the clarifications. You can push this with these changes.
Thank you!
--
Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#35127: [PATCH] Add meritous.
2019-04-04 10:24 ` Ricardo Wurmus
@ 2019-04-04 12:51 ` Nicolas Goaziou
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2019-04-04 12:51 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 35127-done
Hello,
Ricardo Wurmus <rekado@elephly.net> writes:
> Thanks for the clarifications. You can push this with these changes.
Pushed as 660e00507e308cdfe0bab681d95dc2cc07000b80. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-04 12:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 17:37 [bug#35127] [PATCH] Add meritous Nicolas Goaziou
2019-04-03 20:07 ` Ricardo Wurmus
2019-04-04 9:24 ` Nicolas Goaziou
2019-04-04 10:24 ` Ricardo Wurmus
2019-04-04 12:51 ` bug#35127: " Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.