From 9b361bea5a9eeb20afb1e28135f950ac5f00b1ea Mon Sep 17 00:00:00 2001 From: Justin S <3630356+codeandkey@users.noreply.github.com> Date: Fri, 12 Jul 2019 18:50:04 -0500 Subject: r package: add rmath variant for standalone rmath library (#11693) --- var/spack/repos/builtin/packages/r/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.2.3-70-g09d2