diff options
author | Michael Gilroy <michael.gilroy24@gmail.com> | 2017-07-05 06:00:49 +0000 |
---|---|---|
committer | Michael Gilroy <michael.gilroy24@gmail.com> | 2017-07-05 06:00:49 +0000 |
commit | fcf17aaf6696c327d50c08641bf121cf615eaccc (patch) | |
tree | 5b078c75ec1a1b78d7a2cbd087342193a1611a92 | |
parent | exporting BUILD_DIR per implementation (diff) | |
download | gentoo-mpi-fcf17aaf6696c327d50c08641bf121cf615eaccc.tar.gz gentoo-mpi-fcf17aaf6696c327d50c08641bf121cf615eaccc.tar.bz2 gentoo-mpi-fcf17aaf6696c327d50c08641bf121cf615eaccc.zip |
new mpi_wrapper for env variables and make.conf probe
-rw-r--r-- | eclass/mpi-select-r1.eclass | 11 | ||||
-rw-r--r-- | 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 <michael.gilroy24@gmail.com> # @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 } |