summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
Diffstat (limited to 'emulators')
-rw-r--r--emulators/dosbox-x/Makefile7
-rw-r--r--emulators/dosbox-x/distinfo3
-rw-r--r--emulators/dosbox-x/patches/patch-include_iconvpp.hpp34
-rw-r--r--emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp2
4 files changed, 43 insertions, 3 deletions
diff --git a/emulators/dosbox-x/Makefile b/emulators/dosbox-x/Makefile
index 9ed0cb55571..a431f365040 100644
--- a/emulators/dosbox-x/Makefile
+++ b/emulators/dosbox-x/Makefile
@@ -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 @@ GNU_CONFIGURE= yes
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 @@ CHECK_PORTABILITY_SKIP+= Makefile.in Makefile.am
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 --git a/emulators/dosbox-x/distinfo b/emulators/dosbox-x/distinfo
index ac3f273e646..9357ea65058 100644
--- a/emulators/dosbox-x/distinfo
+++ b/emulators/dosbox-x/distinfo
@@ -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 --git a/emulators/dosbox-x/patches/patch-include_iconvpp.hpp b/emulators/dosbox-x/patches/patch-include_iconvpp.hpp
new file mode 100644
index 00000000000..0c18e5e9cdf
--- /dev/null
+++ b/emulators/dosbox-x/patches/patch-include_iconvpp.hpp
@@ -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 --git a/emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp b/emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp
index 86b947a1c7f..fefc6eec488 100644
--- a/emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp
+++ b/emulators/dosbox-x/patches/patch-src_dos_dos__programs.cpp
@@ -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