From d24186ea8445bf299bfc1be93af8dc90a033031c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Dec 2016 16:26:47 -0600 Subject: Update PnetCDF to AutotoolsPackage (#2637) --- .../builtin/packages/parallel-netcdf/package.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index be4a8bc38b..65512017ef 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -25,7 +25,7 @@ from spack import * -class ParallelNetcdf(Package): +class ParallelNetcdf(AutotoolsPackage): """Parallel netCDF (PnetCDF) is a library providing high-performance parallel I/O while still maintaining file-format compatibility with Unidata's NetCDF.""" @@ -41,13 +41,17 @@ class ParallelNetcdf(Package): variant('fpic', default=True, description='Produce position-independent code (for shared libs)') - depends_on("m4", type='build') - depends_on("mpi") + depends_on('mpi') + + depends_on('m4', type='build') # See: # https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL - def install(self, spec, prefix): - args = list() + def configure_args(self): + spec = self.spec + + args = ['--with-mpi={0}'.format(spec['mpi'].prefix)] + if '+fpic' in spec: args.extend(['CFLAGS=-fPIC', 'CXXFLAGS=-fPIC', 'FFLAGS=-fPIC']) if '~cxx' in spec: @@ -55,8 +59,4 @@ class ParallelNetcdf(Package): if '~fortran' in spec: args.append('--disable-fortran') - args.extend(["--prefix=%s" % prefix, - "--with-mpi=%s" % spec['mpi'].prefix]) - configure(*args) - make() - make("install") + return args -- cgit v1.2.3-60-g2f50