summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-libs/netcdf/ChangeLog12
-rw-r--r--sci-libs/netcdf/files/netcdf-4.0.1-as-needed.patch20
-rw-r--r--sci-libs/netcdf/files/netcdf-4.0.1-cfortran.patch34
-rw-r--r--sci-libs/netcdf/files/netcdf-4.0.1-pkgconfig.patch45
-rw-r--r--sci-libs/netcdf/files/netcdf-4.1.1-implicits.patch30
-rw-r--r--sci-libs/netcdf/files/netcdf-4.1.1-parallel-build.patch38
-rw-r--r--sci-libs/netcdf/netcdf-4.1.1-r1.ebuild (renamed from sci-libs/netcdf/netcdf-4.0.1-r1.ebuild)65
7 files changed, 115 insertions, 129 deletions
diff --git a/sci-libs/netcdf/ChangeLog b/sci-libs/netcdf/ChangeLog
index de6dd5117a47..179d80e450c0 100644
--- a/sci-libs/netcdf/ChangeLog
+++ b/sci-libs/netcdf/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sci-libs/netcdf
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/ChangeLog,v 1.75 2010/12/01 16:55:59 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/ChangeLog,v 1.76 2010/12/04 21:40:09 xarthisius Exp $
+
+*netcdf-4.1.1-r1 (04 Dec 2010)
+
+ 04 Dec 2010; Kacper Kowalik <xarthisius@gentoo.org> -netcdf-4.0.1-r1.ebuild,
+ -files/netcdf-4.0.1-as-needed.patch, -files/netcdf-4.0.1-cfortran.patch,
+ -files/netcdf-4.0.1-pkgconfig.patch, +netcdf-4.1.1-r1.ebuild,
+ +files/netcdf-4.1.1-implicits.patch,
+ +files/netcdf-4.1.1-parallel-build.patch:
+ Fix parallel build wrt #296174 by MarisN <maris.gis@gmail.com>. Fix implicit
+ function declarations. Drop old.
01 Dec 2010; Sébastien Fabbro <bicatali@gentoo.org> netcdf-3.6.3.ebuild:
Remove use of fortran eclass
diff --git a/sci-libs/netcdf/files/netcdf-4.0.1-as-needed.patch b/sci-libs/netcdf/files/netcdf-4.0.1-as-needed.patch
deleted file mode 100644
index b0391c804ec0..000000000000
--- a/sci-libs/netcdf/files/netcdf-4.0.1-as-needed.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- netcdf-4.0.1.orig/libsrc4/Makefile.am 2009-03-26 21:03:16.000000000 +0100
-+++ netcdf-4.0.1/libsrc4/Makefile.am 2009-09-10 22:34:48.245041376 +0200
-@@ -67,6 +67,7 @@
- libnetcdf_la_SOURCES = nc4attr.c nc4internal.c nc4var.c netcdf3.h \
- nc4dim.c nc4internal.h ncfunc.c nc4file.c netcdf.h error.c error.h \
- nc4grp.c nc4type.c nc4hdf.c
-+libnetcdf_la_LIBADD += -lhdf5_hl
-
- # If we are not building separate fortran libraries, then include
- # their functions in the C library.
---- netcdf-4.0.1.orig/cxx4/Makefile.am 2007-08-13 18:05:17.000000000 +0200
-+++ netcdf-4.0.1/cxx4/Makefile.am 2009-09-10 23:45:06.335707145 +0200
-@@ -42,6 +42,7 @@
- # Library source.
- libnetcdf_c__4_la_SOURCES = ncatt.cpp ncdim.cpp ncexception.cpp \
- ncfile.cpp ncgroup.cpp ncvar.cpp ncvalues.cpp ncvalues.h
-+libnetcdf_c__4_la_LIBADD = $(top_builddir)/libsrc4/libnetcdf.la
-
- TESTFILES = tst_suiterunner$(EXEEXT) tst_file$(EXEEXT) tst_filerw$(EXEEXT) tst_simple$(EXEEXT)
- tst_suiterunner_SOURCES = tst_suite.cpp tst_suiterunner.cpp tst_suite.h
diff --git a/sci-libs/netcdf/files/netcdf-4.0.1-cfortran.patch b/sci-libs/netcdf/files/netcdf-4.0.1-cfortran.patch
deleted file mode 100644
index 56b761df1be3..000000000000
--- a/sci-libs/netcdf/files/netcdf-4.0.1-cfortran.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- netcdf-4.0.1.orig/configure.ac 2009-03-26 13:10:02.000000000 +0100
-+++ netcdf-4.0.1/configure.ac 2010-01-28 19:01:47.156238559 +0100
-@@ -801,7 +801,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
-
---- netcdf-4.0.1.orig/fortran/ncfortran.h 2009-02-19 13:50:25.000000000 +0100
-+++ netcdf-4.0.1/fortran/ncfortran.h 2009-09-24 21:10:08.000000000 +0200
-@@ -660,7 +660,7 @@
- * The following is for f2c-support only.
- */
-
--#if defined(f2cFortran) && !defined(pgiFortran)
-+#if defined(f2cFortran) && !defined(pgiFortran) && !defined(gFortran)
-
- /*
- * The f2c(1) utility on BSD/OS and Linux systems adds an additional
---- netcdf-4.0.1.orig/nf_test/fortlib.c 2009-09-24 21:11:12.000000000 +0200
-+++ netcdf-4.0.1/nf_test/fortlib.c 2009-09-24 21:11:36.000000000 +0200
-@@ -14,7 +14,7 @@
- #include "../fortran/ncfortran.h"
-
-
--#if defined(f2cFortran) && !defined(pgiFortran)
-+#if defined(f2cFortran) && !defined(pgiFortran) && !defined(gFortran)
- /*
- * The f2c(1) utility on BSD/OS and Linux systems adds an additional
- * underscore suffix (besides the usual one) to global names that have
diff --git a/sci-libs/netcdf/files/netcdf-4.0.1-pkgconfig.patch b/sci-libs/netcdf/files/netcdf-4.0.1-pkgconfig.patch
deleted file mode 100644
index 4bd940fee82e..000000000000
--- a/sci-libs/netcdf/files/netcdf-4.0.1-pkgconfig.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Nru netcdf-4.0.1.orig/configure.ac netcdf-4.0.1/configure.ac
---- netcdf-4.0.1.orig/configure.ac 2009-03-26 12:10:02.000000000 +0000
-+++ netcdf-4.0.1/configure.ac 2010-01-28 22:10:56.000000000 +0000
-@@ -1159,11 +1159,11 @@
- fi
- if test "x$enable_netcdf_4" = xyes ; then
- if test "x$HDF5DIR" != x ; then
-- NC_LIBS="$NC_LIBS -L$HDF5DIR"
-+ NC_LIBS="$NC_LIBS -L$HDF5DIR/lib"
- fi
- NC_LIBS="$NC_LIBS -lhdf5_hl -lhdf5 $SZLIB_LIBS"
- if test "x$ZLIBDIR" != x ; then
-- NC_LIBS="$NC_LIBS -L$ZLIBDIR"
-+ NC_LIBS="$NC_LIBS -L$ZLIBDIR/lib"
- fi
- NC_LIBS="$NC_LIBS -lz $LIBS"
- fi
-diff -Nru netcdf-4.0.1.orig/nc-config.in netcdf-4.0.1/nc-config.in
---- netcdf-4.0.1.orig/nc-config.in 2009-03-18 20:28:46.000000000 +0000
-+++ netcdf-4.0.1/nc-config.in 2010-01-28 21:48:02.000000000 +0000
-@@ -4,9 +4,9 @@
- #
-
- prefix=@prefix@
--exec_prefix=${prefix}
--libdir=${exec_prefix}/lib
--includedir=${prefix}/include
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-
- cc="@CC@"
- cxx="@CXX@"
-diff -Nru netcdf-4.0.1.orig/netcdf.pc.in netcdf-4.0.1/netcdf.pc.in
---- netcdf-4.0.1.orig/netcdf.pc.in 2009-03-19 12:22:33.000000000 +0000
-+++ netcdf-4.0.1/netcdf.pc.in 2010-01-28 22:11:32.000000000 +0000
-@@ -6,7 +6,7 @@
- cppcompiler=@CXX@
- fcompiler=@FC@
- fflags=@FFLAGS@ -I${includedir}
--flibs=@FLIBS@ @NC_FLIBS@
-+flibs=@NC_FLIBS@
-
- Name: @PACKAGE@
- Description: NetCDF Client Library
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..bd2982bf3a74
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.1.1-implicits.patch
@@ -0,0 +1,30 @@
+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)
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..d06e94539664
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.1.1-parallel-build.patch
@@ -0,0 +1,38 @@
+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,23 @@
+ # 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
+
++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/netcdf-4.0.1-r1.ebuild b/sci-libs/netcdf/netcdf-4.1.1-r1.ebuild
index f65123f6a28a..1c19295b6e8e 100644
--- a/sci-libs/netcdf/netcdf-4.0.1-r1.ebuild
+++ b/sci-libs/netcdf/netcdf-4.1.1-r1.ebuild
@@ -1,26 +1,35 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-4.0.1-r1.ebuild,v 1.6 2010/03/07 18:59:31 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-4.1.1-r1.ebuild,v 1.1 2010/12/04 21:40:09 xarthisius Exp $
EAPI="3"
-inherit eutils autotools
+inherit autotools autotools-utils
DESCRIPTION="Scientific library and interface for array oriented data access"
-SRC_URI="ftp://ftp.unidata.ucar.edu/pub/netcdf/${P}.tar.gz"
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"
-IUSE="doc fortran hdf5 szip cxx"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cxx dap doc fortran hdf5 static-libs szip"
+
+RDEPEND="dap? ( net-misc/curl )
+ hdf5? ( >=sci-libs/hdf5-1.8[zlib,szip?,fortran?] )"
-RDEPEND="hdf5? ( >=sci-libs/hdf5-1.8[zlib,szip?,fortran?] )"
DEPEND="${RDEPEND}
>=sys-devel/libtool-2.2
doc? ( virtual/latex-base )
fortran? ( dev-lang/cfortran )"
+DOCS=(README RELEASE_NOTES)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-parallel-build.patch
+ "${FILESDIR}"/${P}-implicits.patch
+)
+
pkg_setup() {
if use hdf5 && has_version sci-libs/hdf5[mpi]; then
export CC=mpicc
@@ -35,11 +44,12 @@ pkg_setup() {
}
src_prepare() {
- epatch "${FILESDIR}"/${P}-as-needed.patch
- epatch "${FILESDIR}"/${P}-cfortran.patch
- epatch "${FILESDIR}"/${P}-pkgconfig.patch
# use system cfortran
rm -f fortran/cfortran.h || die
+ if ! use doc; then
+ sed -i -e "/\$(NC_TEST4)/ s/man4//" Makefile.am || die
+ fi
+ autotools-utils_src_prepare
eautoreconf
}
@@ -50,31 +60,28 @@ src_configure() {
use szip && myconf="${myconf} --with-szlib=${EPREFIX}/usr"
fi
- econf \
- --docdir="${EPREFIX}"/usr/share/doc/${PF} \
- --enable-shared \
- $(use_enable fortran f77) \
- $(use_enable fortran f90) \
- $(use_enable cxx) \
- $(use_enable fortran separate-fortran) \
- $(use_enable hdf5 netcdf-4) \
- $(use_enable hdf5 ncgen4) \
- $(use_enable doc docs-install) \
+ myeconfargs=(
+ --enable-shared
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ $(use_enable dap)
+ $(use_enable static-libs static)
+ $(use_enable fortran f77)
+ $(use_enable fortran f90)
+ $(use_enable cxx)
+ $(use_enable fortran separate-fortran)
+ $(use_enable hdf5 netcdf-4)
+ $(use_enable hdf5 ncgen4)
+ $(use_enable doc docs-install)
${myconf}
+ )
+ autotools-utils_src_configure
}
src_compile() {
# hack to allow parallel build
if use doc; then
- emake pdf || die "emake pdf failed"
- cd man4
- emake -j1 || die "emake doc failed"
- cd ..
+ emake pdf || die
+ emake -j1 -C man4 || die
fi
- emake || die "emake failed"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "emake install failed"
- dodoc README RELEASE_NOTES VERSION
+ autotools-utils_src_compile
}