Add maintainers and variants for building with default earlier api versions. (#16534)

* Add maintainers.
Add variants for building with default earlier api versions.

* Update var/spack/repos/builtin/packages/hdf5/package.py

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Larry Knox 2020-05-09 13:05:55 -05:00 committed by GitHub
parent 54fee4b400
commit 6e46603470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,7 @@ class Hdf5(AutotoolsPackage):
list_url = "https://support.hdfgroup.org/ftp/HDF5/releases" list_url = "https://support.hdfgroup.org/ftp/HDF5/releases"
list_depth = 3 list_depth = 3
git = "https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git" git = "https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git"
maintainers = ['lrknox']
version('develop', branch='develop') version('develop', branch='develop')
@ -63,6 +64,13 @@ class Hdf5(AutotoolsPackage):
variant('szip', default=False, description='Enable szip support') variant('szip', default=False, description='Enable szip support')
variant('pic', default=True, variant('pic', default=True,
description='Produce position-independent code (for shared libs)') description='Produce position-independent code (for shared libs)')
# Build HDF5 with API compaitibility.
variant('api', default='none', description='choose api compatibility', values=('v114', 'v112', 'v110', 'v18', 'v16'), multi=False)
conflicts('api=v114', when='@1.6:1.12.99', msg='v114 is not compatible with this release')
conflicts('api=v112', when='@1.6:1.10.99', msg='v112 is not compatible with this release')
conflicts('api=v110', when='@1.6:1.8.99', msg='v110 is not compatible with this release')
conflicts('api=v18', when='@1.6:1.6.99', msg='v18 is not compatible with this release')
depends_on('autoconf', type='build', when='@develop') depends_on('autoconf', type='build', when='@develop')
depends_on('automake', type='build', when='@develop') depends_on('automake', type='build', when='@develop')
@ -230,6 +238,10 @@ def configure_args(self):
extra_args += self.enable_or_disable('hl') extra_args += self.enable_or_disable('hl')
extra_args += self.enable_or_disable('fortran') extra_args += self.enable_or_disable('fortran')
api = self.spec.variants['api'].value
if api != 'none':
extra_args.append('--with-default-api-version=' + api)
if '+szip' in self.spec: if '+szip' in self.spec:
extra_args.append('--with-szlib=%s' % self.spec['szip'].prefix) extra_args.append('--with-szlib=%s' % self.spec['szip'].prefix)
else: else: