- Add patch to make ncl compile with hdf5 1.10.
- Add missing dependencies to make ncl compile without errors.
This commit is contained in:
Michael Kuhn 2017-04-05 20:59:26 +02:00 committed by Adam J. Stewart
parent 9e50d16f13
commit 9dcd6052cb
2 changed files with 23 additions and 1 deletions

View file

@ -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

View file

@ -39,7 +39,10 @@ class Ncl(Package):
version('6.4.0', 'a981848ddcaf1c263279648265f24766', version('6.4.0', 'a981848ddcaf1c263279648265f24766',
url='https://www.earthsystemgrid.org/download/fileDownload.html?logicalFileId=86b9bec2-fa01-11e6-a976-00c0f03d5b7c', url='https://www.earthsystemgrid.org/download/fileDownload.html?logicalFileId=86b9bec2-fa01-11e6-a976-00c0f03d5b7c',
extension='tar.gz') extension='tar.gz')
patch('spack_ncl.patch') patch('spack_ncl.patch')
# Make ncl compile with hdf5 1.10
patch('hdf5.patch')
# This installation script is implemented according to this manual: # This installation script is implemented according to this manual:
# http://www.ncl.ucar.edu/Download/build_from_src.shtml # 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 # Also, the manual says that ncl requires zlib, but that comes as a
# mandatory dependency of libpng, which is a mandatory dependency of cairo. # 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 # 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, so we will tell the ncl configuration script that we want
# support for netcdf-4, but the script assumes that hdf5 is compiled with # support for netcdf-4, but the script assumes that hdf5 is compiled with
# szip support. We introduce this restriction with the following dependency # szip support. We introduce this restriction with the following dependency
# statement. # 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 # 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. # support, so we will tell the ncl configuration script that we have it.