diff options
-rw-r--r-- | lib/spack/docs/module_file_support.rst | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/r/package.py | 19 |
2 files changed, 9 insertions, 13 deletions
diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst index 773f347ed6..d46ec3143d 100644 --- a/lib/spack/docs/module_file_support.rst +++ b/lib/spack/docs/module_file_support.rst @@ -130,9 +130,8 @@ list of environment modifications. to the corresponding environment variables: ================== ================================= - LIBRARY_PATH ``self.prefix/rlib/R/lib`` LD_LIBRARY_PATH ``self.prefix/rlib/R/lib`` - CPATH ``self.prefix/rlib/R/include`` + PKG_CONFIG_PATH ``self.prefix/rlib/pkgconfig`` ================== ================================= with the following snippet: diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index c0859285b2..b0f1dc11e9 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -109,17 +109,12 @@ class R(AutotoolsPackage): def etcdir(self): return join_path(prefix, 'rlib', 'R', 'etc') - @run_after('build') - def build_rmath(self): - if '+rmath' in self.spec: - with working_dir('src/nmath/standalone'): - make() - @run_after('install') def install_rmath(self): if '+rmath' in self.spec: with working_dir('src/nmath/standalone'): - make('install') + make() + make('install', parallel=False) def configure_args(self): spec = self.spec @@ -225,12 +220,14 @@ class R(AutotoolsPackage): dependent_spec.prefix, self.r_lib_dir)) def setup_run_environment(self, env): - env.prepend_path('LIBRARY_PATH', - join_path(self.prefix, 'rlib', 'R', 'lib')) env.prepend_path('LD_LIBRARY_PATH', join_path(self.prefix, 'rlib', 'R', 'lib')) - env.prepend_path('CPATH', - join_path(self.prefix, 'rlib', 'R', 'include')) + env.prepend_path('PKG_CONFIG_PATH', + join_path(self.prefix, 'rlib', 'pkgconfig')) + + if '+rmath' in self.spec: + env.prepend_path('LD_LIBRARY_PATH', + join_path(self.prefix, 'rlib')) def setup_dependent_package(self, module, dependent_spec): """Called before R modules' install() methods. In most cases, |