summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fisette <ribosome@gentoo.org>2004-12-28 18:29:26 +0000
committerOlivier Fisette <ribosome@gentoo.org>2004-12-28 18:29:26 +0000
commitc6353e81c3d3e07321b193066aa81854a375a7e4 (patch)
treee44d31aab2565acd36a4b667d6f5516d2012b710 /sci-libs/netcdf
parentMoving to sci-libs/netcdf (diff)
downloadgentoo-2-c6353e81c3d3e07321b193066aa81854a375a7e4.tar.gz
gentoo-2-c6353e81c3d3e07321b193066aa81854a375a7e4.tar.bz2
gentoo-2-c6353e81c3d3e07321b193066aa81854a375a7e4.zip
Moved from app-sci/netcdf to sci-libs/netcdf.
Diffstat (limited to 'sci-libs/netcdf')
-rw-r--r--sci-libs/netcdf/ChangeLog89
-rw-r--r--sci-libs/netcdf/Manifest20
-rw-r--r--sci-libs/netcdf/files/digest-netcdf-3.5.0-r31
-rw-r--r--sci-libs/netcdf/files/digest-netcdf-3.5.0-r41
-rw-r--r--sci-libs/netcdf/files/digest-netcdf-3.5.11
-rw-r--r--sci-libs/netcdf/files/fPIC.patch11
-rw-r--r--sci-libs/netcdf/files/gcc3-gentoo.patch245
-rw-r--r--sci-libs/netcdf/metadata.xml9
-rw-r--r--sci-libs/netcdf/netcdf-3.5.0-r3.ebuild43
-rw-r--r--sci-libs/netcdf/netcdf-3.5.0-r4.ebuild44
-rw-r--r--sci-libs/netcdf/netcdf-3.5.1.ebuild37
11 files changed, 501 insertions, 0 deletions
diff --git a/sci-libs/netcdf/ChangeLog b/sci-libs/netcdf/ChangeLog
new file mode 100644
index 000000000000..23904c6a341e
--- /dev/null
+++ b/sci-libs/netcdf/ChangeLog
@@ -0,0 +1,89 @@
+# ChangeLog for app-sci/netcdf
+# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/ChangeLog,v 1.1 2004/12/28 18:29:26 ribosome Exp $
+
+*netcdf-3.5.0-r3 (28 Dec 2004)
+
+ 28 Dec 2004; Olivier Fisette <ribosome@gentoo.org> +metadata.xml,
+ +files/fPIC.patch, +files/gcc3-gentoo.patch, +netcdf-3.5.0-r3.ebuild,
+ +netcdf-3.5.0-r4.ebuild, +netcdf-3.5.1.ebuild:
+ Moved from app-sci/netcdf to sci-libs/netcdf.
+
+ 11 Dec 2004; Bryan Østergaard <kloeri@gentoo.org> netcdf-3.5.1.ebuild:
+ Stable on alpha.
+
+ 07 Nov 2004; Jason Wever <weeve@gentoo.org> netcdf-3.5.1.ebuild:
+ Stable on sparc.
+
+ 31 May 2004; Bryan Østergaard <kloeri@gentoo.org> netcdf-3.5.0-r4.ebuild:
+ Stable on alpha.
+
+*netcdf-3.5.1 (11 May 2004)
+
+ 11 May 2004; Steve Arnold <nerdboy@gentoo.org> netcdf-3.5.1.ebuild:
+ updated 3.5.1 ebuild, all gcc and C++ changes have been added upstream
+
+ 26 Apr 2004; Aron Griffis <agriffis@gentoo.org> netcdf-3.5.0-r3.ebuild,
+ netcdf-3.5.0-r4.ebuild:
+ Add die following econf for bug 48950
+
+*netcdf-3.5.0-r4 (20 Apr 2004)
+
+ 20 Apr 2004; Patrick Kursawe <phosphan@gentoo.org> netcdf-3.5.0-r4.ebuild,
+ files/fPIC.patch:
+ Adding -fPIC patch, see bug #47517
+
+ 01 Apr 2004; Patrick Kursawe <phosphan@gentoo.org> netcdf-3.5.0-r3.ebuild:
+ Declaring stable for all arches.
+
+ 26 Mar 2004; Patrick Kursawe <phosphan@gentoo.org> netcdf-3.5.0-r2.ebuild,
+ netcdf-3.5.0-r3.ebuild:
+ Adding IUSE and inherit eutils
+
+ 03 Mar 2004; Patrick Kursawe <phosphan@gentoo.org> netcdf-3.5.0-r3.ebuild:
+ Some arches were missing in -r3 that were added to -r2, assume it was a
+ mistake.
+
+ 17 Feb 2004; Aron Griffis <agriffis@gentoo.org> netcdf-3.5.0-r3.ebuild:
+ stable on alpha and ia64 for the sake of dev-python/ScientificPython
+
+ 12 Jan 2004; <nerdboy@gentoo.org> netcdf-3.5.0-r3.ebuild,
+ netcdf-3.5.0-r2.ebuild, metadata.xml:
+ bumped r3 to x86 and added (belated) changelog entry for #32570 and #32575
+ fixes; also corrected license, updated metadata, and added additional arches
+
+ 18 Dec 2003; Martin Holzer <mholzer@gentoo.org> netcdf-3.5.0-r2.ebuild,
+ netcdf-3.5.0-r3.ebuild:
+ fixing typo in homepage. closes #36018
+
+*netcdf-3.5.0-r3 (16 Dec 2003)
+
+ 16 Dec 2003; Jason Wever <weeve@gentoo.org> netcdf-3.5.0-r3.ebuild:
+ Added ~sparc keyword to fix broken dev-python/ScientificPython dependencies.
+
+ 11 Nov 2003; Steve Arnold <nerdboy@gentoo.org> netcdf-3.5.0-r3.ebuild:
+ fixed bugs 32570 and 32575 (but somehow the changelog got messed up)
+
+*netcdf-3.5.0-r2 (1 Feb 2002)
+
+ 18 Nov 2002; Matthew Kennedy <mkennedy@gentoo.org>
+ netcdf-3.5.0-r2.ebuild, files/digest-netcdf-3.5.0-r2,
+ files/gcc3-gentoo.patch :
+
+ C++ fixing for compatibility for GCC3.2 and ANSI C++. Patch thanks to
+ Sam Yates <sam@quux.dropbear.id.au> of bug #5784 fame.
+
+*netcdf-3.5.0-r1 (1 Feb 2002)
+
+ 14 Sep 2002; Seemant Kulleen <seemant@gentoo.org> netcdf-3.5.0-r1.ebuild :
+
+ emake->make thanks to Chad Netzer (chad.netzer@stanfordalumni.org) in bug
+ #6363 reported by: martin.holzer@wienerlinien.at (Martin Holzer)
+
+ 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+
+ Added initial ChangeLog which should be updated whenever the package is
+ updated in any way. This changelog is targetted to users. This means that the
+ comments should well explained and written in clean English. The details about
+ writing correct changelogs are explained in the skel.ChangeLog file which you
+ can find in the root directory of the portage repository.
diff --git a/sci-libs/netcdf/Manifest b/sci-libs/netcdf/Manifest
new file mode 100644
index 000000000000..d95800a4ce9c
--- /dev/null
+++ b/sci-libs/netcdf/Manifest
@@ -0,0 +1,20 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 57c8953d47ef8667103c0936ba6621f1 ChangeLog 3231
+MD5 13aa2496d3f0701bf1fc21d21244fdd8 netcdf-3.5.0-r4.ebuild 1225
+MD5 a90354cea7ea5a1ccb093598a750c7c6 metadata.xml 354
+MD5 23cce3f557156d969880716680ec6cf1 netcdf-3.5.0-r3.ebuild 1188
+MD5 893b0f59e8a09c654aa21eb83195a387 netcdf-3.5.1.ebuild 1075
+MD5 fc4457bab8a911f12f9048c4a2c32322 files/digest-netcdf-3.5.0-r4 64
+MD5 64dba3b92d456a56b4ba82a228644a12 files/gcc3-gentoo.patch 6830
+MD5 fc4457bab8a911f12f9048c4a2c32322 files/digest-netcdf-3.5.0-r3 64
+MD5 46a9de0130f415c3cff34812e9ce6724 files/fPIC.patch 209
+MD5 253c25302faf05dae06feda0e45a85e2 files/digest-netcdf-3.5.1 64
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.2.6 (GNU/Linux)
+
+iD8DBQFBu0StugEuf3OQ0akRAobAAJ0S6AqxOTp+W84cr8P9v0m7/1frZQCfQmHR
+5JvqXb8AWqGUMsqRBNjbx9k=
+=k9PV
+-----END PGP SIGNATURE-----
diff --git a/sci-libs/netcdf/files/digest-netcdf-3.5.0-r3 b/sci-libs/netcdf/files/digest-netcdf-3.5.0-r3
new file mode 100644
index 000000000000..25d6e8d0de3d
--- /dev/null
+++ b/sci-libs/netcdf/files/digest-netcdf-3.5.0-r3
@@ -0,0 +1 @@
+MD5 28640a40a44f982f90f5eeb15e917a1f netcdf-3.5.0.tar.Z 1319419
diff --git a/sci-libs/netcdf/files/digest-netcdf-3.5.0-r4 b/sci-libs/netcdf/files/digest-netcdf-3.5.0-r4
new file mode 100644
index 000000000000..25d6e8d0de3d
--- /dev/null
+++ b/sci-libs/netcdf/files/digest-netcdf-3.5.0-r4
@@ -0,0 +1 @@
+MD5 28640a40a44f982f90f5eeb15e917a1f netcdf-3.5.0.tar.Z 1319419
diff --git a/sci-libs/netcdf/files/digest-netcdf-3.5.1 b/sci-libs/netcdf/files/digest-netcdf-3.5.1
new file mode 100644
index 000000000000..c825f6ed727b
--- /dev/null
+++ b/sci-libs/netcdf/files/digest-netcdf-3.5.1
@@ -0,0 +1 @@
+MD5 52972e8765394010d2507a9a1dc02a56 netcdf-3.5.1.tar.Z 1333257
diff --git a/sci-libs/netcdf/files/fPIC.patch b/sci-libs/netcdf/files/fPIC.patch
new file mode 100644
index 000000000000..84080809cce8
--- /dev/null
+++ b/sci-libs/netcdf/files/fPIC.patch
@@ -0,0 +1,11 @@
+--- libsrc/Makefile~ 2004-04-11 17:42:21.000000000 +0200
++++ libsrc/Makefile 2004-04-11 17:42:46.000000000 +0200
+@@ -14,6 +14,8 @@
+
+ MANUAL = netcdf.3
+
++CFLAGS += -fPIC
++
+ LIB_CSRCS = \
+ attr.c \
+ dim.c \
diff --git a/sci-libs/netcdf/files/gcc3-gentoo.patch b/sci-libs/netcdf/files/gcc3-gentoo.patch
new file mode 100644
index 000000000000..dd4d05c42f4b
--- /dev/null
+++ b/sci-libs/netcdf/files/gcc3-gentoo.patch
@@ -0,0 +1,245 @@
+*** cxx/ncvalues.h.orig 2002-07-31 03:03:17.000000000 +0930
+--- cxx/ncvalues.h 2002-07-31 03:26:14.000000000 +0930
+***************
+*** 10,25 ****
+ #ifndef Ncvalues_def
+ #define Ncvalues_def
+
+! #include <iostream.h>
+! #ifdef STRSTREAM_H_SPEC
+! # include STRSTREAM_H_SPEC
+! #else
+! # include <strstream.h>
+! #endif
+ #include <limits.h>
+ #include <string.h>
+ #include "netcdf.h"
+!
+ typedef unsigned char ncbyte;
+
+ #define NC_UNSPECIFIED ((nc_type)0)
+--- 10,22 ----
+ #ifndef Ncvalues_def
+ #define Ncvalues_def
+
+! #include <iostream>
+! #include <sstream>
+! extern "C" {
+ #include <limits.h>
+ #include <string.h>
+ #include "netcdf.h"
+! }
+ typedef unsigned char ncbyte;
+
+ #define NC_UNSPECIFIED ((nc_type)0)
+***************
+*** 82,88 ****
+ virtual int invalid( void ) const; \
+ private: \
+ TYPE* the_values; \
+! ostream& print(ostream&) const; \
+ };
+
+ #define NcTypeEnum(TYPE) makename2(_nc__,TYPE)
+--- 79,85 ----
+ virtual int invalid( void ) const; \
+ private: \
+ TYPE* the_values; \
+! std::ostream& print(std::ostream&) const; \
+ };
+
+ #define NcTypeEnum(TYPE) makename2(_nc__,TYPE)
+***************
+*** 218,228 ****
+
+ #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; \
+! return s; \
+ }
+
+ class NcValues // ABC for value blocks
+--- 215,227 ----
+
+ #define as_string_implement(TYPE) \
+ char* NcVal(TYPE)::as_string( long n ) const \
+! { \
+ char* s = new char[32]; \
+! ostringstream ostr; \
+! ostr << the_values[n]; \
+! strncpy(s,ostr.str().c_str(),32); \
+! s[31]=0; \
+! return s; \
+ }
+
+ class NcValues // ABC for value blocks
+***************
+*** 232,238 ****
+ NcValues(NcType, long);
+ virtual ~NcValues( void );
+ virtual long num( void );
+! virtual ostream& print(ostream&) const = 0;
+ virtual void* base( void ) const = 0;
+ virtual int bytes_for_one( void ) const = 0;
+
+--- 231,237 ----
+ NcValues(NcType, long);
+ virtual ~NcValues( void );
+ virtual long num( void );
+! virtual std::ostream& print(std::ostream&) const = 0;
+ virtual void* base( void ) const = 0;
+ virtual int bytes_for_one( void ) const = 0;
+
+***************
+*** 252,258 ****
+ protected:
+ NcType the_type;
+ long the_number;
+! friend ostream& operator<< (ostream&, const NcValues&);
+ };
+
+ declare(NcValues,ncbyte)
+--- 251,257 ----
+ protected:
+ NcType the_type;
+ long the_number;
+! friend std::ostream& operator<< (std::ostream&, const NcValues&);
+ };
+
+ declare(NcValues,ncbyte)
+*** cxx/ncvalues.cpp.orig 2002-07-31 03:12:52.000000000 +0930
+--- cxx/ncvalues.cpp 2002-07-31 03:13:56.000000000 +0930
+***************
+*** 7,15 ****
+ * $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/files/gcc3-gentoo.patch,v 1.1 2004/12/28 18:29:26 ribosome Exp $
+ *********************************************************************/
+
+! #include <iostream.h> // for debugging
+ #include "ncvalues.h"
+
+ NcValues::NcValues( void ) : the_number(0), the_type(ncNoType)
+ {}
+
+--- 7,17 ----
+ * $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/files/gcc3-gentoo.patch,v 1.1 2004/12/28 18:29:26 ribosome Exp $
+ *********************************************************************/
+
+! #include <iostream> // for debugging
+ #include "ncvalues.h"
+
++ using namespace std;
++
+ NcValues::NcValues( void ) : the_number(0), the_type(ncNoType)
+ {}
+
+***************
+*** 304,310 ****
+
+ ostream& NcValues_float::print(ostream& os) const
+ {
+! long save=os.flags();
+ os.precision(7);
+ for(int i = 0; i < the_number - 1; i++)
+ os << the_values[i] << ", ";
+--- 306,312 ----
+
+ ostream& NcValues_float::print(ostream& os) const
+ {
+! ios::fmtflags save=os.flags();
+ os.precision(7);
+ for(int i = 0; i < the_number - 1; i++)
+ os << the_values[i] << ", ";
+***************
+*** 316,322 ****
+
+ ostream& NcValues_double::print(ostream& os) const
+ {
+! long save=os.flags();
+ os.precision(15);
+ for(int i = 0; i < the_number - 1; i++)
+ os << the_values[i] << ", ";
+--- 318,324 ----
+
+ ostream& NcValues_double::print(ostream& os) const
+ {
+! ios::fmtflags save=os.flags();
+ os.precision(15);
+ for(int i = 0; i < the_number - 1; i++)
+ os << the_values[i] << ", ";
+*** cxx/netcdfcpp.h.orig 2002-07-31 03:07:35.000000000 +0930
+--- cxx/netcdfcpp.h 2002-07-31 03:07:56.000000000 +0930
+***************
+*** 154,160 ****
+ virtual ~NcDim( void );
+
+ // to construct dimensions, since constructor is private
+! friend NcFile;
+ };
+
+
+--- 154,160 ----
+ virtual ~NcDim( void );
+
+ // to construct dimensions, since constructor is private
+! friend class NcFile;
+ };
+
+
+***************
+*** 357,363 ****
+ void init_cur( void );
+
+ // to make variables, since constructor is private
+! friend NcFile;
+ };
+
+
+--- 357,363 ----
+ void init_cur( void );
+
+ // to make variables, since constructor is private
+! friend class NcFile;
+ };
+
+
+***************
+*** 388,394 ****
+ NcAtt( NcFile*, NcToken); // global attribute
+
+ // To make attributes, since constructor is private
+! friend NcFile;
+ friend NcAtt* NcVar::get_att( NcToken ) const;
+ };
+
+--- 388,394 ----
+ NcAtt( NcFile*, NcToken); // global attribute
+
+ // To make attributes, since constructor is private
+! friend class NcFile;
+ friend NcAtt* NcVar::get_att( NcToken ) const;
+ };
+
+*** cxx/nctst.cpp.orig 2002-07-31 04:00:10.000000000 +0930
+--- cxx/nctst.cpp 2002-07-31 04:00:19.000000000 +0930
+***************
+*** 1,7 ****
+! #include <iostream.h>
+ #include <string.h>
+ #include "netcdfcpp.h"
+
+ void gen(const char* path) // Generate a netCDF file
+ {
+ NcFile nc(path, NcFile::Replace); // Create, leave in define mode
+--- 1,9 ----
+! #include <iostream>
+ #include <string.h>
+ #include "netcdfcpp.h"
+
++ using namespace std;
++
+ void gen(const char* path) // Generate a netCDF file
+ {
+ NcFile nc(path, NcFile::Replace); // Create, leave in define mode
diff --git a/sci-libs/netcdf/metadata.xml b/sci-libs/netcdf/metadata.xml
new file mode 100644
index 000000000000..597cede6b022
--- /dev/null
+++ b/sci-libs/netcdf/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<maintainer>
+ <email>sci@gentoo.org</email>
+</maintainer>
+<longdescription>The netCDF library defines a machine-independent format and interface for representing scientific data.</longdescription>
+</pkgmetadata>
diff --git a/sci-libs/netcdf/netcdf-3.5.0-r3.ebuild b/sci-libs/netcdf/netcdf-3.5.0-r3.ebuild
new file mode 100644
index 000000000000..c9278e2f9e56
--- /dev/null
+++ b/sci-libs/netcdf/netcdf-3.5.0-r3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-3.5.0-r3.ebuild,v 1.1 2004/12/28 18:29:26 ribosome Exp $
+
+inherit eutils
+
+DESCRIPTION="Scientific library and interface for array oriented data access"
+SRC_URI="ftp://ftp.unidata.ucar.edu/pub/netcdf/${P}.tar.Z"
+HOMEPAGE="http://www.unidata.ucar.edu/packages/netcdf/"
+
+LICENSE="UCAR-Unidata"
+SLOT="0"
+IUSE=""
+KEYWORDS="x86 sparc amd64 alpha ia64 ppc mips hppa"
+
+S=${WORKDIR}/${P}/src
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ # welcome to ANSI C++ coding with sed
+ sed \
+ -e 's/iostream\.h/iostream/g' \
+ -e 's/cout/std::cout/g' \
+ -e 's/^extern "C".*//g' -i configure || die
+
+ cd cxx && epatch ${FILESDIR}/gcc3-gentoo.patch
+}
+
+src_compile() {
+ export CPPFLAGS=-Df2cFortran
+ econf || die "econf failed"
+ make || die
+ make test || die
+}
+
+src_install() {
+ dodir /usr/{lib,share} /usr/share/man/man3 /usr/share/man/man3f
+ einstall MANDIR=${D}/usr/share/man
+ mv ${D}/usr/share/man/man3/netcdf.3f ${D}/usr/share/man/man3f/.
+ dodoc COMPATIBILITY COPYRIGHT MANIFEST README RELEASE_NOTES VERSION fortran/cfortran.doc
+ dohtml -r .
+}
diff --git a/sci-libs/netcdf/netcdf-3.5.0-r4.ebuild b/sci-libs/netcdf/netcdf-3.5.0-r4.ebuild
new file mode 100644
index 000000000000..345ae17b2f08
--- /dev/null
+++ b/sci-libs/netcdf/netcdf-3.5.0-r4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-3.5.0-r4.ebuild,v 1.1 2004/12/28 18:29:26 ribosome Exp $
+
+inherit eutils
+
+DESCRIPTION="Scientific library and interface for array oriented data access"
+SRC_URI="ftp://ftp.unidata.ucar.edu/pub/netcdf/${P}.tar.Z"
+HOMEPAGE="http://www.unidata.ucar.edu/packages/netcdf/"
+
+LICENSE="UCAR-Unidata"
+SLOT="0"
+IUSE=""
+KEYWORDS="~x86 ~sparc ~amd64 alpha ~ia64 ~ppc ~mips ~hppa"
+
+S=${WORKDIR}/${P}/src
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ # welcome to ANSI C++ coding with sed
+ sed \
+ -e 's/iostream\.h/iostream/g' \
+ -e 's/cout/std::cout/g' \
+ -e 's/^extern "C".*//g' -i configure || die
+
+ epatch ${FILESDIR}/fPIC.patch
+ cd cxx && epatch ${FILESDIR}/gcc3-gentoo.patch
+}
+
+src_compile() {
+ export CPPFLAGS=-Df2cFortran
+ econf || die "econf failed"
+ make || die
+ make test || die
+}
+
+src_install() {
+ dodir /usr/{lib,share} /usr/share/man/man3 /usr/share/man/man3f
+ einstall MANDIR=${D}/usr/share/man
+ mv ${D}/usr/share/man/man3/netcdf.3f ${D}/usr/share/man/man3f/.
+ dodoc COMPATIBILITY COPYRIGHT MANIFEST README RELEASE_NOTES VERSION fortran/cfortran.doc
+ dohtml -r .
+}
diff --git a/sci-libs/netcdf/netcdf-3.5.1.ebuild b/sci-libs/netcdf/netcdf-3.5.1.ebuild
new file mode 100644
index 000000000000..ca2e5c4fbe45
--- /dev/null
+++ b/sci-libs/netcdf/netcdf-3.5.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-3.5.1.ebuild,v 1.1 2004/12/28 18:29:26 ribosome Exp $
+
+inherit eutils
+
+DESCRIPTION="Scientific library and interface for array oriented data access"
+SRC_URI="ftp://ftp.unidata.ucar.edu/pub/netcdf/${P}.tar.Z"
+HOMEPAGE="http://www.unidata.ucar.edu/packages/netcdf/"
+
+LICENSE="UCAR-Unidata"
+SLOT="0"
+IUSE=""
+KEYWORDS="x86 sparc ~amd64 alpha ~ia64 ~ppc ~mips ~hppa"
+
+S=${WORKDIR}/${P}/src
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/fPIC.patch || die "fPIC patch failed"
+}
+
+src_compile() {
+ export CPPFLAGS=-Df2cFortran
+ econf || die "econf failed"
+ make || die "make failed"
+ make test || die "make test failed"
+}
+
+src_install() {
+ dodir /usr/{lib,share} /usr/share/man/man3 /usr/share/man/man3f
+ einstall MANDIR=${D}/usr/share/man
+ mv ${D}/usr/share/man/man3/netcdf.3f ${D}/usr/share/man/man3f/.
+ dodoc COMPATIBILITY COPYRIGHT MANIFEST README RELEASE_NOTES VERSION fortran/cfortran.doc
+ dohtml -r .
+}