summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/r/package.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py
index eb5a6f4a8f..65276d9269 100644
--- a/var/spack/repos/builtin/packages/r/package.py
+++ b/var/spack/repos/builtin/packages/r/package.py
@@ -49,6 +49,8 @@ class R(AutotoolsPackage):
description='Enable X11 support (call configure --with-x)')
variant('memory_profiling', default=False,
description='Enable memory profiling')
+ variant('rmath', default=False,
+ description='Build standalone Rmath library')
# Virtual dependencies
depends_on('blas', when='+external-lapack')
@@ -89,6 +91,18 @@ 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')
+
def configure_args(self):
spec = self.spec
prefix = self.prefix