[PATCH] gnu: Add cataclysm-dda.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kei Kebreau
  • Marius Bakke
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 8 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170501172040.12350-1-kei@openmailbox.org
* gnu/packages/games.scm (cataclysm-dda): New variable.
---
gnu/packages/games.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (61 lines)
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
Kei Kebreau wrote 8 years ago
Making sure that comments can be made
(address . 26737@debbugs.gnu.org)
874lw6drbc.fsf@openmailbox.org
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlkp1XgACgkQ5qXuPBlG
eg0wpg/9F+MZrTno9mkFNrnXG1zv1Agkz6sk0631A4g3eO0AqApbxfaSpD8pyvg8
9bOeXRNN0mq84CRXVUrIIw4ijvBA5D6uxXs6CaMMD1Y1Pvj5IBHMjE9ooZ1t0c3L
6oxN6w1AXQIplzS1EhgNLnu0aLkqujP48egdoh7tKWzO8Hy/btjwbvWw3wXXgYq/
7sAN6n4GwN2WO1UK4vSw7KRFlZ5H0QJwxjSyfGZ87SI71nlZXAfASgDWDytoKCVr
1rA6n6BPq86p5PDDWpiTWwfuAc9MMspUhnR5VJzUUAYjXdTf+wAK4QM3HsasqoGP
sHIj4rEr+8a3lN90QywNHrHc+L25ioEUdzLhBTO8nu5wdHwYBwZ6lGOeSRfa7ucX
78aY/PWye0MYBrUQuuRvRLPjyrYsEo6AwJ1gOmPdvPdQFXM4cw/Erm760T8FDsyW
EfYgLNrn46nYjVoZ1ROMK8mb92f4C2brxpjF/8nu9b2FNNbp6fohJh1ljXUfuxGr
r3xk9pB2qQ4fsQg264q6ZI0XQH7TQy/jdLkDrYo6LvFK+3WzSZbyAYRip+KeKpBG
CZzF7rgY/czWREfNQNz8xwKf7XY6tQyeewa3eDjrFJ/vJH26hnJEEInjm+X01KvT
ccOsy6P3zm0yIVVHBq0LI1OAF71YpWyfIhw64oA314D0aYIxxGQ=
=9MvJ
-----END PGP SIGNATURE-----

Marius Bakke wrote 8 years ago
87inkkg9ns.fsf@fastmail.com
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (5 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkrDBcACgkQoqBt8qM6
VPp2tAf+JL+8YfXSbr2xsEt/cdUJnM49ROeYGebtKvs0PnQ1M4NQFXTQMJcdxQ5n
oPlBTWu4xKALfYYe9lCjRKf7ES4CuhXtV489I+0HetrGxXCvcJyJeAlM7AgFbTv4
kA8tB6LfyBMpi1toJyDxmgd54pWQPgrS+UVPM6h3/ya6O2byDzsg3llIheI/cZII
lUmFcQ1UBPDl651P0CdxpZPSuSF5N0ZjNcbgWBQu67dVJP2kOZcUVJHkA/Fm0jRH
v45+9jPZuoVfGRN7hZgEdRjOsgy4i/F+kqt6iq9FhOsdKcOjDirDR2/v2cvLzKG0
j8f7RfNbLTWjYp0hYfh2ckwQmVK6Gw==
=TVtN
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 26737@debbugs.gnu.org)
87y3temcv5.fsf@openmailbox.org
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (15 lines)
> 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.


Toggle quote (3 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlkttl4ACgkQ5qXuPBlG
eg2dlQ//eWTlKWIgINk6IqAfpv/JWgaFiuQI72ib9c5Ha4gJE5ynASZPaFLoWuFu
5e22g4RLzjBcuWDekeKAk1kppqiZr/DajR2w0QmCXYnApDgBNX8vZPNa0wODR0Dp
n6GSIDC5WpC/V+B2Eb64Alzd0ClabLfBWMtepA1PNeMbaKC8tAbzPXBiLJVrFyN0
6WPkLQ2fmFnkn9UJtA8VUYtCN0jo7RqNh7Qamlwrt+6eTJrB5ygfosvrVcJfTmTI
uoKE8EeUECS7YwVyE7p8xre21LdlTdjcT9TgGfKYcduvYjGBdX8HSPXHWo/SPQZR
nnmHBAQTh5A8qz8xES09ELfAeEI1jo5uPY5YqgGbIFDozsjt1MFDGpuih4W4lMg9
W43frzA/bLSqWXmt648fXZ9EcC9cyS9WmOLFW2vwsvTSeH/VPsiGSOtbqMt1I/ZA
u81l8/ap2IbvrVaKqhE7uH3Uxkeo7q+WqFQnyo5LRUb9ikzyUUd9OcmTmcjd8/KT
c/OV/3ihBVdGAmoIxzkO9NGwWCNcPvaxaNbhaeemA6kUsIuaid2AhRNEC8J2kcMa
0ON2RZ7P8ulOkfl7LFC89JPsaPgQwpUQMg0ugI/XAJPaR7f5kh7mLLUtNeiZsGda
BBduIJ+G7a/FZdRODx3GQE8Xh1bZLpFHCkPcAEbRSbCkugKQpMA=
=mlTi
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
Re: Status: [PATCH] gnu: Add cataclysm-dda.
(name . bug#26737)(address . 26737-done@debbugs.gnu.org)
87a85omzne.fsf@openmailbox.org
bug#26737 <26737@debbugs.gnu.org> writes:

Toggle quote (8 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlkzQwYACgkQ5qXuPBlG
eg2z6RAAk/6voOSuzc6Y1uMvI37z4SEO5fUOeYiPiZOvmSNwG6qqKqvHlYUcrIFu
MRqUHb3YFgEyfXIyQKgf5+0Az8AG6OaUezz1Tyax31Jnz9TraSuX1VpdAaGbxv3M
+iIKUdk81BNX5pDZMLxuzyeQDQ5HgeI7RRcdSMtlZfvmMn1wkQizDGd4E1D8UrzE
eKmDnopAc4NMhoKrCJ9lK+HHZh/PzI1ykpnPn6GkEYyQFmFx4ukqomwGltHhawVL
FfGBN9TMEL9ArkmPnW5tbBPfpim8vI7kF2QsdxkewMG5QWvENjtym3zLJuKBWRB0
r9g14JzdIvSDTfWFuVE5midTPew57jGR8w1v2A5+Q40Ule7BD4VXNgdbWJDCW+oT
DzXpqdtxjYzuXYU2BU94eN7mJ+MKinHtFuoFVcN0huWsCvFB/D9qq5UX+qu2j09S
KL8T7kKiq4NQtqiDcC8C3g7iGM0qHn2UBV4FxQGR0/3X+b1bfEpaE3LMXdqv5xcZ
BBN6zjTltYymq8OcPLhvNUeILZbD3PULpQGvsq7qrhYC6HM+XZ3f/CIkS7hyEoo8
BonQ4CTpPLy3ks54snLZs6zlsyzWX3V6HiRyrduP8LwGlPvwj7JaJar+S/lX41YU
YjBhMSifcJzdd5ROeDoRLfuDMKE5gh23eHPByDtSrlGLveSLUgM=
=RwLK
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 26737@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 26737
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help