gnu: cataclysm-dda: Improve package style.

* gnu/packages/games.scm (cataclysm-dda)[arguments]: Use G-expressions.
[native-inputs]: Remove labels. Re-order alphabetically.
This commit is contained in:
Nicolas Goaziou 2023-03-09 13:26:28 +01:00
parent f7682c2475
commit ad64874753
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -954,43 +954,40 @@ (define-public cataclysm-dda
(file-name (git-file-name name version)))) (file-name (git-file-name name version))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:make-flags (list
(list (string-append "PREFIX=" (assoc-ref %outputs "out")) #:make-flags
"USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1" #~(list (string-append "PREFIX=" #$output)
"LOCALIZE=1" "LANGUAGES=all") "USE_HOME_DIR=1" "DYNAMIC_LINKING=1" "RELEASE=1"
#:phases "LOCALIZE=1" "LANGUAGES=all")
(modify-phases %standard-phases #:phases
(delete 'configure) #~(modify-phases %standard-phases
;; Apparently we can't do make on both tiles and a console version at (delete 'configure)
;; the same time anymore, so we have to either "make clean" between ;; Apparently we can't do make on both tiles and a console version at
;; builds or do some other hackery. See: ;; the same time anymore, so we have to either "make clean" between
;; https://github.com/CleverRaven/Cataclysm-DDA/issues/42598#issuecomment-667702746 ;; builds or do some other hackery. See:
(add-after 'install 'make-clean-pre-tiles ;; https://github.com/CleverRaven/Cataclysm-DDA/issues/42598#issuecomment-667702746
(lambda* (#:key make-flags outputs #:allow-other-keys) (add-after 'install 'make-clean-pre-tiles
;; Change prefix directory and enable tile graphics and sound. (lambda* (#:key make-flags outputs #:allow-other-keys)
(invoke "make" "clean"))) ;; Change prefix directory and enable tile graphics and sound.
(add-after 'make-clean-pre-tiles 'build-tiles (invoke "make" "clean")))
(lambda* (#:key make-flags outputs #:allow-other-keys) (add-after 'make-clean-pre-tiles 'build-tiles
;; Change prefix directory and enable tile graphics and sound. (lambda* (#:key make-flags outputs #:allow-other-keys)
(apply invoke "make" "TILES=1" "SOUND=1" ;; Change prefix directory and enable tile graphics and sound.
(string-append "PREFIX=" (apply invoke "make" "TILES=1" "SOUND=1"
(assoc-ref outputs "tiles")) (string-append "PREFIX=" #$output:tiles)
(cdr make-flags)))) (cdr make-flags))))
(add-after 'build-tiles 'install-tiles (add-after 'build-tiles 'install-tiles
(lambda* (#:key make-flags outputs #:allow-other-keys) (lambda* (#:key make-flags outputs #:allow-other-keys)
(apply invoke "make" "install" "TILES=1" "SOUND=1" (apply invoke "make" "install" "TILES=1" "SOUND=1"
(string-append "PREFIX=" (string-append "PREFIX=" #$output:tiles)
(assoc-ref outputs "tiles")) (cdr make-flags)))))
(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))
(outputs '("out" (outputs '("out"
"tiles")) ;for tile graphics and sound support "tiles")) ;for tile graphics and sound support
(native-inputs (native-inputs
`(("gettext" ,gettext-minimal) (list astyle gettext-minimal pkg-config))
("pkg-config" ,pkg-config)
("astyle" ,astyle)))
(inputs (inputs
(list freetype (list freetype
libogg libogg