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.
This commit is contained in:
Sergey Kosukhin 2018-08-02 15:32:20 +02:00 committed by Adam J. Stewart
parent c79cd5fe51
commit 03dc78a894
2 changed files with 35 additions and 0 deletions

View File

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

View File

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