[R] PCRE private function _pcre_valid_utf8() has been renamed
Petr Pisar
ppisar at fedoraproject.org
Tue Feb 14 13:57:27 UTC 2012
commit 211834daea4f1f4dbfb6a7723e9a11e635fa5cb4
Author: Petr Písař <ppisar at redhat.com>
Date: Tue Feb 14 14:44:46 2012 +0100
PCRE private function _pcre_valid_utf8() has been renamed
R-2.14.1-Adapt-to-PCRE-8.30.patch | 35 +++++++++++++++++++++++++++++++++++
R.spec | 3 +++
2 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/R-2.14.1-Adapt-to-PCRE-8.30.patch b/R-2.14.1-Adapt-to-PCRE-8.30.patch
new file mode 100644
index 0000000..512f3ce
--- /dev/null
+++ b/R-2.14.1-Adapt-to-PCRE-8.30.patch
@@ -0,0 +1,35 @@
+From f849075205ac15da7ad9bd3fbe81ca08af053fbe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 14 Feb 2012 14:40:22 +0100
+Subject: [PATCH] Adapt to PCRE 8.30
+
+PCRE 8.30 renamed private function _pcre_valid_utf8() to
+_pcre_valid_utf().
+---
+ src/main/util.c | 10 +++++++++-
+ 1 files changed, 9 insertions(+), 1 deletions(-)
+
+diff --git a/src/main/util.c b/src/main/util.c
+index 13ce259..c1eb572 100644
+--- a/src/main/util.c
++++ b/src/main/util.c
+@@ -1258,7 +1258,15 @@ Rboolean mbcsValid(const char *str)
+
+ #include "pcre.h"
+ /* This changed at 8.13: we don't allow < 8.0 */
+-#if PCRE_MAJOR > 8 || PCRE_MINOR >= 13
++#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);
++}
++#elif PCRE_MAJOR > 8 || PCRE_MINOR >= 13
+ extern int _pcre_valid_utf8(const char *string, int length, int *erroroffset);
+
+ Rboolean utf8Valid(const char *str)
+--
+1.7.7.6
+
diff --git a/R.spec b/R.spec
index e0760f9..e3e81a2 100644
--- a/R.spec
+++ b/R.spec
@@ -12,6 +12,8 @@ URL: http://www.r-project.org
Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz
Source1: macros.R
Source2: R-make-search-index.sh
+# Submitted to upstream as bug #14813
+Patch0: R-2.14.1-Adapt-to-PCRE-8.30.patch
License: GPLv2+
Group: Applications/Engineering
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -175,6 +177,7 @@ from the R project. This package provides the static libRmath library.
%prep
%setup -q
+%patch0 -p1 -b .pcre830
# Filter false positive provides.
cat <<EOF > %{name}-prov
More information about the scm-commits
mailing list