>From 10635e96a2c78340c0f892572bea1491a534f1a7 Mon Sep 17 00:00:00 2001 From: Moritz Lell Date: Thu, 16 Jan 2020 01:17:07 +0100 Subject: [PATCH] gnu: r-minimal: Prevent absolute paths in lib/R/etc/Makevars Defining the variables CPPFLAGS, LDFLAGS and TCLLIBPATH prevents the R build system from using wrong defaults like CPPFLAGS = -I/usr/local/include --- gnu/packages/statistics.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index e7fd5bd084..ed1f1e56ed 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -273,6 +273,17 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\ ;; Set default pager to "cat", because otherwise it is "false", ;; making "help()" print nothing at all. (lambda _ (setenv "PAGER" "cat") #t)) + (add-before 'configure 'prevent-include-defaults + (lambda* (#:key inputs #:allow-other-keys) + (setenv "CPPFLAGS" (string-append + "-isystem " (assoc-ref inputs "glibc") "/include")) + (setenv "LDFLAGS" (string-append + "-L" (assoc-ref inputs "glibc") "/lib")) + ;(setenv "TCLTK_LIBS" "") ; still sets -L/usr/lib + (setenv "TCLLIBPATH" (string-append + (assoc-ref inputs "tcl") "/lib")) + ; (setenv "TCLTK_CPPFLAGS" "") ; still sets -L/usr/lib -ltcl8.6 -L/usr/lib -ltk8.6 -lX11 -lXss -lXext + #t)) (add-before 'check 'set-timezone ;; Some tests require the timezone to be set. However, the ;; timezone may not just be "UTC", or else a brittle regression @@ -341,6 +352,7 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\ ("coreutils" ,coreutils) ("curl" ,curl) ("openblas" ,openblas) + ("glibc", glibc) ("gfortran" ,gfortran) ("icu4c" ,icu4c) ("libjpeg" ,libjpeg) -- 2.24.1