From patchwork Thu Apr 13 11:32:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Goaziou X-Patchwork-Id: 49139 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 49B7917503; Thu, 13 Apr 2023 12:33:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 29758174BB for ; Thu, 13 Apr 2023 12:33:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmvCQ-0002A7-BY; Thu, 13 Apr 2023 07:33:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmvCJ-00021P-Fg for guix-patches@gnu.org; Thu, 13 Apr 2023 07:33:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmvCI-0000r0-7N for guix-patches@gnu.org; Thu, 13 Apr 2023 07:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmvCI-0005kI-2e for guix-patches@gnu.org; Thu, 13 Apr 2023 07:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62724] [PATCH v4] gnu: mame: Update to 0.253. References: <20230408101422.781587-1-mail@nicolasgoaziou.fr> In-Reply-To: <20230408101422.781587-1-mail@nicolasgoaziou.fr> Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Apr 2023 11:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62724 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62724@debbugs.gnu.org Received: via spool by 62724-submit@debbugs.gnu.org id=B62724.168138556922067 (code B ref 62724); Thu, 13 Apr 2023 11:33:02 +0000 Received: (at 62724) by debbugs.gnu.org; 13 Apr 2023 11:32:49 +0000 Received: from localhost ([127.0.0.1]:42725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmvC5-0005jr-7s for submit@debbugs.gnu.org; Thu, 13 Apr 2023 07:32:49 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:34151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmvC3-0005jd-3j for 62724@debbugs.gnu.org; Thu, 13 Apr 2023 07:32:48 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id A502040010 for <62724@debbugs.gnu.org>; Thu, 13 Apr 2023 11:32:40 +0000 (UTC) From: Nicolas Goaziou Date: Thu, 13 Apr 2023 13:32:39 +0200 Message-Id: <20230413113239.939168-1-mail@nicolasgoaziou.fr> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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(-) base-commit: a4e9842a70775a54bbe1369881b739e7ea9a6432 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