GNU bug report logs - #26737
[PATCH] gnu: Add cataclysm-dda.

Previous Next

Package: guix-patches;

Reported by: Kei Kebreau <kei <at> openmailbox.org>

Date: Mon, 1 May 2017 17:22:01 UTC

Severity: normal

Tags: patch

Done: Kei Kebreau <kei <at> openmailbox.org>

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 26737 in the body.
You can then email your comments to 26737 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#26737; Package guix-patches. (Mon, 01 May 2017 17:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kei Kebreau <kei <at> openmailbox.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 01 May 2017 17:22:02 GMT) Full text and rfc822 format available.

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

From: Kei Kebreau <kei <at> openmailbox.org>
To: guix-patches <at> gnu.org
Cc: Kei Kebreau <kei <at> openmailbox.org>
Subject: [PATCH] gnu: Add cataclysm-dda.
Date: Mon,  1 May 2017 13:20:40 -0400
* gnu/packages/games.scm (cataclysm-dda): New variable.
---
 gnu/packages/games.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index b31bb93db..90f84e441 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -126,6 +126,54 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system trivial))
 
+(define-public cataclysm-dda
+  (package
+    (name "cataclysm-dda")
+    (version "0.C")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/CleverRaven/Cataclysm-DDA/"
+                                  "archive/" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1xlajmgl9cviqyjpp5g5q4rbljy9gqc49v54bi8gpzr68s14gsb9"))
+              (modules '((guix build utils)))
+              ;; Import cmath header for the std::pow function.
+              (snippet
+               '(for-each (lambda (file)
+                            (substitute* file
+                              (("#include <math.h>")
+                               "#include <cmath>")))
+                          (find-files "src")))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+                          "USE_HOME_DIR=1" "DYNAMIC_LINKING=1")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda _
+             (substitute* "Makefile"
+               (("ncursesw5-config") "ncursesw6-config"))
+             #t)))
+       ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
+       ;;       input in order to support tests.
+       #:tests? #f))
+    (inputs
+     `(("ncurses" ,ncurses)))
+    (home-page "http://en.cataclysmdda.com/")
+    (synopsis "Survival horror roguelike video game")
+    (description
+     "Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.
+Struggle to survive in a harsh, persistent, procedurally generated world.
+Scavenge the remnants of a dead civilization for food, equipment, or, if you are
+lucky, a vehicle with a full tank of gas to get you out of Dodge.  Fight to
+defeat or escape from a wide variety of powerful monstrosities, from zombies to
+giant insects to killer robots and things far stranger and deadlier, and against
+the others like yourself, that want what you have.")
+    (license license:cc-by-sa3.0)))
+
 (define-public freedoom
   (package
    (name "freedoom")
-- 
2.12.2





Information forwarded to guix-patches <at> gnu.org:
bug#26737; Package guix-patches. (Sat, 27 May 2017 19:38:01 GMT) Full text and rfc822 format available.

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

From: Kei Kebreau <kei <at> openmailbox.org>
To: 26737 <at> debbugs.gnu.org
Subject: Making sure that comments can be made
Date: Sat, 27 May 2017 15:37:27 -0400
[Message part 1 (text/plain, inline)]
Can I commit this (note: I will enable the release build, which
optimizes for size)? And for games with both ncurses and SDL tiles
interfaces, should the two interfaces be separate outputs or separate
packages all together?

TIA,
Kei
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26737; Package guix-patches. (Sun, 28 May 2017 17:43:01 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Kei Kebreau <kei <at> openmailbox.org>, 26737 <at> debbugs.gnu.org
Subject: Re: bug#26737: Making sure that comments can be made
Date: Sun, 28 May 2017 19:42:47 +0200
[Message part 1 (text/plain, inline)]
Kei Kebreau <kei <at> openmailbox.org> writes:

> Can I commit this (note: I will enable the release build, which
> optimizes for size)? And for games with both ncurses and SDL tiles
> interfaces, should the two interfaces be separate outputs or separate
> packages all together?

Since there has been no feedback for a month, I think you can go ahead
and commit it (see HACKING).

I do find the s/<math.h>/<cmath> substitution a bit odd. Is there an
upstream issue about it? I think we should do that in a phase instead,
since it's apparently not a problem with other compilers(?).

Different outputs is generally better than separate packages, but I
guess it depends on the case.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26737; Package guix-patches. (Tue, 30 May 2017 18:15:01 GMT) Full text and rfc822 format available.

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

From: Kei Kebreau <kei <at> openmailbox.org>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 26737 <at> debbugs.gnu.org
Subject: Re: bug#26737: Making sure that comments can be made
Date: Tue, 30 May 2017 14:13:50 -0400
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Kei Kebreau <kei <at> openmailbox.org> writes:
>
>> Can I commit this (note: I will enable the release build, which
>> optimizes for size)? And for games with both ncurses and SDL tiles
>> interfaces, should the two interfaces be separate outputs or separate
>> packages all together?
>
> Since there has been no feedback for a month, I think you can go ahead
> and commit it (see HACKING).
>
> I do find the s/<math.h>/<cmath> substitution a bit odd. Is there an
> upstream issue about it? I think we should do that in a phase instead,
> since it's apparently not a problem with other compilers(?).
>

Long story short, standards-compliant C++ code that needs
C-standard-compatibile functions uses either:

* <c[header]> and std namespace function names or
* <[header].h> and global namespace function names.

This program tries to mix and match these methods. While it may work
with other compilers, this code isn't guaranteed to work with the C++
standard. As a result, either <math.h> is replaced with <cmath> or
functions like std::pow are replaced with ::pow. I simply chose the former.

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf#section.D.5

> Different outputs is generally better than separate packages, but I
> guess it depends on the case.

I'll experiment with this some time soon, then.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Kei Kebreau <kei <at> openmailbox.org>:
You have taken responsibility. (Sat, 03 Jun 2017 23:16:02 GMT) Full text and rfc822 format available.

Notification sent to Kei Kebreau <kei <at> openmailbox.org>:
bug acknowledged by developer. (Sat, 03 Jun 2017 23:16:03 GMT) Full text and rfc822 format available.

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

From: Kei Kebreau <kei <at> openmailbox.org>
To: bug#26737 <26737-done <at> debbugs.gnu.org>
Subject: Re: Status: [PATCH] gnu: Add cataclysm-dda.
Date: Sat, 03 Jun 2017 19:15:17 -0400
[Message part 1 (text/plain, inline)]
bug#26737 <26737 <at> debbugs.gnu.org> writes:

> retitle 26737 [PATCH] gnu: Add cataclysm-dda.
> reassign 26737 guix-patches
> submitter 26737 Kei Kebreau <kei <at> openmailbox.org>
> severity 26737 normal
> tag 26737 patch
>
> thanks

Pushed to master as 20214f71157074406c19f4d29228eed79938b97d.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Jul 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 298 days ago.

Previous Next


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