summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kuhn <suraia@ikkoku.de>2017-04-05 20:59:26 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2017-04-05 13:59:26 -0500
commit9dcd6052cb004324472ccd5c21d7f337cbed9f23 (patch)
tree2de001aef0f9e5ca5d09078edb23353bbfba25cd
parent9e50d16f1340143ec1af7185206fe711491a60bc (diff)
downloadspack-9dcd6052cb004324472ccd5c21d7f337cbed9f23.tar.gz
spack-9dcd6052cb004324472ccd5c21d7f337cbed9f23.tar.bz2
spack-9dcd6052cb004324472ccd5c21d7f337cbed9f23.tar.xz
spack-9dcd6052cb004324472ccd5c21d7f337cbed9f23.zip
Fix ncl (#3708)
- Add patch to make ncl compile with hdf5 1.10. - Add missing dependencies to make ncl compile without errors.
-rw-r--r--var/spack/repos/builtin/packages/ncl/hdf5.patch11
-rw-r--r--var/spack/repos/builtin/packages/ncl/package.py13
2 files changed, 23 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/ncl/hdf5.patch b/var/spack/repos/builtin/packages/ncl/hdf5.patch
new file mode 100644
index 0000000000..ff8b586b4f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ncl/hdf5.patch
@@ -0,0 +1,11 @@
+--- a/ni/src/ncl/NclNewHDF5.c 2017-04-05 12:57:52.311104685 +0200
++++ b/ni/src/ncl/NclNewHDF5.c 2017-04-05 12:58:17.634551443 +0200
+@@ -35,6 +35,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
++#define H5_USE_18_API
++
+ #include <hdf5.h>
+
+ #ifdef NIO_LIB_ONLY
diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py
index b7394cff32..78c5bf1ce2 100644
--- a/var/spack/repos/builtin/packages/ncl/package.py
+++ b/var/spack/repos/builtin/packages/ncl/package.py
@@ -39,7 +39,10 @@ class Ncl(Package):
version('6.4.0', 'a981848ddcaf1c263279648265f24766',
url='https://www.earthsystemgrid.org/download/fileDownload.html?logicalFileId=86b9bec2-fa01-11e6-a976-00c0f03d5b7c',
extension='tar.gz')
+
patch('spack_ncl.patch')
+ # Make ncl compile with hdf5 1.10
+ patch('hdf5.patch')
# This installation script is implemented according to this manual:
# http://www.ncl.ucar.edu/Download/build_from_src.shtml
@@ -58,12 +61,20 @@ class Ncl(Package):
# Also, the manual says that ncl requires zlib, but that comes as a
# mandatory dependency of libpng, which is a mandatory dependency of cairo.
+ # The following dependencies are required, otherwise several components
+ # fail to compile:
+ depends_on('curl')
+ depends_on('libiconv')
+ depends_on('libx11')
+ depends_on('libxaw')
+ depends_on('libxmu')
+
# In Spack, we do not have an option to compile netcdf without netcdf-4
# support, so we will tell the ncl configuration script that we want
# support for netcdf-4, but the script assumes that hdf5 is compiled with
# szip support. We introduce this restriction with the following dependency
# statement.
- depends_on('hdf5@:1.8+szip')
+ depends_on('hdf5+szip')
# In Spack, we also do not have an option to compile netcdf without DAP
# support, so we will tell the ncl configuration script that we have it.