Update to 3.5.0.

Some relevant changes:

 Fixed miswriting of netCDF header when exiting define
 mode.  Because the header was always written correctly
 later, this was only a problem if there was another
 reader of the netCDF file.

 Fixed explicit synchronizing between netCDF writer and
 readers via the nc_sync(), nf_sync(), and ncsync()
 functions.

 Fixed a number of bugs related to attempts to support
 shrinking the header in netCDF files when attributes
 are rewritten or deleted.  Also fixed the problem that
 nc__endef() did not work as intended in reserving
 extra space in the file header, since the extra space
 would be compacted again on calling nc_close().

 Fixed the "redef bug" that occurred when nc_enddef()
 or nf_enddef() is called after nc_redef() or
 nf_redef(), the file is growing such that the new
 beginning of a record variable is in the next "chunk",
 and the size of at least one record variable exceeds
 the chunk size (see netcdf.3 man page for a
 description of this tuning parameter and how to set
 it).  This bug resulted in corruption of some values
 in other variables than the one being added.

 The "__" tuning functions for the Fortran interface,
 nf__create, nf__open, and nf__enddef, are now
 documented in the Fortran interface man pages.

 Changed the extension of C++ files from ".cc" to ".cpp".
 Renamed the C++ interface header file "netcdfcpp.h"
 instead of "netcdf.hh", changing "netcdf.hh" to
 include "netcdfcpp.h" for backward compatibility.

 Fixed bug in ncdump using same CDL header name when
 called with multiple files.

 Added new NULL data type  NC_NAT (Not A Type) to
 facilitate checking whether a variable object has had
 its type defined yet, for example when working with
 packed values.

 Fixed use of compile-time macro NO_NETCDF_2 so it
 really doesn't include old netCDF-2 interfaces, as
 intended.

 Fixed C++ friend declarations to conform to C++ standard.
This commit is contained in:
jtb 2003-03-02 08:26:09 +00:00
parent a986c2b819
commit fef1bf968c
10 changed files with 135 additions and 125 deletions

View file

@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.11 2003/02/18 00:23:46 jtb Exp $
#
# $NetBSD: Makefile,v 1.12 2003/03/02 08:26:09 jtb Exp $
DISTNAME= netcdf-3.4
DISTNAME= netcdf-3.5.0
WRKSRC= ${WRKDIR}/${DISTNAME}/src
CATEGORIES= devel
MASTER_SITES= ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/

View file

@ -1,21 +0,0 @@
@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:24:58 zuntum Exp $
bin/ncdump
bin/ncgen
include/netcdf.h
include/netcdf.inc
include/netcdf.hh
include/ncvalues.hh
lib/libnetcdf.a
lib/libnetcdf.la
lib/libnetcdf.so
lib/libnetcdf.so.3
lib/libnetcdf.so.3.4
lib/libnetcdf_c++.a
lib/libnetcdf_c++.la
lib/libnetcdf_c++.so
lib/libnetcdf_c++.so.3
lib/libnetcdf_c++.so.3.4
man/man1/ncdump.1
man/man1/ncgen.1
man/man3/netcdf.3
man/man3/netcdf.3f

View file

@ -1,10 +1,10 @@
# $NetBSD: buildlink2.mk,v 1.2 2002/08/25 19:22:34 jlam Exp $
# $NetBSD: buildlink2.mk,v 1.3 2003/03/02 08:26:09 jtb Exp $
.if !defined(NETCDF_BUILDLINK2_MK)
NETCDF_BUILDLINK2_MK= # defined
BUILDLINK_PACKAGES+= netcdf
BUILDLINK_DEPENDS.netcdf?= netcdf>=3.4
BUILDLINK_DEPENDS.netcdf?= netcdf>=3.5
BUILDLINK_PKGSRCDIR.netcdf?= ../../devel/netcdf
EVAL_PREFIX+= BUILDLINK_PREFIX.netcdf=netcdf
@ -12,7 +12,7 @@ BUILDLINK_PREFIX.netcdf_DEFAULT= ${LOCALBASE}
BUILDLINK_FILES.netcdf= include/netcdf.h
BUILDLINK_FILES.netcdf+= include/netcdf.inc
BUILDLINK_FILES.netcdf+= include/netcdf.hh
BUILDLINK_FILES.netcdf+= include/ncvalues.hh
BUILDLINK_FILES.netcdf+= include/ncvalues.h
BUILDLINK_FILES.netcdf+= lib/libnetcdf.*
BUILDLINK_FILES.netcdf+= lib/libnetcdf_c++.*

