sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master games grimoire by Ismael Luceno (b9391193ffa7da607619349e372f450bf682c1b3)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master games grimoire by Ismael Luceno (b9391193ffa7da607619349e372f450bf682c1b3)
- Date: Sat, 17 May 2025 01:23:24 +0000
GIT changes to master games grimoire by Ismael Luceno <ismael AT sourcemage.org>:
games-emulators/mame/BUILD |
11 +
games-emulators/mame/DEPENDS |
2
games-emulators/mame/DETAILS |
4
games-emulators/mame/HISTORY |
12 ++
games-emulators/mame/PRE_BUILD |
2
games-emulators/mame/patches/0001-bx-Re-add-musl-libc-support.patch |
60 ++++++++++
games-emulators/mame/patches/0001-pulse_sound-Fix-missing-include.patch |
24 ++++
games-emulators/mame/patches/musl-netlist.patch |
11 -
games-emulators/mame/patches/musl-time_t.patch |
10 -
9 files changed, 109 insertions(+), 27 deletions(-)
New commits:
commit b9391193ffa7da607619349e372f450bf682c1b3
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
mame 0.277
diff --git a/games-emulators/mame/BUILD b/games-emulators/mame/BUILD
index 0a8e516..a7903a3 100755
--- a/games-emulators/mame/BUILD
+++ b/games-emulators/mame/BUILD
@@ -1,8 +1,15 @@
case "$HOST" in
-*-musl) CXXFLAGS+=' -DBX_CRT_MUSL=1' ;;
+(*-musl) CXXFLAGS+=' -DBX_CRT_MUSL=1' ;;
+esac &&
+
+# Somehow not detected anymore
+OPTS+=' TARGETOS=linux' &&
+case "$HOST" in
+ (x86_64-*|mips64*|powerpc64*|aarch64*|riscv64*)
+ OPTS+=' PTR64=1' ;;
esac &&
# Avoid non-fatal errors
OPTS+=' NOWERROR=1' &&
-make -j "$MAKE_NJOBS" $OPTS
+make -j $((${#DISTCC_HOSTS[@]} * JOBS_PER_HOST + MAKE_NJOBS)) $OPTS
diff --git a/games-emulators/mame/DEPENDS b/games-emulators/mame/DEPENDS
index d49f5d7..af2fd38 100755
--- a/games-emulators/mame/DEPENDS
+++ b/games-emulators/mame/DEPENDS
@@ -12,7 +12,7 @@ depends sdl2 &&
depends sdl2_ttf &&
depends python3 PYTHON_EXECUTABLE=python3 &&
use_system JPEG &&
-use_system LUA &&
+# FIXME BROKEN: use_system LUA &&
# FIXME BROKEN: use_system asio &&
use_system expat &&
use_system flac &&
diff --git a/games-emulators/mame/DETAILS b/games-emulators/mame/DETAILS
index f8d560a..368276f 100755
--- a/games-emulators/mame/DETAILS
+++ b/games-emulators/mame/DETAILS
@@ -1,9 +1,9 @@
# Watch: https://github.com/mamedev/mame/releases >MAME ([0-9.]+)<
SPELL=mame
- VERSION=0.253
+ VERSION=0.277
SOURCE="mame${VERSION/.}.tar.gz"
SOURCE_URL[0]="https://github.com/mamedev/mame/archive/$SOURCE"
-
SOURCE_HASH=sha512:0cd9a95ef7e79a3d870ad7dc8d4d857e7001e067d10449c94f1ed4e83eb9e930343d4f2fa2a33ce3fd980f8202ffcac2a776c333b8db337120958da8eaeb5dc7
+
SOURCE_HASH=sha512:81fc5b3f85e9fc69ad58d453d0cfc4e3cdeedf47e1d2da1806f2bf44f4ce9a601dcdf3e5d82f21343d35151e1622b870a35b09a77ea283564be0f8e3643d4353
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/mame-mame${VERSION/.}"
TMPFS=off
WEB_SITE="http://mamedev.org/"
diff --git a/games-emulators/mame/HISTORY b/games-emulators/mame/HISTORY
index 5259c8d..7fc66a3 100644
--- a/games-emulators/mame/HISTORY
+++ b/games-emulators/mame/HISTORY
@@ -1,3 +1,15 @@
+2025-05-17 Ismael Luceno <ismael AT sourcemage.org>
+ * DEPENDS: removed system lua (fails to build)
+ * BUILD: fixed MAKE_NJOBS usage
+ fixed OS detection
+ * patches/musl-time_t.patch, patches/musl-netlist.patch:
+ removed, no longer needed
+ * PRE_BUILD: apply patches using apply_patch_dir
+ * patches/0001-bx-Re-add-musl-libc-support.patch,
+ patches/0001-pulse_sound-Fix-missing-include.patch:
+ fixed build against musl
+ * DETAILS: updated spell to 0.277
+
2023-03-31 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 0.253
diff --git a/games-emulators/mame/PRE_BUILD b/games-emulators/mame/PRE_BUILD
index 1b2007b..c230ad1 100755
--- a/games-emulators/mame/PRE_BUILD
+++ b/games-emulators/mame/PRE_BUILD
@@ -1,3 +1,3 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
-find "$SPELL_DIRECTORY"/patches -name \*.patch | xargs -n 1 -t patch -fp1 -i
+apply_patch_dir patches
diff --git
a/games-emulators/mame/patches/0001-bx-Re-add-musl-libc-support.patch
b/games-emulators/mame/patches/0001-bx-Re-add-musl-libc-support.patch
new file mode 100644
index 0000000..cd42bc6
--- /dev/null
+++ b/games-emulators/mame/patches/0001-bx-Re-add-musl-libc-support.patch
@@ -0,0 +1,60 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT sourcemage.org>
+Date: Fri, 14 Jun 2024 08:45:35 +0200
+Subject: [PATCH] bx: Re-add musl libc support
+
+Upstream-Status: Pending
+Origin: Source Mage
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ 3rdparty/bx/include/bx/platform.h | 3 +++
+ 3rdparty/bx/tests/macros_test.cpp | 1 +
+ 3rdparty/bx/src/file.cpp | 2 ++
+ 3 files changed, 6 insertions(+)
+
+diff --git a/3rdparty/bx/include/bx/platform.h
b/3rdparty/bx/include/bx/platform.h
+index 37aa34edc..210d4b4d3 100644
+--- a/3rdparty/bx/include/bx/platform.h
++++ b/3rdparty/bx/include/bx/platform.h
+@@ -255,6 +255,7 @@
+ && !BX_CRT_LIBCXX \
+ && !BX_CRT_MINGW \
+ && !BX_CRT_MSVC \
++ && !BX_CRT_MUSL \
+ && !BX_CRT_NEWLIB
+ # undef BX_CRT_NONE
+ # define BX_CRT_NONE 1
+@@ -432,6 +433,8 @@
+ # define BX_CRT_NAME "Clang C Library"
+ #elif BX_CRT_NEWLIB
+ # define BX_CRT_NAME "Newlib"
++#elif BX_CRT_MUSL
++# define BX_CRT_NAME "musl libc"
+ #elif BX_CRT_NONE
+ # define BX_CRT_NAME "None"
+ #else
+diff --git a/3rdparty/bx/tests/macros_test.cpp
b/3rdparty/bx/tests/macros_test.cpp
+index eb39edb55..787068046 100644
+--- a/3rdparty/bx/tests/macros_test.cpp
++++ b/3rdparty/bx/tests/macros_test.cpp
+@@ -13,6 +13,7 @@ BX_STATIC_ASSERT(false
+ || BX_CRT_LIBCXX
+ || BX_CRT_MINGW
+ || BX_CRT_MSVC
++ || BX_CRT_MUSL
+ || BX_CRT_NEWLIB
+ );
+
+diff --git a/src/file.cpp b/src/file.cpp
+index 1ed80a03bc85..8654ff81743e 100644
+--- a/3rdparty/bx/src/file.cpp
++++ b/3rdparty/bx/src/file.cpp
+@@ -3,6 +3,8 @@
+ * License: https://github.com/bkaradzic/bx/blob/master/LICENSE
+ */
+
++#define _LARGEFILE64_SOURCE // for fseeko64 & ftello64
++
+ #include <bx/file.h>
+
+ #ifndef BX_CONFIG_CRT_FILE_READER_WRITER
diff --git
a/games-emulators/mame/patches/0001-pulse_sound-Fix-missing-include.patch
b/games-emulators/mame/patches/0001-pulse_sound-Fix-missing-include.patch
new file mode 100644
index 0000000..ef1ee0d
--- /dev/null
+++ b/games-emulators/mame/patches/0001-pulse_sound-Fix-missing-include.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Taner Tas <taner76 AT gmail.com>
+Date: Sun, 27 Mar 2022 20:51:14 +0000
+Subject: [PATCH] pulse_sound: Fix missing include
+
+Origin: Alpine Linux
+Upstream-Status: Unknown
+
+[ismael AT sourcemage.org: Normalised]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ src/osd/modules/sound/pulse_sound.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/osd/modules/sound/pulse_sound.cpp
++++ b/src/osd/modules/sound/pulse_sound.cpp
+@@ -19,6 +19,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <poll.h>
++#include <signal.h>
+
+ #include <thread>
+ #include <pulse/pulseaudio.h>
diff --git a/games-emulators/mame/patches/musl-netlist.patch
b/games-emulators/mame/patches/musl-netlist.patch
deleted file mode 100644
index e210e10..0000000
--- a/games-emulators/mame/patches/musl-netlist.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/lib/netlist/plib/pexception.cpp
-+++ b/src/lib/netlist/plib/pexception.cpp
-@@ -10,7 +10,7 @@
- #include "pexception.h"
- #include "pfmtlog.h"
-
--#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__)
-+#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__) &&
defined(__GLIBC__)
- #define HAS_FEENABLE_EXCEPT (1)
- #else
- #define HAS_FEENABLE_EXCEPT (0)
diff --git a/games-emulators/mame/patches/musl-time_t.patch
b/games-emulators/mame/patches/musl-time_t.patch
deleted file mode 100644
index 7c9869d..0000000
--- a/games-emulators/mame/patches/musl-time_t.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/3rdparty/bx/include/bx/bx.h
-+++ b/3rdparty/bx/include/bx/bx.h
-@@ -11,6 +11,7 @@
- #include <stdint.h> // uint32_t
- #include <stdlib.h> // size_t
- #include <stddef.h> // ptrdiff_t
-+#include <time.h> // time_t
-
- #include "platform.h"
- #include "config.h"
- [[SM-Commit] ] GIT changes to master games grimoire by Ismael Luceno (b9391193ffa7da607619349e372f450bf682c1b3), Ismael Luceno, 05/16/2025
Archive powered by MHonArc 2.6.24.