pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/hex-a-hop hex-a-hop: Fix build on NetBSD 9.99.17



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b2639772e8d0
branches:  trunk
changeset: 342734:b2639772e8d0
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Thu Oct 24 22:31:48 2019 +0000

description:
hex-a-hop: Fix build on NetBSD 9.99.17

Adapt the local patch for the POSIX iconv(3) API change in new NetBSD.

diffstat:

 games/hex-a-hop/distinfo         |   4 ++--
 games/hex-a-hop/patches/patch-aa |  26 +++++++++++++++++++++-----
 2 files changed, 23 insertions(+), 7 deletions(-)

diffs (54 lines):

diff -r d9b4a2f28a7d -r b2639772e8d0 games/hex-a-hop/distinfo
--- a/games/hex-a-hop/distinfo  Thu Oct 24 22:28:46 2019 +0000
+++ b/games/hex-a-hop/distinfo  Thu Oct 24 22:31:48 2019 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.3 2015/11/03 20:56:52 agc Exp $
+$NetBSD: distinfo,v 1.4 2019/10/24 22:31:48 kamil Exp $
 
 SHA1 (hex-a-hop-1.1.0.tar.gz) = 5e1994caaa4974ba87bb5676aed1e44c81dec85d
 RMD160 (hex-a-hop-1.1.0.tar.gz) = af89e8da428d8b79e71a77b9750a10b1b303b9e4
 SHA512 (hex-a-hop-1.1.0.tar.gz) = d8f7c1ab576d499595a09703a699654b88548b7266441af8f8af5287cfdcc998389faba024650214f3cb85f359a238802ecbcecbb699e5aa80ad7c5cf02a6bcd
 Size (hex-a-hop-1.1.0.tar.gz) = 9249269 bytes
-SHA1 (patch-aa) = e5701d1a80e85ff947894e430c2a0b876192065b
+SHA1 (patch-aa) = 1e950a2ebd4190d7911eaf64f4ee53bff2fc001a
 SHA1 (patch-ab) = ad560c67520e3be4eba657c60713e25e4c24f2a6
diff -r d9b4a2f28a7d -r b2639772e8d0 games/hex-a-hop/patches/patch-aa
--- a/games/hex-a-hop/patches/patch-aa  Thu Oct 24 22:28:46 2019 +0000
+++ b/games/hex-a-hop/patches/patch-aa  Thu Oct 24 22:31:48 2019 +0000
@@ -1,15 +1,31 @@
-$NetBSD: patch-aa,v 1.2 2011/12/11 20:51:48 marino Exp $
+$NetBSD: patch-aa,v 1.3 2019/10/24 22:31:48 kamil Exp $
 
 --- src/text.cpp.orig  2009-10-02 22:26:15.000000000 +0000
 +++ src/text.cpp
-@@ -441,7 +441,11 @@ void ConvertToUTF8(const std::string &te
+@@ -7,6 +7,15 @@
+ #include "text.h"
+ #include "video.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
++
+ #ifndef ENABLE_PANGO
+ 
+ #include <SDL_ttf.h>
+@@ -441,7 +450,11 @@ void ConvertToUTF8(const std::string &te
        iconv_t cd = iconv_open("UTF-8", locale_enc);
        char *in_buf = const_cast<char *>(&text_locally_encoded[0]);
        char *out_buf = &text_utf8[0];
-+#if defined(__DragonFly__)
++#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV
++      iconv(cd, (const char **)&in_buf, &text_length, &out_buf, &text_utf8_length);
++#else
        iconv(cd, &in_buf, &text_length, &out_buf, &text_utf8_length);
-+#else
-+      iconv(cd, (const char **)&in_buf, &text_length, &out_buf, &text_utf8_length);
 +#endif
        iconv_close(cd);
        if (errno != 0)



Home | Main Index | Thread Index | Old Index