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:28
Message-Id: 1472500666.d223fbab4e43b5b2bb78f3a4df7c3caf3632ab5a.jsbronder@gentoo
1 commit: d223fbab4e43b5b2bb78f3a4df7c3caf3632ab5a
2 Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 29 19:57:46 2016 +0000
4 Commit: Justin Bronder <jsbronder <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 29 19:57:46 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=d223fbab
7
8 sys-cluster/mpich: bring back thread logic
9
10 Package-Manager: portage-2.2.28
11
12 sys-cluster/mpich/mpich-3.2-r2.ebuild | 21 +++++++++++++++++----
13 1 file changed, 17 insertions(+), 4 deletions(-)
14
15 diff --git a/sys-cluster/mpich/mpich-3.2-r2.ebuild b/sys-cluster/mpich/mpich-3.2-r2.ebuild
16 index d66b32d..28dad07 100644
17 --- a/sys-cluster/mpich/mpich-3.2-r2.ebuild
18 +++ b/sys-cluster/mpich/mpich-3.2-r2.ebuild
19 @@ -18,7 +18,6 @@ SLOT="0"
20 LICENSE="mpich"
21 KEYWORDS=""
22 IUSE="+cxx doc fortran mpi-threads romio threads"
23 -REQUIRED_USE="mpi-threads? ( threads )"
24
25 COMMON_DEPEND="
26 >=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]
27 @@ -53,7 +52,22 @@ src_prepare() {
28 multilib_src_configure() {
29 # The configure statements can be somewhat confusing, as they
30 # don't all show up in the top level configure, however, they
31 - # are picked up in the children directories.
32 + # are picked up in the children directories. Hence the separate
33 + # local vars.
34 +
35 + local c=
36 + if use mpi-threads; then
37 + # MPI-THREAD requries threading.
38 + c="${c} --with-thread-package=pthreads"
39 + c="${c} --enable-threads=runtime"
40 + else
41 + if use threads ; then
42 + c="${c} --with-thread-package=pthreads"
43 + else
44 + c="${c} --with-thread-package=none"
45 + fi
46 + c="${c} --enable-threads=single"
47 + fi
48
49 export MPICHLIB_CFLAGS="${CFLAGS}"
50 export MPICHLIB_CPPFLAGS="${CPPFLAGS}"
51 @@ -67,8 +81,7 @@ multilib_src_configure() {
52 --enable-shared \
53 --sysconfdir="${EPREFIX}/etc/${PN}" \
54 --with-hwloc-prefix="${EPREFIX}/usr" \
55 - --enable-threads=$(usex mpi-threads runtime single) \
56 - --with-thread-package=$(usex threads pthreads none) \
57 + ${c} \
58 --with-pm=hydra \
59 --disable-fast \
60 --enable-versioning \