mame: update to 0262.

This commit is contained in:
Elaine Gibson 2024-02-01 19:33:55 +00:00 committed by classabbyamp
parent a26a2d8fb2
commit 2d866a2ad5
5 changed files with 43 additions and 44 deletions

View file

@ -0,0 +1,35 @@
Restores musl support which was removed upstream:
https://github.com/bkaradzic/bx/commit/d7ecac17060ab8cf765b21e55a762aa4855dfdb1
diff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h
index f14f9b68..ea82d7f3 100644
--- a/3rdparty/bx/include/bx/platform.h
+++ b/3rdparty/bx/include/bx/platform.h
@@ -37,6 +37,10 @@
#define BX_CRT_MSVC 0
#define BX_CRT_NEWLIB 0
+#ifndef BX_CRT_MUSL
+# define BX_CRT_MUSL 1
+#endif // BX_CRT_MUSL
+
#ifndef BX_CRT_NONE
# define BX_CRT_NONE 0
#endif // BX_CRT_NONE
@@ -255,6 +259,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 +437,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

View file

@ -9,16 +9,3 @@
#define HAS_FEENABLE_EXCEPT (1)
#else
#define HAS_FEENABLE_EXCEPT (0)
https://git.alpinelinux.org/aports/commit/testing/mame/fix-musl.patch?id=7f174f79c0ccd719a6592d356d1c8db82a426a00
--- a/src/lib/netlist/plib/ppmf.h
+++ b/src/lib/netlist/plib/ppmf.h
@@ -94,6 +94,7 @@
#ifndef PPMF_FORCE_TYPE
#define PPMF_FORCE_TYPE -1
#endif
+#include "stddef.h"
namespace plib {

View file

@ -1,10 +0,0 @@
--- a/3rdparty/bx/include/bx/bx.h 2017-12-27 02:45:37.000000000 +0100
+++ b/3rdparty/bx/include/bx/bx.h 2017-12-28 10:58:30.254932880 +0100
@@ -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"

View file

@ -1,10 +0,0 @@
--- a/src/lib/netlist/plib/palloc.h 2020-06-26 07:55:07.000000000 +0200
+++ b/src/lib/netlist/plib/palloc.h 2020-06-27 17:37:11.920172697 +0200
@@ -16,6 +16,7 @@
#include <algorithm>
#include <cstddef> // for std::max_align_t (usually long long)
+#undef PAGESIZE // for PAGESIZE
#include <memory>
#include <type_traits>
#include <utility>

View file

@ -1,10 +1,10 @@
# Template file for 'mame'
pkgname=mame
version=0251
revision=3
version=0262
revision=1
hostmakedepends="pkg-config python3 qt5-host-tools tar xz which"
makedepends="SDL2_ttf-devel fontconfig-devel glm libgomp-devel libjpeg-turbo-devel
lua-devel libutf8proc-devel libuv-devel portaudio-devel portmidi-devel
libutf8proc-devel libuv-devel portaudio-devel portmidi-devel
pugixml-devel rapidjson libXinerama-devel $(vopt_if qt 'qt5-devel')"
depends="liberation-fonts-ttf"
short_desc="Multiple Arcade Machine Emulator"
@ -12,12 +12,10 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://mamedev.org"
distfiles="https://github.com/mamedev/mame/archive/mame${version}.tar.gz"
checksum=6d97db4ebfb269b1eb0e530444495a50d3961d0a60bce13e11dc88bbebb2fbc1
checksum=64e482f3dd13be4e91c5dfa076fb7a71f450f2879118c6ae452b0037b661aaae
nodebug=yes
replaces="sdlmame>=0 sdlmess>=0"
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/lua5.3"
CXXFLAGS="$CFLAGS"
[ "$XBPS_TARGET_LIBC" = "musl" ] && CXXFLAGS+=" -DBX_CRT_MUSL=1"
case "$XBPS_TARGET_MACHINE" in
@ -25,6 +23,9 @@ case "$XBPS_TARGET_MACHINE" in
CFLAGS+=" -mlong-double-64"
CXXFLAGS+=" -mlong-double-64"
;;
armv[67]*)
LDFLAGS+=" -Wl,--long-plt"
;;
esac
build_options="qt"
@ -33,7 +34,7 @@ build_options_default="qt"
_options="REGENIE=1 TARGETOS=linux NOWERROR=1 OPENMP=1 OPTIMIZE=3
TOOLS=1 LTO=0 USE_SYSTEM_LIB_ASIO=0 USE_SYSTEM_LIB_EXPAT=1
USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1
USE_SYSTEM_LIB_LUA=0 USE_SYSTEM_LIB_SQLITE3=1
USE_SYSTEM_LIB_SQLITE3=1
USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_PORTAUDIO=1
USE_SYSTEM_LIB_UTF8PROC=1 USE_SYSTEM_LIB_GLM=1
USE_SYSTEM_LIB_RAPIDJSON=1 USE_SYSTEM_LIB_PUGIXML=1"
@ -64,8 +65,6 @@ fi
#_options+=" TARGET=mame SUBTARGET=tiny VERBOSE=1"
do_configure() {
# When linking mame expects liblua.so but we have liblua5.3.so
ln -sf liblua5.3.so ${XBPS_CROSS_BASE}/usr/lib/liblua.so
if [ "${CROSS_BUILD}" ]; then
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) ;;
@ -131,6 +130,4 @@ do_install() {
for f in artwork bgfx docs hash hlsl keymaps plugins samples; do
vcopy ${f} usr/share/${pkgname}
done
# Remove temporary liblua.so symlink
rm -f ${XBPS_CROSS_BASE}/usr/lib/liblua.so
}