head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.12 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.10 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.8 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.6 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.4 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.2 pkgsrc-2024Q4-base:1.1; locks; strict; comment @// @; 1.1 date 2024.11.16.01.57.06; author ktnb; state Exp; branches; next ; commitid N8rUqN8cVoVtoOxF; desc @@ 1.1 log @luanti: update to 5.10.0 Packaging changes: - games/minetest -> games/luanti - made myself (ktnb) maintainer Upstream changes: - name change - many updates to the client and scripting parts https://dev.minetest.net/Changelog#5.9.1_.E2.86.92_5.10.0 @ text @$NetBSD: patch-src_util_string.cpp,v 1.9 2024/09/09 07:46:20 nia Exp $ Support non-POSIX iconv on NetBSD before 10 and SunOS. --- src/util/string.cpp.orig 2024-08-11 15:54:55.000000000 +0000 +++ src/util/string.cpp @@@@ -39,6 +39,13 @@@@ with this program; if not, write to the #include #endif +#if defined(__NetBSD__) +#include +#if __NetBSD_Prereq__(9,99,17) +#define NETBSD_POSIX_ICONV 1 +#endif +#endif + #ifndef _WIN32 namespace { @@@@ -77,7 +84,11 @@@@ static bool convert(iconv_t cd, char *ou const size_t old_outbuf_size = *outbuf_size; size_t old_size = inbuf_size; while (inbuf_size > 0) { +#if (defined(__NetBSD__) && !defined(NETBSD_POSIX_ICONV)) || defined(__sun) + iconv(cd, (const char **)&inbuf_ptr, &inbuf_size, &outbuf_ptr, outbuf_size); +#else iconv(cd, &inbuf_ptr, &inbuf_size, &outbuf_ptr, outbuf_size); +#endif if (inbuf_size == old_size) { return false; } @