diff options
-rw-r--r-- | var/spack/repos/builtin/packages/ior/package.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py index 63c7db1225..8ab3f2ed7c 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -23,10 +23,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -import os -class Ior(Package): +class Ior(AutotoolsPackage): """The IOR software is used for benchmarking parallel file systems using POSIX, MPI-IO, or HDF5 interfaces.""" @@ -38,17 +37,23 @@ class Ior(Package): variant('hdf5', default=False, description='support IO with HDF5 backend') variant('ncmpi', default=False, description='support IO with NCMPI backend') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') + depends_on('m4', type='build') depends_on('mpi') - depends_on('hdf5+mpi', when='+hdf5') + depends_on('hdf5+mpi', when='+hdf5') depends_on('parallel-netcdf', when='+ncmpi') - def install(self, spec, prefix): - os.system('./bootstrap') + @run_before('autoreconf') + def bootstrap(self): + Executable('./bootstrap')() - config_args = [ - 'MPICC=%s' % spec['mpi'].prefix.bin + '/mpicc', - '--prefix=%s' % prefix, - ] + def configure_args(self): + spec = self.spec + config_args = [] + + env['CC'] = spec['mpi'].mpicc if '+hdf5' in spec: config_args.append('--with-hdf5') @@ -61,7 +66,4 @@ class Ior(Package): else: config_args.append('--without-ncmpi') - configure(*config_args) - - make() - make('install') + return config_args |