aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gilroy <michael.gilroy24@gmail.com>2017-07-19 15:35:37 -0600
committerMichael Gilroy <michael.gilroy24@gmail.com>2017-07-19 15:35:37 -0600
commit40bcf005142f4320b367abcdff61c53dcb1fd711 (patch)
tree6d752bca74975699d6492c2be834d531742d88f9
parenterror fixes in mpi-select (diff)
downloadgentoo-mpi-40bcf005142f4320b367abcdff61c53dcb1fd711.tar.gz
gentoo-mpi-40bcf005142f4320b367abcdff61c53dcb1fd711.tar.bz2
gentoo-mpi-40bcf005142f4320b367abcdff61c53dcb1fd711.zip
added mpi.eclass functions to mpi-select
-rw-r--r--eclass/mpi-select.eclass31
1 files changed, 31 insertions, 0 deletions
diff --git a/eclass/mpi-select.eclass b/eclass/mpi-select.eclass
index 3c58dcd..c3c8267 100644
--- a/eclass/mpi-select.eclass
+++ b/eclass/mpi-select.eclass
@@ -40,6 +40,37 @@ MPI_DIR="/usr/$(get_libdir)/mpi"
# List of implementations in make.conf.
MPI_TARGETS="${MPI_TARGETS}"
+# @FUNCTION : mpi_pkg_cc
+# @DESCRIPTION :
+# Get location of C compiler from /usr/
+mpi_pkg_cc()
+{
+ mpi_pkg_compiler "MPI_CC" "cc"
+}
+
+# @FUNCTION: mpi_pkg_compiler
+# @DESCRIPTION :
+# Return /usr/bin/mpi/$PN
+mpi_pkg_compiler
+{
+ local suffixes="${2}"
+
+ for p in ${suffixes}; do
+ if [ -x ${ROOT}usr/bin/mpi${PN} ]; then
+ echo "${ROOT}usr/bin/mpi${PN}"
+ break
+ fi
+ done
+}
+
+# @FUNCTION: mpi_root
+# @DESCRIPTION:
+# Return installation root
+mpi_root()
+{
+ echo "/usr/$(get_libdir)/mpi/${PN}"
+}
+
# @ECLASS-FUNCTION: mpi-select_detect_installs
# @DESCRIPTION:
# See what MPI software is installed on the system