pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/valyriatear valyriatear: fix build on netbsd rel...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7f9808682e14
branches:  trunk
changeset: 450069:7f9808682e14
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Apr 10 09:38:20 2021 +0000

description:
valyriatear: fix build on netbsd releases without posix iconv

diffstat:

 games/valyriatear/Makefile                                      |   7 ++-
 games/valyriatear/distinfo                                      |   3 +-
 games/valyriatear/patches/patch-src_utils_src_utils_ustring.cpp |  27 ++++++++++
 3 files changed, 35 insertions(+), 2 deletions(-)

diffs (73 lines):

diff -r a9241f5468a9 -r 7f9808682e14 games/valyriatear/Makefile
--- a/games/valyriatear/Makefile        Sat Apr 10 09:29:35 2021 +0000
+++ b/games/valyriatear/Makefile        Sat Apr 10 09:38:20 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2021/04/04 11:10:37 nia Exp $
+# $NetBSD: Makefile,v 1.2 2021/04/10 09:38:20 nia Exp $
 
 DISTNAME=      ValyriaTear-src-with-deps-1.1.0
 PKGNAME=       ${DISTNAME:tl:S/-src-with-deps//1}
@@ -11,6 +11,8 @@
 COMMENT=       Single player medieval fantasy 2D JRPG
 LICENSE=       gnu-gpl-v2 AND gnu-gpl-v3 AND cc-by-sa-v3.0
 
+TOOL_DEPENDS+= dos2unix-[0-9]*:../../converters/dos2unix
+
 WRKSRC=                ${WRKDIR}/ValyriaTear
 
 USE_CMAKE=     yes
@@ -19,6 +21,9 @@
 
 LDFLAGS+=      ${BUILDLINK_LDADD.gettext}
 
+post-extract:
+       dos2unix src/utils/src/utils/ustring.cpp
+
 .include "../../audio/libvorbis/buildlink3.mk"
 .include "../../audio/openal-soft/buildlink3.mk"
 .include "../../devel/SDL2/buildlink3.mk"
diff -r a9241f5468a9 -r 7f9808682e14 games/valyriatear/distinfo
--- a/games/valyriatear/distinfo        Sat Apr 10 09:29:35 2021 +0000
+++ b/games/valyriatear/distinfo        Sat Apr 10 09:38:20 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2021/04/04 11:10:37 nia Exp $
+$NetBSD: distinfo,v 1.2 2021/04/10 09:38:20 nia Exp $
 
 SHA1 (ValyriaTear-src-with-deps-1.1.0.tar.gz) = 407cc5bdf4ed67236cfab089c14cee0377bb3cc7
 RMD160 (ValyriaTear-src-with-deps-1.1.0.tar.gz) = 243b04060c6d2bdec717f98835f3c5f27e6742ea
@@ -7,3 +7,4 @@
 SHA1 (patch-src_CMakeLists.txt) = 6189c5313ef3f01b174032e249c1a94ceabfa96c
 SHA1 (patch-src_common_app__settings.cpp) = 826d0eb42ad777b61296b5b4a21787ce0707930b
 SHA1 (patch-src_main.cpp) = 2c8f826e34341f2a7a47c67886d6a6a3ce0fa819
+SHA1 (patch-src_utils_src_utils_ustring.cpp) = 061337fd91124edba8ecaa53ba4e23651ba0445b
diff -r a9241f5468a9 -r 7f9808682e14 games/valyriatear/patches/patch-src_utils_src_utils_ustring.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/valyriatear/patches/patch-src_utils_src_utils_ustring.cpp   Sat Apr 10 09:38:20 2021 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_utils_src_utils_ustring.cpp,v 1.1 2021/04/10 09:38:21 nia Exp $
+
+Support non-POSIX iconv on NetBSD.
+
+--- src/utils/src/utils/ustring.cpp.orig       2019-07-29 10:50:15.000000000 +0000
++++ src/utils/src/utils/ustring.cpp
+@@ -25,6 +25,10 @@
+ // For correct endianess support
+ #include <SDL2/SDL_endian.h>
+ 
++#ifdef __NetBSD__
++#include <sys/param.h>
++#endif
++
+ namespace vt_utils
+ {
+ 
+@@ -171,7 +175,8 @@ static bool UTF8ToUTF16(const std::strin
+         return false;
+     }
+ 
+-#if (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION == 0x0109) || defined(__FreeBSD__)
++#if (defined(_LIBICONV_VERSION) && _LIBICONV_VERSION == 0x0109) || defined(__FreeBSD__) || \
++    (defined(__NetBSD__) && !__NetBSD_Prereq__(9,99,17))
+     // We are using an iconv API that uses const char*
+     const char *sourceChar = source.c_str();
+ #else



Home | Main Index | Thread Index | Old Index