summaryrefslogtreecommitdiff
path: root/games/valyriatear
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-04-10 09:38:20 +0000
committernia <nia@pkgsrc.org>2021-04-10 09:38:20 +0000
commita79ed294a7532c856472a4076219a8167dcbaa17 (patch)
treeb2bd4dfccc660f8410cb6d84c8fca22c63dcc41c /games/valyriatear
parent71550c5b6ddcf477bb0b2da56bde87d5127fc6ae (diff)
downloadpkgsrc-a79ed294a7532c856472a4076219a8167dcbaa17.tar.gz
valyriatear: fix build on netbsd releases without posix iconv
Diffstat (limited to 'games/valyriatear')
-rw-r--r--games/valyriatear/Makefile7
-rw-r--r--games/valyriatear/distinfo3
-rw-r--r--games/valyriatear/patches/patch-src_utils_src_utils_ustring.cpp27
3 files changed, 35 insertions, 2 deletions
diff --git a/games/valyriatear/Makefile b/games/valyriatear/Makefile
index 75d260c76cf..cb92fc6f55e 100644
--- a/games/valyriatear/Makefile
+++ b/games/valyriatear/Makefile
@@ -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 @@ HOMEPAGE= https://github.com/ValyriaTear/ValyriaTear
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 @@ USE_LANGUAGES= c c++
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 --git a/games/valyriatear/distinfo b/games/valyriatear/distinfo
index 72c93f14fea..ce1789d1bab 100644
--- a/games/valyriatear/distinfo
+++ b/games/valyriatear/distinfo
@@ -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 @@ Size (ValyriaTear-src-with-deps-1.1.0.tar.gz) = 117039173 bytes
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 --git a/games/valyriatear/patches/patch-src_utils_src_utils_ustring.cpp b/games/valyriatear/patches/patch-src_utils_src_utils_ustring.cpp
new file mode 100644
index 00000000000..1c1616008f8
--- /dev/null
+++ b/games/valyriatear/patches/patch-src_utils_src_utils_ustring.cpp
@@ -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