unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26737: [PATCH] gnu: Add cataclysm-dda.
@ 2017-05-01 17:20 Kei Kebreau
  2017-05-27 19:37 ` bug#26737: Making sure that comments can be made Kei Kebreau
  2017-06-03 23:15 ` bug#26737: Status: [PATCH] gnu: Add cataclysm-dda Kei Kebreau
  0 siblings, 2 replies; 5+ messages in thread
From: Kei Kebreau @ 2017-05-01 17:20 UTC (permalink / raw)
  To: 26737; +Cc: Kei Kebreau

* 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#26737: Making sure that comments can be made
  2017-05-01 17:20 bug#26737: [PATCH] gnu: Add cataclysm-dda Kei Kebreau
@ 2017-05-27 19:37 ` Kei Kebreau
  2017-05-28 17:42   ` Marius Bakke
  2017-06-03 23:15 ` bug#26737: Status: [PATCH] gnu: Add cataclysm-dda Kei Kebreau
  1 sibling, 1 reply; 5+ messages in thread
From: Kei Kebreau @ 2017-05-27 19:37 UTC (permalink / raw)
  To: 26737

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#26737: Making sure that comments can be made
  2017-05-27 19:37 ` bug#26737: Making sure that comments can be made Kei Kebreau
@ 2017-05-28 17:42   ` Marius Bakke
  2017-05-30 18:13     ` Kei Kebreau
  0 siblings, 1 reply; 5+ messages in thread
From: Marius Bakke @ 2017-05-28 17:42 UTC (permalink / raw)
  To: Kei Kebreau, 26737

[-- Attachment #1: Type: text/plain, Size: 677 bytes --]

Kei Kebreau <kei@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#26737: Making sure that comments can be made
  2017-05-28 17:42   ` Marius Bakke
@ 2017-05-30 18:13     ` Kei Kebreau
  0 siblings, 0 replies; 5+ messages in thread
From: Kei Kebreau @ 2017-05-30 18:13 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 26737

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> Kei Kebreau <kei@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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#26737: Status: [PATCH] gnu: Add cataclysm-dda.
  2017-05-01 17:20 bug#26737: [PATCH] gnu: Add cataclysm-dda Kei Kebreau
  2017-05-27 19:37 ` bug#26737: Making sure that comments can be made Kei Kebreau
@ 2017-06-03 23:15 ` Kei Kebreau
  1 sibling, 0 replies; 5+ messages in thread
From: Kei Kebreau @ 2017-06-03 23:15 UTC (permalink / raw)
  To: bug#26737

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

bug#26737 <26737@debbugs.gnu.org> writes:

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

Pushed to master as 20214f71157074406c19f4d29228eed79938b97d.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-03 23:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-01 17:20 bug#26737: [PATCH] gnu: Add cataclysm-dda Kei Kebreau
2017-05-27 19:37 ` bug#26737: Making sure that comments can be made Kei Kebreau
2017-05-28 17:42   ` Marius Bakke
2017-05-30 18:13     ` Kei Kebreau
2017-06-03 23:15 ` bug#26737: Status: [PATCH] gnu: Add cataclysm-dda Kei Kebreau

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).