/[gentoo-x86]/sci-libs/hdf5/hdf5-1.8.9-r2.ebuild
Gentoo

Contents of /sci-libs/hdf5/hdf5-1.8.9-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Sun Nov 4 14:09:16 2012 UTC (22 months, 2 weeks ago) by ago
Branch: MAIN
Changes since 1.6: +2 -2 lines
Stable for amd64, wrt bug #440682

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 xarthisius 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ago 1.7 # $Header: /var/cvsroot/gentoo-x86/sci-libs/hdf5/hdf5-1.8.9-r2.ebuild,v 1.6 2012/11/01 16:59:45 blueness Exp $
4 xarthisius 1.1
5     EAPI=4
6    
7 jlec 1.3 FORTRAN_NEEDED=fortran
8    
9 bicatali 1.2 inherit autotools eutils fortran-2 flag-o-matic toolchain-funcs multilib
10 xarthisius 1.1
11     DESCRIPTION="General purpose library and file format for storing scientific data"
12     HOMEPAGE="http://www.hdfgroup.org/HDF5/"
13     SRC_URI="http://www.hdfgroup.org/ftp/HDF5/releases/${P}/src/${P}.tar.bz2"
14    
15     LICENSE="NCSA-HDF"
16     SLOT="0"
17 ago 1.7 KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
18 xarthisius 1.1 IUSE="cxx debug examples fortran fortran2003 mpi static-libs szip threads zlib"
19 jlec 1.5
20     REQUIRED_USE="
21     cxx? ( !mpi ) mpi? ( !cxx )
22 xarthisius 1.1 threads? ( !cxx !mpi !fortran )
23     fortran2003? ( fortran )"
24    
25     RDEPEND="
26     mpi? ( virtual/mpi[romio] )
27     szip? ( >=sci-libs/szip-2.1 )
28     zlib? ( sys-libs/zlib )"
29    
30     DEPEND="${RDEPEND}
31     sys-devel/libtool:2"
32    
33     pkg_setup() {
34 jlec 1.5 tc-export CXX CC # workaround for bug 285148
35 xarthisius 1.1 if use fortran; then
36     use fortran2003 && FORTRAN_STANDARD=2003
37     fortran-2_pkg_setup
38     fi
39     if use mpi; then
40     if has_version 'sci-libs/hdf5[-mpi]'; then
41     ewarn "Installing hdf5 with mpi enabled with a previous hdf5 with mpi disabled may fail."
42     ewarn "Try to uninstall the current hdf5 prior to enabling mpi support."
43     fi
44     export CC=mpicc
45     use fortran && export FC=mpif90
46     elif has_version 'sci-libs/hdf5[mpi]'; then
47     ewarn "Installing hdf5 with mpi disabled while having hdf5 installed with mpi enabled may fail."
48     ewarn "Try to uninstall the current hdf5 prior to disabling mpi support."
49     fi
50     }
51    
52     src_prepare() {
53     epatch "${FILESDIR}"/${PN}-1.8.8-buildsystem.patch \
54     "${FILESDIR}"/${PN}-1.8.8-array_bounds.patch \
55     "${FILESDIR}"/${P}-implicits.patch \
56     "${FILESDIR}"/${P}-static_libgfortran.patch \
57     "${FILESDIR}"/${P}-mpicxx.patch
58     # respect gentoo examples directory
59     sed \
60     -e "s:hdf5_examples:doc/${PF}/examples:g" \
61     -i $(find . -name Makefile.am) $(find . -name "run*.sh.in") || die
62     sed \
63     -e '/docdir/d' \
64     -i config/commence.am || die
65     if ! use examples; then
66     sed -e '/^install:/ s/install-examples//' \
67     -i Makefile.am || die #409091
68     fi
69     eautoreconf
70     # enable shared libs by default for h5cc config utility
71     sed -i -e "s/SHLIB:-no/SHLIB:-yes/g" tools/misc/h5cc.in || die
72 bicatali 1.2 # bug #419677
73     use prefix && \
74     append-ldflags -Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir) \
75     -Wl,-rpath,"${EPREFIX}"/$(get_libdir)
76 xarthisius 1.1 }
77    
78     src_configure() {
79     econf \
80     --enable-production \
81     --docdir="${EPREFIX}"/usr/share/doc/${PF} \
82     --enable-deprecated-symbols \
83     --enable-shared \
84     --disable-silent-rules \
85 bicatali 1.2 $(use_enable prefix sharedlib-rpath) \
86 xarthisius 1.1 $(use_enable static-libs static) \
87     $(use_enable debug debug all) \
88     $(use_enable debug codestack) \
89     $(use_enable cxx) \
90     $(use_enable fortran) \
91     $(use_enable fortran2003) \
92     $(use_enable mpi parallel) \
93     $(use_enable threads threadsafe) \
94     $(use_with szip szlib) \
95     $(use_with threads pthread) \
96     $(use_with zlib) \
97     ${myconf}
98     }
99    
100     src_install() {
101     default
102     use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
103     }

  ViewVC Help
Powered by ViewVC 1.1.20