diff options
author | cjep <cjep@pkgsrc.org> | 2004-01-11 15:58:45 +0000 |
---|---|---|
committer | cjep <cjep@pkgsrc.org> | 2004-01-11 15:58:45 +0000 |
commit | f0876e747ebc2b716017a9f002187a12dc527bd2 (patch) | |
tree | ecf8f791328bb71e8a639b443d208d7195f07baa /devel/netcdf | |
parent | 0c7c17f4d76462d89dfe6a9313728a48ed25d23f (diff) | |
download | pkgsrc-f0876e747ebc2b716017a9f002187a12dc527bd2.tar.gz |
Make this package compile with gcc3. Fixes PR#23330 from
Wolfgang S. Rupprecht.
Patches from http://www.unidata.ucar.edu/packages/netcdf/known_problems.html
(Mike Romberg).
Diffstat (limited to 'devel/netcdf')
-rw-r--r-- | devel/netcdf/Makefile | 3 | ||||
-rw-r--r-- | devel/netcdf/distinfo | 7 | ||||
-rw-r--r-- | devel/netcdf/patches/patch-al | 25 | ||||
-rw-r--r-- | devel/netcdf/patches/patch-am | 28 | ||||
-rw-r--r-- | devel/netcdf/patches/patch-an | 137 | ||||
-rw-r--r-- | devel/netcdf/patches/patch-ao | 80 | ||||
-rw-r--r-- | devel/netcdf/patches/patch-ap | 63 |
7 files changed, 341 insertions, 2 deletions
diff --git a/devel/netcdf/Makefile b/devel/netcdf/Makefile index 7e7010864ad..2d1a5b9593b 100644 --- a/devel/netcdf/Makefile +++ b/devel/netcdf/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.15 2003/07/17 21:31:57 grant Exp $ +# $NetBSD: Makefile,v 1.16 2004/01/11 15:58:45 cjep Exp $ DISTNAME= netcdf-3.5.0 +PKGREVISION= 1 WRKSRC= ${WRKDIR}/${DISTNAME}/src CATEGORIES= devel MASTER_SITES= ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/ diff --git a/devel/netcdf/distinfo b/devel/netcdf/distinfo index f0cd237c6c8..b4f6c614bb0 100644 --- a/devel/netcdf/distinfo +++ b/devel/netcdf/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.8 2003/11/29 00:14:54 wiz Exp $ +$NetBSD: distinfo,v 1.9 2004/01/11 15:58:45 cjep Exp $ SHA1 (netcdf-3.5.0.tar.Z) = e9c5a9847d8ff9b3e1b8a18f5e216f6a1508bce8 Size (netcdf-3.5.0.tar.Z) = 1319419 bytes @@ -12,3 +12,8 @@ SHA1 (patch-ah) = 11083d7a775ca6199162fe3b14776ca24b5c009a SHA1 (patch-ai) = fb8386c47a2b0e2468bf31a424738979c472de94 SHA1 (patch-aj) = 7721c70d1ec33477a51863626cbfb68e2ed689bb SHA1 (patch-ak) = 334ba2656119c9b3682cb6795030a2320c8b6d98 +SHA1 (patch-al) = e34833121ee90a18318948705af40da7a4513afc +SHA1 (patch-am) = ac8ade3c79380833a1339b7f4c99224e89b231e7 +SHA1 (patch-an) = 5e8e3d13f65664af37ef276d0968b9206de120e9 +SHA1 (patch-ao) = 873ed1497741ed4cc449f19f499f3e55c4d4f6ea +SHA1 (patch-ap) = 90951e89f433f231d66ffa31f48e8527f24a82c7 diff --git a/devel/netcdf/patches/patch-al b/devel/netcdf/patches/patch-al new file mode 100644 index 00000000000..f308c5a0747 --- /dev/null +++ b/devel/netcdf/patches/patch-al @@ -0,0 +1,25 @@ +$NetBSD: patch-al,v 1.1 2004/01/11 15:58:45 cjep Exp $ + +--- aclocal.m4.orig 2001-03-22 21:43:11.000000000 +0000 ++++ aclocal.m4 +@@ -173,9 +173,9 @@ AC_DEFUN(UD_PROG_CXX, + AC_MSG_CHECKING(C++ compiler \"$CXX\") + AC_TRY_RUN( + [ +- #include <iostream.h> ++ #include <iostream> + int main() { +- cout << ""; ++ std::cout << ""; + return 0; + } + ], +@@ -1141,7 +1141,7 @@ do + echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion" + exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) +- echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION" ++ echo "$CONFIG_STATUS generated by autoconf version ?unknown?" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "[\$]ac_cs_usage"; exit 0 ;; diff --git a/devel/netcdf/patches/patch-am b/devel/netcdf/patches/patch-am new file mode 100644 index 00000000000..676eea627c1 --- /dev/null +++ b/devel/netcdf/patches/patch-am @@ -0,0 +1,28 @@ +$NetBSD: patch-am,v 1.1 2004/01/11 15:58:45 cjep Exp $ + +--- configure.in.orig 2001-03-22 21:43:13.000000000 +0000 ++++ configure.in +@@ -3,13 +3,15 @@ dnl + dnl Process this file with GNU autoconf(1) to produce a configure script. + dnl + ++AC_INIT(netcdf, 3.5.0) ++dnl AC_INIT(libsrc/ncconfig.in) ++ ++ + dnl Defaults: + CPPFLAGS=${CPPFLAGS--DNDEBUG} + CFLAGS=${CFLAGS--O} + FPPFLAGS=${FPPFLAGS-} + FFLAGS=${FFLAGS-} +- +-AC_INIT(libsrc/ncconfig.in) + UD_SRCDIR + AC_PREFIX_DEFAULT(`(cd ..; pwd)`) + AC_CONFIG_HEADER( +@@ -55,4 +57,4 @@ UD_CHECK_SIZEOF(off_t) + UD_CHECK_SIZEOF(size_t) + UD_MAKEWHATIS + UD_FTPBINDIR +-UD_OUTPUT(macros.make) ++AC_OUTPUT(macros.make) diff --git a/devel/netcdf/patches/patch-an b/devel/netcdf/patches/patch-an new file mode 100644 index 00000000000..27b515862ed --- /dev/null +++ b/devel/netcdf/patches/patch-an @@ -0,0 +1,137 @@ +$NetBSD: patch-an,v 1.1 2004/01/11 15:58:45 cjep Exp $ + +--- cxx/nctst.cpp.orig 1999-09-17 18:21:23.000000000 +0100 ++++ cxx/nctst.cpp +@@ -1,4 +1,4 @@ +-#include <iostream.h> ++#include <iostream> + #include <string.h> + #include "netcdfcpp.h" + +@@ -8,7 +8,7 @@ void gen(const char* path) // Generate + + // Check if the file was opened successfully + if (! nc.is_valid()) { +- cerr << "can't create netCDF file " << path << "\n"; ++ std::cerr << "can't create netCDF file " << path << "\n"; + return; + } + +@@ -124,12 +124,12 @@ void DumpableNcFile::dumpdims( void ) + + for (int n=0; n < num_dims(); n++) { + NcDim* dim = get_dim(n); +- cout << "\t" << dim->name() << " = " ; ++ std::cout << "\t" << dim->name() << " = " ; + if (dim->is_unlimited()) +- cout << "UNLIMITED" << " ;\t " << "// " << dim->size() << ++ std::cout << "UNLIMITED" << " ;\t " << "// " << dim->size() << + " currently\n"; + else +- cout << dim->size() << " ;\n"; ++ std::cout << dim->size() << " ;\n"; + } + } + +@@ -137,10 +137,10 @@ void dumpatts(NcVar& var) + { + NcToken vname = var.name(); + NcAtt* ap; +- for(int n = 0; ap = var.get_att(n); n++) { +- cout << "\t\t" << vname << ":" << ap->name() << " = " ; ++ for(int n = 0; (ap = var.get_att(n)); n++) { ++ std::cout << "\t\t" << vname << ":" << ap->name() << " = " ; + NcValues* vals = ap->values(); +- cout << *vals << " ;" << endl ; ++ std::cout << *vals << " ;" << std::endl ; + delete ap; + delete vals; + } +@@ -153,20 +153,20 @@ void DumpableNcFile::dumpvars( void ) + {"","byte","char","short","long","float","double"}; + NcVar* vp; + +- for(n = 0; vp = get_var(n); n++) { +- cout << "\t" << types[vp->type()] << " " << vp->name() ; ++ for(n = 0; (vp = get_var(n)); n++) { ++ std::cout << "\t" << types[vp->type()] << " " << vp->name() ; + + if (vp->num_dims() > 0) { +- cout << "("; ++ std::cout << "("; + for (int d = 0; d < vp->num_dims(); d++) { + NcDim* dim = vp->get_dim(d); +- cout << dim->name(); ++ std::cout << dim->name(); + if (d < vp->num_dims()-1) +- cout << ", "; ++ std::cout << ", "; + } +- cout << ")"; ++ std::cout << ")"; + } +- cout << " ;\n"; ++ std::cout << " ;\n"; + // now dump each of this variable's attributes + dumpatts(*vp); + } +@@ -175,10 +175,10 @@ void DumpableNcFile::dumpvars( void ) + void DumpableNcFile::dumpgatts( void ) + { + NcAtt* ap; +- for(int n = 0; ap = get_att(n); n++) { +- cout << "\t\t" << ":" << ap->name() << " = " ; ++ for(int n = 0; (ap = get_att(n)); n++) { ++ std::cout << "\t\t" << ":" << ap->name() << " = " ; + NcValues* vals = ap->values(); +- cout << *vals << " ;" << endl ; ++ std::cout << *vals << " ;" << std::endl ; + delete vals; + delete ap; + } +@@ -187,10 +187,10 @@ void DumpableNcFile::dumpgatts( void ) + void DumpableNcFile::dumpdata( ) + { + NcVar* vp; +- for (int n = 0; vp = get_var(n); n++) { +- cout << " " << vp->name() << " = "; ++ for (int n = 0; (vp = get_var(n)); n++) { ++ std::cout << " " << vp->name() << " = "; + NcValues* vals = vp->values(); +- cout << *vals << " ;" << endl ; ++ std::cout << *vals << " ;" << std::endl ; + delete vals; + } + } +@@ -199,25 +199,25 @@ void dump(const char* path) + { + DumpableNcFile nc(path); // default is open in read-only mode + +- cout << "netcdf " << cdl_name(path) << " {" << endl << +- "dimensions:" << endl ; ++ std::cout << "netcdf " << cdl_name(path) << " {" << std::endl << ++ "dimensions:" << std::endl ; + + nc.dumpdims(); + +- cout << "variables:" << endl; ++ std::cout << "variables:" << std::endl; + + nc.dumpvars(); + + if (nc.num_atts() > 0) +- cout << "// global attributes" << endl ; ++ std::cout << "// global attributes" << std::endl ; + + nc.dumpgatts(); + +- cout << "data:" << endl; ++ std::cout << "data:" << std::endl; + + nc.dumpdata(); + +- cout << "}" << endl; ++ std::cout << "}" << std::endl; + } + + diff --git a/devel/netcdf/patches/patch-ao b/devel/netcdf/patches/patch-ao new file mode 100644 index 00000000000..a4e98d5424d --- /dev/null +++ b/devel/netcdf/patches/patch-ao @@ -0,0 +1,80 @@ +$NetBSD: patch-ao,v 1.1 2004/01/11 15:58:45 cjep Exp $ + +--- cxx/ncvalues.cpp.orig 1998-12-22 18:21:49.000000000 +0000 ++++ cxx/ncvalues.cpp +@@ -8,5 +8,5 @@ + *********************************************************************/ + +-#include <iostream.h> // for debugging ++#include <iostream> // for debugging + #include "ncvalues.h" + +@@ -26,5 +26,5 @@ long NcValues::num( void ) + } + +-ostream& operator<< (ostream& os, const NcValues& vals) ++std::ostream& operator<< (std::ostream& os, const NcValues& vals) + { + return vals.print(os); +@@ -245,5 +245,5 @@ inline char* NcValues_char::as_string( l + } + +-ostream& NcValues_short::print(ostream& os) const ++std::ostream& NcValues_short::print(std::ostream& os) const + { + for(int i = 0; i < the_number - 1; i++) +@@ -254,5 +254,5 @@ ostream& NcValues_short::print(ostream& + } + +-ostream& NcValues_int::print(ostream& os) const ++std::ostream& NcValues_int::print(std::ostream& os) const + { + for(int i = 0; i < the_number - 1; i++) +@@ -263,5 +263,5 @@ ostream& NcValues_int::print(ostream& os + } + +-ostream& NcValues_nclong::print(ostream& os) const ++std::ostream& NcValues_nclong::print(std::ostream& os) const + { + for(int i = 0; i < the_number - 1; i++) +@@ -272,5 +272,5 @@ ostream& NcValues_nclong::print(ostream& + } + +-ostream& NcValues_long::print(ostream& os) const ++std::ostream& NcValues_long::print(std::ostream& os) const + { + for(int i = 0; i < the_number - 1; i++) +@@ -281,5 +281,5 @@ ostream& NcValues_long::print(ostream& o + } + +-ostream& NcValues_ncbyte::print(ostream& os) const ++std::ostream& NcValues_ncbyte::print(std::ostream& os) const + { + for(int i = 0; i < the_number - 1; i++) +@@ -290,5 +290,5 @@ ostream& NcValues_ncbyte::print(ostream& + } + +-ostream& NcValues_char::print(ostream& os) const ++std::ostream& NcValues_char::print(std::ostream& os) const + { + os << '"'; +@@ -303,7 +303,7 @@ ostream& NcValues_char::print(ostream& o + } + +-ostream& NcValues_float::print(ostream& os) const ++std::ostream& NcValues_float::print(std::ostream& os) const + { +- long save=os.flags(); ++ std::ostream::fmtflags save=os.flags(); + os.precision(7); + for(int i = 0; i < the_number - 1; i++) +@@ -315,7 +315,7 @@ ostream& NcValues_float::print(ostream& + } + +-ostream& NcValues_double::print(ostream& os) const ++std::ostream& NcValues_double::print(std::ostream& os) const + { +- long save=os.flags(); ++ std::ostream::fmtflags save=os.flags(); + os.precision(15); + for(int i = 0; i < the_number - 1; i++) diff --git a/devel/netcdf/patches/patch-ap b/devel/netcdf/patches/patch-ap new file mode 100644 index 00000000000..b4245d4209f --- /dev/null +++ b/devel/netcdf/patches/patch-ap @@ -0,0 +1,63 @@ +$NetBSD: patch-ap,v 1.1 2004/01/11 15:58:45 cjep Exp $ + +--- cxx/ncvalues.h.orig 1998-10-28 17:10:16.000000000 +0000 ++++ cxx/ncvalues.h +@@ -10,11 +10,11 @@ + #ifndef Ncvalues_def + #define Ncvalues_def + +-#include <iostream.h> ++#include <iostream> + #ifdef STRSTREAM_H_SPEC + # include STRSTREAM_H_SPEC + #else +-# include <strstream.h> ++# include <sstream> + #endif + #include <limits.h> + #include <string.h> +@@ -82,7 +82,7 @@ class NcVal(TYPE) : public NcValues + virtual int invalid( void ) const; \ + private: \ + TYPE* the_values; \ +- ostream& print(ostream&) const; \ ++ std::ostream& print(std::ostream&) const; \ + }; + + #define NcTypeEnum(TYPE) makename2(_nc__,TYPE) +@@ -219,9 +219,11 @@ inline double NcVal(TYPE)::as_double( lo + #define as_string_implement(TYPE) \ + char* NcVal(TYPE)::as_string( long n ) const \ + { \ +- char* s = new char[32]; \ +- ostrstream ostr(s, sizeof(s)); \ +- ostr << the_values[n] << ends; \ ++ std::ostringstream ostr; \ ++ ostr << the_values[n] << std::ends; \ ++ std::string str(ostr.str()); \ ++ char *s = new char[str.size()]; \ ++ str.copy(s, str.size()); \ + return s; \ + } + +@@ -232,7 +234,7 @@ class NcValues // ABC for value blocks + NcValues(NcType, long); + virtual ~NcValues( void ); + virtual long num( void ); +- virtual ostream& print(ostream&) const = 0; ++ virtual std::ostream& print(std::ostream&) const = 0; + virtual void* base( void ) const = 0; + virtual int bytes_for_one( void ) const = 0; + +@@ -250,9 +252,9 @@ class NcValues // ABC for value blocks + virtual char* as_string( long n ) const = 0; // value as string + + protected: +- NcType the_type; + long the_number; +- friend ostream& operator<< (ostream&, const NcValues&); ++ NcType the_type; ++ friend std::ostream& operator<< (std::ostream&, const NcValues&); + }; + + declare(NcValues,ncbyte) |