aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJustin Bronder <jbronder@gentoo.org>2013-07-11 21:29:49 -0400
committerJustin Bronder <jbronder@gentoo.org>2015-08-18 20:09:09 -0400
commite509b30fbd0e5d72acdc19aa8dcd8027f4acb012 (patch)
treee288f912d09621a35945be05c1a3d8f1dd0684eb /eclass
parentMerge pull request #462 from mschubert/salmon (diff)
downloadsci-e509b30fbd0e5d72acdc19aa8dcd8027f4acb012.tar.gz
sci-e509b30fbd0e5d72acdc19aa8dcd8027f4acb012.tar.bz2
sci-e509b30fbd0e5d72acdc19aa8dcd8027f4acb012.zip
mpi: support required threads and use deps for mpi packages
Diffstat (limited to 'eclass')
-rw-r--r--eclass/mpi.eclass23
1 files changed, 19 insertions, 4 deletions
diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 99685b89b..c22940f66 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -250,12 +250,23 @@ MPI_PKG_USE_CXX="${MPI_PKG_USE_CXX:-0}"
# This feature requires EAPI 2 style use dependencies
MPI_PKG_USE_FC="${MPI_PKG_USE_FC:-0}"
-
# @ECLASS-VARIABLE: MPI_PKG_USE_ROMIO
# @DESCRIPTION: Require a mpi implementation with romio enabled.
# This feature requires EAPI 2 style use dependencies
MPI_PKG_USE_ROMIO="${MPI_PKG_USE_ROMIO:-0}"
+# @ECLASS-VARIABLE: MPI_PKG_USE_THREADS
+# @DESCRIPTION: Require a mpi implementation with threads enabled.
+# This feature requires EAPI 2 style use dependencies
+MPI_PKG_USE_THREADS="${MPI_PKG_USE_THREADS:-0}"
+
+# @ECLASS-VARIABLE: MPI_PKG_USE_DEPS
+# @DESCRIPTION: Set the use deps for the virtual mpi package
+# directly. For instance, if set to 'fortran=,threads?' then a dep on
+# virtual/mpi[fortran=,threads?] will be added.
+# This feature requires EAPI 2 style use dependencies
+MPI_PKG_USE_DEPS="${MPI_PKG_USE_DEPS}"
+
# @FUNCTION: mpi_pkg_deplist
# @USAGE:
@@ -265,13 +276,17 @@ mpi_pkg_deplist() {
local pn pn2 ver usedeps invalid_imps inval
case "${EAPI}" in
- 2|3|4)
+ 2|3|4|5)
[[ ${MPI_PKG_USE_CXX} -ne 0 ]] \
&& usedeps=",cxx"
[[ ${MPI_PKG_USE_FC} -ne 0 ]] \
- && usedeps="${use_deps},fortran"
+ && usedeps="${usedeps},fortran"
[[ ${MPI_PKG_USE_ROMIO} -ne 0 ]] \
- && usedeps="${use_deps},romio"
+ && usedeps="${usedeps},romio"
+ [[ "${MPI_PKG_USE_THREADS}" -ne 0 ]] \
+ && usedeps="${usedeps},threads"
+ [ -n "${MPI_PKG_USE_DEPS}" ] \
+ && usedeps="${usedeps},${MPI_PKG_USE_DEPS}"
;;
*)
;;