diff options
author | kamil <kamil@pkgsrc.org> | 2019-10-25 11:04:04 +0000 |
---|---|---|
committer | kamil <kamil@pkgsrc.org> | 2019-10-25 11:04:04 +0000 |
commit | afd02eb011bec1175d77fad0dfb6c818bf0c7c64 (patch) | |
tree | 65a06bbc0dddbd7d32612034ade85464fb17c879 /emulators | |
parent | 0503900a5e922109fb3ca12fbe81defee56c6eb7 (diff) | |
download | pkgsrc-afd02eb011bec1175d77fad0dfb6c818bf0c7c64.tar.gz |
libretro-dolphin: Fix build on NetBSD 9.99.17
Adapt the local patch for the POSIX iconv(3) API change in new NetBSD.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/libretro-dolphin/distinfo | 4 | ||||
-rw-r--r-- | emulators/libretro-dolphin/patches/patch-Source_Core_Common_StringUtil.cpp | 28 |
2 files changed, 24 insertions, 8 deletions
diff --git a/emulators/libretro-dolphin/distinfo b/emulators/libretro-dolphin/distinfo index c64cbf1e660..5488db6c6e5 100644 --- a/emulators/libretro-dolphin/distinfo +++ b/emulators/libretro-dolphin/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.1 2018/10/15 17:20:21 nia Exp $ +$NetBSD: distinfo,v 1.2 2019/10/25 11:04:04 kamil Exp $ SHA1 (libretro-dolphin-20180827-a5bce7d67abeaa9142d466a578ca5049197073e9.tar.gz) = 10f66e6c88d28a0ee203ce29526c862286a30e65 RMD160 (libretro-dolphin-20180827-a5bce7d67abeaa9142d466a578ca5049197073e9.tar.gz) = 6c60c2ba633d5195efe8a1c9632c7eea09444b52 @@ -7,7 +7,7 @@ Size (libretro-dolphin-20180827-a5bce7d67abeaa9142d466a578ca5049197073e9.tar.gz) SHA1 (patch-CMakeLists.txt) = a2645cbadef33fa5da955f577d7b076b4d56d139 SHA1 (patch-Externals_SFML_include_SFML_Config.hpp) = 75ece2ce86b54b219a80d6ff028ecc80a00454f5 SHA1 (patch-Source_Core_Common_MemoryUtil.cpp) = dd5792447e2a06b0a94e64b33d5bd77f0c439724 -SHA1 (patch-Source_Core_Common_StringUtil.cpp) = e7617eb9c16f479f3a3edda1a2ed7496d5ca531c +SHA1 (patch-Source_Core_Common_StringUtil.cpp) = 9a0e91980e91f49e39364b46581984115e4c5c4b SHA1 (patch-Source_Core_Common_Swap.h) = bbba25b164dac8109c7e95256e108cff2c71924d SHA1 (patch-Source_Core_Common_Thread.cpp) = 2043bdbdc07eb0e3a0e78cf5258cac10b350d26b SHA1 (patch-Source_Core_Core_Analytics.cpp) = 7b6b5770eea86d71c42bf309eca86eff14b1b177 diff --git a/emulators/libretro-dolphin/patches/patch-Source_Core_Common_StringUtil.cpp b/emulators/libretro-dolphin/patches/patch-Source_Core_Common_StringUtil.cpp index 3c591b65bb0..0ce66924770 100644 --- a/emulators/libretro-dolphin/patches/patch-Source_Core_Common_StringUtil.cpp +++ b/emulators/libretro-dolphin/patches/patch-Source_Core_Common_StringUtil.cpp @@ -1,10 +1,26 @@ -$NetBSD: patch-Source_Core_Common_StringUtil.cpp,v 1.1 2018/10/15 17:20:21 nia Exp $ +$NetBSD: patch-Source_Core_Common_StringUtil.cpp,v 1.2 2019/10/25 11:04:04 kamil Exp $ Support NetBSD. --- Source/Core/Common/StringUtil.cpp.orig 2018-08-27 13:59:39.000000000 +0000 +++ Source/Core/Common/StringUtil.cpp -@@ -131,11 +131,11 @@ bool CharArrayFromFormatV(char* out, int +@@ -38,6 +38,15 @@ constexpr u32 CODEPAGE_WINDOWS_1252 = 12 + #include <locale.h> + #endif + ++#if defined(__NetBSD__) ++#include <sys/param.h> ++#if __NetBSD_Prereq__(9,99,17) ++#define NETBSD_POSIX_ICONV 1 ++#else ++#define NETBSD_POSIX_ICONV 0 ++#endif ++#endif ++ + #if !defined(_WIN32) && !defined(ANDROID) && !defined(__HAIKU__) && !defined(__OpenBSD__) + static locale_t GetCLocale() + { +@@ -131,11 +140,11 @@ bool CharArrayFromFormatV(char* out, int c_locale = _create_locale(LC_ALL, "C"); writtenCount = _vsnprintf_l(out, outsize, format, c_locale, args); #else @@ -18,7 +34,7 @@ Support NetBSD. uselocale(previousLocale); #endif #endif -@@ -172,7 +172,7 @@ std::string StringFromFormatV(const char +@@ -172,7 +181,7 @@ std::string StringFromFormatV(const char std::string temp = buf; delete[] buf; #else @@ -27,7 +43,7 @@ Support NetBSD. locale_t previousLocale = uselocale(GetCLocale()); #endif if (vasprintf(&buf, format, args) < 0) -@@ -181,7 +181,7 @@ std::string StringFromFormatV(const char +@@ -181,7 +190,7 @@ std::string StringFromFormatV(const char buf = nullptr; } @@ -36,11 +52,11 @@ Support NetBSD. uselocale(previousLocale); #endif -@@ -550,8 +550,13 @@ std::string CodeTo(const char* tocode, c +@@ -550,8 +559,13 @@ std::string CodeTo(const char* tocode, c while (src_bytes != 0) { -+#ifdef __NetBSD__ ++#if (defined(__NetBSD__) && !NETBSD_POSIX_ICONV) + size_t const iconv_result = + iconv(conv_desc, (const char**)(&src_buffer), &src_bytes, &dst_buffer, &dst_bytes); +#else |