View file

@ -1,13 +1,12 @@
$NetBSD: distinfo,v 1.4 2002/01/08 19:55:51 agc Exp $
$NetBSD: distinfo,v 1.5 2003/03/02 08:26:09 jtb Exp $
SHA1 (netcdf-3.4.tar.Z) = 95e36b8a405e4584eac4e2f58a867c53cda6779f
Size (netcdf-3.4.tar.Z) = 1216131 bytes
SHA1 (patch-aa) = 0aca001ad6c4d20436a2394bd6142f837c1bccc1
SHA1 (patch-ab) = c178f590ee7b1aaba7b02a12b490e1edc3c223d5
SHA1 (patch-ac) = 893888531d177b16fbb599fc5f4d16904601fc12
SHA1 (patch-ad) = 3f9fbd975132488192f6ee1e3ef1cbb16575f735
SHA1 (netcdf-3.5.0.tar.Z) = e9c5a9847d8ff9b3e1b8a18f5e216f6a1508bce8
Size (netcdf-3.5.0.tar.Z) = 1319419 bytes
SHA1 (patch-ab) = 37bf389e76316b03cc3590a1c13855636907b8a5
SHA1 (patch-ac) = 8a73893ae7c98dd45d61d795592c57abe76d3fde
SHA1 (patch-ad) = d436debcce008c242e6926949938cdbe8dc6447e
SHA1 (patch-ae) = e91f8111387c7ca3111e640dcbc16d9bca8ed898
SHA1 (patch-af) = 42a96275cc048d796452c20c7c6f24ac651e8877
SHA1 (patch-ag) = b5615e03462df8de777705ab78f0ea21026f2c0a
SHA1 (patch-ag) = 214b7c241bc71e5ebbef1e3f9f8a661acaf05228
SHA1 (patch-ah) = 11083d7a775ca6199162fe3b14776ca24b5c009a
SHA1 (patch-ai) = 3940571e8ef7a8175bf9b580541f9c95ff2152a1
SHA1 (patch-ai) = fb8386c47a2b0e2468bf31a424738979c472de94

View file

@ -1,18 +0,0 @@
$NetBSD: patch-aa,v 1.1.1.1 1999/01/14 20:28:54 frueauf Exp $
--- ncgen/ncgentab.c.orig Wed Sep 17 20:31:03 1997
+++ ncgen/ncgentab.c Sun Sep 27 12:15:56 1998
@@ -82,7 +82,13 @@
#include <memory.h>
#endif
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
+#include <sys/param.h>
+#endif
+
+#ifndef BSD
#include <values.h>
+#endif
#ifdef __cplusplus

View file

