mgba: drop now unneeded workaround

This commit is contained in:
Jerome Duval
2023-04-28 16:32:03 +02:00
parent f8db1d52f9
commit 62b4801a76
2 changed files with 1 additions and 37 deletions

View File

@@ -12,11 +12,10 @@ and a modern feature set for emulators that older emulators may not support."
HOMEPAGE="https://mgba.io/"
COPYRIGHT="2013-2021 Jeffrey Pfau"
LICENSE="MPL v2.0"
REVISION="2"
REVISION="3"
SOURCE_URI="https://github.com/mgba-emu/mgba/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="692ff0ac50e18380df0ff3ee83071f9926715200d0dceedd9d16a028a59537a0"
ADDITIONAL_FILES="mgba.rdef.in"
PATCHES="mgba-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

View File

@@ -1,35 +0,0 @@
From c540a757aa411ad99fa28c84878d673eb586fceb Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 29 Mar 2023 20:55:37 +0200
Subject: Haiku: disable locale support to workaround a crash in uselocale
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5413367..65f8f9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -400,7 +400,7 @@ if(HAVE_LOCALTIME_R)
list(APPEND FUNCTION_DEFINES HAVE_LOCALTIME_R)
endif()
-if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE OR APPLE)
+if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE OR APPLE AND NOT HAIKU)
list(APPEND FUNCTION_DEFINES HAVE_LOCALE)
if (HAVE_SNPRINTF_L)
list(APPEND FUNCTION_DEFINES HAVE_SNPRINTF_L)
diff --git a/include/mgba-util/formatting.h b/include/mgba-util/formatting.h
index 6eb01ff..1e70836 100644
--- a/include/mgba-util/formatting.h
+++ b/include/mgba-util/formatting.h
@@ -15,7 +15,7 @@ CXX_GUARD_START
#ifdef HAVE_XLOCALE
#include <xlocale.h>
#elif !defined(HAVE_LOCALE)
-typedef const char* locale_t;
+typedef void* locale_t;
#endif
int ftostr_l(char* restrict str, size_t size, float f, locale_t locale);
--
2.37.3