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