gnu: cataclysm-dda: Update snapshot.

* gnu/packages/games.scm (cataclysm-dda): Update snapshot to ad3b0c3d5.
[source]: Use git-fetch and remove snippet.
[arguments]: Remove 'configure' phase.  Use 'invoke' in 'build-tiles' and
'install-tiles' phases.
This commit is contained in:
Kei Kebreau 2018-06-29 10:55:00 -04:00
parent 12a96d4d41
commit 529701aa01
No known key found for this signature in database
GPG Key ID: E6A5EE3C19467A0D
1 changed files with 64 additions and 76 deletions

View File

@ -177,54 +177,42 @@ settings to tweak as well.")
(license license:gpl2+))) (license license:gpl2+)))
(define-public cataclysm-dda (define-public cataclysm-dda
(let ((commit "ad3b0c3d521292d119f97a83390e7acfe9e9e7f7")
(revision "1"))
(package (package
(name "cataclysm-dda") (name "cataclysm-dda")
(version "0.C") ;; This denotes the version released after the 0.C release.
;; Revert to a normal version number if updating to stable version 0.D.
(version (git-version "0.C" revision commit))
(source (origin (source (origin
(method url-fetch) (method git-fetch)
(uri (string-append "https://github.com/CleverRaven/Cataclysm-DDA/" (uri (git-reference
"archive/" version ".tar.gz")) (url "https://github.com/CleverRaven/Cataclysm-DDA.git")
(file-name (string-append name "-" version ".tar.gz")) (commit commit)))
(sha256 (sha256
(base32 (base32
"1xlajmgl9cviqyjpp5g5q4rbljy9gqc49v54bi8gpzr68s14gsb9")) "1kdgbl8zqd53f5yilm2c9nyq3w6585yxl5jvgxy65dlpzxcqqj7y"))
(modules '((guix build utils))) (file-name (git-file-name name version))))
(snippet
;; Import cmath header for the std::pow function.
'(begin
(for-each (lambda (file)
(substitute* file
(("#include <math.h>")
"#include <cmath>")))
(find-files "src"))
#t))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1") "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1")
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'configure (delete 'configure)
(lambda _
(substitute* "Makefile"
(("ncursesw5-config") "ncursesw6-config")
(("RELEASE_FLAGS = -Werror") "RELEASE_FLAGS ="))
#t))
(add-after 'build 'build-tiles (add-after 'build 'build-tiles
(lambda* (#:key make-flags outputs #:allow-other-keys) (lambda* (#:key make-flags outputs #:allow-other-keys)
;; Change prefix directory and enable tile graphics and sound. ;; Change prefix directory and enable tile graphics and sound.
(zero? (apply invoke "make" "TILES=1" "SOUND=1"
(apply system* "make" "TILES=1" "SOUND=1" (string-append "PREFIX="
(assoc-ref outputs "tiles"))
(cdr make-flags))))
(add-after 'install 'install-tiles
(lambda* (#:key make-flags outputs #:allow-other-keys)
(apply invoke "make" "install" "TILES=1" "SOUND=1"
(string-append "PREFIX=" (string-append "PREFIX="
(assoc-ref outputs "tiles")) (assoc-ref outputs "tiles"))
(cdr make-flags))))) (cdr make-flags)))))
(add-after 'install 'install-tiles
(lambda* (#:key make-flags outputs #:allow-other-keys)
(zero?
(apply system* "make" "install" "TILES=1" "SOUND=1"
(string-append "PREFIX="
(assoc-ref outputs "tiles"))
(cdr make-flags))))))
;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native ;; TODO: Add libtap++ from https://github.com/cbab/libtappp as a native
;; input in order to support tests. ;; input in order to support tests.
#:tests? #f)) #:tests? #f))
@ -245,14 +233,14 @@ settings to tweak as well.")
(home-page "http://en.cataclysmdda.com/") (home-page "http://en.cataclysmdda.com/")
(synopsis "Survival horror roguelike video game") (synopsis "Survival horror roguelike video game")
(description (description
"Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. "Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic
Struggle to survive in a harsh, persistent, procedurally generated world. world. Struggle to survive in a harsh, persistent, procedurally generated
Scavenge the remnants of a dead civilization for food, equipment, or, if you are world. Scavenge the remnants of a dead civilization for food, equipment, or,
lucky, a vehicle with a full tank of gas to get you out of Dodge. Fight to if you are lucky, a vehicle with a full tank of gas to get you out of Dodge.
defeat or escape from a wide variety of powerful monstrosities, from zombies to Fight to defeat or escape from a wide variety of powerful monstrosities, from
giant insects to killer robots and things far stranger and deadlier, and against zombies to giant insects to killer robots and things far stranger and deadlier,
the others like yourself, that want what you have.") and against the others like yourself, that want what you have.")
(license license:cc-by-sa3.0))) (license license:cc-by-sa3.0))))
(define-public cowsay (define-public cowsay
(package (package