From ff2b1c17b824a2399cfdc11a9839ef3d5bb1a6ed Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 22 Apr 2015 11:58:44 +0200 Subject: gnu: r: Set library rpath. * gnu/packages/statistics.scm (r)[arguments]: Add the rpath for lib directory of output to LDFLAGS. --- gnu/packages/statistics.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu/packages/statistics.scm') diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 5fae6d7a3c..42c16cdb30 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -53,7 +53,11 @@ "0ypsm11c7n49pgh2ricyhhpfhas3famscdazzdp2zq70rapm1ldw")))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:make-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" + (assoc-ref %outputs "out") + "/lib/R/lib")) + #:phases (alist-cons-before 'check 'set-timezone ;; Some tests require the timezone to be set. -- cgit 1.4.1 From 3c43bcc68d4ad9caddbb64506b5c8f10fdb9c8f3 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 22 Apr 2015 12:26:45 +0200 Subject: gnu: r: Update to 3.2.0. * gnu/packages/statistics.scm (r): Update to 3.2.0. --- gnu/packages/statistics.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/statistics.scm') diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 42c16cdb30..722e0dfa49 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -42,7 +42,7 @@ (define-public r (package (name "r") - (version "3.1.2") + (version "3.2.0") (source (origin (method url-fetch) (uri (string-append "mirror://cran/src/base/R-" @@ -50,7 +50,7 @@ version ".tar.gz")) (sha256 (base32 - "0ypsm11c7n49pgh2ricyhhpfhas3famscdazzdp2zq70rapm1ldw")))) + "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")))) (build-system gnu-build-system) (arguments `(#:make-flags -- cgit 1.4.1 From 9099e881828fd242cc26054c0f33670c46154d96 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 19 May 2015 11:53:47 +0200 Subject: gnu: r: Apply patch to fix linking against R. * gnu/packages/patches/r-fix-15899.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/statistics.scm (r)[source]: Use it. --- gnu-system.am | 1 + gnu/packages/patches/r-fix-15899.patch | 17 +++++++++++++++++ gnu/packages/statistics.scm | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/r-fix-15899.patch (limited to 'gnu/packages/statistics.scm') diff --git a/gnu-system.am b/gnu-system.am index a26686b81b..297c8bcf6a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -542,6 +542,7 @@ dist_patch_DATA = \ gnu/packages/patches/qt4-tests.patch \ gnu/packages/patches/qt5-conflicting-typedefs.patch \ gnu/packages/patches/qt5-runpath.patch \ + gnu/packages/patches/r-fix-15899.patch \ gnu/packages/patches/ratpoison-shell.patch \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/ripperx-libm.patch \ diff --git a/gnu/packages/patches/r-fix-15899.patch b/gnu/packages/patches/r-fix-15899.patch new file mode 100644 index 0000000000..40593d34e6 --- /dev/null +++ b/gnu/packages/patches/r-fix-15899.patch @@ -0,0 +1,17 @@ +Without the "extern" keyword external applications linking against R (such as +Shogun, for example) might not be linkable. + +See https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15899 for details +about this bug. + +--- a/src/include/Rinterface.h (revision 66251) ++++ b/src/include/Rinterface.h (working copy) +@@ -84,7 +84,7 @@ + void fpu_setup(Rboolean); + + /* in unix/system.c */ +-int R_running_as_main_program; ++extern int R_running_as_main_program; + + #ifdef CSTACK_DEFNS + /* duplicating Defn.h */ diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 722e0dfa49..9408705d5e 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -50,7 +50,8 @@ version ".tar.gz")) (sha256 (base32 - "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")))) + "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")) + (patches (list (search-patch "r-fix-15899.patch"))))) (build-system gnu-build-system) (arguments `(#:make-flags -- cgit 1.4.1