diff options
author | MichaelJGilroy <michael.gilroy24@gmail.com> | 2017-06-14 21:32:20 -0600 |
---|---|---|
committer | MichaelJGilroy <michael.gilroy24@gmail.com> | 2017-06-14 21:32:20 -0600 |
commit | 71a1408dfc631aeb240dbb0fe56fc806fc5d518d (patch) | |
tree | ce5c61ec1d0da72c8b6811b7b4b18e17bd9ff820 | |
parent | fixed mv issues with docs (diff) | |
download | gentoo-mpi-71a1408dfc631aeb240dbb0fe56fc806fc5d518d.tar.gz gentoo-mpi-71a1408dfc631aeb240dbb0fe56fc806fc5d518d.tar.bz2 gentoo-mpi-71a1408dfc631aeb240dbb0fe56fc806fc5d518d.zip |
exporting functions
-rw-r--r-- | eclass/mpi-select.eclass | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/eclass/mpi-select.eclass b/eclass/mpi-select.eclass index 49d2ef9..4dfa8d3 100644 --- a/eclass/mpi-select.eclass +++ b/eclass/mpi-select.eclass @@ -6,6 +6,8 @@ # Michael Gilroy <michael.gilroy24@gmail.com> # @BLURB: Allow mpi software to select mpi implementation of choice. +EXPORT_FUNCTIONS src_configure src_compile src_test src_install + case ${EAPI:-0} in 6) ;; 5) ;; @@ -18,19 +20,20 @@ esac # List of used MPI implementation IMPLEMENTATION_LIST="mpich mpich2 openmpi openib-mvapich2" -# @ECLASS-VARIABLE: INSTALLED_IMPLEMENTATIONS +# @ECLASS-VARIABLE: MPI_DIR # @INTERNAL # @DESCRIPTION: -# To be populated by mpi-select_detect_installs -INSTALLED_IMPLEMENTATIONS="" +# Location in which mpi software should be installed +MPI_DIR="/usr/$(get_libdir)/mpi" # @ECLASS-FUNCTION: mpi-select_implementation_install # @DESCRIPTION: # Install MPI software with arbitrary implementations mpi-select_implementation_install (){ + local installed=mpi-select_detect_installs for implementation in "$@" do - if [[ "${IMPLEMENTATION_LIST}" == *"${implementation}"* ]]; then + if [[ "${installed}" == *"${implementation}"* ]]; then # go through src_[phase] else die "invalid implementation" @@ -41,5 +44,26 @@ mpi-select_implementation_install (){ # @DESCRIPTION: # See what MPI software is installed on the system mpi-select_detect_installs (){ - # iterate through /usr/lib/mpi to populate INSTALLED_IMPLEMENTATIONS + for dir in "${MPI_DIR}"/* + do + INSTALLED_IMPLEMENTATIONS="${INSTALLED_IMPLEMENTATIONS} ${dir}" + done + + echo "${INSTALLED_IMPLEMENTATIONS}" +} + +mpi-select_src_configure (){ + default +} + +mpi-select_src_compile (){ + default +} + +mpi-select_src_test (){ + default +} + +mpi-select_src_install (){ + default } |