@ -1,53 +1,48 @@
$NetBSD: patch-ab,v 1.2 2002/01/08 19:55:51 agc Exp $
$NetBSD: patch-ab,v 1.3 2003/03/02 08:26:10 jtb Exp $
--- macros.make.in.orig Thu Sep 18 21:56:04 1997
+++ macros.make.in Tue Jan 8 19:47:38 2002
@@ -19,7 +19,7 @@
# Preprocessing:
M4 = @M4@
-M4FLAGS = -B10000
+M4FLAGS =
CPP = @CPP@
CPPFLAGS = $(INCLUDES) $(DEFINES) @CPPFLAGS@
FPP = @FPP@
@@ -28,9 +28,9 @@
--- macros.make.in.orig Tue Mar 13 17:42:50 2001
+++ macros.make.in
@@ -29,10 +29,10 @@ CXXCPPFLAGS = $(CPPFLAGS)
# Compilation:
-CC = @CC@
-CXX = @CXX@
-FC = @FC@
+CC = ${LIBTOOL} --mode=compile @CC@
+CXX = ${LIBTOOL} --mode=compile @CXX@
+FC = ${LIBTOOL} --mode=compile @FC@
-F90 = @F90@
+CC = $(LIBTOOL) --mode=compile @CC@
+CXX = $(LIBTOOL) --mode=compile @CXX@
+FC = $(LIBTOOL) --mode=compile @FC@
+F90 = $(LIBTOOL) --mode=compile @F90@
CFLAGS = @CFLAGS@
CXXFLAGS = $(CFLAGS) @CXXFLAGS@
CXXFLAGS = @CXXFLAGS@
FFLAGS = @FFLAGS@
@@ -47,10 +47,10 @@
MATHLIB = @MATHLIB@
FLIBS = @FLIBS@
@@ -54,11 +54,11 @@ FLIBS = @FLIBS@
F90LIBS = @F90LIBS@
LIBS = @LIBS@
F90LDFLAGS = $(LDFLAGS)
-LINK.c = $(CC) -o $@ $(CFLAGS) $(LDFLAGS)
-LINK.cxx = $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS)
-LINK.F = $(FC) -o $@ $(FFLAGS) $(FLDFLAGS)
-LINK.f = $(FC) -o $@ $(FFLAGS) $(FLDFLAGS)
+LINK.c = ${LIBTOOL} --mode=link @CC@ -o $@ $(CFLAGS) $(LDFLAGS)
+LINK.cxx = ${LIBTOOL} --mode=link @CXX@ -o $@ $(CXXFLAGS) $(LDFLAGS)
+LINK.F = ${LIBTOOL} --mode=link @FC@ -o $@ $(FFLAGS) $(FLDFLAGS)
+LINK.f = ${LIBTOOL} --mode=link @FC@ -o $@ $(FFLAGS) $(FLDFLAGS)
-LINK.F90 = $(F90) -o $@ $(F90FLAGS) $(F90LDFLAGS)
+LINK.c = $(LIBTOOL) --mode=link @CC@ -o $@ $(CFLAGS) $(LDFLAGS)
+LINK.cxx = $(LIBTOOL) --mode=link @CXX@ -o $@ $(CXXFLAGS) $(LDFLAGS)
+LINK.F = $(LIBTOOL) --mode=link @FC@ -o $@ $(FFLAGS) $(FLDFLAGS)
+LINK.f = $(LIBTOOL) --mode=link @FC@ -o $@ $(FFLAGS) $(FLDFLAGS)
+LINK.F90 = $(LIBTOOL) --mode=link @F90@ -o $@ $(F90FLAGS) $(F90LDFLAGS)
# NetCDF files:
@@ -66,9 +66,9 @@
# Manual pages:
@@ -69,9 +69,9 @@ MAKEWHATIS_CMD = @MAKEWHATIS_CMD@
# Misc. Utilities:
-AR = @AR@
-ARFLAGS = cru # NB: SunOS 4 doesn't like `-' option prefix
-ARFLAGS = @ARFLAGS@
-RANLIB = @RANLIB@
+AR = ${LIBTOOL} --mode=link @CC@
+ARFLAGS = -rpath $(LIBDIR) -version-info 3:4
+AR = $(LIBTOOL) --mode=link @CC@
+ARFLAGS = -rpath $(LIBDIR) -version-info 3:5
+RANLIB = echo
TARFLAGS = -chf

View file

