Add --without-x when building r~X (#2864)
* Add --without-x when building r~X * Add latest version of R * Run patch for latest version as well
This commit is contained in:
parent
258dfc707d
commit
bcef90fe10
1 changed files with 28 additions and 16 deletions
|
@ -28,7 +28,7 @@
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
class R(Package):
|
class R(AutotoolsPackage):
|
||||||
"""R is 'GNU S', a freely available language and environment for
|
"""R is 'GNU S', a freely available language and environment for
|
||||||
statistical computing and graphics which provides a wide variety of
|
statistical computing and graphics which provides a wide variety of
|
||||||
statistical and graphical techniques: linear and nonlinear modelling,
|
statistical and graphical techniques: linear and nonlinear modelling,
|
||||||
|
@ -40,6 +40,7 @@ class R(Package):
|
||||||
|
|
||||||
extendable = True
|
extendable = True
|
||||||
|
|
||||||
|
version('3.3.2', '2437014ef40641cdc9673e89c040b7a8')
|
||||||
version('3.3.1', 'f50a659738b73036e2f5635adbd229c5')
|
version('3.3.1', 'f50a659738b73036e2f5635adbd229c5')
|
||||||
version('3.3.0', '5a7506c8813432d1621c9725e86baf7a')
|
version('3.3.0', '5a7506c8813432d1621c9725e86baf7a')
|
||||||
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
|
version('3.2.3', '1ba3dac113efab69e706902810cc2970')
|
||||||
|
@ -82,35 +83,46 @@ class R(Package):
|
||||||
depends_on('pcre')
|
depends_on('pcre')
|
||||||
depends_on('jdk')
|
depends_on('jdk')
|
||||||
|
|
||||||
patch('zlib.patch', when='@:3.3.1')
|
patch('zlib.patch', when='@:3.3.2')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def etcdir(self):
|
def etcdir(self):
|
||||||
return join_path(prefix, 'rlib', 'R', 'etc')
|
return join_path(prefix, 'rlib', 'R', 'etc')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def configure_args(self):
|
||||||
rlibdir = join_path(prefix, 'rlib')
|
spec = self.spec
|
||||||
configure_args = ['--prefix=%s' % prefix,
|
prefix = self.prefix
|
||||||
'--libdir=%s' % rlibdir,
|
|
||||||
'--enable-R-shlib',
|
config_args = [
|
||||||
'--enable-BLAS-shlib',
|
'--libdir={0}'.format(join_path(prefix, 'rlib')),
|
||||||
'--enable-R-framework=no']
|
'--enable-R-shlib',
|
||||||
|
'--enable-BLAS-shlib',
|
||||||
|
'--enable-R-framework=no'
|
||||||
|
]
|
||||||
|
|
||||||
if '+external-lapack' in spec:
|
if '+external-lapack' in spec:
|
||||||
configure_args.extend(['--with-blas', '--with-lapack'])
|
config_args.extend([
|
||||||
|
'--with-blas',
|
||||||
|
'--with-lapack'
|
||||||
|
])
|
||||||
|
|
||||||
configure(*configure_args)
|
if '+X' in spec:
|
||||||
make()
|
config_args.append('--with-x')
|
||||||
make('install')
|
else:
|
||||||
|
config_args.append('--without-x')
|
||||||
|
|
||||||
|
return config_args
|
||||||
|
|
||||||
|
@AutotoolsPackage.sanity_check('install')
|
||||||
|
def copy_makeconf(self):
|
||||||
# Make a copy of Makeconf because it will be needed to properly build R
|
# Make a copy of Makeconf because it will be needed to properly build R
|
||||||
# dependencies in Spack.
|
# dependencies in Spack.
|
||||||
src_makeconf = join_path(self.etcdir, 'Makeconf')
|
src_makeconf = join_path(self.etcdir, 'Makeconf')
|
||||||
dst_makeconf = join_path(self.etcdir, 'Makeconf.spack')
|
dst_makeconf = join_path(self.etcdir, 'Makeconf.spack')
|
||||||
shutil.copy(src_makeconf, dst_makeconf)
|
shutil.copy(src_makeconf, dst_makeconf)
|
||||||
|
|
||||||
self.filter_compilers(spec, prefix)
|
@AutotoolsPackage.sanity_check('install')
|
||||||
|
def filter_compilers(self):
|
||||||
def filter_compilers(self, spec, prefix):
|
|
||||||
"""Run after install to tell the configuration files and Makefiles
|
"""Run after install to tell the configuration files and Makefiles
|
||||||
to use the compilers that Spack built the package with.
|
to use the compilers that Spack built the package with.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue