summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-01-26 15:38:22 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2016-01-26 15:38:22 -0600
commit81ccba202c601edacaf483eacc7373d1947e4875 (patch)
tree62a7b176a278a773df6526e915732f2bc52f1dfd
parent950246b331c74700e01dc48a86f84bf47d528af3 (diff)
downloadspack-81ccba202c601edacaf483eacc7373d1947e4875.tar.gz
spack-81ccba202c601edacaf483eacc7373d1947e4875.tar.bz2
spack-81ccba202c601edacaf483eacc7373d1947e4875.tar.xz
spack-81ccba202c601edacaf483eacc7373d1947e4875.zip
Make szip a variant
-rw-r--r--var/spack/repos/builtin/packages/hdf/package.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py
index 43b5980230..1ecb167183 100644
--- a/var/spack/repos/builtin/packages/hdf/package.py
+++ b/var/spack/repos/builtin/packages/hdf/package.py
@@ -11,8 +11,10 @@ class Hdf(Package):
version('4.2.11', '063f9928f3a19cc21367b71c3b8bbf19')
+ variant('szip', default=False, description="Enable szip support")
+
depends_on("jpeg")
- depends_on("szip")
+ depends_on("szip", when='+szip')
depends_on("zlib")
@@ -21,15 +23,22 @@ class Hdf(Package):
def install(self, spec, prefix):
- configure('--prefix=%s' % prefix,
- '--with-jpeg=%s' % spec['jpeg'].prefix,
- '--with-szlib=%s' % spec['szip'].prefix,
- '--with-zlib=%s' % spec['zlib'].prefix,
- '--disable-netcdf',
- '--enable-fortran',
- '--disable-shared',
- '--enable-static',
- '--enable-production')
+ config_args = [
+ '--prefix=%s' % prefix,
+ '--with-jpeg=%s' % spec['jpeg'].prefix,
+ '--with-zlib=%s' % spec['zlib'].prefix,
+ '--disable-netcdf',
+ '--enable-fortran',
+ '--disable-shared',
+ '--enable-static',
+ '--enable-production'
+ ]
+
+ # SZip support
+ if '+szip' in spec:
+ config_args.append('--with-szlib=%s' % spec['szip'].prefix)
+
+ configure(*config_args)
make()
make("install")