diff options
Diffstat (limited to 'science/netcdf4')
-rw-r--r-- | science/netcdf4/Makefile | 14 | ||||
-rw-r--r-- | science/netcdf4/files/patch-fortran+cfortran.h | 21 | ||||
-rw-r--r-- | science/netcdf4/pkg-plist | 6 |
3 files changed, 40 insertions, 1 deletions
diff --git a/science/netcdf4/Makefile b/science/netcdf4/Makefile index 45d76cf3c598..9455b3c9fa46 100644 --- a/science/netcdf4/Makefile +++ b/science/netcdf4/Makefile @@ -17,11 +17,12 @@ COMMENT= Library for machine-independent, array-oriented data access 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 USE_LDCONFIG= yes +CONFIGURE_ENV+= ${MAKE_ENV} MAN1= ncdump.1 ncgen.1 MAN3= netcdf.3 @@ -29,6 +30,15 @@ MAN3= netcdf.3 INFO= netcdf netcdf-c netcdf-cxx netcdf-f77 netcdf-f90 \ netcdf-install netcdf-tutorial +.ifdef WITH_FORTRAN +USE_FORTRAN= yes +MAN3+= netcdf_f77.3 netcdf_f90.3 +PLIST_SUB+= FORTRAN="" +.else +CONFIGURE_ARGS+=--disable-f77 +PLIST_SUB+= FORTRAN="@comment " +.endif + post-install: @${STRIP_CMD} ${PREFIX}/bin/ncdump ${PREFIX}/bin/ncgen ${LN} -fs libnetcdf.so.4 ${PREFIX}/lib/libnetcdf.so @@ -38,6 +48,8 @@ post-install: .for file in COPYRIGHT README RELEASE_NOTES ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} .endfor +.else +CONFIGURE_ARGS+= --disable-docs-install .endif regression-test: build diff --git a/science/netcdf4/files/patch-fortran+cfortran.h b/science/netcdf4/files/patch-fortran+cfortran.h new file mode 100644 index 000000000000..e3baf9ec0e9b --- /dev/null +++ b/science/netcdf4/files/patch-fortran+cfortran.h @@ -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 + diff --git a/science/netcdf4/pkg-plist b/science/netcdf4/pkg-plist index ccb8850193b8..972db7bbf9e8 100644 --- a/science/netcdf4/pkg-plist +++ b/science/netcdf4/pkg-plist @@ -3,6 +3,8 @@ bin/ncgen include/ncvalues.h include/netcdf.h include/netcdf.hh +%%FORTRAN%%include/netcdf.mod +%%FORTRAN%%include/typesizes.mod include/netcdfcpp.h lib/libnetcdf.a lib/libnetcdf.la @@ -12,6 +14,10 @@ lib/libnetcdf_c++.a lib/libnetcdf_c++.la lib/libnetcdf_c++.so lib/libnetcdf_c++.so.4 +%%FORTRAN%%lib/libnetcdff.a +%%FORTRAN%%lib/libnetcdff.la +%%FORTRAN%%lib/libnetcdff.so +%%FORTRAN%%lib/libnetcdff.so.4 %%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES |