pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/audio/ncmpc
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.
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 <sys/param.h>
++#if __NetBSD_Prereq__(9,99,17)
++#define NETBSD_POSIX_ICONV 1
++#else
++#define NETBSD_POSIX_ICONV 0
++#endif
++#endif
++
+ #include <algorithm>
+
+ #include <assert.h>
+@@ -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<char **>(&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<char **>(&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) {
Home |
Main Index |
Thread Index |
Old Index