me
/
guix
Archived
1
0
Fork 0

gnu: mame: Use G-expressions.

* gnu/packages/emulators.scm (mame)[arguments]<#:phases>: Use G-expressions.
master
Nicolas Goaziou 2022-02-07 18:33:22 +01:00
parent 6f1b57ef43
commit 89d928f412
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 57 additions and 61 deletions

View File

@ -1745,15 +1745,14 @@ This is a part of the TiLP project.")
"pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib")))
#:tests? #f ;no test in regular release
#:phases
`(modify-phases %standard-phases
#~(modify-phases %standard-phases
(delete 'configure)
(add-after 'build 'build-documentation
(lambda _ (invoke "make" "-C" "docs" "man" "info")))
(replace 'install
;; Upstream does not provide an installation phase.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share/mame")))
(lambda _
(let ((share (string-append #$output "/share/mame")))
;; Install data.
(for-each (lambda (dir)
(copy-recursively dir (string-append share "/" dir)))
@ -1766,12 +1765,11 @@ This is a part of the TiLP project.")
(install-file "uismall.bdf" fonts))
(when (file-exists? "mame64")
(rename-file "mame64" "mame"))
(install-file "mame" (string-append out "/bin")))))
(install-file "mame" (string-append #$output "/bin")))))
(add-after 'install 'install-documentation
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man/man1"))
(info (string-append out "/share/info")))
(lambda _
(let ((man (string-append #$output "/share/man/man1"))
(info (string-append #$output "/share/info")))
(install-file "docs/build/man/MAME.1" man)
(install-file "docs/build/texinfo/MAME.info" info))))
(add-after 'install 'install-ini-file
@ -1781,9 +1779,8 @@ This is a part of the TiLP project.")
;; XXX: We need to insert absolute references to the store. It can
;; be an issue if they leak into user's home directory, e.g., with
;; "mame -createconfig" and the package is later GC'ed.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(share (string-append out "/share/mame"))
(lambda _
(let* ((share (string-append #$output "/share/mame"))
(ini (string-append share "/ini")))
(with-output-to-file (string-append ini "/mame.ini")
(lambda _
@ -1834,10 +1831,9 @@ This is a part of the TiLP project.")
covers_directory $HOME/mame/covers~@
ui_path $HOME/.mame/ui~%"))))))
(add-after 'install 'install-desktop-file
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(desktop (string-append out "/share/applications"))
(executable (string-append out "/bin/mame")))
(lambda _
(let ((desktop (string-append #$output "/share/applications"))
(executable (string-append #$output "/bin/mame")))
(mkdir-p desktop)
(with-output-to-file (string-append desktop "/mame.desktop")
(lambda _