Received: by mail.netbsd.org (Postfix, from userid 605) id AAA1184D6F; Thu, 24 Oct 2019 21:50:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 31A2C84D58 for ; Thu, 24 Oct 2019 21:50:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id XXW46EYJf6sY for ; Thu, 24 Oct 2019 21:50:08 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 9B05184CFC for ; Thu, 24 Oct 2019 21:50:08 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 94BEAFA84; Thu, 24 Oct 2019 21:50:08 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1571953808224070" MIME-Version: 1.0 Date: Thu, 24 Oct 2019 21:50:08 +0000 From: "Kamil Rytarowski" Subject: CVS commit: pkgsrc/audio/ncmpc To: pkgsrc-changes@NetBSD.org Reply-To: kamil@netbsd.org X-Mailer: log_accum Message-Id: <20191024215008.94BEAFA84@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1571953808224070 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: kamil Date: Thu Oct 24 21:50:08 UTC 2019 Modified Files: pkgsrc/audio/ncmpc: distinfo pkgsrc/audio/ncmpc/patches: patch-src_charset.cxx Log Message: ncmpc: Fix build on NetBSD 9.99.17 Adapt the local patch for the POSIX iconv(3) API change in new NetBSD. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 pkgsrc/audio/ncmpc/distinfo cvs rdiff -u -r1.1 -r1.2 pkgsrc/audio/ncmpc/patches/patch-src_charset.cxx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1571953808224070 Content-Disposition: inline Content-Length: 3315 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/audio/ncmpc/distinfo diff -u pkgsrc/audio/ncmpc/distinfo:1.18 pkgsrc/audio/ncmpc/distinfo:1.19 --- pkgsrc/audio/ncmpc/distinfo:1.18 Sun Oct 6 16:15:51 2019 +++ pkgsrc/audio/ncmpc/distinfo Thu Oct 24 21:50:08 2019 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.18 2019/10/06 16:15:51 nia Exp $ +$NetBSD: distinfo,v 1.19 2019/10/24 21:50:08 kamil Exp $ SHA1 (ncmpc-0.35.tar.xz) = af728f27674a9b33db555bfad663c1b831d5c08f RMD160 (ncmpc-0.35.tar.xz) = d8a0c1a2e953cc1e8ffc685b89c5be8f1d292979 @@ -6,5 +6,5 @@ SHA512 (ncmpc-0.35.tar.xz) = 64f56730b04 Size (ncmpc-0.35.tar.xz) = 232828 bytes SHA1 (patch-doc_meson.build) = c19102b6f7f069a2a147b66e6ed4b4585332ac8e SHA1 (patch-meson.build) = b16babee9f8e5799a600bf029b3bb606e32a265a -SHA1 (patch-src_charset.cxx) = 0925365535ca35de73e94c1fa3737c8c71eee101 +SHA1 (patch-src_charset.cxx) = c8e06c936657819060c6539a3726e03fda7da54a SHA1 (patch-src_ncu.cxx) = 0a4516a7c5a9819977873a78d5078a22f0414356 Index: pkgsrc/audio/ncmpc/patches/patch-src_charset.cxx diff -u pkgsrc/audio/ncmpc/patches/patch-src_charset.cxx:1.1 pkgsrc/audio/ncmpc/patches/patch-src_charset.cxx:1.2 --- pkgsrc/audio/ncmpc/patches/patch-src_charset.cxx:1.1 Sat Sep 14 12:19:40 2019 +++ pkgsrc/audio/ncmpc/patches/patch-src_charset.cxx Thu Oct 24 21:50:08 2019 @@ -1,34 +1,49 @@ -$NetBSD: patch-src_charset.cxx,v 1.1 2019/09/14 12:19:40 nia Exp $ +$NetBSD: patch-src_charset.cxx,v 1.2 2019/10/24 21:50:08 kamil Exp $ -Don't strip constness for the iconv input on SunOS and NetBSD, -which continue to have the input as const. +Don't strip constness for the iconv input on SunOS and old NetBSD. ---- src/charset.cxx.orig 2019-04-10 09:08:34.000000000 +0000 +--- src/charset.cxx.orig 2019-09-14 12:24:35.000000000 +0000 +++ src/charset.cxx -@@ -64,9 +64,13 @@ Iconv(iconv_t i, +@@ -20,6 +20,15 @@ + #include "charset.hxx" + #include "util/ScopeExit.hxx" + ++#if defined(__NetBSD__) ++#include ++#if __NetBSD_Prereq__(9,99,17) ++#define NETBSD_POSIX_ICONV 1 ++#else ++#define NETBSD_POSIX_ICONV 0 ++#endif ++#endif ++ + #include + + #include +@@ -64,9 +73,13 @@ Iconv(iconv_t i, --dest_size; /* reserve once byte for the null terminator */ while (src_length > 0) { -+#if !defined(__NetBSD__) && !defined(__sun) ++#if (defined(__NetBSD__) && !NETBSD_POSIX_ICONV) || defined(__sun) ++ size_t err = iconv(i, &src, &src_length, &dest, &dest_size); ++#else size_t err = iconv(i, const_cast(&src), &src_length, &dest, &dest_size); -+#else -+ size_t err = iconv(i, &src, &src_length, &dest, &dest_size); +#endif if (err == (size_t)-1) { switch (errno) { case EILSEQ: -@@ -130,9 +134,13 @@ Iconv(iconv_t i, +@@ -130,9 +143,13 @@ Iconv(iconv_t i, char buffer[1024], *outbuf = buffer; size_t outbytesleft = sizeof(buffer); -+#if !defined(__NetBSD__) && !defined(__sun) ++#if (defined(__NetBSD__) && !NETBSD_POSIX_ICONV) || defined(__sun) ++ size_t err = iconv(i, &src, &src_length, &outbuf, &outbytesleft); ++#else size_t err = iconv(i, const_cast(&src), &src_length, &outbuf, &outbytesleft); -+#else -+ size_t err = iconv(i, &src, &src_length, &outbuf, &outbytesleft); +#endif dest.append(buffer, outbuf); if (err == (size_t)-1) { --_----------=_1571953808224070--