summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/R/distinfo3
-rw-r--r--math/R/patches/patch-src_main_util.c26
2 files changed, 28 insertions, 1 deletions
diff --git a/math/R/distinfo b/math/R/distinfo
index d1ab81043fb..6b6aa3a58ee 100644
--- a/math/R/distinfo
+++ b/math/R/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.46 2011/12/18 02:50:07 marino Exp $
+$NetBSD: distinfo,v 1.47 2012/03/06 21:34:29 wiz Exp $
SHA1 (R-2.14.0.tar.gz) = 0f46bf75a7c150350b1142c29a98e7994d2b4bef
RMD160 (R-2.14.0.tar.gz) = f2f2805c8660d58050be1d11abf376843dbb40ea
@@ -6,3 +6,4 @@ Size (R-2.14.0.tar.gz) = 22675106 bytes
SHA1 (patch-ac) = ea885d8391ec06a7cc7fcbbadce134c794b7a47c
SHA1 (patch-ad) = 43ae23bd0815986c3bac661bd3354cd96b3e54e4
SHA1 (patch-src_main_format.c) = f337358361cd81547305d61be4682c4f73b6531a
+SHA1 (patch-src_main_util.c) = ef4d1bc426f49f51903cf2da66897cfa023b2092
diff --git a/math/R/patches/patch-src_main_util.c b/math/R/patches/patch-src_main_util.c
new file mode 100644
index 00000000000..76af0411a13
--- /dev/null
+++ b/math/R/patches/patch-src_main_util.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_main_util.c,v 1.1 2012/03/06 21:34:29 wiz Exp $
+
+Fix build with pcre-8.30+.
+Based on Petr Písař <ppisar@redhat.com>'s patch
+http://pkgs.fedoraproject.org/gitweb/?p=R.git;a=commitdiff_plain
+
+--- src/main/util.c.orig 2011-10-02 22:02:33.000000000 +0000
++++ src/main/util.c
+@@ -1257,8 +1257,16 @@ Rboolean mbcsValid(const char *str)
+ }
+
+ #include "pcre.h"
++#if PCRE_MAJOR > 8 || PCRE_MINOR >= 30
++extern int _pcre_valid_utf(const char *string, int length, int *erroroffset);
++
++Rboolean utf8Valid(const char *str)
++{
++ int errp;
++ return (_pcre_valid_utf(str, (int) strlen(str), &errp) == 0);
++}
+ /* This changed at 8.13: we don't allow < 8.0 */
+-#if PCRE_MAJOR > 8 || PCRE_MINOR >= 13
++#elif PCRE_MAJOR > 8 || PCRE_MINOR >= 13
+ extern int _pcre_valid_utf8(const char *string, int length, int *erroroffset);
+
+ Rboolean utf8Valid(const char *str)