From 9dcd6052cb004324472ccd5c21d7f337cbed9f23 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Wed, 5 Apr 2017 20:59:26 +0200 Subject: [PATCH] Fix ncl (#3708) - Add patch to make ncl compile with hdf5 1.10. - Add missing dependencies to make ncl compile without errors. --- var/spack/repos/builtin/packages/ncl/hdf5.patch | 11 +++++++++++ var/spack/repos/builtin/packages/ncl/package.py | 13 ++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/ncl/hdf5.patch 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 + #include + ++#define H5_USE_18_API ++ + #include + + #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.