- update to netcdf 3.5.0
- cleanup - pull in patches from netcdf-current to build with gcc3
This commit is contained in:
parent
a0dbbd185c
commit
df1ebdb359
@ -1,32 +1,33 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2003/07/16 19:24:25 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2004/02/01 12:22:05 sturm Exp $
|
||||
# $FreeBSD: ports/math/netcdf/Makefile,v 1.7 2000/06/16 21:51:39 asami Exp $
|
||||
#
|
||||
|
||||
COMMENT= "library for machine-independent, array-oriented data access"
|
||||
|
||||
DISTNAME= netcdf-3.5b3
|
||||
DISTNAME= netcdf-3.5.0
|
||||
CATEGORIES= math
|
||||
DISTFILES= netcdf-3.5-beta3.tar.Z
|
||||
|
||||
MASTER_SITES= ftp://unidata.ucar.edu/pub/netcdf/
|
||||
|
||||
HOMEPAGE= http://www.unidata.ucar.edu/packages/netcdf/
|
||||
|
||||
MAINTAINER= Tom Knienieder <tom@knienieder.com>
|
||||
|
||||
# BSD-like
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WRKSRC= ${WRKDIR}/netcdf-3.5-beta3/src
|
||||
MASTER_SITES= ftp://unidata.ucar.edu/pub/netcdf/
|
||||
EXTRACT_SUFX= .tar.Z
|
||||
|
||||
WRKSRC= ${WRKDIST}/src
|
||||
|
||||
INSTALLS_SHLIB= yes
|
||||
CONFIGURE_STYLE= gnu dest
|
||||
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
|
||||
|
||||
FAKE_FLAGS= DESTDIR="${WRKINST}"
|
||||
MAKE_FLAGS= CPPFLAGS="-fPIC -DPIC -Df2cFortran -I${WRKSRC}/libsrc"
|
||||
|
||||
REGRESS_DEPENDS= ::math/netcdf
|
||||
|
||||
post-build:
|
||||
@(cd ${WRKSRC}/libsrc && \
|
||||
@ -35,9 +36,9 @@ post-build:
|
||||
${SETENV} ${MAKE_ENV} ${MAKE} linux_shared_library)
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/libsrc/libnetcdf.so ${PREFIX}/lib/libnetcdf.so.1.0
|
||||
ln -sf libnetcdf.so.1.0 ${PREFIX}/lib/libnetcdf.so
|
||||
${INSTALL_DATA} ${WRKSRC}/cxx/libnetcdf_c++.so ${PREFIX}/lib/libnetcdf_c++.so.1.0
|
||||
ln -sf libnetcdf_c++.so.1.0 ${PREFIX}/lib/libnetcdf_c++.so
|
||||
test -f ${WRKSRC}/libsrc/libnetcdf.so && ${INSTALL_DATA} \
|
||||
${WRKSRC}/libsrc/libnetcdf.so ${PREFIX}/lib/libnetcdf.so.1.0
|
||||
test -f ${WRKSRC}/cxx/libnetcdf_c++.so && ${INSTALL_DATA} \
|
||||
${WRKSRC}/cxx/libnetcdf_c++.so ${PREFIX}/lib/libnetcdf_c++.so.1.0
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (netcdf-3.5-beta3.tar.Z) = b6b0f1d6fd6c5ccf559032eb1e9d6950
|
||||
RMD160 (netcdf-3.5-beta3.tar.Z) = ba440f4b3bcecf93f73c15feb2971cb0be34de65
|
||||
SHA1 (netcdf-3.5-beta3.tar.Z) = 01318ab60014dc8a2316dc51962edfbdea12a73b
|
||||
MD5 (netcdf-3.5.0.tar.Z) = 28640a40a44f982f90f5eeb15e917a1f
|
||||
RMD160 (netcdf-3.5.0.tar.Z) = 4313e00fc56273e871c003bfb27c533d4a7f556f
|
||||
SHA1 (netcdf-3.5.0.tar.Z) = e9c5a9847d8ff9b3e1b8a18f5e216f6a1508bce8
|
||||
|
11
math/netcdf/patches/patch-src_cxx_nctst_cpp
Normal file
11
math/netcdf/patches/patch-src_cxx_nctst_cpp
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-src_cxx_nctst_cpp,v 1.1 2004/02/01 12:22:05 sturm Exp $
|
||||
--- src/cxx/nctst.cpp.orig 2004-02-01 11:39:39.000000000 +0100
|
||||
+++ src/cxx/nctst.cpp 2004-02-01 11:39:47.000000000 +0100
|
||||
@@ -1,4 +1,6 @@
|
||||
-#include <iostream.h>
|
||||
+#include <iostream>
|
||||
+using namespace std;
|
||||
+
|
||||
#include <string.h>
|
||||
#include "netcdfcpp.h"
|
||||
|
106
math/netcdf/patches/patch-src_cxx_ncvalues_cpp
Normal file
106
math/netcdf/patches/patch-src_cxx_ncvalues_cpp
Normal file
@ -0,0 +1,106 @@
|
||||
$OpenBSD: patch-src_cxx_ncvalues_cpp,v 1.1 2004/02/01 12:22:05 sturm Exp $
|
||||
--- src/cxx/ncvalues.cpp.orig 1998-12-22 19:21:49.000000000 +0100
|
||||
+++ src/cxx/ncvalues.cpp 2004-02-01 11:54:51.000000000 +0100
|
||||
@@ -7,7 +7,7 @@
|
||||
* $Header: /home/cvs/ports/math/netcdf/patches/Attic/patch-src_cxx_ncvalues_cpp,v 1.1 2004/02/01 12:22:05 sturm Exp $
|
||||
*********************************************************************/
|
||||
|
||||
-#include <iostream.h> // for debugging
|
||||
+#include <iostream> // for debugging
|
||||
#include "ncvalues.h"
|
||||
|
||||
NcValues::NcValues( void ) : the_number(0), the_type(ncNoType)
|
||||
@@ -25,7 +25,7 @@ long NcValues::num( void )
|
||||
return the_number;
|
||||
}
|
||||
|
||||
-ostream& operator<< (ostream& os, const NcValues& vals)
|
||||
+std::ostream& operator<< (std::ostream& os, const NcValues& vals)
|
||||
{
|
||||
return vals.print(os);
|
||||
}
|
||||
@@ -244,7 +244,7 @@ inline char* NcValues_char::as_string( l
|
||||
return s;
|
||||
}
|
||||
|
||||
-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++)
|
||||
os << the_values[i] << ", ";
|
||||
@@ -253,7 +253,7 @@ ostream& NcValues_short::print(ostream&
|
||||
return os;
|
||||
}
|
||||
|
||||
-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++)
|
||||
os << the_values[i] << ", ";
|
||||
@@ -262,7 +262,7 @@ ostream& NcValues_int::print(ostream& os
|
||||
return 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++)
|
||||
os << the_values[i] << ", ";
|
||||
@@ -271,7 +271,7 @@ ostream& NcValues_nclong::print(ostream&
|
||||
return os;
|
||||
}
|
||||
|
||||
-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++)
|
||||
os << the_values[i] << ", ";
|
||||
@@ -280,7 +280,7 @@ ostream& NcValues_long::print(ostream& o
|
||||
return os;
|
||||
}
|
||||
|
||||
-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++)
|
||||
os << the_values[i] << ", ";
|
||||
@@ -289,7 +289,7 @@ ostream& NcValues_ncbyte::print(ostream&
|
||||
return os;
|
||||
}
|
||||
|
||||
-ostream& NcValues_char::print(ostream& os) const
|
||||
+std::ostream& NcValues_char::print(std::ostream& os) const
|
||||
{
|
||||
os << '"';
|
||||
long len = the_number;
|
||||
@@ -302,7 +302,7 @@ ostream& NcValues_char::print(ostream& o
|
||||
return os;
|
||||
}
|
||||
|
||||
-ostream& NcValues_float::print(ostream& os) const
|
||||
+std::ostream& NcValues_float::print(std::ostream& os) const
|
||||
{
|
||||
long save=os.flags();
|
||||
os.precision(7);
|
||||
@@ -310,11 +310,11 @@ ostream& NcValues_float::print(ostream&
|
||||
os << the_values[i] << ", ";
|
||||
if (the_number > 0)
|
||||
os << the_values[the_number-1] ;
|
||||
- os.flags(save);
|
||||
+ os.precision(save);
|
||||
return os;
|
||||
}
|
||||
|
||||
-ostream& NcValues_double::print(ostream& os) const
|
||||
+std::ostream& NcValues_double::print(std::ostream& os) const
|
||||
{
|
||||
long save=os.flags();
|
||||
os.precision(15);
|
||||
@@ -322,6 +322,6 @@ ostream& NcValues_double::print(ostream&
|
||||
os << the_values[i] << ", ";
|
||||
if (the_number > 0)
|
||||
os << the_values[the_number-1];
|
||||
- os.flags(save);
|
||||
+ os.precision(save);
|
||||
return os;
|
||||
}
|
60
math/netcdf/patches/patch-src_cxx_ncvalues_h
Normal file
60
math/netcdf/patches/patch-src_cxx_ncvalues_h
Normal file
@ -0,0 +1,60 @@
|
||||
$OpenBSD: patch-src_cxx_ncvalues_h,v 1.1 2004/02/01 12:22:06 sturm Exp $
|
||||
--- src/cxx/ncvalues.h.orig 1998-10-28 18:10:16.000000000 +0100
|
||||
+++ src/cxx/ncvalues.h 2004-02-01 11:57:27.000000000 +0100
|
||||
@@ -10,14 +10,9 @@
|
||||
#ifndef Ncvalues_def
|
||||
#define Ncvalues_def
|
||||
|
||||
-#include <iostream.h>
|
||||
-#ifdef STRSTREAM_H_SPEC
|
||||
-# include STRSTREAM_H_SPEC
|
||||
-#else
|
||||
-# include <strstream.h>
|
||||
-#endif
|
||||
+#include <iostream>
|
||||
+#include <sstream>
|
||||
#include <limits.h>
|
||||
-#include <string.h>
|
||||
#include "netcdf.h"
|
||||
|
||||
typedef unsigned char ncbyte;
|
||||
@@ -82,7 +77,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)
|
||||
@@ -220,8 +215,10 @@ inline double NcVal(TYPE)::as_double( lo
|
||||
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]; \
|
||||
+ ostr.str().copy(s, std::string::npos); \
|
||||
+ s[ostr.str().length()] = 0; \
|
||||
return s; \
|
||||
}
|
||||
|
||||
@@ -232,7 +229,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;
|
||||
|
||||
@@ -252,7 +249,7 @@ class NcValues // ABC for value blocks
|
||||
protected:
|
||||
NcType the_type;
|
||||
long the_number;
|
||||
- friend ostream& operator<< (ostream&, const NcValues&);
|
||||
+ friend std::ostream& operator<< (std::ostream&, const NcValues&);
|
||||
};
|
||||
|
||||
declare(NcValues,ncbyte)
|
30
math/netcdf/patches/patch-src_cxx_netcdfcpp_h
Normal file
30
math/netcdf/patches/patch-src_cxx_netcdfcpp_h
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-src_cxx_netcdfcpp_h,v 1.1 2004/02/01 12:22:06 sturm Exp $
|
||||
--- src/cxx/netcdfcpp.h.orig 2004-02-01 11:41:02.000000000 +0100
|
||||
+++ src/cxx/netcdfcpp.h 2004-02-01 11:41:35.000000000 +0100
|
||||
@@ -154,7 +154,7 @@ class NcDim
|
||||
virtual ~NcDim( void );
|
||||
|
||||
// to construct dimensions, since constructor is private
|
||||
- friend NcFile;
|
||||
+ friend class NcFile;
|
||||
};
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ class NcVar : public NcTypedComponent
|
||||
void init_cur( void );
|
||||
|
||||
// to make variables, since constructor is private
|
||||
- friend NcFile;
|
||||
+ friend class NcFile;
|
||||
};
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ class NcAtt : public NcTypedComponent
|
||||
NcAtt( NcFile*, NcToken); // global attribute
|
||||
|
||||
// To make attributes, since constructor is private
|
||||
- friend NcFile;
|
||||
+ friend class NcFile;
|
||||
friend NcAtt* NcVar::get_att( NcToken ) const;
|
||||
};
|
||||
|
4
math/netcdf/pkg/PFRAG.shared
Normal file
4
math/netcdf/pkg/PFRAG.shared
Normal file
@ -0,0 +1,4 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1 2004/02/01 12:22:06 sturm Exp $
|
||||
lib/libnetcdf.so.1.0
|
||||
lib/libnetcdf_c++.so.1.0
|
||||
DYNLIBDIR(%D/lib)
|
@ -1,14 +1,17 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2000/12/26 12:22:53 reinhard Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2004/02/01 12:22:06 sturm Exp $
|
||||
bin/ncdump
|
||||
bin/ncgen
|
||||
include/ncvalues.h
|
||||
include/netcdf.h
|
||||
include/netcdf.hh
|
||||
@comment include/netcdf.inc
|
||||
include/netcdfcpp.h
|
||||
lib/libnetcdf.a
|
||||
lib/libnetcdf.so
|
||||
lib/libnetcdf_c++.a
|
||||
lib/libnetcdf_c++.so
|
||||
man/man1/ncdump.1
|
||||
man/man1/ncgen.1
|
||||
man/man3/netcdf.3
|
||||
man/man3/netcdf.3f
|
||||
@comment man/man3f/netcdf.3f
|
||||
%%SHARED%%
|
||||
@comment @dirrm man/man3f
|
||||
|
@ -1,12 +0,0 @@
|
||||
@comment $OpenBSD: PLIST.noshared,v 1.1.1.1 2000/12/26 12:22:53 reinhard Exp $
|
||||
bin/ncdump
|
||||
bin/ncgen
|
||||
include/ncvalues.h
|
||||
include/netcdf.h
|
||||
include/netcdf.hh
|
||||
include/netcdfcpp.h
|
||||
lib/libnetcdf.a
|
||||
lib/libnetcdf_c++.a
|
||||
man/man1/ncdump.1
|
||||
man/man1/ncgen.1
|
||||
man/man3/netcdf.3
|
Loading…
Reference in New Issue
Block a user