summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2016-07-11 13:29:43 -0500
committerGlenn Johnson <glenn-johnson@uiowa.edu>2016-07-11 13:29:43 -0500
commit664bdd359fc0421cc2327a4dbfdf50e739361664 (patch)
treefda51fa604ecf22f1ee555ec7ae3ed2000a045f7
parentc086ccdab66be0443706b86f64e046965a76fe2c (diff)
downloadspack-664bdd359fc0421cc2327a4dbfdf50e739361664.tar.gz
spack-664bdd359fc0421cc2327a4dbfdf50e739361664.tar.bz2
spack-664bdd359fc0421cc2327a4dbfdf50e739361664.tar.xz
spack-664bdd359fc0421cc2327a4dbfdf50e739361664.zip
Filter compilers for R
This adds a filter_compilers function to have the Makeconf file for R point to the actual compilers rather than the spack wrappers. Also added version 3.3.1.
-rw-r--r--var/spack/repos/builtin/packages/R/package.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/R/package.py b/var/spack/repos/builtin/packages/R/package.py
index 001dde5329..07bb6b6b03 100644
--- a/var/spack/repos/builtin/packages/R/package.py
+++ b/var/spack/repos/builtin/packages/R/package.py
@@ -40,6 +40,7 @@ class R(Package):
extendable = True
+ version('3.3.1', 'f50a659738b73036e2f5635adbd229c5')
version('3.3.0', '5a7506c8813432d1621c9725e86baf7a')
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
version('3.2.2', '57cef5c2e210a5454da1979562a10e5b')
@@ -87,6 +88,29 @@ class R(Package):
make()
make('install')
+ self.filter_compilers(spec, prefix)
+
+ def filter_compilers(self, spec, prefix):
+ """Run after install to tell the configuration files and Makefiles
+ to use the compilers that Spack built the package with.
+
+ If this isn't done, they'll have CC and CXX set to Spack's generic
+ cc and c++. We want them to be bound to whatever compiler
+ they were built with."""
+
+ etcdir = join_path(prefix, 'rlib', 'R', 'etc')
+
+ kwargs = {'ignore_absent': True, 'backup': False, 'string': True}
+
+ filter_file(env['CC'], self.compiler.cc,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+ filter_file(env['CXX'], self.compiler.cxx,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+ filter_file(env['F77'], self.compiler.f77,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+ filter_file(env['FC'], self.compiler.fc,
+ join_path(etcdir, 'Makeconf'), **kwargs)
+
# ========================================================================
# Set up environment to make install easy for R extensions.
# ========================================================================