@ -1,27 +1,40 @@
$NetBSD: patch-ac,v 1.1.1.1 1999/01/14 20:28:54 frueauf Exp $
$NetBSD: patch-ac,v 1.2 2003/03/02 08:26:10 jtb Exp $
--- rules.make.orig Fri Dec 19 23:07:52 1997
+++ rules.make Sun Sep 27 22:34:28 1998
--- rules.make.orig Thu Feb 27 13:08:11 2003
+++ rules.make
@@ -55,8 +55,7 @@
lib: $(LIBRARY)
$(LIBRARY): $(LIB_OBJS) FORCE
- $(AR) $(ARFLAGS) $@ $(LIB_OBJS)
- $(RANLIB) $@
+ $(AR) $(ARFLAGS) -o ${.TARGET:.a=.la} ${LIB_OBJS:.o=.lo}
+ $(AR) $(ARFLAGS) -o $(.TARGET:.a=.la) $(LIB_OBJS:.o=.lo)
#-------------------------------------------------------------------------------
# Shared Libraries:
@@ -122,10 +121,10 @@
cp $(HEADER2) $@
@@ -115,19 +114,19 @@ sunos5_shared_library:
# Installation:
$(INCDIR)/$(HEADER): $(INCDIR) $(HEADER)
- cp $(HEADER) $@
+ $(BSD_INSTALL_DATA) $(HEADER) $@
$(INCDIR)/$(HEADER1): $(INCDIR) $(HEADER1)
- cp $(HEADER1) $@
+ $(BSD_INSTALL_DATA) $(HEADER1) $@
$(INCDIR)/$(HEADER2): $(INCDIR) $(HEADER2)
- cp $(HEADER2) $@
+ $(BSD_INSTALL_DATA) $(HEADER2) $@
$(INCDIR)/$(HEADER3): $(INCDIR) $(HEADER3)
- cp $(HEADER3) $@
+ $(BSD_INSTALL_DATA) $(HEADER3) $@
$(LIBDIR)/$(LIBRARY): $(LIBDIR) $(LIBRARY)
- cp $(LIBRARY) $@
+ ${LIBTOOL} --mode=install cp $(LIBRARY) $@
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) $(LIBRARY) $@
$(BINDIR)/$(PROGRAM): $(BINDIR) $(PROGRAM)
- cp $(PROGRAM) $@
+ ${LIBTOOL} --mode=install cp $(PROGRAM) $@
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $(PROGRAM) $@
$(BINDIR) \
$(INCDIR) \

View file

@ -1,25 +1,56 @@
$NetBSD: patch-ad,v 1.2 2001/07/30 03:42:27 jlam Exp $
$NetBSD: patch-ad,v 1.3 2003/03/02 08:26:10 jtb Exp $
--- Makefile.orig Mon Jul 7 12:17:36 1997
--- Makefile.orig Tue Feb 27 16:04:32 2001
+++ Makefile
@@ -25,8 +25,8 @@
@@ -27,9 +27,8 @@ PACKING_LIST = \
rules.make
-all: libsrc/all \
- fortran/all \
- f90/all \
+all: fortran/all \
+ libsrc/all \
ncdump/all \
ncgen/all \
cxx/all
@@ -42,8 +42,7 @@
fortran/install \
ncdump/install \
ncgen/install \
- cxx/install \
- $(MANDIR)/$(WHATIS)
+ cxx/install
@@ -64,7 +63,7 @@ distclean: libsrc/distclean \
nctest/distclean nc_test/distclean \
fortran/distclean f90/distclean nf_test/distclean \
ncdump/distclean ncgen/distclean cxx/distclean \
- clean_macros
+ clean_macros
clean: libsrc/clean \
nctest/clean nc_test/clean \
clean_macros:
-cp macros.make.def macros.make
@@ -162,7 +161,7 @@ subdir_target:
@echo "Returning to directory `pwd`"
@echo ""
-install: whatis
+install:
whatis: $(MANDIR)/$(WHATIS)
$(MANDIR)/$(WHATIS): $(MANDIR)
$(MAKEWHATIS_CMD)
@@ -189,7 +188,7 @@ check_system: FORCE
*) exit 0;; \
esac
-# Make a compressed, tar(1) file of the source distribution in the current
+# Make a compressed, tar(1) file of the source distribution in the current
# directory.
#
tar.Z: check_system FORCE
@@ -225,10 +224,10 @@ ftp: check_system FORCE
$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z: $(PACKAGE)-$(VERSION).tar.Z
rm -f $@
- cp $(PACKAGE)-$(VERSION).tar.Z $@
+ cp $(PACKAGE)-$(VERSION).tar.Z $@
chmod u+rw,g+rw,o=r $@
-# Make a compressed, tar(1) file of the binary distribution in the
+# Make a compressed, tar(1) file of the binary distribution in the
# appropriate FTP directory.
#
binftp: FORCE

View file

