aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny van Dyk <kugelfang@gentoo.org>2005-04-08 01:56:30 +0000
committerDanny van Dyk <kugelfang@gentoo.org>2005-04-08 01:56:30 +0000
commit20a05f3f1a2c4258470936af11047aaa6059af91 (patch)
tree67e2f675481901d3982421085dd9731b482da362 /modules
parentAdded a rudimental manpage. (diff)
downloadeselect-20a05f3f1a2c4258470936af11047aaa6059af91.tar.gz
eselect-20a05f3f1a2c4258470936af11047aaa6059af91.tar.bz2
eselect-20a05f3f1a2c4258470936af11047aaa6059af91.zip
Small changes to blas.eclectic's output. Added a manpage for the blas module.
svn path=/trunk/; revision=17
Diffstat (limited to 'modules')
-rw-r--r--modules/blas.eclectic34
1 files changed, 29 insertions, 5 deletions
diff --git a/modules/blas.eclectic b/modules/blas.eclectic
index c4070d4..2838188 100644
--- a/modules/blas.eclectic
+++ b/modules/blas.eclectic
@@ -34,6 +34,18 @@ check_reference() {
echo "${ret}"
}
+# package $impl
+# Prints the name of the package providing $impl
+package() {
+ case ${1} in
+ ACML) echo "sci-libs/ACML";;
+ ATLAS) echo "sci-libs/blas-atlas";;
+ MKL) echo "sci-libs/mkl";;
+ reference) echo "sci-libs/blas-reference";;
+ *) ;;
+ esac
+}
+
# is_active_* $lib
# return 0 if $lib points to an active BLAS implementation of profile *
is_active_ACML() {
@@ -53,6 +65,12 @@ is_active_ATLAS() {
return 1
}
+is_active_MKL() {
+ [[ -L ${1} ]] || return 1
+ local lib=$(/bin/readlink -sn ${1})
+
+}
+
is_active_reference() {
[[ -L ${1} ]] || return 1
local lib=$(/bin/readlink -sn ${1})
@@ -115,18 +133,24 @@ do_list() {
|| libdirs="$@"
for libdir in ${libdirs} ; do
- C_PROFILES=$(load_config blas C_${libdir})
- F77_PROFILES=$(load_config blas F77_${libdir})
+ C_PROFILES=()
+ for x in $(load_config blas C_${libdir}) ; do
+ C_PROFILES=("${C_PROFILES[@]}" "${x}\t($(package ${x}))")
+ done
+ F77_PROFILES=()
+ for x in $(load_config blas F77_${libdir}) ; do
+ F77_PROFILES=("${F77_PROFILES[@]}" "${x}\t($(package ${x}))")
+ done
if [[ -n ${C_PROFILES} ]] || [[ -n ${F77_PROFILES} ]] ; then
echo "--- Installed in ${ROOT}/usr/${libdir} ---"
if [[ -n ${C_PROFILES} ]] ; then
write_list_start "C/C++ profiles"
- write_numbered_list ${C_PROFILES}
+ write_numbered_list ${C_PROFILES[@]}
echo
fi
if [[ -n ${F77_PROFILES} ]] ; then
write_list_start "FORTRAN 77 profiles"
- write_numbered_list ${F77_PROFILES}
+ write_numbered_list ${F77_PROFILES[@]}
echo
fi
fi
@@ -190,7 +214,7 @@ do_show() {
impl=$(load_config blas "${prof}_${libdir}_CURRENT")
[[ -z ${impl} ]] && die -q "Configuration file is broken. Please run update."
if is_active_${impl} ${ROOT}/usr/${libdir}/${lib} ; then
- echo -e "${myprefix}\tActive BLAS is ${impl}."
+ echo -e "${myprefix}\tActive BLAS is ${impl} ($(package ${impl}))."
else
die -q "Configuration file is out of date. Please run update."
fi