summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-12-17 20:17:06 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-12-17 20:17:06 +0000
commit2c5d2912ce50fddd26ce60dd509ac6739f907327 (patch)
tree9766008778f6b11292bc2278391ca5923320bd6f /sci-libs/netcdf
parentInitial import. (diff)
downloadgentoo-2-2c5d2912ce50fddd26ce60dd509ac6739f907327.tar.gz
gentoo-2-2c5d2912ce50fddd26ce60dd509ac6739f907327.tar.bz2
gentoo-2-2c5d2912ce50fddd26ce60dd509ac6739f907327.zip
Default to gfortran if cannot figure out compiler wrt #348922 by Honza Macháček <Hloupy.Honza@centrum.cz> Drop old.
(Portage version: 2.1.9.25/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/netcdf')
-rw-r--r--sci-libs/netcdf/ChangeLog9
-rw-r--r--sci-libs/netcdf/files/netcdf-4.1.1-fortran.patch15
-rw-r--r--sci-libs/netcdf/netcdf-4.1.1-r4.ebuild89
3 files changed, 112 insertions, 1 deletions
diff --git a/sci-libs/netcdf/ChangeLog b/sci-libs/netcdf/ChangeLog
index 2c3c735b50a0..81791748f204 100644
--- a/sci-libs/netcdf/ChangeLog
+++ b/sci-libs/netcdf/ChangeLog
@@ -1,6 +1,13 @@
# 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.78 2010/12/06 12:47:00 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/ChangeLog,v 1.79 2010/12/17 20:17:06 xarthisius Exp $
+
+*netcdf-4.1.1-r4 (17 Dec 2010)
+
+ 17 Dec 2010; Kacper Kowalik <xarthisius@gentoo.org> +netcdf-4.1.1-r4.ebuild,
+ +files/netcdf-4.1.1-fortran.patch:
+ Default to gfortran if cannot figure out compiler wrt #348922 by Honza
+ Macháček <Hloupy.Honza@centrum.cz> Drop old.
*netcdf-4.1.1-r3 (06 Dec 2010)
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/netcdf-4.1.1-r4.ebuild b/sci-libs/netcdf/netcdf-4.1.1-r4.ebuild
new file mode 100644
index 000000000000..29902065a38f
--- /dev/null
+++ b/sci-libs/netcdf/netcdf-4.1.1-r4.ebuild
@@ -0,0 +1,89 @@
+# 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.1.1-r4.ebuild,v 1.1 2010/12/17 20:17:06 xarthisius Exp $
+
+EAPI="3"
+
+inherit autotools 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"
+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?] )"
+
+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
+ "${FILESDIR}"/${P}-mpi-fix.patch
+ "${FILESDIR}"/${P}-fortran.patch
+)
+
+pkg_setup() {
+ if use hdf5 && has_version sci-libs/hdf5[mpi]; then
+ export CC=mpicc
+ if use cxx; then
+ export CXX=mpicxx
+ fi
+ if use fortran; then
+ export FC=mpif90
+ export F77=mpif77
+ fi
+ fi
+}
+
+src_prepare() {
+ # use system cfortran
+ rm -f fortran/cfortran.h || die
+ # we don't build udunits and libcf
+ sed -i -e '/udunits libcf/d' configure.ac || die
+ if ! use doc; then
+ sed -i -e "/\$(NC_TEST4)/ s/man4//" Makefile.am || die
+ fi
+ autotools-utils_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use hdf5; then
+ myconf="--with-hdf5=${EPREFIX}/usr --with-zlib=${EPREFIX}/usr"
+ use szip && myconf="${myconf} --with-szlib=${EPREFIX}/usr"
+ fi
+
+ 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)
+ ${myconf}
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ # hack to allow parallel build
+ if use doc; then
+ autotools-utils_src_compile pdf
+ autotools-utils_src_compile -j1 -C man4
+ fi
+ autotools-utils_src_compile
+}