pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/inputmethod/fcitx5-libthai fcitx5-libthai: fix buildin...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9418a367a525
branches: trunk
changeset: 376607:9418a367a525
user: nia <nia%pkgsrc.org@localhost>
date: Sun Apr 10 07:59:29 2022 +0000
description:
fcitx5-libthai: fix building on netbsd-9
diffstat:
inputmethod/fcitx5-libthai/distinfo | 3 +-
inputmethod/fcitx5-libthai/patches/patch-src_iconvwrapper.cpp | 37 +++++++++++
2 files changed, 39 insertions(+), 1 deletions(-)
diffs (52 lines):
diff -r 027487139d99 -r 9418a367a525 inputmethod/fcitx5-libthai/distinfo
--- a/inputmethod/fcitx5-libthai/distinfo Sun Apr 10 07:55:12 2022 +0000
+++ b/inputmethod/fcitx5-libthai/distinfo Sun Apr 10 07:59:29 2022 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2021/10/26 10:49:32 nia Exp $
+$NetBSD: distinfo,v 1.4 2022/04/10 07:59:29 nia Exp $
BLAKE2s (fcitx5-libthai-5.0.2.tar.xz) = cd53e04503c9d895a766ac3196995ccb61aa2db93fd3c28460e5577dde773a87
SHA512 (fcitx5-libthai-5.0.2.tar.xz) = 660ba7ec3142cc0d568a1af2d77659778ea83c0b3f1a9fd9ca5fe40969f9f2e41fd7cf66f9932cc6479c25d511f2553f6aedfff64950da7bfc06b92bb5100e63
Size (fcitx5-libthai-5.0.2.tar.xz) = 14556 bytes
+SHA1 (patch-src_iconvwrapper.cpp) = 2856fdb143ef45e3aff65c83e74bda58381ae2ea
diff -r 027487139d99 -r 9418a367a525 inputmethod/fcitx5-libthai/patches/patch-src_iconvwrapper.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/fcitx5-libthai/patches/patch-src_iconvwrapper.cpp Sun Apr 10 07:59:29 2022 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_iconvwrapper.cpp,v 1.1 2022/04/10 07:59:29 nia Exp $
+
+Fix building on NetBSD <=9 with non-POSIX iconv.
+
+--- src/iconvwrapper.cpp.orig 2020-12-11 07:57:11.364756600 +0000
++++ src/iconvwrapper.cpp
+@@ -9,6 +9,15 @@
+ #include <fcitx-utils/utf8.h>
+ #include <iconv.h>
+
++#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
++
+ class IconvWrapperPrivate {
+ public:
+ IconvWrapperPrivate(iconv_t conv) : conv_(conv) {}
+@@ -37,9 +46,13 @@ std::vector<uint8_t> IconvWrapper::tryCo
+ result.resize(s.size() * 10);
+ size_t byteLength = s.size();
+ size_t byteRemains = result.size();
+- char *data = const_cast<char *>(s.data());
+ char *outData = reinterpret_cast<char *>(result.data());
++#if (defined(__NetBSD__) && !NETBSD_POSIX_ICONV) || defined(__sun)
++ auto err = iconv(conv, s.data(), &byteLength, &outData, &byteRemains);
++#else
++ char *data = const_cast<char *>(s.data());
+ auto err = iconv(conv, &data, &byteLength, &outData, &byteRemains);
++#endif
+ if (err == static_cast<size_t>(-1)) {
+ continue;
+ }
Home |
Main Index |
Thread Index |
Old Index