Gentoo Archives: gentoo-commits

From: Justin Bronder <jsbronder@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sys-cluster/mpich/
Date: Mon, 29 Aug 2016 20:45:26
Message-Id: 1472489236.d2354e659f484aab41b16820da9700b404e9b801.jsbronder@gentoo
1 commit: d2354e659f484aab41b16820da9700b404e9b801
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 29 15:53:42 2016 +0000
4 Commit: Justin Bronder <jsbronder <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 29 16:47:16 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=d2354e65
7
8 sys-cluster/mpich: add multilib version
9
10 Package-Manager: portage-2.2.28
11
12 sys-cluster/mpich/mpich-3.2-r2.ebuild | 120 ++++++++++++++++++++++++++++++++++
13 1 file changed, 120 insertions(+)
14
15 diff --git a/sys-cluster/mpich/mpich-3.2-r2.ebuild b/sys-cluster/mpich/mpich-3.2-r2.ebuild
16 new file mode 100644
17 index 0000000..7f5dcf7
18 --- /dev/null
19 +++ b/sys-cluster/mpich/mpich-3.2-r2.ebuild
20 @@ -0,0 +1,120 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=6
26 +
27 +FORTRAN_NEEDED=fortran
28 +FORTRAN_STANDARD="77 90"
29 +
30 +inherit fortran-2 multilib-minimal mpi
31 +
32 +MY_PV=${PV/_/}
33 +DESCRIPTION="A high performance and portable MPI implementation"
34 +HOMEPAGE="http://www.mpich.org/"
35 +SRC_URI="http://www.mpich.org/static/downloads/${PV}/${P}.tar.gz"
36 +
37 +SLOT="0"
38 +LICENSE="mpich"
39 +KEYWORDS=""
40 +IUSE="+cxx doc fortran mpi-threads romio threads"
41 +REQUIRED_USE="mpi-threads? ( threads )"
42 +
43 +COMMON_DEPEND="
44 + >=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]
45 + >=sys-apps/hwloc-1.10.0-r2[${MULTILIB_USEDEP}]
46 + romio? ( net-fs/nfs-utils )
47 + $(mpi_imp_deplist)"
48 +
49 +DEPEND="${COMMON_DEPEND}
50 + dev-lang/perl
51 + sys-devel/libtool"
52 +
53 +RDEPEND="${COMMON_DEPEND}"
54 +
55 +S="${WORKDIR}"/${PN}-${MY_PV}
56 +
57 +MULTILIB_WRAPPED_HEADERS=(
58 + /usr/include/mpicxx.h
59 + /usr/include/mpi.h
60 + /usr/include/opa_config.h
61 +)
62 +
63 +src_prepare() {
64 + default
65 +
66 + # Using MPICHLIB_LDFLAGS doesn't seem to fully work.
67 + sed -i 's| *@WRAPPER_LDFLAGS@ *||' \
68 + src/packaging/pkgconfig/mpich.pc.in \
69 + src/env/*.in \
70 + || die
71 +}
72 +
73 +multilib_src_configure() {
74 + # The configure statements can be somewhat confusing, as they
75 + # don't all show up in the top level configure, however, they
76 + # are picked up in the children directories.
77 +
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
85 +
86 + ECONF_SOURCE=${S} $(mpi_econf_args) econf \
87 + --enable-shared \
88 + --sysconfdir="${EPREFIX}/etc/${PN}" \
89 + --with-hwloc-prefix="${EPREFIX}/usr" \
90 + --enable-threads=$(usex mpi-threads runtime single) \
91 + --with-thread-package=$(usex threads pthreads none) \
92 + --with-pm=hydra \
93 + --disable-fast \
94 + --enable-versioning \
95 + --with-hwloc-prefix=/usr \
96 + $(mpi_classed && echo "--docdir=$(mpi_root)/usr/share/doc/${PF}") \
97 + $(use_enable romio) \
98 + $(use_enable cxx) \
99 + $(multilib_native_use_enable fortran fortran all)
100 +}
101 +
102 +multilib_src_test() {
103 + emake -j1 check
104 +}
105 +
106 +multilib_src_install() {
107 + default
108 +
109 + # fortran header cannot be wrapped (bug #540508), workaround part 1
110 + if multilib_is_native_abi && use fortran; then
111 + mkdir "${T}"/fortran || die
112 + mv "${ED}"usr/include/mpif* "${T}"/fortran || die
113 + mv "${ED}"usr/include/*.mod "${T}"/fortran || die
114 + else
115 + # some fortran files get installed unconditionally
116 + rm "${ED}"usr/include/mpif* "${ED}"usr/include/*.mod || die
117 + fi
118 +}
119 +
120 +multilib_src_install_all() {
121 + # fortran header cannot be wrapped (bug #540508), workaround part 2
122 + if use fortran; then
123 + mv "${T}"/fortran/* "${ED}"usr/include || die
124 + fi
125 +
126 + mpi_dodir /usr/share/doc/${PF}
127 + mpi_dodoc COPYRIGHT README{,.envvar} CHANGES RELEASE_NOTES
128 + mpi_newdoc src/pm/hydra/README README.hydra
129 + if use romio; then
130 + mpi_newdoc src/mpi/romio/README README.romio
131 + fi
132 +
133 + local d=$(echo ${ED}/$(mpi_root)/ | sed 's,///*,/,g')
134 + if ! use doc; then
135 + rm -rf "${d}"usr/share/doc/${PF}/www* || die
136 + fi
137 +
138 + MPI_ESELECT_FILE="eselect.mpi.mpich"
139 + mpi_imp_add_eselect
140 +}