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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jun 13 18:59:33 2012 UTC (12 months ago) by xarthisius
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Prevent accidental inclusion of mpi c++ headers when hdf5.h is included by third party C++ program/library. Fixes #420777 Juergen Rose <rose@rz.uni-potsdam.de>

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20