pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/htmlcxx htmlcxx: Fix build on NetBSD 9.99.17
details: https://anonhg.NetBSD.org/pkgsrc/rev/1ef436f91fe8
branches: trunk
changeset: 403314:1ef436f91fe8
user: kamil <kamil%pkgsrc.org@localhost>
date: Fri Oct 25 10:29:04 2019 +0000
description:
htmlcxx: Fix build on NetBSD 9.99.17
Adapt the local patch for the POSIX iconv(3) API change in new NetBSD.
diffstat:
www/htmlcxx/distinfo | 4 +-
www/htmlcxx/patches/patch-html_CharsetConverter.cc | 25 +++++++++++++++++++--
2 files changed, 24 insertions(+), 5 deletions(-)
diffs (55 lines):
diff -r 6e88bbee23b2 -r 1ef436f91fe8 www/htmlcxx/distinfo
--- a/www/htmlcxx/distinfo Fri Oct 25 10:22:26 2019 +0000
+++ b/www/htmlcxx/distinfo Fri Oct 25 10:29:04 2019 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.2 2015/11/04 02:46:54 agc Exp $
+$NetBSD: distinfo,v 1.3 2019/10/25 10:29:04 kamil Exp $
SHA1 (htmlcxx-0.85.tar.gz) = e56fef830db51041fd297d269d24379b2dccb928
RMD160 (htmlcxx-0.85.tar.gz) = d357b4c29127aae7f06da666c004c9db26ef29a4
SHA512 (htmlcxx-0.85.tar.gz) = a385b65fb668727b0034a95e5dcda18939e4cd2fa5140bbf3bc63907abc481cb4e6f2f46089eac131cde2b8234a4fc5db4f81253b10e6dff6b42632cea990a61
Size (htmlcxx-0.85.tar.gz) = 414624 bytes
-SHA1 (patch-html_CharsetConverter.cc) = 72204f93fa3639328b73c5bed1841f23c32946c8
+SHA1 (patch-html_CharsetConverter.cc) = c06dd6a2ad59ebbf25c65a567b24ace73b58f52f
SHA1 (patch-html_ci__string.h) = 71438e4eea290f5934918d1996d0c80eefd5ffe5
diff -r 6e88bbee23b2 -r 1ef436f91fe8 www/htmlcxx/patches/patch-html_CharsetConverter.cc
--- a/www/htmlcxx/patches/patch-html_CharsetConverter.cc Fri Oct 25 10:22:26 2019 +0000
+++ b/www/htmlcxx/patches/patch-html_CharsetConverter.cc Fri Oct 25 10:29:04 2019 +0000
@@ -1,15 +1,34 @@
-$NetBSD: patch-html_CharsetConverter.cc,v 1.1 2014/02/16 22:58:51 wiz Exp $
+$NetBSD: patch-html_CharsetConverter.cc,v 1.2 2019/10/25 10:29:04 kamil Exp $
Fix build on NetBSD.
--- html/CharsetConverter.cc.orig 2011-05-15 17:32:10.000000000 +0000
+++ html/CharsetConverter.cc
-@@ -37,7 +37,7 @@ string CharsetConverter::convert(const s
+@@ -4,6 +4,15 @@
+ #include <cerrno>
+ #include "CharsetConverter.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
++
+ using namespace std;
+ using namespace htmlcxx;
+
+@@ -37,7 +46,11 @@ string CharsetConverter::convert(const s
size_t ret;
while (1) {
-- ret = iconv(mIconvDescriptor, const_cast<char**>(&inbuf), &inbytesleft, &outbuf, &outbytesleft);
++#if (defined(__NetBSD__) && !NETBSD_POSIX_ICONV)
+ ret = iconv(mIconvDescriptor, (const char**)(&inbuf), &inbytesleft, &outbuf, &outbytesleft);
++#else
+ ret = iconv(mIconvDescriptor, const_cast<char**>(&inbuf), &inbytesleft, &outbuf, &outbytesleft);
++#endif
if (ret == 0) break;
if (ret == (size_t)-1 && errno == E2BIG) return string();
Home |
Main Index |
Thread Index |
Old Index