diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/hdf/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/hdf/package.py | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index aafb345be6..2554bd0f96 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -34,24 +34,24 @@ class Hdf(Package): list_url = "https://www.hdfgroup.org/ftp/HDF/releases/" list_depth = 3 + version('4.2.12', '79fd1454c899c05e34a3da0456ab0c1c') version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19') variant('szip', default=False, description="Enable szip support") - depends_on("jpeg") - depends_on("szip", when='+szip') - depends_on("zlib") + depends_on('jpeg@6b:') + depends_on('szip', when='+szip') + depends_on('zlib@1.1.4:') - def url_for_version(self, version): - return "https://www.hdfgroup.org/ftp/HDF/releases/HDF" + str( - version) + "/src/hdf-" + str(version) + ".tar.gz" + depends_on('bison', type='build') + depends_on('flex', type='build') def install(self, spec, prefix): config_args = [ 'CFLAGS=-fPIC', - '--prefix=%s' % prefix, - '--with-jpeg=%s' % spec['jpeg'].prefix, - '--with-zlib=%s' % spec['zlib'].prefix, + '--prefix={0}'.format(prefix), + '--with-jpeg={0}'.format(spec['jpeg'].prefix), + '--with-zlib={0}'.format(spec['zlib'].prefix), '--disable-netcdf', # must be disabled to build NetCDF with HDF4 '--enable-fortran', '--disable-shared', # fortran and shared libs are not compatible @@ -59,11 +59,17 @@ class Hdf(Package): '--enable-production' ] - # SZip support + # Szip support if '+szip' in spec: - config_args.append('--with-szlib=%s' % spec['szip'].prefix) + config_args.append('--with-szlib={0}'.format(spec['szip'].prefix)) + else: + config_args.append('--without-szlib') configure(*config_args) make() - make("install") + + if self.run_tests: + make('check') + + make('install') |