From fcf17aaf6696c327d50c08641bf121cf615eaccc Mon Sep 17 00:00:00 2001 From: Michael Gilroy Date: Wed, 5 Jul 2017 06:00:49 +0000 Subject: new mpi_wrapper for env variables and make.conf probe --- eclass/mpi-select-r1.eclass | 11 +++++++++-- eclass/mpi-select.eclass | 18 ++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/eclass/mpi-select-r1.eclass b/eclass/mpi-select-r1.eclass index 76a4c5b..12e7105 100644 --- a/eclass/mpi-select-r1.eclass +++ b/eclass/mpi-select-r1.eclass @@ -59,8 +59,6 @@ mpi_foreach_implementation() local status=0 - export BUILD_DIR="${PF}-${ABI}" - for implementation in "${@}" do # iterate through implementations, repeat same commands for each variant @@ -92,6 +90,15 @@ mpi_foreach_implementation() echo "${status}" } +mpi_wrapper() +{ + export BUILD_DIR="${PF}-${ABI}" + + impl="$(grep -R MPI_TARGETS* /etc/portage/make.conf* | cut -d '\"' -f2)" + + echo ${impl} +} + mpi-select_get_implementation() { echo "${PN}" diff --git a/eclass/mpi-select.eclass b/eclass/mpi-select.eclass index 3083505..0584542 100644 --- a/eclass/mpi-select.eclass +++ b/eclass/mpi-select.eclass @@ -6,6 +6,8 @@ # Michael Gilroy # @BLURB: Allow mpi software to select mpi implementation of choice. +inherit multilib + EXPORT_FUNCTIONS src_configure src_compile src_test src_install case ${EAPI:-0} in @@ -88,6 +90,14 @@ mpi_foreach_implementation() echo "${status}" } +mpi_wrapper() +{ + export BUILD_DIR="${PF}-${ABI}" + + impl="$(grep -R MPI_TARGETS* /etc/portage/make.conf* | cut -d '\"' -f2)" + echo ${impl} +} + # TODO: write src_configure/compile/test/ mpi-select_src_configure() { @@ -105,7 +115,7 @@ mpi-select_src_configure() popd > /dev/null || die } - mpi_foreach_implementation mpi-select_abi_src_configure + mpi_foreach_implementation mpi_wrapper mpi-select_abi_src_configure } mpi-select_src_compile() @@ -124,7 +134,7 @@ mpi-select_src_compile() popd > /dev/null || die } - mpi_foreach_implementation mpi-select_abi_src_compile + mpi_foreach_implementation mpi_wrapper mpi-select_abi_src_compile } mpi-select_src_test() @@ -143,7 +153,7 @@ mpi-select_src_test() popd > /dev/null || die } - mpi_foreach_implementation mpi-select_abi_src_test + mpi_foreach_implementation mpi_wrapper mpi-select_abi_src_test } mpi-select_src_install() @@ -161,5 +171,5 @@ mpi-select_src_install() fi popd > /dev/null || die } - mpi_foreach_implementation mpi-select_abi_src_install + mpi_foreach_implementation mpi-wrapper mpi-select_abi_src_install } -- cgit v1.2.3-65-gdbad