summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKei Kebreau <kei@openmailbox.org>2017-05-01 13:16:04 -0400
committerKei Kebreau <kei@openmailbox.org>2017-06-03 18:29:43 -0400
commit20214f71157074406c19f4d29228eed79938b97d (patch)
treed21d21280b0c5c0796e5d025a15902b94d923a26
parent8d2832e3f4a8af79198c23da46259d5808f99986 (diff)
gnu: Add cataclysm-dda.
* gnu/packages/games.scm (cataclysm-dda): New variable.
-rw-r--r--gnu/packages/games.scm76
1 files changed, 76 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index ec200250b98..9153a2b5cf8 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -136,6 +136,82 @@
136 #:use-module (guix build-system cmake) 136 #:use-module (guix build-system cmake)
137 #:use-module (guix build-system trivial)) 137 #:use-module (guix build-system trivial))
138 138
139(define-public cataclysm-dda
140 (package
141 (name "cataclysm-dda")
142 (version "0.C")
143 (source (origin
144 (method url-fetch)
145 (uri (string-append "https://github.com/CleverRaven/Cataclysm-DDA/"
146 "archive/" version ".tar.gz"))
147 (file-name (string-append name "-" version ".tar.gz"))
148 (sha256
149 (base32
150 "1xlajmgl9cviqyjpp5g5q4rbljy9gqc49v54bi8gpzr68s14gsb9"))
151 (modules '((guix build utils)))
152 (snippet
153 ;; Import cmath header for the std::pow function.
154 '(for-each (lambda (file)
155 (substitute* file
156 (("#include <math.h>")
157 "#include <cmath>")))
158 (find-files "src")))))
159 (build-system gnu-build-system)
160 (arguments
161 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
162 "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1")
163 #:phases
164 (modify-phases %standard-phases
165 (replace 'configure
166 (lambda _
167 (substitute* "Makefile"
168 (("ncursesw5-config") "ncursesw6-config")
169 (("RELEASE_FLAGS = -Werror") "RELEASE_FLAGS ="))
170 #t))
171 (add-after 'build 'build-tiles
172 (lambda* (#:key make-flags outputs #:allow-other-keys)
173 ;; Change prefix directory and enable tile graphics and sound.
174 (zero?
175 (apply system* "make" "TILES=1" "SOUND=1"
176 (string-append "PREFIX="
177 (assoc-ref outputs "tiles"))
178 (cdr make-flags)))))
179 (add-after 'install 'install-tiles
180 (lambda* (#:key make-flags outputs #:allow-other-keys)
181 (zero?
182 (apply system* "make" "install" "TILES=1" "SOUND=1"
183 (string-append "PREFIX="
184 (assoc-ref outputs "tiles"))
185 (cdr make-flags))))))
186 ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
187 ;; input in order to support tests.
188 #:tests? #f))
189 (outputs '("out"
190 "tiles")) ; For tile graphics and sound support.
191 (native-inputs
192 `(("gettext" ,gettext-minimal)
193 ("pkg-config" ,pkg-config)))
194 (inputs
195 `(("freetype" ,freetype)
196 ("libogg" ,libogg)
197 ("libvorbis" ,libvorbis)
198 ("ncurses" ,ncurses)
199 ("sdl2" ,sdl2)
200 ("sdl2-image", sdl2-image)
201 ("sdl2-ttf" ,sdl2-ttf)
202 ("sdl2-mixer" ,sdl2-mixer)))
203 (home-page "http://en.cataclysmdda.com/")
204 (synopsis "Survival horror roguelike video game")
205 (description
206 "Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.
207Struggle to survive in a harsh, persistent, procedurally generated world.
208Scavenge the remnants of a dead civilization for food, equipment, or, if you are
209lucky, a vehicle with a full tank of gas to get you out of Dodge. Fight to
210defeat or escape from a wide variety of powerful monstrosities, from zombies to
211giant insects to killer robots and things far stranger and deadlier, and against
212the others like yourself, that want what you have.")
213 (license license:cc-by-sa3.0)))
214
139(define-public freedoom 215(define-public freedoom
140 (package 216 (package
141 (name "freedoom") 217 (name "freedoom")