- Add experimental WITH_FORTRAN knob and a patch to have it compile.
- It's off by default as it doesn't seem to be required by any port. - No functional change. PR: ports/125915 Submitted by: Pedro F. Giffuni <pfgshield-freebsd@yahoo.com> Approved by: maintainer timeout (>2 Weeks)
This commit is contained in:
parent
ff57c42264
commit
6546605e6b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=218179
6 changed files with 80 additions and 2 deletions
|
@ -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
|
||||
|
|
21
science/netcdf/files/patch-fortran+cfortran.h
Normal file
21
science/netcdf/files/patch-fortran+cfortran.h
Normal file
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
21
science/netcdf4/files/patch-fortran+cfortran.h
Normal file
21
science/netcdf4/files/patch-fortran+cfortran.h
Normal file
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue