mame: Update to 0.259 (#9624)

Co-authored-by: Alex Brown <mail@alexbrown.info>
This commit is contained in:
Alex Brown
2023-10-23 11:11:31 +01:00
committed by GitHub
parent 937d8db2a9
commit 133cdb9075
2 changed files with 193 additions and 196 deletions

View File

@@ -11,11 +11,11 @@ sister-project MESS (Multi Emulator Super System), so MAME now documents a \
wide variety of (mostly vintage) computers, video game consoles and \
calculators, in addition to the arcade video games that were its initial focus."
HOMEPAGE="https://www.mamedev.org/"
COPYRIGHT="1997-2020 MAMEDev and contributors"
COPYRIGHT="1997-2023 MAMEDev and contributors"
LICENSE="GNU GPL v2"
REVISION="3"
REVISION="1"
SOURCE_URI="https://github.com/mamedev/mame/archive/mame${portVersion/./}.tar.gz"
CHECKSUM_SHA256="7c4c9ec232ba988e65fd29665c9b8e40b5ac3aa9f561eeb107cebbf08ba94baf"
CHECKSUM_SHA256="46baf431079a3373ffe8d984b3ba5d62ad5b1d5e356d1f60cf60f6ad03d4cec6"
SOURCE_FILENAME="mame-$portVersion.tar.gz"
SOURCE_DIR="mame-mame${portVersion/./}"
PATCHES="mame-$portVersion.patchset"
@@ -60,7 +60,6 @@ PROVIDES="
cmd:testkeys$commandSuffix
cmd:unidasm$commandSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libexpat$secondaryArchSuffix
@@ -69,7 +68,6 @@ REQUIRES="
lib:libfreetype$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblua$secondaryArchSuffix >= 5.3
lib:libpugixml$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
@@ -90,7 +88,6 @@ BUILD_REQUIRES="
devel:libfreetype$secondaryArchSuffix
devel:libGL$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblua$secondaryArchSuffix >= 5.3
devel:libogg$secondaryArchSuffix
devel:libpugixml$secondaryArchSuffix
devel:librapidjson$secondaryArchSuffix
@@ -110,7 +107,7 @@ BUILD_PREREQUIRES="
cmd:make
cmd:moc$secondaryArchSuffix
cmd:pkg_config$secondaryArchSuffix
cmd:python2
cmd:python3
cmd:sed
cmd:strip$secondaryArchSuffix
cmd:which
@@ -136,7 +133,7 @@ BUILD()
{
# This is wrong on so many levels
SYS_LDFLAGS="-lbsd -lnetwork " # trailing space required!
for _i in flac libutf8proc lua RapidJSON sqlite3; do
for _i in flac libutf8proc RapidJSON sqlite3; do
SYS_CFLAGS+="`pkg-config $_i --cflags` "
SYS_LDFLAGS+="`pkg-config $_i --libs` "
done
@@ -154,12 +151,12 @@ BUILD()
USE_SYSTEM_LIB_ZLIB=1 \
USE_SYSTEM_LIB_JPEG=1 \
USE_SYSTEM_LIB_FLAC=1 \
USE_SYSTEM_LIB_LUA=1 \
USE_SYSTEM_LIB_SQLITE3=1 \
USE_SYSTEM_LIB_UTF8PROC=1 \
USE_SYSTEM_LIB_GLM=1 \
USE_SYSTEM_LIB_RAPIDJSON=1 \
USE_SYSTEM_LIB_PUGIXML=1 \
VERBOSE=1 \
-j $makejobs
}
@@ -167,12 +164,6 @@ INSTALL()
{
# Based on https://projects.archlinux.de/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/mame
# Arch cleanup
# 32 bit main binary called as "mame" which would collide with our symlink
if [ "$targetArchitecture" = x86_64 ]; then
mv mame$bits mame
fi
# Install the binaries
mkdir -p "$commandBinDir"
for _i in castool chdman floptool imgtool jedutil ldresample ldverify \

View File

@@ -1,33 +1,11 @@
From e634f7d6d66f5feb51e662d54f050366445faaa9 Mon Sep 17 00:00:00 2001
From 41eb3a9049489acd62679b1f93091b4acd6ee831 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 10 Jun 2020 22:35:16 +1000
Subject: Haiku patches
diff --git a/3rdparty/asio/include/asio/detail/config.hpp b/3rdparty/asio/include/asio/detail/config.hpp
index 0c651be..aebab8c 100644
--- a/3rdparty/asio/include/asio/detail/config.hpp
+++ b/3rdparty/asio/include/asio/detail/config.hpp
@@ -1080,6 +1080,8 @@
# define ASIO_HAS_THREADS 1
# elif defined(__APPLE__)
# define ASIO_HAS_THREADS 1
+# elif defined(__HAIKU__)
+# define ASIO_HAS_THREADS 1
# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
# define ASIO_HAS_THREADS 1
# elif defined(_PTHREADS)
@@ -1095,6 +1097,8 @@
# define ASIO_HAS_PTHREADS 1
# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
# define ASIO_HAS_PTHREADS 1
+# elif defined(__HAIKU__)
+# define ASIO_HAS_PTHREADS 1
# endif // defined(ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
# endif // defined(ASIO_HAS_THREADS)
#endif // !defined(ASIO_HAS_PTHREADS)
diff --git a/3rdparty/bgfx/3rdparty/dear-imgui/widgets/file_list.inl b/3rdparty/bgfx/3rdparty/dear-imgui/widgets/file_list.inl
index 75f1fc5..c44be05 100644
index fda99b6..a83e72c 100644
--- a/3rdparty/bgfx/3rdparty/dear-imgui/widgets/file_list.inl
+++ b/3rdparty/bgfx/3rdparty/dear-imgui/widgets/file_list.inl
@@ -32,6 +32,7 @@ namespace ImGui
@@ -46,81 +24,6 @@ index 75f1fc5..c44be05 100644
}
}
diff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h
index d4445d3..80124be 100644
--- a/3rdparty/bx/include/bx/platform.h
+++ b/3rdparty/bx/include/bx/platform.h
@@ -61,6 +61,7 @@
#define BX_PLATFORM_WINDOWS 0
#define BX_PLATFORM_WINRT 0
#define BX_PLATFORM_XBOXONE 0
+#define BX_PLATFORM_HAIKU 0
// http://sourceforge.net/apps/mediawiki/predef/index.php?title=Compilers
#if defined(__clang__)
@@ -275,6 +276,7 @@
|| BX_PLATFORM_PS4 \
|| BX_PLATFORM_RPI \
|| BX_PLATFORM_STEAMLINK \
+ || BX_PLATFORM_HAIKU \
)
///
@@ -294,6 +296,7 @@
|| BX_PLATFORM_WINDOWS \
|| BX_PLATFORM_WINRT \
|| BX_PLATFORM_XBOXONE \
+ || BX_PLATFORM_HAIKU \
)
///
@@ -398,6 +401,8 @@
# define BX_PLATFORM_NAME "WinRT"
#elif BX_PLATFORM_XBOXONE
# define BX_PLATFORM_NAME "Xbox One"
+#elif BX_PLATFORM_HAIKU
+# define BX_PLATFORM_NAME "Haiku"
#else
# error "Unknown BX_PLATFORM!"
#endif // BX_PLATFORM_
diff --git a/3rdparty/bx/src/file.cpp b/3rdparty/bx/src/file.cpp
index aea285e..c158af0 100644
--- a/3rdparty/bx/src/file.cpp
+++ b/3rdparty/bx/src/file.cpp
@@ -76,7 +76,8 @@ namespace bx
|| BX_PLATFORM_BSD \
|| BX_PLATFORM_HAIKU \
|| BX_PLATFORM_IOS \
- || BX_PLATFORM_OSX
+ || BX_PLATFORM_OSX \
+ || BX_PLATFORM_HAIKU
# define fseeko64 fseeko
# define ftello64 ftello
# elif BX_PLATFORM_PS4
diff --git a/3rdparty/bx/src/mutex.cpp b/3rdparty/bx/src/mutex.cpp
index 2fe5eaf..c9ce444 100644
--- a/3rdparty/bx/src/mutex.cpp
+++ b/3rdparty/bx/src/mutex.cpp
@@ -18,6 +18,7 @@
|| BX_PLATFORM_IOS \
|| BX_PLATFORM_OSX \
|| BX_PLATFORM_PS4 \
+ || BX_PLATFORM_HAIKU \
|| BX_PLATFORM_RPI
# include <pthread.h>
#elif BX_PLATFORM_WINDOWS \
diff --git a/3rdparty/bx/src/thread.cpp b/3rdparty/bx/src/thread.cpp
index 9525105..cebcb82 100644
--- a/3rdparty/bx/src/thread.cpp
+++ b/3rdparty/bx/src/thread.cpp
@@ -21,6 +21,7 @@
|| BX_PLATFORM_IOS \
|| BX_PLATFORM_OSX \
|| BX_PLATFORM_PS4 \
+ || BX_PLATFORM_HAIKU \
|| BX_PLATFORM_RPI
# include <pthread.h>
# if defined(__FreeBSD__)
diff --git a/3rdparty/genie/build/gmake.haiku/Makefile b/3rdparty/genie/build/gmake.haiku/Makefile
new file mode 100644
index 0000000..be9880c
@@ -705,10 +608,10 @@ index 48f6fb8..b844440 100644
cp bin/darwin/genie ../bx/tools/bin/darwin/
+ cp bin/haiku/genie ../bx/tools/bin/haiku/
diff --git a/3rdparty/genie/scripts/genie.lua b/3rdparty/genie/scripts/genie.lua
index 7e64ad9..fefb444 100644
index de53725..84c6b2b 100644
--- a/3rdparty/genie/scripts/genie.lua
+++ b/3rdparty/genie/scripts/genie.lua
@@ -88,6 +88,11 @@
@@ -91,6 +91,11 @@
configuration {}
@@ -773,10 +676,10 @@ index f0782db..5a3a636 100644
#define PLATFORM_WINDOWS (1)
#define PLATFORM_STRING "windows"
diff --git a/makefile b/makefile
index 4e0182d..1543f17 100644
index 5b75438..8044628 100644
--- a/makefile
+++ b/makefile
@@ -216,6 +216,7 @@ GENIEOS := darwin
@@ -221,6 +221,7 @@ GENIEOS := darwin
endif
ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
OS := haiku
@@ -784,7 +687,7 @@ index 4e0182d..1543f17 100644
endif
ifndef OS
$(error Unable to detect OS from uname -a: $(UNAME))
@@ -471,6 +472,10 @@ endif
@@ -493,6 +494,10 @@ endif
ifeq ($(TARGETOS),asmjs)
OSD := sdl
endif
@@ -795,9 +698,9 @@ index 4e0182d..1543f17 100644
endif
#-------------------------------------------------
@@ -1643,6 +1648,28 @@ endif
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_SDL)/$(MAKETYPE)-ci20 config=$(CONFIG) precompile
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_SDL)/$(MAKETYPE)-ci20 config=$(CONFIG)
@@ -1504,6 +1509,28 @@ openbsd_x86_clang: generate $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang/Makefile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang config=$(CONFIG)32 precompile
$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang config=$(CONFIG)32
+#-------------------------------------------------
+# gmake-haiku
@@ -822,22 +725,22 @@ index 4e0182d..1543f17 100644
+ $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-haiku config=$(CONFIG)
+
#-------------------------------------------------
# cmake
# Clean/bootstrap
#-------------------------------------------------
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 3eb2acf..7c919c9 100644
index 966d55d..52d5146 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -41,6 +41,7 @@ newoption {
@@ -34,6 +34,7 @@ newoption {
{ "osx", "OSX (GCC compiler)" },
{ "osx-clang", "OSX (Clang compiler)" },
{ "solaris", "Solaris" },
{ "steamlink", "Steam Link" },
{ "ci20", "Creator-Ci20" },
+ { "haiku", "Haiku" },
},
}
@@ -253,6 +254,10 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-ci20")
@@ -162,6 +163,10 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-linux-clang")
end
+ if "haiku" == _OPTIONS["gcc"] then
@@ -847,41 +750,41 @@ index 3eb2acf..7c919c9 100644
if "mingw32-gcc" == _OPTIONS["gcc"] then
if not os.getenv("MINGW32") then
print("Set MINGW32 envrionment variable.")
@@ -329,6 +334,10 @@ function toolchain(_buildDir, _subDir)
if "ci20" == _OPTIONS["gcc"] then
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-ci20")
@@ -211,6 +216,10 @@ function toolchain(_buildDir, _subDir)
premake.gcc.ar = toolchainPrefix .. "ar"
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-osx-clang")
end
+
+ if "haiku" == _OPTIONS["gcc"] then
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-haiku")
+ end
elseif _ACTION == "vs2015" or _ACTION == "vs2015-fastbuild" then
elseif _ACTION == "vs2019" then
if (_ACTION .. "-clang") == _OPTIONS["vs"] then
if "clangcl" == _OPTIONS["vs"] then
diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp
index 4f56a84..6b0c3a0 100644
index c5ce8bf..7c37057 100644
--- a/src/osd/modules/file/posixfile.cpp
+++ b/src/osd/modules/file/posixfile.cpp
@@ -93,7 +93,7 @@ public:
@@ -100,7 +100,7 @@ public:
{
ssize_t result;
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__) || defined(__HAIKU__)
result = ::pread(m_fd, buffer, size_t(count), off_t(std::make_unsigned_t<off_t>(offset)));
#elif defined(WIN32) || defined(SDLMAME_NO64BITIO)
#elif defined(_WIN32) || defined(SDLMAME_NO64BITIO)
if (lseek(m_fd, off_t(std::make_unsigned_t<off_t>(offset)), SEEK_SET) < 0)
@@ -114,7 +114,7 @@ public:
@@ -121,7 +121,7 @@ public:
{
ssize_t result;
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__) || defined(__HAIKU__)
result = ::pwrite(m_fd, buffer, size_t(count), off_t(std::make_unsigned_t<off_t>(offset)));
#elif defined(WIN32) || defined(SDLMAME_NO64BITIO)
#elif defined(_WIN32) || defined(SDLMAME_NO64BITIO)
if (lseek(m_fd, off_t(std::make_unsigned_t<off_t>(offset)), SEEK_SET) < 0)
diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp
index 5ecb370..a960e80 100644
index 57ff069..e0ff74e 100644
--- a/src/osd/modules/file/posixptty.cpp
+++ b/src/osd/modules/file/posixptty.cpp
@@ -19,6 +19,10 @@
@@ -895,34 +798,21 @@ index 5ecb370..a960e80 100644
#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <termios.h>
#include <libutil.h>
diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp
index 39f11a2..61c4baa 100644
--- a/src/osd/modules/render/drawbgfx.cpp
+++ b/src/osd/modules/render/drawbgfx.cpp
@@ -176,7 +176,7 @@ static void* sdlNativeWindowHandle(SDL_Window* _window)
return wmi.info.win.window;
# elif BX_PLATFORM_STEAMLINK
return wmi.info.vivante.window;
-# elif BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_ANDROID
+# elif BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_ANDROID || BX_PLATFORM_HAIKU
return nullptr;
# endif // BX_PLATFORM_
}
--
2.36.1
2.42.0
From 4d6c98988c8fe948c801896a1462f99eced787ab Mon Sep 17 00:00:00 2001
From c280f26e99a0928ef270170eb4126f9339e26c7a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 11 Jun 2020 08:59:34 +1000
Subject: Use stat Haiku
diff --git a/3rdparty/bx/src/file.cpp b/3rdparty/bx/src/file.cpp
index c158af0..2d6aa3e 100644
index dab8620..ceb2263 100644
--- a/3rdparty/bx/src/file.cpp
+++ b/3rdparty/bx/src/file.cpp
@@ -650,7 +650,14 @@ namespace bx
@@ -648,7 +648,14 @@ namespace bx
break;
}
@@ -937,7 +827,7 @@ index c158af0..2d6aa3e 100644
{
_out.type = FileType::Dir;
_out.size = UINT64_MAX;
@@ -658,7 +665,11 @@ namespace bx
@@ -656,7 +663,11 @@ namespace bx
return true;
}
@@ -950,56 +840,33 @@ index c158af0..2d6aa3e 100644
_out.type = FileType::File;
_out.size = UINT64_MAX;
--
2.36.1
2.42.0
From 5ed349df65f1b093355613ea23864858c56f0b07 Mon Sep 17 00:00:00 2001
From cc45915060f2db673f8ef2af775b01ccfb974385 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 11 Jun 2020 09:00:11 +1000
Subject: Disable ptty
diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp
index a960e80..76cae4c 100644
index e0ff74e..39a0a5a 100644
--- a/src/osd/modules/file/posixptty.cpp
+++ b/src/osd/modules/file/posixptty.cpp
@@ -113,7 +113,7 @@ bool posix_check_ptty_path(std::string const &path)
@@ -113,7 +113,7 @@ bool posix_check_ptty_path(std::string const &path) noexcept
osd_file::error posix_open_ptty(std::uint32_t openflags, osd_file::ptr &file, std::uint64_t &filesize, std::string &name)
std::error_condition posix_open_ptty(std::uint32_t openflags, osd_file::ptr &file, std::uint64_t &filesize, std::string &name) noexcept
{
-#if defined(__ANDROID__)
+#if defined(__ANDROID__) || defined(__HAIKU__)
return osd_file::error::FAILURE;
return std::errc::not_supported; // TODO: revisit this error code
#else // defined(__ANDROID__)
#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))
// TODO: handling of the slave path is insecure - should use ptsname_r/ttyname_r in a loop
--
2.36.1
2.42.0
From e7015152b09aef14d9e3b82b8c43945ec9e3342c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Thu, 29 Oct 2020 07:05:28 +0100
Subject: Build fix
diff --git a/src/lib/netlist/plib/palloc.h b/src/lib/netlist/plib/palloc.h
index 9243645..00fe44e 100644
--- a/src/lib/netlist/plib/palloc.h
+++ b/src/lib/netlist/plib/palloc.h
@@ -422,7 +422,7 @@ namespace plib {
#if (PUSE_ALIGNED_ALLOCATION)
#if defined(_WIN32) || defined(_WIN64) || defined(_MSC_VER)
return _aligned_malloc(size, alignment);
- #elif defined(__APPLE__) || defined(__ANDROID__)
+ #elif defined(__APPLE__) || defined(__ANDROID__) || defined(__HAIKU__)
void* p;
if (::posix_memalign(&p, alignment, size) != 0) {
p = nullptr;
--
2.36.1
From 67cc5d963c7ea49d794724e7f2443b7d9c3c1d43 Mon Sep 17 00:00:00 2001
From 9b00c17d6112b15d3d92a466b0f3af5dc1a74c65 Mon Sep 17 00:00:00 2001
From: PulkoMandy <pulkomandy@pulkomandy.tk>
Date: Fri, 5 Aug 2022 19:24:12 +0200
Subject: Allow use of Qt Debugger on Haiku
@@ -1008,11 +875,11 @@ It is normally tied to X11, but we want Qt and no X11, so introduce a
special case.
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index 10aa994..62adc04 100644
index abf4a90..4f06d1a 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -298,14 +298,16 @@ if BASE_TARGETOS=="unix" then
end
@@ -258,14 +258,16 @@ if BASE_TARGETOS=="unix" then
addoptionsfromstring(str)
end
else
- if _OPTIONS["NO_X11"]=="1" then
@@ -1034,8 +901,147 @@ index 10aa994..62adc04 100644
+ }
+ end
end
if _OPTIONS["with-bundled-sdl2"]~=nil then
if _OPTIONS["targetos"]~="android" then
local str = backtick(sdlconfigcmd() .. " --libs")
addlibfromstring(str)
--
2.36.1
2.42.0
From 8e332ff22f6cb8b19a44ba8f6a3d9daa07b6ccd3 Mon Sep 17 00:00:00 2001
From: Alex Brown <mail@alexbrown.info>
Date: Sat, 14 Oct 2023 12:26:57 +0200
Subject: toolchain.lua: set targetdir for Haiku
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 52d5146..0b67b44 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -61,7 +61,8 @@ function androidToolchainRoot()
local hostTags = {
windows = "windows-x86_64",
linux = "linux-x86_64",
- macosx = "darwin-x86_64"
+ macosx = "darwin-x86_64",
+ haiku = "haiku-x86_64"
}
android.toolchainRoot = (os.getenv("ANDROID_NDK_HOME") or "") .. "/toolchains/llvm/prebuilt/" .. hostTags[os.get()]
end
@@ -609,6 +610,30 @@ function toolchain(_buildDir, _subDir)
configuration { "osx*", "arm64", "Release" }
targetdir (_buildDir .. "osx_clang" .. "/bin/x64/Release")
+ configuration { "haiku", "x32" }
+ objdir (_buildDir .. "haiku" .. "/obj")
+ buildoptions {
+ "-m32",
+ }
+
+ configuration { "haiku", "x32", "Release" }
+ targetdir (_buildDir .. "haiku" .. "/bin/x32/Release")
+
+ configuration { "haiku", "x32", "Debug" }
+ targetdir (_buildDir .. "haiku" .. "/bin/x32/Debug")
+
+ configuration { "haiku", "x64" }
+ objdir (_buildDir .. "haiku" .. "/obj")
+ buildoptions {
+ "-m64",
+ }
+
+ configuration { "haiku", "x64", "Release" }
+ targetdir (_buildDir .. "haiku" .. "/bin/x64/Release")
+
+ configuration { "haiku", "x64", "Debug" }
+ targetdir (_buildDir .. "haiku" .. "/bin/x64/Debug")
+
configuration { "osx*", "arm64", "Debug" }
targetdir (_buildDir .. "osx_clang" .. "/bin/x64/Debug")
--
2.42.0
From 1ce9aa530282c952f9e17cf630db8e738ff13946 Mon Sep 17 00:00:00 2001
From: Alex Brown <mail@alexbrown.info>
Date: Sat, 14 Oct 2023 10:14:19 +0200
Subject: Fix for asio from upstream
diff --git a/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp b/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
index 77edf9e..3403f1c 100644
--- a/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
+++ b/3rdparty/asio/include/asio/detail/impl/socket_ops.ipp
@@ -641,7 +641,7 @@ bool sockatmark(socket_type s, asio::error_code& ec)
# endif // defined(ENOTTY)
#else // defined(SIOCATMARK)
int value = ::sockatmark(s);
- get_last_error(ec, result < 0);
+ get_last_error(ec, value < 0);
#endif // defined(SIOCATMARK)
return ec ? false : value != 0;
--
2.42.0
From cfa4c2d158b92b4346680c83ed3f08917ab66964 Mon Sep 17 00:00:00 2001
From: Alex Brown <mail@alexbrown.info>
Date: Sun, 15 Oct 2023 07:04:21 +0100
Subject: Set LinkSupportCircularDependencies for Haiku
diff --git a/scripts/genie.lua b/scripts/genie.lua
index a98ea44..05b4d85 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -1243,6 +1243,11 @@ configuration { "freebsd or netbsd" }
"LinkSupportCircularDependencies",
}
+configuration { "haiku" }
+ flags {
+ "LinkSupportCircularDependencies",
+ }
+
configuration { "osx*" }
links {
"pthread",
--
2.42.0
From f10abefe051bdffc2522940fb58e0fb1fff6a1ce Mon Sep 17 00:00:00 2001
From: Vas Crabb <vas@vastheman.com>
Date: Tue, 3 Oct 2023 13:48:27 +1100
Subject: [PATCH] cpu/sh: Explicitly #include prefix header (fixes GitHub
#11591).
diff --git a/src/devices/cpu/sh/sh7021.cpp b/src/devices/cpu/sh/sh7021.cpp
index 18aa0c1..458e4ff 100644
--- a/src/devices/cpu/sh/sh7021.cpp
+++ b/src/devices/cpu/sh/sh7021.cpp
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
+#include "emu.h"
#include "sh7021.h"
DEFINE_DEVICE_TYPE(SH2A_SH7021, sh2a_sh7021_device, "sh2a_sh7021", "Hitachi SH-2A (SH7021)")
diff --git a/src/devices/cpu/sh/sh7032.cpp b/src/devices/cpu/sh/sh7032.cpp
index 775e7e7..e65e86c 100644
--- a/src/devices/cpu/sh/sh7032.cpp
+++ b/src/devices/cpu/sh/sh7032.cpp
@@ -1,6 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Angelo Salese
+#include "emu.h"
#include "sh7032.h"
DEFINE_DEVICE_TYPE(SH1_SH7032, sh1_sh7032_device, "sh1_sh7032", "Hitachi SH-1 (SH7032)")
--
2.42.0