summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMichael Kuron <mkuron@users.noreply.github.com>2017-11-23 21:39:32 +0100
committerChristoph Junghans <christoph.junghans@gmail.com>2017-11-23 13:39:32 -0700
commitff4a4fcd9eee2c1eced7fe4e3ec22522e8c1d1d1 (patch)
tree07e2dc7ce80231a99b39cd420734579d60fd8a68 /var
parent2a2670175d4d118b0f72588770b0e2f52f5ce0e8 (diff)
downloadspack-ff4a4fcd9eee2c1eced7fe4e3ec22522e8c1d1d1.tar.gz
spack-ff4a4fcd9eee2c1eced7fe4e3ec22522e8c1d1d1.tar.bz2
spack-ff4a4fcd9eee2c1eced7fe4e3ec22522e8c1d1d1.tar.xz
spack-ff4a4fcd9eee2c1eced7fe4e3ec22522e8c1d1d1.zip
siesta: add netcdf support (#6431)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/siesta/configure.patch21
-rw-r--r--var/spack/repos/builtin/packages/siesta/package.py6
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/siesta/configure.patch b/var/spack/repos/builtin/packages/siesta/configure.patch
new file mode 100644
index 0000000000..8371c9e9bb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/siesta/configure.patch
@@ -0,0 +1,21 @@
+--- a/Src/configure 2017-11-23 12:42:40.909339915 +0100
++++ b/Src/configure 2017-11-23 12:42:59.911416449 +0100
+@@ -6000,7 +6000,7 @@
+ withval="$with_netcdf"
+
+ fi;
+-if test x$with_netcdf != xno; then
++if test "x$with_netcdf" != xno; then
+
+ tw_netcdf_ok=no
+ ac_ext=${FC_SRCEXT-f}
+@@ -6069,7 +6069,7 @@
+ LIBS="$save_LIBS"
+ fi
+ if test $tw_netcdf_ok = yes; then
+- DEFS="$DEFS CDF";NETCDF_INTERFACE="libnetcdf_f90.a"
++ DEFS="$DEFS CDF";
+ else
+ NETCDF_LIBS="";tw_netcdf_ok=no;if test ! -z "$with_netcdf"; then { { echo "$as_me:$LINENO: error: Could not find NetCDF library." >&5
+ echo "$as_me: error: Could not find NetCDF library." >&2;}
+
diff --git a/var/spack/repos/builtin/packages/siesta/package.py b/var/spack/repos/builtin/packages/siesta/package.py
index bfe225ef71..536aac44b0 100644
--- a/var/spack/repos/builtin/packages/siesta/package.py
+++ b/var/spack/repos/builtin/packages/siesta/package.py
@@ -35,10 +35,14 @@ class Siesta(Package):
version('4.0.1', '5cb60ce068f2f6e84fa9184ffca94c08')
+ patch('configure.patch')
+
depends_on('mpi')
depends_on('blas')
depends_on('lapack')
depends_on('scalapack')
+ depends_on('netcdf')
+ depends_on('netcdf-fortran')
phases = ['configure', 'build', 'install']
@@ -53,6 +57,8 @@ class Siesta(Package):
'--with-blacs=%s' % (spec['scalapack'].libs +
spec['blas'].libs),
'--with-scalapack=%s' % spec['scalapack'].libs,
+ '--with-netcdf=%s' % (spec['netcdf-fortran'].libs +
+ spec['netcdf'].libs),
# need to specify MPIFC explicitly below, otherwise
# Intel's mpiifort is not found
'MPIFC=%s' % spec['mpi'].mpifc