diff -ruN netcdf.orig/Makefile netcdf/Makefile --- netcdf.orig/Makefile 2008-07-23 21:21:33.000000000 -0500 +++ netcdf/Makefile 2008-07-23 21:27:12.000000000 -0500 @@ -17,7 +17,7 @@ CONFLICTS= hdf-4.* netcdf-4.* -CONFIGURE_ARGS= --enable-shared --disable-f77 +CONFIGURE_ARGS= --enable-shared CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -fPIC -DPIC -Df2cFortran" GNU_CONFIGURE= yes @@ -29,6 +29,12 @@ INFO= netcdf netcdf-c netcdf-cxx netcdf-f77 netcdf-f90 \ netcdf-install netcdf-tutorial +.ifdef WITH_FORTRAN +USE_FORTRAN= yes +.else +CONFIGURE_ARGS+=--disable-f77 +.endif + post-install: @${STRIP_CMD} ${PREFIX}/bin/ncdump ${PREFIX}/bin/ncgen ${LN} -fs libnetcdf.so.4 ${PREFIX}/lib/libnetcdf.so diff -ruN netcdf.orig/files/patch-fortran+cfortran.h netcdf/files/patch-fortran+cfortran.h --- netcdf.orig/files/patch-fortran+cfortran.h 1969-12-31 19:00:00.000000000 -0500 +++ netcdf/files/patch-fortran+cfortran.h 2008-07-23 21:49:47.000000000 -0500 @@ -0,0 +1,21 @@ +--- fortran/cfortran.h.orig 2008-07-23 21:47:30.000000000 -0500 ++++ fortran/cfortran.h 2008-07-23 21:48:50.000000000 -0500 +@@ -134,7 +134,8 @@ + /* Split #if into 2 because some HP-UX can't handle long #if */ + #if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran)||defined(PATHSCALE_COMPILER)||defined(gFortran)) + #if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran)) +-/* If your compiler barfs on ' #error', replace # with the trigraph for # */ ++#define f2cFortran ++/* If your compiler barfs on ' #error', replace # with the trigraph for # + #error "cfortran.h: Can't find your environment among:\ + - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \ + - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \ +@@ -158,7 +159,7 @@ + - Absoft Pro Fortran: Use #define AbsoftProFortran \ + - Portland Group Fortran: Use #define pgiFortran \ + - PathScale Fortran: Use #define PATHSCALE_COMPILER" +-/* Compiler must throw us out at this point! */ ++ Compiler must throw us out at this point! */ + #endif + #endif +