summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-01-26 19:31:14 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-01-26 19:31:14 -0700
commit90750f59c1acccb02332a4041d26def94fde7725 (patch)
tree92488f2b3e422c7b48e7b82278fd5c77bf913040
parent65b57f0c21b0ffa47d99191e91c4c22376945312 (diff)
parentc6bb00085f89b6db37a03674ba09714adab1f2f0 (diff)
downloadspack-90750f59c1acccb02332a4041d26def94fde7725.tar.gz
spack-90750f59c1acccb02332a4041d26def94fde7725.tar.bz2
spack-90750f59c1acccb02332a4041d26def94fde7725.tar.xz
spack-90750f59c1acccb02332a4041d26def94fde7725.zip
Merge pull request #400 from adamjstewart/features/netcdf
Extensive modifications to NetCDF package
-rw-r--r--var/spack/repos/builtin/packages/netcdf/package.py52
1 files changed, 39 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py
index 239644d894..93c4410146 100644
--- a/var/spack/repos/builtin/packages/netcdf/package.py
+++ b/var/spack/repos/builtin/packages/netcdf/package.py
@@ -2,27 +2,53 @@ from spack import *
class Netcdf(Package):
"""NetCDF is a set of software libraries and self-describing, machine-independent
- data formats that support the creation, access, and sharing of array-oriented
- scientific data."""
+ data formats that support the creation, access, and sharing of array-oriented
+ scientific data."""
homepage = "http://www.unidata.ucar.edu/software/netcdf/"
url = "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.3.3.tar.gz"
+ version('4.4.0', 'f01cb26a0126dd9a6224e76472d25f6c')
version('4.3.3', '5fbd0e108a54bd82cb5702a73f56d2ae')
+ variant('fortran', default=False, description="Download and install NetCDF-Fortran")
+ variant('hdf4', default=False, description="Enable HDF4 support")
+
patch('netcdf-4.3.3-mpi.patch')
# Dependencies:
- depends_on("cmake @2.8.12:")
- # >HDF5
- depends_on("hdf5")
+ depends_on("curl") # required for DAP support
+ depends_on("hdf", when='+hdf4')
+ depends_on("hdf5") # required for NetCDF-4 support
+ depends_on("zlib") # required for NetCDF-4 support
def install(self, spec, prefix):
- with working_dir('spack-build', create=True):
- cmake('..',
- "-DCMAKE_INSTALL_PREFIX:PATH=%s" % prefix,
- "-DENABLE_DAP:BOOL=OFF", # Disable DAP.
- "-DBUILD_SHARED_LIBS:BOOL=OFF") # Don't build shared libraries (use static libs).
-
- make()
- make("install")
+ config_args = [
+ "--enable-fsync",
+ "--enable-v2",
+ "--enable-utilities",
+ "--enable-shared",
+ "--enable-static",
+ "--enable-largefile",
+ # necessary for HDF5 support
+ "--enable-netcdf-4",
+ "--enable-dynamic-loading",
+ # necessary for DAP support
+ "--enable-dap"
+ ]
+
+ # HDF4 support
+ if '+hdf4' in spec:
+ config_args.append("--enable-hdf4")
+
+ # Fortran support
+ # In version 4.2+, NetCDF-C and NetCDF-Fortran have split.
+ # They can be installed separately, but this bootstrap procedure
+ # should be able to install both at the same time.
+ # Note: this is a new experimental feature
+ if '+fortran' in spec:
+ config_args.append("--enable-remote-fortran-bootstrap")
+
+ configure(*config_args)
+ make()
+ make("install")