all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 62724@debbugs.gnu.org
Subject: [bug#62724] [PATCH v3] gnu: mame: Update to 0.253.
Date: Wed, 12 Apr 2023 19:41:47 +0200	[thread overview]
Message-ID: <20230412174147.930153-1-mail@nicolasgoaziou.fr> (raw)
In-Reply-To: <20230408101422.781587-1-mail@nicolasgoaziou.fr>

* gnu/packages/emulators.scm (mame): Update to 0.253.
[source]: Add modules for CUT and SCANDIR.  Preserve the minimum set of
third-party libraries.
[arguments]<#:make-flags>: Remove unnecessary flags.
<#:phases>: Add a phase to use all possible system libraries instead of
listing them piece wise.
[native-inputs]: Add NASM.
---

v3: Preserve nanosvg directory.  Add a phase to fix a build issue with sol2.

 gnu/packages/emulators.scm | 53 ++++++++++++++++++++++++++------------
 1 file changed, 36 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 7e73b217ea..31ebc9883a 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1759,7 +1759,7 @@ (define-public libticalcs2
 (define-public mame
   (package
     (name "mame")
-    (version "0.252")
+    (version "0.253")
     (source
      (origin
        (method git-fetch)
@@ -1768,33 +1768,51 @@ (define-public mame
              (commit (apply string-append "mame" (string-split version #\.)))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "07qhcm1v47sy2wj30nx3cbhvcbgki0cl83gabr0miiw60fhgyn6j"))
-       (modules '((guix build utils)))
+        (base32 "0mk6clpvw7y567qis1g1rxabwz7qxik6c1ywjdqr5075a2kw44jm"))
+       (modules '((ice-9 ftw)
+                  (srfi srfi-26)
+                  (guix build utils)))
        (snippet
-        ;; Remove bundled libraries.
-        '(begin
-           (with-directory-excursion "3rdparty"
-             (for-each delete-file-recursively
-                       '("asio" "expat" "glm" "libflac" "libjpeg" "lua"
-                         "portaudio" "portmidi" "pugixml" "rapidjson" "SDL2"
-                         "SDL2-override" "sqlite3" "utf8proc" "zlib")))))))
+        ;; Remove most bundled libraries.  Some of the kept libraries below
+        ;; are provided by Guix, but difficult to un-bundle.
+        #~(with-directory-excursion "3rdparty"
+            (let ((keep (list "." ".."
+                              "asmjit"
+                              "bgfx"
+                              "bimg"
+                              "bx"
+                              "genie"
+                              "lzma"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "ymfm")))
+              (for-each delete-file-recursively
+                        (scandir "." (negate (cut member <> keep)))))))))
     (build-system gnu-build-system)
     (arguments
      (list
       #:make-flags
-      #~(cons*
+      #~(list
          ;; A 'strict-overflow' error pops up on i686 so disable '-Werror'.
          "NOWERROR=1"
          (string-append "QT_HOME=" #$(this-package-input "qtbase"))
-         (string-append "SDL_INI_PATH=" #$output "/share/mame/ini")
-         (map (lambda (lib)
-                (string-append "USE_SYSTEM_LIB_" (string-upcase lib) "=1"))
-              '("asio" "expat" "flac" "glm" "jpeg" "lua" "portaudio" "portmidi"
-                "pugixml" "rapidjson" "sqlite3" "utf8proc" "zlib")))
+         (string-append "SDL_INI_PATH=" #$output "/share/mame/ini"))
       #:tests? #f                       ;no test in regular release
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-sol2-build-error
+            ;; Fix "error: operator '!=' has no left operand" because
+            ;; LUA_COMPAT_BITLIB is empty.
+            (lambda _
+              (substitute* "3rdparty/sol2/sol/sol.hpp"
+                (("&& \\(LUA_COMPAT_BITLIB != 0\\)") ""))))
           (delete 'configure)
+          (add-before 'build 'use-system-libraries
+            (lambda _
+              (substitute* "makefile"
+                (("# +(USE_SYSTEM_LIB)" _ option) option))))
           (add-after 'build 'build-documentation
             (lambda _ (invoke "make" "-C" "docs" "man" "info")))
           (replace 'install
@@ -1897,7 +1915,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))

base-commit: a4e9842a70775a54bbe1369881b739e7ea9a6432
-- 
2.39.2





  parent reply	other threads:[~2023-04-12 17:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
2023-04-11 12:53 ` [bug#62724] [PATCH v2] " Nicolas Goaziou
2023-04-12 17:41 ` Nicolas Goaziou [this message]
2023-04-13 11:32 ` [bug#62724] [PATCH v4] " Nicolas Goaziou
2023-04-13 15:37 ` [bug#62724] [PATCH v5] " Nicolas Goaziou
2023-04-14 21:13 ` [bug#62724] [PATCH v6] " Nicolas Goaziou
2023-04-17 11:16 ` [bug#62724] [PATCH v7] " Nicolas Goaziou
2023-04-19  8:53 ` [bug#62724] [PATCH v8] " Nicolas Goaziou
2023-04-20 12:09 ` [bug#62724] [PATCH v9] " Nicolas Goaziou
2023-05-24  8:35   ` [bug#62724] [PATCH v10] gnu: mame: Update to 0.254 Nicolas Goaziou
2023-05-29 21:45     ` [bug#62724] [PATCH] gnu: mame: Update to 0.253 Ludovic Courtès
2023-05-29 21:57       ` Nicolas Goaziou
2023-06-09 20:43 ` [bug#62724] [PATCH v11] gnu: mame: Update to 0.255 Nicolas Goaziou
2023-06-18 21:22   ` [bug#62724] [PATCH] gnu: mame: Update to 0.253 Ludovic Courtès
2023-06-19  6:19     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230412174147.930153-1-mail@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=62724@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.