Archived
1
0
Fork 0

gnu: open-adventure: Improve package style.

* gnu/packages/games.scm (open-adventure)[arguments]: Use G-expressions.
<#:make-flags>: Be nicer with cross-compilation.
<#:phases>: Remove trailing #T.
[native-inputs]: Remove labels.  Re-order alphabetically.
This commit is contained in:
Nicolas Goaziou 2022-10-11 00:16:30 +02:00
parent 8fc86d1f6f
commit a01e7f09cb
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -6952,38 +6952,36 @@ at their peak of economic growth and military prowess.
(base32 "1n0fzrdlbc6px88qr574ww2q85xk43bv09jpmsskzv1l2cncwm37")))) (base32 "1n0fzrdlbc6px88qr574ww2q85xk43bv09jpmsskzv1l2cncwm37"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:make-flags (list "CC=gcc") (list
#:parallel-tests? #f ;some tests fail non-deterministically #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
#:phases #:parallel-tests? #f ;some tests fail non-deterministically
(modify-phases %standard-phases #:phases
(delete 'configure) ;no configure script #~(modify-phases %standard-phases
(add-before 'build 'use-echo (delete 'configure) ;no configure script
(lambda _ (add-before 'build 'use-echo
(substitute* (list "tests/Makefile" "tests/tapview") (lambda _
(("/bin/echo") (which "echo"))) (substitute* (list "tests/Makefile" "tests/tapview")
#t)) (("/bin/echo") (which "echo")))))
(add-after 'build 'build-manpage (add-after 'build 'build-manpage
(lambda _ (lambda _
;; This target is missing a dependency ;; This target is missing a dependency
(substitute* "Makefile" (substitute* "Makefile"
((".adoc.6:" line) ((".adoc.6:" line)
(string-append line " advent.adoc"))) (string-append line " advent.adoc")))
(invoke "make" ".adoc.6"))) (invoke "make" ".adoc.6")))
;; There is no install target. ;; There is no install target.
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (let ((bin (string-append #$output "/bin"))
(bin (string-append out "/bin")) (man (string-append #$output "/share/man/man6")))
(man (string-append out "/share/man/man6"))) (install-file "advent" bin)
(install-file "advent" bin) (install-file "advent.6" man)))))))
(install-file "advent.6" man))
#t)))))
(native-inputs (native-inputs
`(("asciidoc" ,asciidoc) (list asciidoc
("libedit" ,libedit) libedit
("pkg-config" ,pkg-config) pkg-config
("python" ,python-wrapper) python-pyyaml
("python-pyyaml" ,python-pyyaml))) python-wrapper))
(home-page "https://gitlab.com/esr/open-adventure") (home-page "https://gitlab.com/esr/open-adventure")
(synopsis "Colossal Cave Adventure") (synopsis "Colossal Cave Adventure")
(description (description