diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-11 11:37:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-11 11:37:39 -0700 |
commit | 255d05a9c123a6632c0ab496f2bde31a2917fdf4 (patch) | |
tree | ffb8001e27dc4ccf862f90f1a91e74e1885a8871 /var | |
parent | 7f6541ef02ce1c60d68abb669276e89f97a45a8e (diff) | |
parent | 664bdd359fc0421cc2327a4dbfdf50e739361664 (diff) | |
download | spack-255d05a9c123a6632c0ab496f2bde31a2917fdf4.tar.gz spack-255d05a9c123a6632c0ab496f2bde31a2917fdf4.tar.bz2 spack-255d05a9c123a6632c0ab496f2bde31a2917fdf4.tar.xz spack-255d05a9c123a6632c0ab496f2bde31a2917fdf4.zip |
Merge pull request #1214 from glennpj/rfilter
Filter compilers for R
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/R/package.py | 24 |
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. # ======================================================================== |