summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2020-07-17 20:46:53 +1000
committerMark Wright <gienah@gentoo.org>2020-07-17 20:48:00 +1000
commit9a942b9f13c331d304201d35fe1a0f78491291b3 (patch)
tree691b0b1fb12a19d11c3a978d54f463439e971dc6 /sci-mathematics/rstudio/files/rstudio-1.3.1056-R-4.0.0.patch
parentvirtual/rust: arm64 stable (bug #732798) (diff)
downloadgentoo-9a942b9f13c331d304201d35fe1a0f78491291b3.tar.gz
gentoo-9a942b9f13c331d304201d35fe1a0f78491291b3.tar.bz2
gentoo-9a942b9f13c331d304201d35fe1a0f78491291b3.zip
sci-mathematics/rstudio: Bump to rstudio-1.3.1056
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Mark Wright <gienah@gentoo.org>
Diffstat (limited to 'sci-mathematics/rstudio/files/rstudio-1.3.1056-R-4.0.0.patch')
-rw-r--r--sci-mathematics/rstudio/files/rstudio-1.3.1056-R-4.0.0.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/sci-mathematics/rstudio/files/rstudio-1.3.1056-R-4.0.0.patch b/sci-mathematics/rstudio/files/rstudio-1.3.1056-R-4.0.0.patch
new file mode 100644
index 000000000000..662089e93a01
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-1.3.1056-R-4.0.0.patch
@@ -0,0 +1,58 @@
+From 71b1a935762efd24a79de193662450de5a89f67e Mon Sep 17 00:00:00 2001
+From: Jonathan McPherson <jonathan@rstudio.com>
+Date: Tue, 14 Jan 2020 12:53:20 -0800
+Subject: [PATCH] use R_NoSave over R_Slave for R 4.0+
+
+---
+ src/cpp/r/CMakeLists.txt | 12 ++++++++++++
+ src/cpp/r/config.h.in | 8 +++++++-
+ src/cpp/r/session/REmbeddedPosix.cpp | 20 ++++++++++++++------
+ 3 files changed, 33 insertions(+), 7 deletions(-)
+
+diff --git a/src/cpp/r/CMakeLists.txt b/src/cpp/r/CMakeLists.txt
+index 6984ae309c..29784b8b67 100644
+--- a/src/cpp/r/CMakeLists.txt
++++ b/src/cpp/r/CMakeLists.txt
+@@ -15,6 +15,18 @@
+
+ project (R)
+
++# find the version of R in play
++find_package(LibR REQUIRED)
++execute_process(
++ COMMAND "${LIBR_EXECUTABLE}" "--vanilla" "--slave" "-e" "cat(as.character(getRversion()))"
++ OUTPUT_VARIABLE LIBR_VERSION)
++
++# parse and save the R version to a variable
++string(REPLACE "." ";" R_VERSION_LIST "${LIBR_VERSION}")
++list(GET R_VERSION_LIST 0 R_VERSION_MAJOR)
++list(GET R_VERSION_LIST 1 R_VERSION_MINOR)
++list(GET R_VERSION_LIST 2 R_VERSION_PATCH)
++
+ # include files
+ file(GLOB_RECURSE R_HEADER_FILES "*.h*")
+
+diff --git a/src/cpp/r/config.h.in b/src/cpp/r/config.h.in
+index 6ba67c8e09..00bc8b6191 100644
+--- a/src/cpp/r/config.h.in
++++ b/src/cpp/r/config.h.in
+@@ -1,7 +1,7 @@
+ /*
+ * config.h.in
+ *
+- * Copyright (C) 2009-12 by RStudio, PBC
++ * Copyright (C) 2009-20 by RStudio, Inc.
+ *
+ * Unless you have received this program directly from RStudio pursuant
+ * to the terms of a commercial license agreement with RStudio, then
+@@ -16,4 +16,10 @@
+
+ #cmakedefine PANGO_CAIRO_FOUND
+
++// Important: These variables represent the version of R found during
++// compile/link time, NOT the version of R present at runtime.
++#define R_VERSION_MAJOR ${R_VERSION_MAJOR}
++#define R_VERSION_MINOR ${R_VERSION_MINOR}
++#define R_VERSION_PATCH ${R_VERSION_PATCH}
++
+