1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
12 DESCRIPTION="A high performance and portable MPI implementation"
13 HOMEPAGE="http://www.mpich.org/"
14 SRC_URI="http://www.mpich.org/static/downloads/${PV}/${P}.tar.gz"
18 KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
19 IUSE="+cxx doc fortran mpi-threads romio threads"
24 romio? ( net-fs/nfs-utils )"
26 DEPEND="${COMMON_DEPEND}
30 RDEPEND="${COMMON_DEPEND}
34 S="${WORKDIR}"/${PN}-${MY_PV}
37 FORTRAN_STANDARD="77 90"
40 if use mpi-threads && ! use threads; then
41 ewarn "mpi-threads requires threads, assuming that's what you want"
46 # Using MPICHLIB_LDFLAGS doesn't seem to fully work.
47 sed -i 's| *@WRAPPER_LDFLAGS@ *||' \
48 src/packaging/pkgconfig/mpich.pc.in \
54 local c="--enable-shared"
55 local hydra_c="--with-hwloc-prefix=/usr"
57 # The configure statements can be somewhat confusing, as they
58 # don't all show up in the top level configure, however, they
59 # are picked up in the children directories. Hence the separate
62 if use mpi-threads; then
63 # MPI-THREAD requries threading.
64 c="${c} --with-thread-package=pthreads"
65 c="${c} --enable-threads=runtime"
68 c="${c} --with-thread-package=pthreads"
70 c="${c} --with-thread-package=none"
72 c="${c} --enable-threads=single"
75 c="${c} --sysconfdir=${EPREFIX}/etc/${PN}"
76 c="${c} --docdir=${EPREFIX}/usr/share/doc/${PF}"
78 export MPICHLIB_CFLAGS=${CFLAGS}
79 export MPICHLIB_CPPFLAGS=${CPPFLAGS}
80 export MPICHLIB_CXXFLAGS=${CXXFLAGS}
81 export MPICHLIB_FFLAGS=${FFLAGS}
82 export MPICHLIB_FCFLAGS=${FCFLAGS}
83 export MPICHLIB_LDFLAGS=${LDFLAGS}
84 unset CFLAGS CPPFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS
93 $(use_enable fortran f77) \
94 $(use_enable fortran fc)
104 dodir /usr/share/doc/${PF}
105 dodoc README{,.envvar} CHANGES RELEASE_NOTES
106 newdoc src/pm/hydra/README README.hydra
108 newdoc src/mpi/romio/README README.romio
112 rm -rf "${D}"usr/share/doc/${PF}/www*