@ -1,15 +1,22 @@
$NetBSD: patch-ag,v 1.1.1.1 1999/01/14 20:28:54 frueauf Exp $
$NetBSD: patch-ag,v 1.2 2003/03/02 08:26:10 jtb Exp $
--- ncdump/Makefile.orig Sun Sep 27 20:07:07 1998
+++ ncdump/Makefile Sun Sep 27 20:08:23 1998
@@ -19,8 +19,8 @@
--- ncdump/Makefile.orig Thu Feb 27 13:28:14 2003
+++ ncdump/Makefile
@@ -16,7 +16,7 @@ PACKING_LIST = $(c_sources) $(headers) d
test0.cdl ncdump.1 Makefile
MANUAL = ncdump.1
-lib_netcdf = ../libsrc/libnetcdf.a
-ld_netcdf = -L../libsrc -lnetcdf
+lib_netcdf = ../libsrc/libnetcdf.la
+ld_netcdf = ${lib_netcdf}
OBJS = ncdump.o vardata.o dumplib.o
GARBAGE = $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl
# Don't use "-L../libsrc -lnetcdf" in the following because that doesn't
# work on a CRAY T90 (sigh).
@@ -28,7 +28,7 @@ GARBAGE = $(PROGRAM) test0.nc test1.nc
all: $(PROGRAM)
$(PROGRAM): $(lib_netcdf) $(OBJS)
- $(LINK.c) $(OBJS) $(ld_netcdf) $(LIBS)
+ $(LINK.c) $(OBJS) $(ld_netcdf) $(LIBS)
test: $(PROGRAM) FORCE
$(NCGEN) -b test0.cdl

View file

@ -1,26 +1,31 @@
$NetBSD: patch-ai,v 1.1.1.1 1999/01/14 20:28:54 frueauf Exp $
$NetBSD: patch-ai,v 1.2 2003/03/02 08:26:10 jtb Exp $
--- cxx/Makefile.orig Sun Sep 27 20:12:34 1998
+++ cxx/Makefile Sun Sep 27 20:17:51 1998
@@ -11,9 +11,9 @@
nctst.cc ncvalues.cc ncvalues.hh netcdf.cc netcdf.hh \
expected cxxdoc.tex cxxdoc.ps texinfo.tex
--- cxx/Makefile.orig Thu Feb 27 13:35:04 2003
+++ cxx/Makefile
@@ -11,9 +11,9 @@ PACKING_LIST = Makefile README depend ex
nctst.cpp ncvalues.cpp ncvalues.h netcdf.cpp netcdfcpp.h \
expected cxxdoc.tex cxxdoc.ps texinfo.tex netcdf.hh
-LIBRARY = libnetcdf_c++.a
-lib_netcdf = ../libsrc/libnetcdf.a
-ld_netcdf = -L../libsrc -lnetcdf
+LIBRARY = libnetcdf_c++.la
+lib_netcdf = ../libsrc/libnetcdf.la
+ld_netcdf = ${lib_netcdf}
+ld_netcdf = $(lib_netcdf)
HEADER1 = netcdf.hh
HEADER2 = ncvalues.hh
@@ -42,7 +42,7 @@
install: $(LIBDIR)/$(LIBRARY) $(INCDIR)/$(HEADER1) $(INCDIR)/$(HEADER2)
HEADER1 = netcdfcpp.h
HEADER2 = ncvalues.h
@@ -51,7 +51,7 @@ uninstall:
-rm -f $(INCDIR)/$(HEADER3)
$(prog) : $(prog_objs) $(LIBRARY) $(lib_netcdf)
- $(CXX) -o $@ $(CXXCPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(prog_objs) $(libs)
+ $(LINK.cxx) -o $@ $(CXXCPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(prog_objs) $(libs)
- $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(prog_objs) $(libs)
+ $(LINK.cxx) -o $@ $(CXXFLAGS) $(LDFLAGS) $(prog_objs) $(libs)
nctst_src: nctst.cc netcdf.cc ncvalues.cc
nctst_src: nctst.cpp netcdf.cpp ncvalues.cpp
#load -I../libsrc $(nctst_src)
@@ -95,4 +95,3 @@ ncvalues.o: ncvalues.h ncvalues.cpp
nctst.o: netcdfcpp.h nctst.cpp
include depend
-