summary refs log tree commit diff
path: root/gnu/packages/emulators.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-02-13 14:24:53 +0100
committerMarius Bakke <marius@gnu.org>2022-02-13 14:24:53 +0100
commit76b6bbdf232b4b82cdd23cfe0d81331a4fd2edec (patch)
tree0e6a57ba08b9c6f9f5cbcdc5b5d9daeea91e428d /gnu/packages/emulators.scm
parent1a5302435ff0d2822b823f5a6fe01faa7a85c629 (diff)
parente8af2ea63a7f497b8f8e19e206645109c0646e72 (diff)
downloadguix-76b6bbdf232b4b82cdd23cfe0d81331a4fd2edec.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/emulators.scm')
-rw-r--r--gnu/packages/emulators.scm194
1 files changed, 92 insertions, 102 deletions
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index b260ca38f7..9ec73bc11f 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1711,7 +1711,7 @@ This is a part of the TiLP project.")
 (define-public mame
   (package
     (name "mame")
-    (version "0.239")
+    (version "0.240")
     (source
      (origin
        (method git-fetch)
@@ -1720,7 +1720,7 @@ This is a part of the TiLP project.")
              (commit (apply string-append "mame" (string-split version #\.)))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "02by0pq0j8pi5dllk90g94nbszynp9wqg75bl5x8bqrc7h80a0dq"))
+        (base32 "141mj5kzafnbw6nqlc3ariwxqn8lq3s13dzypax6igpy4wfy75rm"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove bundled libraries.
@@ -1745,50 +1745,47 @@ 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
-         (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")))
-               ;; Install data.
-               (for-each (lambda (dir)
-                           (copy-recursively dir (string-append share "/" dir)))
-                         '("artwork" "bgfx" "ctrlr" "hash" "ini" "language"
-                           "plugins" "samples"))
-               (let ((keymaps (string-append share "/keymaps")))
-                 (for-each (lambda (file) (install-file file keymaps))
-                           (find-files "keymaps" ".*LINUX\\.map")))
-               (let ((fonts (string-append share "/fonts")))
-                 (install-file "uismall.bdf" fonts))
-               (when (file-exists? "mame64")
-                 (rename-file "mame64" "mame"))
-               (install-file "mame" (string-append out "/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")))
-               (install-file "docs/build/man/MAME.1" man)
-               (install-file "docs/build/texinfo/MAME.info" info))))
-         (add-after 'install 'install-ini-file
-           ;; Generate an ini file so as to set some directories (e.g., roms)
-           ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/".
-           ;;
-           ;; 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"))
-                    (ini (string-append share "/ini")))
-               (with-output-to-file (string-append ini "/mame.ini")
-                 (lambda _
-                   (format #t
-                           "inipath              $HOME/.mame;~a/ini~@
+      #~(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 _
+              (let ((share (string-append #$output "/share/mame")))
+                ;; Install data.
+                (for-each (lambda (dir)
+                            (copy-recursively dir (string-append share "/" dir)))
+                          '("artwork" "bgfx" "ctrlr" "hash" "ini" "language"
+                            "plugins" "samples"))
+                (let ((keymaps (string-append share "/keymaps")))
+                  (for-each (lambda (file) (install-file file keymaps))
+                            (find-files "keymaps" ".*LINUX\\.map")))
+                (let ((fonts (string-append share "/fonts")))
+                  (install-file "uismall.bdf" fonts))
+                (when (file-exists? "mame64")
+                  (rename-file "mame64" "mame"))
+                (install-file "mame" (string-append #$output "/bin")))))
+          (add-after 'install 'install-documentation
+            (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
+            ;; Generate an ini file so as to set some directories (e.g., roms)
+            ;; to a writable location, i.e., "$HOME/.mame/" and "$HOME/mame/".
+            ;;
+            ;; 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 _
+              (let* ((share (string-append #$output "/share/mame"))
+                     (ini (string-append share "/ini")))
+                (with-output-to-file (string-append ini "/mame.ini")
+                  (lambda _
+                    (format #t
+                            "inipath              $HOME/.mame;~a/ini~@
                             homepath             $HOME/mame~@
                             rompath              $HOME/mame/roms~@
                             samplepath           $HOME/mame/samples;~a/samples~@
@@ -1808,12 +1805,12 @@ This is a part of the TiLP project.")
                             state_directory      $HOME/.mame/sta~@
                             diff_directory       $HOME/.mame/diff~@
                             comment_directory    $HOME/.mame/comments~%"
-                           share share share share share share share share
-                           share)))
-               (with-output-to-file (string-append ini "/ui.ini")
-                 (lambda _
-                   (format #t
-                           "historypath          $HOME/mame/history~@
+                            share share share share share share share share
+                            share)))
+                (with-output-to-file (string-append ini "/ui.ini")
+                  (lambda _
+                    (format #t
+                            "historypath          $HOME/mame/history~@
                             categorypath         $HOME/mame/folders~@
                             cabinets_directory   $HOME/mame/cabinets~@
                             cpanels_directory    $HOME/mame/cpanel~@
@@ -1833,16 +1830,15 @@ This is a part of the TiLP project.")
                             icons_directory      $HOME/mame/icons~@
                             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")))
-               (mkdir-p desktop)
-               (with-output-to-file (string-append desktop "/mame.desktop")
-                 (lambda _
-                   (format #t
-                           "[Desktop Entry]~@
+          (add-after 'install 'install-desktop-file
+            (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 _
+                    (format #t
+                            "[Desktop Entry]~@
                            Name=mame~@
                            Comment=Multi-purpose emulation framework~@
                            Exec=~a~@
@@ -1851,7 +1847,7 @@ This is a part of the TiLP project.")
                            Type=Application~@
                            Categories=Game;Emulator;~@
                            Keywords=Game;Emulator;Arcade;~%"
-                           executable)))))))))
+                            executable)))))))))
     (native-inputs
      (list pkg-config
            python-sphinx
@@ -1907,51 +1903,45 @@ functions.  The source code to MAME serves as this documentation.")
          "1qc01a62p65qb6mwjfmxqsd6n3rglsfwrjhsp25nr7q54107n55l"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f                      ; No tests.
-       #:configure-flags (list
-                          (string-append "-DMAME_BIN=\""
-                                         (assoc-ref %build-inputs "mame")
-                                         "/bin/mame\"")
-                          (string-append "-DAPP_RES=\""
-                                         (assoc-ref %outputs "out")
-                                         "/share/gnome-arcade/\""))
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'fix-paths
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (pk 'cwd (getcwd))
-               (substitute* "../source/src/config.c"
-                 (("/usr/share") (string-append out "/share"))))
-             #t))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin"))
-                    (rom (string-append out "/share/gnome-arcade/data/rom"))
-                    (tile (string-append out "/share/gnome-arcade/data/tile")))
-               (mkdir-p bin)
-               (install-file "../gnome-arcade" bin)
-               (copy-recursively "../source/res"
-                                 (string-append out "/share/gnome-arcade/res"))
-               (mkdir-p rom)
-               (install-file "../source/data/rom/ROM.TXT" rom)
-               (mkdir-p tile)
-               (install-file "../source/data/tile/TILE.TXT" tile))
-             #t)))))
+     (list
+      #:tests? #f                       ; No tests.
+      #:configure-flags
+      #~(list
+         (string-append "-DMAME_BIN=\""
+                        #$(this-package-input "mame")
+                        "/bin/mame\"")
+         (string-append "-DAPP_RES=\"" #$output "/share/gnome-arcade/\""))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'fix-paths
+            (lambda _
+              (substitute* "../source/src/config.c"
+                (("/usr/share") (string-append #$output "/share")))))
+          (replace 'install
+            (lambda _
+              (let ((bin (string-append #$output "/bin"))
+                    (rom (string-append #$output
+                                        "/share/gnome-arcade/data/rom"))
+                    (tile (string-append #$output
+                                         "/share/gnome-arcade/data/tile")))
+                (mkdir-p bin)
+                (install-file "../gnome-arcade" bin)
+                (copy-recursively "../source/res"
+                                  (string-append #$output
+                                                 "/share/gnome-arcade/res"))
+                (mkdir-p rom)
+                (install-file "../source/data/rom/ROM.TXT" rom)
+                (mkdir-p tile)
+                (install-file "../source/data/tile/TILE.TXT" tile)))))))
     (native-inputs
      (list pkg-config))
     (inputs
-     `(("mame" ,mame)
-       ("gtk" ,gtk+)
-       ("libevdev" ,libevdev)
-       ("libvlc" ,vlc)
-       ("libarchive" ,libarchive)))
+     (list gtk+ libarchive libevdev mame vlc))
     (home-page "https://github.com/strippato/gnome-arcade")
     (synopsis "Minimal MAME frontend")
     (description
-     "A minimal GTK+ frontend for MAME, the multi-purpose arcade and console
-emulator.")
+     "Gnome Arcade is a minimal GTK+ frontend for MAME, the multi-purpose
+arcade and console emulator.")
     (license license:gpl3+)))
 
 (define-public pcsxr