Make szip a variant
This commit is contained in:
parent
950246b331
commit
81ccba202c
@ -11,8 +11,10 @@ class Hdf(Package):
|
|||||||
|
|
||||||
version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19')
|
version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19')
|
||||||
|
|
||||||
|
variant('szip', default=False, description="Enable szip support")
|
||||||
|
|
||||||
depends_on("jpeg")
|
depends_on("jpeg")
|
||||||
depends_on("szip")
|
depends_on("szip", when='+szip')
|
||||||
depends_on("zlib")
|
depends_on("zlib")
|
||||||
|
|
||||||
|
|
||||||
@ -21,15 +23,22 @@ def url_for_version(self, version):
|
|||||||
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure('--prefix=%s' % prefix,
|
config_args = [
|
||||||
|
'--prefix=%s' % prefix,
|
||||||
'--with-jpeg=%s' % spec['jpeg'].prefix,
|
'--with-jpeg=%s' % spec['jpeg'].prefix,
|
||||||
'--with-szlib=%s' % spec['szip'].prefix,
|
|
||||||
'--with-zlib=%s' % spec['zlib'].prefix,
|
'--with-zlib=%s' % spec['zlib'].prefix,
|
||||||
'--disable-netcdf',
|
'--disable-netcdf',
|
||||||
'--enable-fortran',
|
'--enable-fortran',
|
||||||
'--disable-shared',
|
'--disable-shared',
|
||||||
'--enable-static',
|
'--enable-static',
|
||||||
'--enable-production')
|
'--enable-production'
|
||||||
|
]
|
||||||
|
|
||||||
|
# SZip support
|
||||||
|
if '+szip' in spec:
|
||||||
|
config_args.append('--with-szlib=%s' % spec['szip'].prefix)
|
||||||
|
|
||||||
|
configure(*config_args)
|
||||||
|
|
||||||
make()
|
make()
|
||||||
make("install")
|
make("install")
|
||||||
|
Loading…
Reference in New Issue
Block a user