Skip to content

Commit

Permalink
r package: add rmath variant for standalone rmath library (spack#11693)
Browse files Browse the repository at this point in the history
  • Loading branch information
codeandkey authored and scheibelp committed Jul 12, 2019
1 parent d1af7ae commit 9b361be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions var/spack/repos/builtin/packages/r/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9b361be

Please sign in to comment.