silo: Make silo use AutotoolsPackage (#8551)

To benefit from updates to config.guess for newer architectures.

More info: https://github.com/spack/spack/issues/2063
This commit is contained in:
Nick Forrington 2018-06-22 18:19:03 -04:00 committed by Adam J. Stewart
parent ae8645e27d
commit 259b1834f1

View file

@ -25,7 +25,7 @@
from spack import *
class Silo(Package):
class Silo(AutotoolsPackage):
"""Silo is a library for reading and writing a wide variety of scientific
data to binary, disk files."""
@ -58,8 +58,14 @@ def flag_handler(self, name, flags):
flags.append('-ldl')
return (flags, None, None)
def install(self, spec, prefix):
def configure_args(self):
spec = self.spec
config_args = [
'--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include,
spec['hdf5'].prefix.lib),
'--with-zlib=%s,%s' % (spec['zlib'].prefix.include,
spec['zlib'].prefix.lib),
'--enable-install-lite-headers',
'--enable-fortran' if '+fortran' in spec else '--disable-fortran',
'--enable-silex' if '+silex' in spec else '--disable-silex',
'--enable-shared' if '+shared' in spec else '--disable-shared',
@ -79,14 +85,4 @@ def install(self, spec, prefix):
config_args.append('CXX=%s' % spec['mpi'].mpicxx)
config_args.append('FC=%s' % spec['mpi'].mpifc)
configure(
'--prefix=%s' % prefix,
'--with-hdf5=%s,%s' % (spec['hdf5'].prefix.include,
spec['hdf5'].prefix.lib),
'--with-zlib=%s,%s' % (spec['zlib'].prefix.include,
spec['zlib'].prefix.lib),
'--enable-install-lite-headers',
*config_args)
make()
make('install')
return config_args