aboutsummaryrefslogtreecommitdiffstats
path: root/science/netcdf4
diff options
context:
space:
mode:
authorchinsan <chinsan@FreeBSD.org>2009-01-01 20:19:08 +0800
committerchinsan <chinsan@FreeBSD.org>2009-01-01 20:19:08 +0800
commitb64bc6cfdd45c4caca8ad7ca21f402dfc911c8ab (patch)
treec451b1e5107341ea76ac6c3c7d97994767236b09 /science/netcdf4
parent578db27b4060f71b9ad41dd8526fbc50edfc3248 (diff)
downloadfreebsd-ports-gnome-b64bc6cfdd45c4caca8ad7ca21f402dfc911c8ab.tar.gz
freebsd-ports-gnome-b64bc6cfdd45c4caca8ad7ca21f402dfc911c8ab.tar.zst
freebsd-ports-gnome-b64bc6cfdd45c4caca8ad7ca21f402dfc911c8ab.zip
- Update science/netcdf4 to 4.0
PR: ports/129418 Submitted by: Sunpoet Po-Chuan Hsieh <sunpoet at sunpoet dot net>
Diffstat (limited to 'science/netcdf4')
-rw-r--r--science/netcdf4/Makefile72
-rw-r--r--science/netcdf4/distinfo6
-rw-r--r--science/netcdf4/files/patch-fortran+cfortran.h21
-rw-r--r--science/netcdf4/files/patch-libsrc4-nc4hdf.c12
-rw-r--r--science/netcdf4/pkg-plist54
5 files changed, 104 insertions, 61 deletions
diff --git a/science/netcdf4/Makefile b/science/netcdf4/Makefile
index 7ef4c97f6305..7849bec5fd46 100644
--- a/science/netcdf4/Makefile
+++ b/science/netcdf4/Makefile
@@ -1,56 +1,72 @@
-# New ports collection makefile for: netcdf
-# Date created: 29 July 1999
-# Whom: Thomas Gellekum <tg@FreeBSD.org>
+# New ports collection makefile for: netcdf4
+# Date created: 2008-11-11
+# Whom: Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net>
#
# $FreeBSD$
#
PORTNAME= netcdf
-PORTVERSION= 3.6.3
-PORTREVISION= 1
+PORTVERSION= 4.0
CATEGORIES= science
-MASTER_SITES= ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
+MASTER_SITES= http://www.unidata.ucar.edu/downloads/netcdf/ftp/ \
+ ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
http://sunpoet.net/distfiles/
MAINTAINER= sunpoet@sunpoet.net
COMMENT= Library for machine-independent, array-oriented data access
-CONFLICTS= hdf-4.* netcdf-4.*
+CONFLICTS= hdf-4.* netcdf-3.*
-CONFIGURE_ARGS= --enable-shared
-CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -fPIC -DPIC -Df2cFortran"
+CONFIGURE_ARGS= --disable-f77 --disable-f90 \
+ --enable-cxx --enable-cxx-4 --enable-netcdf-4 --enable-shared \
+ --with-hdf5=${LOCALBASE} --with-zlib=/usr
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -fPIC -DPIC -Df2cFortran"
+MAKE_ENV+= MAKEINFOFLAGS="--no-split" INFODIR="${PREFIX}/${INFO_PATH}"
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
-CONFIGURE_ENV+= ${MAKE_ENV}
-PORTDOCS= COPYRIGHT README RELEASE_NOTES
+
+LIB_DEPENDS+= hdf5.6:${PORTSDIR}/science/hdf5-18
+
+INFO= netcdf netcdf-c netcdf-cxx netcdf-cxx4 netcdf-f77 \
+ netcdf-f90 netcdf-install netcdf-tutorial
MAN1= ncdump.1 ncgen.1
MAN3= netcdf.3
-INFO= netcdf netcdf-c netcdf-cxx netcdf-f77 netcdf-f90 \
- netcdf-install netcdf-tutorial
+OPTIONS= HDF5_CONVERT "Do data conversion through HDF5" off
-.ifdef WITH_FORTRAN
-USE_FORTRAN= yes
-MAN3+= netcdf_f77.3 netcdf_f90.3
-PLIST_SUB+= FORTRAN=""
+.if !defined(NOPORTDOCS)
+CONFIGURE_ARGS+=--enable-docs-install
.else
-CONFIGURE_ARGS+=--disable-f77
-PLIST_SUB+= FORTRAN="@comment "
+CONFIGURE_ARGS+=--disable-docs-install
.endif
-post-install:
- @${STRIP_CMD} ${PREFIX}/bin/ncdump ${PREFIX}/bin/ncgen
- ${LN} -fs libnetcdf.so.4 ${PREFIX}/lib/libnetcdf.so
- ${LN} -fs libnetcdf_c++.so.4 ${PREFIX}/lib/libnetcdf_c++.so
-.if !defined(NOPORTDOCS)
- @${INSTALL} -d ${DOCSDIR}
- @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
-.else
-CONFIGURE_ARGS+= --disable-docs-install
+.if defined(WITH_HDF5_CONVERT)
+CONFIGURE_ARGS+=--enable-hdf5-convert
.endif
+post-patch:
+.if defined(NOPORTDOCS)
+ @${REINPLACE_CMD} -e '814 s/install-docDATA //' \
+ ${WRKSRC}/man4/Makefile.in
+.endif
+ @${REINPLACE_CMD} -e \
+ 's/\(@INSTALL_DOCS_TRUE@MAN.*\)/# \1/' \
+ ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e \
+ '274 s/\(info_docs\).*/html_docs\)/' \
+ ${WRKSRC}/man4/Makefile.in
+
+post-configure:
+ @cd ${WRKSRC}/man4 && make maintainer-clean-aminfo
+.for i in ${INFO}
+ @cd ${WRKSRC}/man4 && makeinfo --no-split ${i}.texi
+.endfor
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
regression-test: build
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check
diff --git a/science/netcdf4/distinfo b/science/netcdf4/distinfo
index effcfec85197..953e56308e28 100644
--- a/science/netcdf4/distinfo
+++ b/science/netcdf4/distinfo
@@ -1,3 +1,3 @@
-MD5 (netcdf-3.6.3.tar.gz) = 334e9bdc010b6cd03fd6531a45fe50ad
-SHA256 (netcdf-3.6.3.tar.gz) = afa1a0fa82b9ea33b035257b6e9662b22e135f98b2fd93d5cf030320dfc3ffa1
-SIZE (netcdf-3.6.3.tar.gz) = 11572512
+MD5 (netcdf-4.0.tar.gz) = afc057b07b6e6843556dcfbc4ced402c
+SHA256 (netcdf-4.0.tar.gz) = 4f6934fd862b2e0f5a6ddcd8ef5f86a03d8aebfd106bc09c97afc80fe2ad5c96
+SIZE (netcdf-4.0.tar.gz) = 11584002
diff --git a/science/netcdf4/files/patch-fortran+cfortran.h b/science/netcdf4/files/patch-fortran+cfortran.h
deleted file mode 100644
index e3baf9ec0e9b..000000000000
--- a/science/netcdf4/files/patch-fortran+cfortran.h
+++ /dev/null
@@ -1,21 +0,0 @@
---- 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/files/patch-libsrc4-nc4hdf.c b/science/netcdf4/files/patch-libsrc4-nc4hdf.c
new file mode 100644
index 000000000000..7134e3b031b3
--- /dev/null
+++ b/science/netcdf4/files/patch-libsrc4-nc4hdf.c
@@ -0,0 +1,12 @@
+--- libsrc4/nc4hdf.c.orig 2008-06-10 23:38:34.000000000 +0800
++++ libsrc4/nc4hdf.c 2008-12-04 00:10:23.755371693 +0800
+@@ -465,6 +465,9 @@
+ int need_to_extend = 0, fill_value_recs = 0;
+ int scalar = 0, retval = NC_NOERR, range_error = 0, i, d2;
+ void *bufr = NULL;
++#ifdef HDF5_CONVERT
++ H5T_conv_except_func_t except_func;
++#endif
+ #ifndef HDF5_CONVERT
+ int need_to_convert = 0;
+ size_t len = 1;
diff --git a/science/netcdf4/pkg-plist b/science/netcdf4/pkg-plist
index 2f3e19916950..c20aa2419771 100644
--- a/science/netcdf4/pkg-plist
+++ b/science/netcdf4/pkg-plist
@@ -3,19 +3,55 @@ bin/ncgen
include/ncvalues.h
include/netcdf.h
include/netcdf.hh
-%%FORTRAN%%include/netcdf.mod
-%%FORTRAN%%include/typesizes.mod
include/netcdfcpp.h
+include/netcdfcpp4.h
lib/libnetcdf.a
lib/libnetcdf.la
lib/libnetcdf.so
-lib/libnetcdf.so.4
+lib/libnetcdf.so.5
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
-@dirrmtry %%DOCSDIR%%
+lib/libnetcdf_c++.so.5
+lib/libnetcdf_c++4.a
+lib/libnetcdf_c++4.la
+lib/libnetcdf_c++4.so
+lib/libnetcdf_c++4.so.1
+%%PORTDOCS%%%%DOCSDIR%%/ncdump-man-1.html
+%%PORTDOCS%%%%DOCSDIR%%/ncgen-man-1.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-c.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-c.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-c.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-c.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx4.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx4.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx4.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-cxx4.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f77.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f77.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f77.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f77.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f90.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f90.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f90.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-f90.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-install.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-install.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-install.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-install.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-man-3.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-tutorial.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-tutorial.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-tutorial.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf-tutorial.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf.pdf
+%%PORTDOCS%%%%DOCSDIR%%/netcdf.ps
+%%PORTDOCS%%%%DOCSDIR%%/netcdf.txt
+%%PORTDOCS%%%%DOCSDIR%%/netcdf_f77-man.html
+%%PORTDOCS%%%%DOCSDIR%%/netcdf_f90-man.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%