pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/netcdf Make this package compile with gcc3. Fixe...
details: https://anonhg.NetBSD.org/pkgsrc/rev/59bd8081171c
branches: trunk
changeset: 466092:59bd8081171c
user: cjep <cjep%pkgsrc.org@localhost>
date: Sun Jan 11 15:58:45 2004 +0000
description:
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:
devel/netcdf/Makefile | 3 +-
devel/netcdf/distinfo | 7 +-
devel/netcdf/patches/patch-al | 25 +++++++
devel/netcdf/patches/patch-am | 28 ++++++++
devel/netcdf/patches/patch-an | 137 ++++++++++++++++++++++++++++++++++++++++++
devel/netcdf/patches/patch-ao | 80 ++++++++++++++++++++++++
devel/netcdf/patches/patch-ap | 63 +++++++++++++++++++
7 files changed, 341 insertions(+), 2 deletions(-)
diffs (truncated from 383 to 300 lines):
diff -r 25a9e06aec32 -r 59bd8081171c devel/netcdf/Makefile
--- a/devel/netcdf/Makefile Sun Jan 11 15:28:07 2004 +0000
+++ b/devel/netcdf/Makefile Sun Jan 11 15:58:45 2004 +0000
@@ -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 -r 25a9e06aec32 -r 59bd8081171c devel/netcdf/distinfo
--- a/devel/netcdf/distinfo Sun Jan 11 15:28:07 2004 +0000
+++ b/devel/netcdf/distinfo Sun Jan 11 15:58:45 2004 +0000
@@ -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-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 -r 25a9e06aec32 -r 59bd8081171c devel/netcdf/patches/patch-al
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/netcdf/patches/patch-al Sun Jan 11 15:58:45 2004 +0000
@@ -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 -r 25a9e06aec32 -r 59bd8081171c devel/netcdf/patches/patch-am
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/netcdf/patches/patch-am Sun Jan 11 15:58:45 2004 +0000
@@ -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 -r 25a9e06aec32 -r 59bd8081171c devel/netcdf/patches/patch-an
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/netcdf/patches/patch-an Sun Jan 11 15:58:45 2004 +0000
@@ -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 -r 25a9e06aec32 -r 59bd8081171c devel/netcdf/patches/patch-ao
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/netcdf/patches/patch-ao Sun Jan 11 15:58:45 2004 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index