commit: d223fbab4e43b5b2bb78f3a4df7c3caf3632ab5a
Author: Christoph Junghans <ottxor <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 29 19:57:46 2016 +0000
Commit: Justin Bronder <jsbronder <AT> gentoo <DOT> org>
CommitDate: Mon Aug 29 19:57:46 2016 +0000
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=d223fbab
sys-cluster/mpich: bring back thread logic
Package-Manager: portage-2.2.28
sys-cluster/mpich/mpich-3.2-r2.ebuild | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/sys-cluster/mpich/mpich-3.2-r2.ebuild
b/sys-cluster/mpich/mpich-3.2-r2.ebuild
index d66b32d..28dad07 100644
--- a/sys-cluster/mpich/mpich-3.2-r2.ebuild
+++ b/sys-cluster/mpich/mpich-3.2-r2.ebuild
@@ -18,7 +18,6 @@ SLOT="0"
LICENSE="mpich"
KEYWORDS=""
IUSE="+cxx doc fortran mpi-threads romio threads"
-REQUIRED_USE="mpi-threads? ( threads )"
COMMON_DEPEND="
>=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]
@@ -53,7 +52,22 @@ src_prepare() {
multilib_src_configure() {
# The configure statements can be somewhat confusing, as they
# don't all show up in the top level configure, however, they
- # are picked up in the children directories.
+ # are picked up in the children directories. Hence the separate
+ # local vars.
+
+ local c=
+ if use mpi-threads; then
+ # MPI-THREAD requries threading.
+ c="${c} --with-thread-package=pthreads"
+ c="${c} --enable-threads=runtime"
+ else
+ if use threads ; then
+ c="${c} --with-thread-package=pthreads"
+ else
+ c="${c} --with-thread-package=none"
+ fi
+ c="${c} --enable-threads=single"
+ fi
export MPICHLIB_CFLAGS="${CFLAGS}"
export MPICHLIB_CPPFLAGS="${CPPFLAGS}"
@@ -67,8 +81,7 @@ multilib_src_configure() {
--enable-shared \
--sysconfdir="${EPREFIX}/etc/${PN}" \
--with-hwloc-prefix="${EPREFIX}/usr" \
- --enable-threads=$(usex mpi-threads runtime single) \
- --with-thread-package=$(usex threads pthreads none) \
+ ${c} \
--with-pm=hydra \
--disable-fast \
--enable-versioning \