summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSergey Kosukhin <skosukhin@gmail.com>2018-08-02 15:32:20 +0200
committerAdam J. Stewart <ajstewart426@gmail.com>2018-08-02 08:32:20 -0500
commit03dc78a894cfc572368483f55403c7fe112fd167 (patch)
treea8f49fe186ee689e55f0e0b10d6f1950ab056e36 /var
parentc79cd5fe51352eba3a2855a60ce90421701ed3bc (diff)
downloadspack-03dc78a894cfc572368483f55403c7fe112fd167.tar.gz
spack-03dc78a894cfc572368483f55403c7fe112fd167.tar.bz2
spack-03dc78a894cfc572368483f55403c7fe112fd167.tar.xz
spack-03dc78a894cfc572368483f55403c7fe112fd167.zip
netcdf-fortran: enforce autoreconf when building with NAG. (#8844)
* netcdf-fortran: enforce autoreconf when building with NAG. * netcdf-fortran: patch the configure script instead of running autoreconf to get rid of additional dependencies. * netcdf-fortran: add comment for the patch.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/nag.patch31
-rw-r--r--var/spack/repos/builtin/packages/netcdf-fortran/package.py4
2 files changed, 35 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/nag.patch b/var/spack/repos/builtin/packages/netcdf-fortran/nag.patch
new file mode 100644
index 0000000000..458c18813e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/netcdf-fortran/nag.patch
@@ -0,0 +1,31 @@
+diff --git a/configure b/configure
+index 06ac8b0..d518a1a 100755
+--- a/configure
++++ b/configure
+@@ -10657,6 +10657,8 @@ _LT_EOF
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
++ nagfor*)
++ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+@@ -14252,6 +14254,8 @@ _LT_EOF
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec_F77=
+ tmp_sharedflag='--shared' ;;
++ nagfor*)
++ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+@@ -17142,6 +17146,8 @@ _LT_EOF
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec_FC=
+ tmp_sharedflag='--shared' ;;
++ nagfor*)
++ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
index a923bb0e81..725804d22c 100644
--- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py
@@ -36,6 +36,10 @@ class NetcdfFortran(AutotoolsPackage):
depends_on('netcdf')
+ # The default libtool.m4 is too old to handle NAG compiler properly:
+ # https://github.com/Unidata/netcdf-fortran/issues/94
+ patch('nag.patch', when='@:4.4.4%nag')
+
def configure_args(self):
return ['CPPFLAGS=-I' + self.spec['netcdf'].prefix.include]