pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators/dosbox-x dosbox-x: do not lose constness of ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/24fcf886a952
branches:  trunk
changeset: 375103:24fcf886a952
user:      nia <nia%pkgsrc.org@localhost>
date:      Mon Mar 07 16:37:51 2022 +0000

description:
dosbox-x: do not lose constness of iconv arg on netbsd prior to current

diffstat:

 emulators/dosbox-x/Makefile                                |   7 ++-
 emulators/dosbox-x/distinfo                                |   3 +-
 emulators/dosbox-x/patches/patch-include_iconvpp.hpp       |  34 ++++++++++++++
 emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp |   2 +-
 4 files changed, 43 insertions(+), 3 deletions(-)

diffs (90 lines):

diff -r cc86d93f483d -r 24fcf886a952 emulators/dosbox-x/Makefile
--- a/emulators/dosbox-x/Makefile       Mon Mar 07 16:27:48 2022 +0000
+++ b/emulators/dosbox-x/Makefile       Mon Mar 07 16:37:51 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.33 2022/03/04 07:41:14 nia Exp $
+# $NetBSD: Makefile,v 1.34 2022/03/07 16:37:51 nia Exp $
 
 DISTNAME=      dosbox-x-0.83.23
 CATEGORIES=    emulators
@@ -15,6 +15,8 @@
 USE_TOOLS+=    autoconf autoreconf automake pkg-config
 USE_LANGUAGES= c c++
 
+TOOL_DEPENDS+= dos2unix-[0-9]*:../../converters/dos2unix
+
 # C++11
 GCC_REQD+=     4.7
 
@@ -56,6 +58,9 @@
 BUILDLINK_TRANSFORM+=  rm:-Wno-int-to-void-pointer-cast
 BUILDLINK_TRANSFORM+=  rm:-Wno-address-of-packed-member
 
+post-extract:
+       dos2unix ${WRKSRC}/include/iconvpp.hpp
+
 pre-configure:
        cd ${WRKSRC} && autoreconf -fi
 
diff -r cc86d93f483d -r 24fcf886a952 emulators/dosbox-x/distinfo
--- a/emulators/dosbox-x/distinfo       Mon Mar 07 16:27:48 2022 +0000
+++ b/emulators/dosbox-x/distinfo       Mon Mar 07 16:37:51 2022 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.20 2022/03/04 07:41:14 nia Exp $
+$NetBSD: distinfo,v 1.21 2022/03/07 16:37:51 nia Exp $
 
 BLAKE2s (dosbox-x-0.83.23.tar.gz) = d6cff5e7e54f3f63757bf0f41f2aa6c635c5bc7c029ebb5b69a0d2c55afe2b8c
 SHA512 (dosbox-x-0.83.23.tar.gz) = 26ca2fd8753cee8c4c931c54b6a0d0af11144c6b770c16f2b482386b06529ce1567e74d355fb9163e9801e833b4546482469e67def80e1aa1b93652663f31fbe
 Size (dosbox-x-0.83.23.tar.gz) = 64494344 bytes
 SHA1 (patch-configure.ac) = 906aa99b5fce6224ef4c001d9bba1e4fc89a34f9
 SHA1 (patch-include_dosbox.h) = 6f7397b4a611511fc1782b1603c9f5cd51b74eb9
+SHA1 (patch-include_iconvpp.hpp) = 992f51ff790ff9ad8b89a4735f6e0a956675434d
 SHA1 (patch-src_dos_dos__programs.cpp) = 64444c54b319fbfc7de7219d88fa6add953a0fb0
 SHA1 (patch-src_libs_physfs_physfs__platform__unix.c) = 5cde2acf3691478f1d91945b3942c968af2eadc6
diff -r cc86d93f483d -r 24fcf886a952 emulators/dosbox-x/patches/patch-include_iconvpp.hpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/dosbox-x/patches/patch-include_iconvpp.hpp      Mon Mar 07 16:37:51 2022 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-include_iconvpp.hpp,v 1.1 2022/03/07 16:37:52 nia Exp $
+
+Support NetBSD 9.x and earlier.
+
+--- include/iconvpp.hpp.orig   2022-03-07 16:24:10.486063951 +0000
++++ include/iconvpp.hpp
+@@ -31,6 +31,15 @@
+ # define ICONV_BIG_ENDIAN BIG_ENDIAN
+ #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 <errno.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -247,7 +256,11 @@ public:
+             iconv(context,NULL,NULL,NULL,NULL);
+ 
+             /* Ref: [http://man7.org/linux/man-pages/man3/iconv.3.html] */
++#if defined(__sun) || (defined(__NetBSD__) && !defined(NETBSD_POSIX_ICONV))
++            int ret = iconv(context,(&(pclass::src_ptr)),&src_left,(char**)(&(pclass::dst_ptr)),&dst_left);
++#else
+             int ret = iconv(context,(char**)(&(pclass::src_ptr)),&src_left,(char**)(&(pclass::dst_ptr)),&dst_left);
++#endif
+ 
+             pclass::src_adv = (size_t)(pclass::src_ptr - i_src);
+             pclass::dst_adv = (size_t)(pclass::dst_ptr - i_dst);
diff -r cc86d93f483d -r 24fcf886a952 emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp
--- a/emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp        Mon Mar 07 16:27:48 2022 +0000
+++ b/emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp        Mon Mar 07 16:37:51 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_dos_dos__programs.cpp,v 1.3 2022/03/04 07:41:14 nia Exp $
+$NetBSD: patch-src_dos_dos__programs.cpp,v 1.4 2022/03/07 16:37:52 nia Exp $
 
 dos_programs.cpp: In member function 'bool AUTOTYPE::ReadDoubleArg(const string&, const char*, const double&, const double&, const double&, double&)':
 dos_programs.cpp:5556:12: error: expected unqualified-id before '(' token



Home | Main Index | Thread Index | Old Index