pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/chat/swirc



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun Sep 18 12:21:19 UTC 2022

Modified Files:
        pkgsrc/chat/swirc: distinfo
Added Files:
        pkgsrc/chat/swirc/patches: patch-src_printtext.cpp

Log Message:
swirc: Fix building on NetBSD 9


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/chat/swirc/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/swirc/patches/patch-src_printtext.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/chat/swirc/distinfo
diff -u pkgsrc/chat/swirc/distinfo:1.3 pkgsrc/chat/swirc/distinfo:1.4
--- pkgsrc/chat/swirc/distinfo:1.3      Thu Jul 28 22:18:05 2022
+++ pkgsrc/chat/swirc/distinfo  Sun Sep 18 12:21:18 2022
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2022/07/28 22:18:05 fcambus Exp $
+$NetBSD: distinfo,v 1.4 2022/09/18 12:21:18 nia Exp $
 
 BLAKE2s (swirc-3.3.5.tgz) = 9723254acc50f0b8680c4f78bdef7934c1984a7b7fa91201360d4ee648862145
 SHA512 (swirc-3.3.5.tgz) = 424b567709cd82aa84efb2623b52d4586077dab5e025c3dce8fae382a5de2a4531819b1f7fde353b84c462c7c7b6cac6142c7d807d05f534a7599d706237d4ee
 Size (swirc-3.3.5.tgz) = 291300 bytes
+SHA1 (patch-src_printtext.cpp) = 476d813c9c4aff2c3d81920d66aa5baafddfaaaa

Added files:

Index: pkgsrc/chat/swirc/patches/patch-src_printtext.cpp
diff -u /dev/null pkgsrc/chat/swirc/patches/patch-src_printtext.cpp:1.1
--- /dev/null   Sun Sep 18 12:21:19 2022
+++ pkgsrc/chat/swirc/patches/patch-src_printtext.cpp   Sun Sep 18 12:21:18 2022
@@ -0,0 +1,36 @@
+$NetBSD: patch-src_printtext.cpp,v 1.1 2022/09/18 12:21:18 nia Exp $
+
+Support iconv prototype on NetBSD 9 and earlier.
+
+--- src/printtext.cpp.orig     2022-07-28 13:19:25.000000000 +0000
++++ src/printtext.cpp
+@@ -39,6 +39,15 @@
+ #include <iconv.h>
+ #endif
+ 
++#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 "assertAPI.h"
+ #include "atomicops.h"
+ #ifdef UNIT_TESTING
+@@ -1473,8 +1482,13 @@ get_buffer(const char *orig)
+               out[outbytes] = '\0';
+               out_p = addrof(out[0]);
+               errno = 0;
++#if (defined(__NetBSD__) && !NETBSD_POSIX_ICONV) || defined(__sun)
++              if (iconv(cd, (const char **)&in, &inbytes, &out_p, &outbytes) == static_cast
++                  <size_t>(-1)) {
++#else
+               if (iconv(cd, &in, &inbytes, &out_p, &outbytes) == static_cast
+                   <size_t>(-1)) {
++#endif
+                       free(orig_copy);
+                       free(out);
+                       (void) iconv_close(cd);



Home | Main Index | Thread Index | Old Index