summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/netcdf
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/netcdf')
-rw-r--r--sci-libs/netcdf/Manifest1
-rw-r--r--sci-libs/netcdf/files/netcdf-4.1.1-fortran.patch15
-rw-r--r--sci-libs/netcdf/files/netcdf-4.1.1-implicits.patch80
-rw-r--r--sci-libs/netcdf/files/netcdf-4.1.1-mpi-fix.patch32
-rw-r--r--sci-libs/netcdf/files/netcdf-4.1.1-parallel-build.patch40
-rw-r--r--sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch145
-rw-r--r--sci-libs/netcdf/metadata.xml18
-rw-r--r--sci-libs/netcdf/netcdf-4.3.2-r1.ebuild59
8 files changed, 390 insertions, 0 deletions
diff --git a/sci-libs/netcdf/Manifest b/sci-libs/netcdf/Manifest
new file mode 100644
index 000000000000..c800b5b3bdd5
--- /dev/null
+++ b/sci-libs/netcdf/Manifest
@@ -0,0 +1 @@
+DIST netcdf-4.3.2.tar.gz 5013938 SHA256 57086b4383ce9232f05aad70761c2a6034b1a0c040260577d369b3bbfe6d248e SHA512 9cb9c761bf1e17a37601c37000fdc0bb654afcf111e5ac2fb7dcf037c6aa827e66beb29d5c661edc50ea3f84849f3dee387aab9e85ef81a9b6ca3f36e45debdd WHIRLPOOL 7fb0dd3324c3e8864729db1409a76feb84ef35298c0f79a4258f1cd30a70e90070d9a44275d064d8a4952c32671182f1bfe97d47f26cf921a625bbe7160f3249
diff --git a/sci-libs/netcdf/files/netcdf-4.1.1-fortran.patch b/sci-libs/netcdf/files/netcdf-4.1.1-fortran.patch
new file mode 100644
index 000000000000..825fd3b893a1
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.1.1-fortran.patch
@@ -0,0 +1,15 @@
+Default to gfortran if cannot figure out F77 compiler
+
+https://bugs.gentoo.org/show_bug.cgi?id=348922
+
+--- netcdf-4.1.1/configure.ac
++++ netcdf-4.1.1/configure.ac
+@@ -973,7 +973,7 @@
+ *)
+ # If it's a gnu compiler, guess f2c.
+ if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+- AC_DEFINE(f2cFortran, [1], [Turned on by netCDF configure.])
++ AC_DEFINE(gFortran, [1], [Turned on by netCDF configure.])
+ fi
+ ;;
+ esac
diff --git a/sci-libs/netcdf/files/netcdf-4.1.1-implicits.patch b/sci-libs/netcdf/files/netcdf-4.1.1-implicits.patch
new file mode 100644
index 000000000000..a30aafc91348
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.1.1-implicits.patch
@@ -0,0 +1,80 @@
+Fix implicit function declarations
+
+--- libsrc/nc.c
++++ libsrc/nc.c
+@@ -15,7 +15,7 @@
+ # include <mpp/shmem.h>
+ # include <intrinsics.h>
+ #endif
+-#ifdef HAVE_UNISTD
++#ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+
+--- fortran/fort-nc4.c
++++ fortran/fort-nc4.c
+@@ -30,6 +30,14 @@
+ /* These are in libsrc4/nc4vars.c... */
+ int nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, int *chunksizesp);
+ int nc_def_var_chunking_ints(int ncid, int varid, int contiguous, int *chunksizes);
++int nc_set_var_chunk_cache_ints(int ncid, int varid, int size, int nelems, int preemption);
++int nc_get_var_chunk_cache_ints(int ncid, int varid, int *sizep, int *nelemsp, int *preemptionp);
++
++/* These are in libsrc4/nc4file.c... */
++int nc_set_chunk_cache_ints(int size, int nelems, int preemption);
++int nc_get_chunk_cache_ints(int *sizep, int *nelemsp, int *preemptionp);
++int nc_create_par_fortran(const char *path, int cmode, int comm, int info, int *ncidp);
++int nc_open_par_fortran(const char *path, int mode, int comm, int info, int *ncidp);
+
+ FCALLSCFUN5(NF_INT, nc_create_par_fortran, NF_CREATE_PAR, nf_create_par,
+ STRING, FINT2CINT, FINT2CINT, FINT2CINT, PCINT2FINT)
+--- libncdap3/oc/daplex.c
++++ libncdap3/oc/daplex.c
+@@ -86,6 +86,8 @@
+ SCAN_PROG
+ };
+
++int daperror(DAPparsestate* state, const char* msg);
++
+ /**************************************************/
+
+ int
+--- libncdap3/oc/ocinternal.c
++++ libncdap3/oc/ocinternal.c
+@@ -37,6 +37,8 @@
+ #endif
+
+ extern OCnode* makeunlimiteddimension(void);
++int occurlopen(CURL** curlp);
++void occurlclose(CURL* curl);
+
+ #ifdef WIN32
+ #include <fcntl.h>
+--- libncdap3/oc/dapparse.c
++++ libncdap3/oc/dapparse.c
+@@ -11,6 +11,7 @@
+ static OCtype octypefor(Object etype);
+ static char* scopeduplicates(OClist* list);
+ static int check_int32(char* val, long* value);
++void setwordchars(DAPlexstate* lexstate, int kind);
+
+ /****************************************************/
+
+--- libncdap3/ncdap3.c
++++ libncdap3/ncdap3.c
+@@ -4,6 +4,7 @@
+ * $Id$
+ *********************************************************************/
+ #include "config.h"
++#include "netcdf3.h"
+ #include "ncdap3.h"
+ #include "dispatch3.h"
+ #include "dapdispatch3.h"
+--- libncdap3/oc/dapparselex.h
++++ libncdap3/oc/dapparselex.h
+@@ -88,4 +88,5 @@
+ extern void daplexinit(char* input, DAPlexstate** lexstatep);
+ extern void daplexcleanup(DAPlexstate** lexstatep);
+
++void dassetup(DAPparsestate* state);
+ #endif /*DAPPARSELEX_H*/
diff --git a/sci-libs/netcdf/files/netcdf-4.1.1-mpi-fix.patch b/sci-libs/netcdf/files/netcdf-4.1.1-mpi-fix.patch
new file mode 100644
index 000000000000..4656ef1e3cbc
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.1.1-mpi-fix.patch
@@ -0,0 +1,32 @@
+Ensure hdf5.h is included before netcdf.h to avoid build error with openmpi >= 1.4.1
+
+--- libsrc4/nc4internal.h
++++ libsrc4/nc4internal.h
+@@ -8,13 +8,13 @@
+
+ #include <config.h>
+ #include <stdio.h>
++#include <hdf5.h>
+ #include "error.h"
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include "netcdf3.h"
+-#include <hdf5.h>
+ #include <netcdf.h>
+
+ #ifdef USE_PARALLEL
+--- libncdap4/ncdap4.h
++++ libncdap4/ncdap4.h
+@@ -12,9 +12,9 @@
+ #include <stdio.h>
+
+ #include "config.h"
++#include "nc4internal.h"
+ #include "netcdf.h"
+ #include "nc.h"
+-#include "nc4internal.h"
+ #include "ncdap.h"
+ #include "getvara.h"
+ #include "constraints3.h"
diff --git a/sci-libs/netcdf/files/netcdf-4.1.1-parallel-build.patch b/sci-libs/netcdf/files/netcdf-4.1.1-parallel-build.patch
new file mode 100644
index 000000000000..22708e2201e9
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.1.1-parallel-build.patch
@@ -0,0 +1,40 @@
+Avoid building fortran modules twice, just install them instead.
+
+https://bugs.gentoo.org/296174
+
+--- netcdf-4.1.1/f90/Makefile.am
++++ netcdf-4.1.1/f90/Makefile.am
+@@ -101,17 +101,25 @@
+ # Some fortran compilers change the file names of .mod files to all
+ # uppercase. Just to be special.
+ if UPPER_CASE_MOD
+-nodist_include_HEADERS = TYPESIZES.mod NETCDF.mod
+-TYPESIZES.mod: typeSizes.o
+-NETCDF.mod: $(NETCDF_O)
+-BUILT_SOURCES = TYPESIZES.mod
++NETCDF_MODULES = TYPESIZES.mod NETCDF.mod
+ else
+-nodist_include_HEADERS = typesizes.mod netcdf.mod
+-typesizes.mod: typeSizes.o
+-netcdf.mod: $(NETCDF_O)
+-BUILT_SOURCES = typesizes.mod
++NETCDF_MODULES = typesizes.mod netcdf.mod
+ endif
+
++NETCDF_LO := $(NETCDF_O:.o=.lo)
++$(NETCDF_LO): typeSizes.o
++install-data-local:
++ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
++ @list='$(NETCDF_MODULES)'; test -n "$(includedir)" || list=; \
++ for p in $$list; do \
++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
++ echo "$$d$$p"; \
++ done | $(am__base_list) | \
++ while read files; do \
++ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
++ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
++ done
++
+ # This is what we are building: a convenience library of F90 functions.
+ noinst_LTLIBRARIES = libnetcdff90.la
+
diff --git a/sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch b/sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch
new file mode 100644
index 000000000000..783a5b06e991
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch
@@ -0,0 +1,145 @@
+From 435d8a03ed28bb5ad63aff12cbc6ab91531b6bc8 Mon Sep 17 00:00:00 2001
+From: Quincey Koziol <quincey@koziol.cc>
+Date: Wed, 7 May 2014 08:45:15 -0500
+Subject: [PATCH] Account for the HDF5 library not having the MPI-POSIX VFD
+ configured in.
+
+---
+ RELEASE_NOTES.md | 2 ++
+ libsrc4/nc4file.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ nc_test4/tst_nc4perf.c | 5 +++++
+ nc_test4/tst_parallel3.c | 5 +++++
+ 4 files changed, 52 insertions(+)
+
+diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
+index 27f228c..1a69d17 100644
+--- a/RELEASE_NOTES.md
++++ b/RELEASE_NOTES.md
+@@ -9,6 +9,8 @@ This file contains a high-level description of this package's evolution. Release
+
+ ### 4.3.3-rc1 Released TBD
+
++* When the NC_MPIPOSIX flag is given for parallel I/O access and the HDF5 library does not have the MPI-POSIX VFD configured in, the NC_MPIPOSIX flag is transparently aliased to the NC_MPIIO flag within the netCDF-4 library.
++
+ ## 4.3.2 Released 2014-04-23
+
+ * As part of an ongoing project, the Doxygen-generated netcdf documentation has been reorganized. The goal is to make the documentation easier to parse, and to eliminate redundant material. This project is ongoing.
+diff --git a/libsrc4/nc4file.c b/libsrc4/nc4file.c
+index ec3bb0c..5c957be 100644
+--- a/libsrc4/nc4file.c
++++ b/libsrc4/nc4file.c
+@@ -308,12 +308,21 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
+ if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0)
+ BAIL(NC_EPARINIT);
+ }
++#ifdef USE_PARALLEL_POSIX
+ else /* MPI/POSIX */
+ {
+ LOG((4, "creating parallel file with MPI/posix"));
+ if (H5Pset_fapl_mpiposix(fapl_id, comm, 0) < 0)
+ BAIL(NC_EPARINIT);
+ }
++#else /* USE_PARALLEL_POSIX */
++ /* Should not happen! Code in NC4_create/NC4_open should alias the
++ * NC_MPIPOSIX flag to NC_MPIIO, if the MPI-POSIX VFD is not
++ * available in HDF5. -QAK
++ */
++ else /* MPI/POSIX */
++ BAIL(NC_EPARINIT);
++#endif /* USE_PARALLEL_POSIX */
+
+ /* Keep copies of the MPI Comm & Info objects */
+ if (MPI_SUCCESS != MPI_Comm_dup(comm, &nc4_info->comm))
+@@ -465,6 +474,17 @@ NC4_create(const char* path, int cmode, size_t initialsz, int basepe,
+ )
+ return NC_EINVAL;
+
++#ifndef USE_PARALLEL_POSIX
++/* If the HDF5 library has been compiled without the MPI-POSIX VFD, alias
++ * the NC_MPIPOSIX flag to NC_MPIIO. -QAK
++ */
++ if(cmode & NC_MPIPOSIX)
++ {
++ cmode &= ~NC_MPIPOSIX;
++ cmode |= NC_MPIIO;
++ }
++#endif /* USE_PARALLEL_POSIX */
++
+ cmode |= NC_NETCDF4;
+
+ /* Apply default create format. */
+@@ -2168,12 +2188,21 @@ nc4_open_file(const char *path, int mode, MPI_Comm comm,
+ if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0)
+ BAIL(NC_EPARINIT);
+ }
++#ifdef USE_PARALLEL_POSIX
+ else /* MPI/POSIX */
+ {
+ LOG((4, "opening parallel file with MPI/posix"));
+ if (H5Pset_fapl_mpiposix(fapl_id, comm, 0) < 0)
+ BAIL(NC_EPARINIT);
+ }
++#else /* USE_PARALLEL_POSIX */
++ /* Should not happen! Code in NC4_create/NC4_open should alias the
++ * NC_MPIPOSIX flag to NC_MPIIO, if the MPI-POSIX VFD is not
++ * available in HDF5. -QAK
++ */
++ else /* MPI/POSIX */
++ BAIL(NC_EPARINIT);
++#endif /* USE_PARALLEL_POSIX */
+
+ /* Keep copies of the MPI Comm & Info objects */
+ if (MPI_SUCCESS != MPI_Comm_dup(comm, &nc4_info->comm))
+@@ -2640,6 +2669,17 @@ NC4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
+ (mode & NC_MPIIO && mode & NC_MPIPOSIX))
+ return NC_EINVAL;
+
++#ifndef USE_PARALLEL_POSIX
++/* If the HDF5 library has been compiled without the MPI-POSIX VFD, alias
++ * the NC_MPIPOSIX flag to NC_MPIIO. -QAK
++ */
++ if(mode & NC_MPIPOSIX)
++ {
++ mode &= ~NC_MPIPOSIX;
++ mode |= NC_MPIIO;
++ }
++#endif /* USE_PARALLEL_POSIX */
++
+
+ /* Depending on the type of file, open it. */
+
+diff --git a/nc_test4/tst_nc4perf.c b/nc_test4/tst_nc4perf.c
+index 47af70e..3528b82 100644
+--- a/nc_test4/tst_nc4perf.c
++++ b/nc_test4/tst_nc4perf.c
+@@ -244,6 +244,11 @@ int test_pio_4d(size_t cache_size, int facc_type, int access_flag, MPI_Comm comm
+ return 0;
+ }
+
++/* Note: When the MPI-POSIX VFD is not compiled in to HDF5, the NC_MPIPOSIX
++ * flag will be aliased to the NC_MPIIO flag within the library, and
++ * therefore this test will exercise the aliasing, with the MPI-IO VFD,
++ * under that configuration. -QAK
++ */
+ #define NUM_MODES 2
+ #define NUM_FACC 2
+ #define NUM_CHUNK_COMBOS_2D 3
+diff --git a/nc_test4/tst_parallel3.c b/nc_test4/tst_parallel3.c
+index 27f9c98..9fa534f 100644
+--- a/nc_test4/tst_parallel3.c
++++ b/nc_test4/tst_parallel3.c
+@@ -129,6 +129,11 @@ int main(int argc, char **argv)
+ if (mpi_rank == 0)
+ SUMMARIZE_ERR;
+
++/* Note: When the MPI-POSIX VFD is not compiled in to HDF5, the NC_MPIPOSIX
++ * flag will be aliased to the NC_MPIIO flag within the library, and
++ * therefore this test will exercise the aliasing, with the MPI-IO VFD,
++ * under that configuration. -QAK
++ */
+ if (mpi_rank == 0)
+ printf("*** Testing parallel IO for raw-data with MPIPOSIX-IO (driver)...");
+ facc_type = NC_NETCDF4|NC_MPIPOSIX;
+--
+2.0.3
+
diff --git a/sci-libs/netcdf/metadata.xml b/sci-libs/netcdf/metadata.xml
new file mode 100644
index 000000000000..d78394eb9cd8
--- /dev/null
+++ b/sci-libs/netcdf/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ NetCDF (network Common Data Form) is an interface for scientific
+ data access and a freely-distributed software library that provides an
+ implementation of the interface. The netCDF library also defines a
+ machine-independent format for representing scientific data.
+ Together, the interface, library, and format support the creation,
+ access, and sharing of scientific data.
+</longdescription>
+ <use>
+ <flag name="dap">Support for remote data access with the built-in OPeNDAP client</flag>
+ <flag name="hdf">Add support for the Hierarchical Data Format v.4 <pkg>sci-libs/hdf</pkg></flag>
+ <flag name="tools">Build the utilities nccopy, ncgen and ncdump</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-libs/netcdf/netcdf-4.3.2-r1.ebuild b/sci-libs/netcdf/netcdf-4.3.2-r1.ebuild
new file mode 100644
index 000000000000..2ef673fdc5aa
--- /dev/null
+++ b/sci-libs/netcdf/netcdf-4.3.2-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="Scientific library and interface for array oriented data access"
+HOMEPAGE="http://www.unidata.ucar.edu/software/netcdf/"
+SRC_URI="ftp://ftp.unidata.ucar.edu/pub/netcdf/${P}.tar.gz"
+
+LICENSE="UCAR-Unidata"
+SLOT="0/7"
+KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="+dap examples hdf +hdf5 mpi static-libs szip test tools"
+
+RDEPEND="
+ dap? ( net-misc/curl:0= )
+ hdf? ( sci-libs/hdf:0= sci-libs/hdf5:0= )
+ hdf5? ( sci-libs/hdf5:0=[mpi=,szip=,zlib] )"
+DEPEND="${RDEPEND}"
+# doc generation is missing many doxygen files in tar ball
+# doc? ( app-doc/doxygen[dot] )"
+
+REQUIRED_USE="test? ( tools ) szip? ( hdf5 ) mpi? ( hdf5 )"
+
+PATCHES=( "${FILESDIR}/${P}-HDF5-1.8.13+-compat.patch" )
+
+src_configure() {
+ # --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ # $(use_enable doc doxygen)
+ local myeconfargs=(
+ --disable-examples
+ --disable-dap-remote-tests
+ $(use_enable dap)
+ $(use_enable hdf hdf4)
+ $(use_enable hdf5 netcdf-4)
+ $(use_enable tools utilities)
+ )
+ if use mpi; then
+ export CC=mpicc
+ myeconfargs+=( --enable-parallel )
+ use test && myeconfargs+=( --enable-parallel-tests )
+ fi
+ autotools-utils_src_configure
+}
+
+src_test() {
+ autotools-utils_src_test -j1
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}