unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#62724] [PATCH] gnu: mame: Update to 0.253.
@ 2023-04-08 10:14 Nicolas Goaziou
  2023-04-11 12:53 ` [bug#62724] [PATCH v2] " Nicolas Goaziou
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-08 10:14 UTC (permalink / raw)
  To: 62724

* gnu/packages/emulators.scm (mame): Update to 0.253.
---
 gnu/packages/emulators.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 7e73b217ea..7854888a65 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,7 +1768,7 @@ (define-public mame
              (commit (apply string-append "mame" (string-split version #\.)))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "07qhcm1v47sy2wj30nx3cbhvcbgki0cl83gabr0miiw60fhgyn6j"))
+        (base32 "0mk6clpvw7y567qis1g1rxabwz7qxik6c1ywjdqr5075a2kw44jm"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove bundled libraries.

base-commit: 6311493d7a6271bfbc51f4693857f9a12fe9965d
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v2] gnu: mame: Update to 0.253.
  2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
@ 2023-04-11 12:53 ` Nicolas Goaziou
  2023-04-12 17:41 ` [bug#62724] [PATCH v3] " Nicolas Goaziou
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-11 12:53 UTC (permalink / raw)
  To: 62724

* 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.
---

v2: Do not list every third-party to remove.  Try to find a minimal set instead.

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

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 7e73b217ea..882778bd21 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,44 @@ (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"
+                              "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
           (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 +1908,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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v3] gnu: mame: Update to 0.253.
  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
  2023-04-13 11:32 ` [bug#62724] [PATCH v4] " Nicolas Goaziou
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-12 17:41 UTC (permalink / raw)
  To: 62724

* 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





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v4] gnu: mame: Update to 0.253.
  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 ` [bug#62724] [PATCH v3] " Nicolas Goaziou
@ 2023-04-13 11:32 ` Nicolas Goaziou
  2023-04-13 15:37 ` [bug#62724] [PATCH v5] " Nicolas Goaziou
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-13 11:32 UTC (permalink / raw)
  To: 62724

* 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.
[inputs]: Replace LUA with LUA-5.4.
---

v4: Use Lua 5.4 as input.

 gnu/packages/emulators.scm | 55 +++++++++++++++++++++++++-------------
 1 file changed, 37 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 7e73b217ea..0850f9ce46 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))
@@ -1911,7 +1930,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: a4e9842a70775a54bbe1369881b739e7ea9a6432
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v5] gnu: mame: Update to 0.253.
  2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
                   ` (2 preceding siblings ...)
  2023-04-13 11:32 ` [bug#62724] [PATCH v4] " Nicolas Goaziou
@ 2023-04-13 15:37 ` Nicolas Goaziou
  2023-04-14 21:13 ` [bug#62724] [PATCH v6] " Nicolas Goaziou
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-13 15:37 UTC (permalink / raw)
  To: 62724

* 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.
[inputs]: Replace LUA with LUA-5.4.
---

v5: Preserve linenoise and wdlfft third-party libraries.

 gnu/packages/emulators.scm | 57 ++++++++++++++++++++++++++------------
 1 file changed, 39 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 7e73b217ea..6b7d453c64 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,53 @@ (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"
+                              "linenoise"
+                              "lzma"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "wdlfft"
+                              "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 +1917,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))
@@ -1911,7 +1932,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: a4e9842a70775a54bbe1369881b739e7ea9a6432
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v6] gnu: mame: Update to 0.253.
  2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
                   ` (3 preceding siblings ...)
  2023-04-13 15:37 ` [bug#62724] [PATCH v5] " Nicolas Goaziou
@ 2023-04-14 21:13 ` Nicolas Goaziou
  2023-04-17 11:16 ` [bug#62724] [PATCH v7] " Nicolas Goaziou
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-14 21:13 UTC (permalink / raw)
  To: 62724

* 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.
[inputs]: Replace LUA with LUA-5.4.
---

v6: Preserve "minimp3" third-party library.

 gnu/packages/emulators.scm | 58 ++++++++++++++++++++++++++------------
 1 file changed, 40 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 7e73b217ea..d8fb09f89a 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,54 @@ (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"
+                              "linenoise"
+                              "lzma"
+                              "minimp3"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "wdlfft"
+                              "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 +1918,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))
@@ -1911,7 +1933,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: a4e9842a70775a54bbe1369881b739e7ea9a6432
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v7] gnu: mame: Update to 0.253.
  2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
                   ` (4 preceding siblings ...)
  2023-04-14 21:13 ` [bug#62724] [PATCH v6] " Nicolas Goaziou
@ 2023-04-17 11:16 ` Nicolas Goaziou
  2023-04-19  8:53 ` [bug#62724] [PATCH v8] " Nicolas Goaziou
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-17 11:16 UTC (permalink / raw)
  To: 62724

* 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.
[inputs]: Replace LUA with LUA-5.4.
---

v7: Preserve "lsqlite3" third-party library.

 gnu/packages/emulators.scm | 59 ++++++++++++++++++++++++++------------
 1 file changed, 41 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index fa1f07eaf3..a4b1260f4b 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1760,7 +1760,7 @@ (define-public libticalcs2
 (define-public mame
   (package
     (name "mame")
-    (version "0.252")
+    (version "0.253")
     (source
      (origin
        (method git-fetch)
@@ -1769,33 +1769,55 @@ (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"
+                              "linenoise"
+                              "lsqlite3"
+                              "lzma"
+                              "minimp3"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "wdlfft"
+                              "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
@@ -1898,7 +1920,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))
@@ -1912,7 +1935,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: 9a5e1dc1f16f5f8c056e64f2077b035784003673
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v8] gnu: mame: Update to 0.253.
  2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
                   ` (5 preceding siblings ...)
  2023-04-17 11:16 ` [bug#62724] [PATCH v7] " Nicolas Goaziou
@ 2023-04-19  8:53 ` Nicolas Goaziou
  2023-04-20 12:09 ` [bug#62724] [PATCH v9] " Nicolas Goaziou
  2023-06-09 20:43 ` [bug#62724] [PATCH v11] gnu: mame: Update to 0.255 Nicolas Goaziou
  8 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-19  8:53 UTC (permalink / raw)
  To: 62724

* 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.
[inputs]: Replace LUA with LUA-5.4.
---

v8: Preserve "lua-linenoise" third-party library.

 gnu/packages/emulators.scm | 60 ++++++++++++++++++++++++++------------
 1 file changed, 42 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index fa1f07eaf3..8e63cfacbd 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1760,7 +1760,7 @@ (define-public libticalcs2
 (define-public mame
   (package
     (name "mame")
-    (version "0.252")
+    (version "0.253")
     (source
      (origin
        (method git-fetch)
@@ -1769,33 +1769,56 @@ (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"
+                              "linenoise"
+                              "lsqlite3"
+                              "lua-linenoise"
+                              "lzma"
+                              "minimp3"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "wdlfft"
+                              "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
@@ -1898,7 +1921,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))
@@ -1912,7 +1936,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: 1f78148b951f498e3733e4b2b1bd65439963f843
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v9] gnu: mame: Update to 0.253.
  2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
                   ` (6 preceding siblings ...)
  2023-04-19  8:53 ` [bug#62724] [PATCH v8] " Nicolas Goaziou
@ 2023-04-20 12:09 ` Nicolas Goaziou
  2023-05-24  8:35   ` [bug#62724] [PATCH v10] gnu: mame: Update to 0.254 Nicolas Goaziou
  2023-06-09 20:43 ` [bug#62724] [PATCH v11] gnu: mame: Update to 0.255 Nicolas Goaziou
  8 siblings, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2023-04-20 12:09 UTC (permalink / raw)
  To: 62724

* 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.
[inputs]: Replace LUA with LUA-5.4.
---

v9: Preserve "lua-zlib" third-party library.

 gnu/packages/emulators.scm | 61 +++++++++++++++++++++++++++-----------
 1 file changed, 43 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index fa1f07eaf3..25ce8f409e 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1760,7 +1760,7 @@ (define-public libticalcs2
 (define-public mame
   (package
     (name "mame")
-    (version "0.252")
+    (version "0.253")
     (source
      (origin
        (method git-fetch)
@@ -1769,33 +1769,57 @@ (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"
+                              "linenoise"
+                              "lsqlite3"
+                              "lua-linenoise"
+                              "lua-zlib"
+                              "lzma"
+                              "minimp3"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "wdlfft"
+                              "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
@@ -1898,7 +1922,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))
@@ -1912,7 +1937,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: 1f78148b951f498e3733e4b2b1bd65439963f843
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v10] gnu: mame: Update to 0.254.
  2023-04-20 12:09 ` [bug#62724] [PATCH v9] " Nicolas Goaziou
@ 2023-05-24  8:35   ` Nicolas Goaziou
  2023-05-29 21:45     ` [bug#62724] [PATCH] gnu: mame: Update to 0.253 Ludovic Courtès
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2023-05-24  8:35 UTC (permalink / raw)
  To: 62724

* gnu/packages/emulators.scm (mame): Update to 0.254.
[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.
[inputs]: Replace LUA with LUA-5.4.
---

v10: Update mame to 0.254.

 gnu/packages/emulators.scm | 63 +++++++++++++++++++++++++++-----------
 1 file changed, 45 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 13b6022308..57987429eb 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1760,7 +1760,7 @@ (define-public libticalcs2
 (define-public mame
   (package
     (name "mame")
-    (version "0.252")
+    (version "0.254")
     (source
      (origin
        (method git-fetch)
@@ -1769,33 +1769,59 @@ (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 "1saypb2czkgg0lpkmdsf796bb4zv4sp2r7s3ay944p1g9kdyjqgh"))
+       (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.
+        ;;
+        ;; TODO: Some of the preserved the libraries below ship with Guix, but
+        ;; may prove difficult to un-bundle.
+        #~(with-directory-excursion "3rdparty"
+            (let ((keep (list "." ".."
+                              "asmjit"
+                              "bgfx"
+                              "bimg"
+                              "bx"
+                              "genie"
+                              "linenoise"
+                              "lsqlite3"
+                              "lua-linenoise"
+                              "lua-zlib"
+                              "lzma"
+                              "minimp3"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "wdlfft"
+                              "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
@@ -1898,7 +1924,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))
@@ -1912,7 +1939,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: e02584b456a3f9c00b303ef4815d892a47edc2e6
-- 
2.40.1





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH] gnu: mame: Update to 0.253.
  2023-05-24  8:35   ` [bug#62724] [PATCH v10] gnu: mame: Update to 0.254 Nicolas Goaziou
@ 2023-05-29 21:45     ` Ludovic Courtès
  2023-05-29 21:57       ` Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2023-05-29 21:45 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 62724

Hi,

Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:

> * gnu/packages/emulators.scm (mame): Update to 0.254.
> [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.
> [inputs]: Replace LUA with LUA-5.4.

From a quick glance this LGTM.  (Per the commit rules you were free to
go ahead if confident, too.)

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH] gnu: mame: Update to 0.253.
  2023-05-29 21:45     ` [bug#62724] [PATCH] gnu: mame: Update to 0.253 Ludovic Courtès
@ 2023-05-29 21:57       ` Nicolas Goaziou
  0 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-05-29 21:57 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 62724

Hello,

Ludovic Courtès <ludo@gnu.org> writes:

> From a quick glance this LGTM.  (Per the commit rules you were free to
> go ahead if confident, too.)

Thanks for the review.

I cannot be confident about it because my weak computer cannot compile
mame. As a consequence, I'm waiting for
<https://qa.guix.gnu.org/issue/62724> to tell me that everything is
good, or if something is amiss. But that hasn't happened yet.

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH v11] gnu: mame: Update to 0.255.
  2023-04-08 10:14 [bug#62724] [PATCH] gnu: mame: Update to 0.253 Nicolas Goaziou
                   ` (7 preceding siblings ...)
  2023-04-20 12:09 ` [bug#62724] [PATCH v9] " Nicolas Goaziou
@ 2023-06-09 20:43 ` Nicolas Goaziou
  2023-06-18 21:22   ` [bug#62724] [PATCH] gnu: mame: Update to 0.253 Ludovic Courtès
  8 siblings, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2023-06-09 20:43 UTC (permalink / raw)
  To: 62724

* gnu/packages/emulators.scm (mame): Update to 0.254.
[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.
[inputs]: Replace LUA with LUA-5.4.
---

v11: Update to 0.255.  Preserve luafilesystem library.

 gnu/packages/emulators.scm | 64 +++++++++++++++++++++++++++-----------
 1 file changed, 46 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 13b6022308..30082ca163 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -1760,7 +1760,7 @@ (define-public libticalcs2
 (define-public mame
   (package
     (name "mame")
-    (version "0.252")
+    (version "0.255")
     (source
      (origin
        (method git-fetch)
@@ -1769,33 +1769,60 @@ (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 "13basy5gjrkyfy9ha2nhww1yl0q3q0fawcx6sk3vfmi927c5asq0"))
+       (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.
+        ;;
+        ;; TODO: Some of the preserved the libraries below ship with Guix, but
+        ;; may prove difficult to un-bundle.
+        #~(with-directory-excursion "3rdparty"
+            (let ((keep (list "." ".."
+                              "asmjit"
+                              "bgfx"
+                              "bimg"
+                              "bx"
+                              "genie"
+                              "linenoise"
+                              "lsqlite3"
+                              "lua-linenoise"
+                              "lua-zlib"
+                              "luafilesystem"
+                              "lzma"
+                              "minimp3"
+                              "nanosvg"
+                              "softfloat"
+                              "softfloat3"
+                              "sol2"
+                              "wdlfft"
+                              "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
@@ -1898,7 +1925,8 @@ (define-public mame
                            Keywords=Game;Emulator;Arcade;~%"
                             executable)))))))))
     (native-inputs
-     (list pkg-config
+     (list nasm
+           pkg-config
            python-sphinx
            python-sphinxcontrib-svg2pdfconverter
            texinfo))
@@ -1912,7 +1940,7 @@ (define-public mame
            libjpeg-turbo
            libxi
            libxinerama
-           lua
+           lua-5.4
            portaudio
            portmidi
            pugixml

base-commit: 44bbfc24e4bcc48d0e3343cd3d83452721af8c36
-- 
2.40.1





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH] gnu: mame: Update to 0.253.
  2023-06-09 20:43 ` [bug#62724] [PATCH v11] gnu: mame: Update to 0.255 Nicolas Goaziou
@ 2023-06-18 21:22   ` Ludovic Courtès
  2023-06-19  6:19     ` Nicolas Goaziou
  0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2023-06-18 21:22 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 62724

Hi,

Apparently v11 is failing as well:
<https://qa.guix.gnu.org/issue/62724>.

Any idea?

Ludo’.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#62724] [PATCH] gnu: mame: Update to 0.253.
  2023-06-18 21:22   ` [bug#62724] [PATCH] gnu: mame: Update to 0.253 Ludovic Courtès
@ 2023-06-19  6:19     ` Nicolas Goaziou
  0 siblings, 0 replies; 15+ messages in thread
From: Nicolas Goaziou @ 2023-06-19  6:19 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 62724

Hello,

Ludovic Courtès <ludo@gnu.org> writes:

> Apparently v11 is failing as well:
> <https://qa.guix.gnu.org/issue/62724>.

Indeed :(

> Any idea?

It seems related to Lua. They ship 5.4.4 compiled as C++, whereas ours
is 5.4.3 compiled as C (or so I think).

Once I'm done with the texlive branch, I'll try to re-bundle (!) their
Lua and send a v12, unless someone beats me to it.

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-06-19  6:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [bug#62724] [PATCH v3] " Nicolas Goaziou
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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).