pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/rkdeveloptool rkdeveloptool: Fix build on Net...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5465391ba54c
branches:  trunk
changeset: 403307:5465391ba54c
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Fri Oct 25 10:10:10 2019 +0000

description:
rkdeveloptool: Fix build on NetBSD 9.99.17

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

diffstat:

 sysutils/rkdeveloptool/distinfo               |   4 +-
 sysutils/rkdeveloptool/patches/patch-main.cpp |  32 +++++++++++++++++++++++---
 2 files changed, 30 insertions(+), 6 deletions(-)

diffs (69 lines):

diff -r 2cb7433201f8 -r 5465391ba54c sysutils/rkdeveloptool/distinfo
--- a/sysutils/rkdeveloptool/distinfo   Fri Oct 25 10:00:58 2019 +0000
+++ b/sysutils/rkdeveloptool/distinfo   Fri Oct 25 10:10:10 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.1 2018/08/31 10:09:51 tnn Exp $
+$NetBSD: distinfo,v 1.2 2019/10/25 10:10:10 kamil Exp $
 
 SHA1 (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = 20b22d5c172c5f651e2a49a4985708bd6d0cbcd6
 RMD160 (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = ce1f05a7d4cd38ae0b63e3a67826b604d925efea
 SHA512 (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = 
cba3f9540b4fecbe3288a10c37294ddddcdb6572bed8085e4cf98328c0a4c651062399595cf92a3422268504d36835d52cac56f5e24a4eeb0639423372020ae4
 Size (rkdeveloptool-1.3-081d237ad5bf8f03170c9d60bd94ceefa0352aaf.tar.gz) = 57003 bytes
-SHA1 (patch-main.cpp) = c1115d44570cbf21084d3326f1fad32db101054f
+SHA1 (patch-main.cpp) = 4cf466f12853a6158f5f299a7a0bdf593e7c0502
diff -r 2cb7433201f8 -r 5465391ba54c sysutils/rkdeveloptool/patches/patch-main.cpp
--- a/sysutils/rkdeveloptool/patches/patch-main.cpp     Fri Oct 25 10:00:58 2019 +0000
+++ b/sysutils/rkdeveloptool/patches/patch-main.cpp     Fri Oct 25 10:10:10 2019 +0000
@@ -1,24 +1,48 @@
-$NetBSD: patch-main.cpp,v 1.1 2018/08/31 10:09:51 tnn Exp $
+$NetBSD: patch-main.cpp,v 1.2 2019/10/25 10:10:10 kamil Exp $
 
 match iconv(3) prototype
 
 --- main.cpp.orig      2018-03-28 01:22:40.000000000 +0000
 +++ main.cpp
-@@ -168,7 +168,7 @@ bool StringToWideString(char *pszSrc, wc
+@@ -15,6 +15,16 @@
+ #include "RKComm.h"
+ #include "RKDevice.h"
+ #include "RKImage.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
++
+ extern const char *szManufName[];
+ CRKLog *g_pLogObject=NULL;
+ CONFIG_ITEM_VECTOR g_ConfigItemVec;
+@@ -168,7 +178,11 @@ bool StringToWideString(char *pszSrc, wc
        pIn = (char *)pszSrc;
        pOut = (char *)pszDest;
  
 -      iRet = iconv(cd, (char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen);
++#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV
 +      iRet = iconv(cd, (const char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen);
++#else
++      iRet = iconv(cd, &pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen);
++#endif
  
        if(iRet == -1) {
                delete []pszDest;
-@@ -205,7 +205,7 @@ bool WideStringToString(wchar_t *pszSrc,
+@@ -205,7 +219,11 @@ bool WideStringToString(wchar_t *pszSrc,
        char *pIn, *pOut;
        pIn = (char *)pszSrc;
        pOut = (char *)pszDest;
--      iRet = iconv(cd, (char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen);
++#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV
 +      iRet = iconv(cd, (const char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen);
++#else
+       iRet = iconv(cd, (char **)&pIn, (size_t *)&nSrcLen, (char **)&pOut, (size_t *)&nDestLen);
++#endif
  
        if(iRet == -1) {
                delete []pszDest;



Home | Main Index | Thread Index | Old Index