aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb>2009-01-14 02:15:21 +0000
committerjsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb>2009-01-14 02:15:21 +0000
commit82d8c8febd94f7eecfe09a06270b50f6f97ec9f6 (patch)
tree89d3e3624809203c3d71e756322fa33c9c12eda7
parentFinite state toolkit foma. Initial ebuild. (diff)
downloadsci-82d8c8febd94f7eecfe09a06270b50f6f97ec9f6.tar.gz
sci-82d8c8febd94f7eecfe09a06270b50f6f97ec9f6.tar.bz2
sci-82d8c8febd94f7eecfe09a06270b50f6f97ec9f6.zip
Update mpi.eclass. Major changes include simplyfing use and allowing non empi builds to still get some information. Also updated all related packages using this eclass.
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1367 32389bae-6d03-0410-99cf-db05cde120eb
-rw-r--r--app-admin/eselect-mpi/ChangeLog11
-rw-r--r--app-admin/eselect-mpi/Manifest8
-rw-r--r--app-admin/eselect-mpi/eselect-mpi-0.0.3-r1.ebuild31
-rw-r--r--app-admin/eselect-mpi/eselect-mpi-0.0.3.ebuild23
-rw-r--r--app-admin/eselect-mpi/eselect-mpi-0.0.5.ebuild (renamed from app-admin/eselect-mpi/eselect-mpi-0.0.4.ebuild)2
-rw-r--r--app-admin/eselect-mpi/files/eselect.mpi-0.0.5 (renamed from app-admin/eselect-mpi/files/mpi.eselect-0.0.4)84
-rw-r--r--app-admin/eselect-mpi/files/mpi.eselect-0.0.3249
-rw-r--r--eclass/mpi.eclass636
-rw-r--r--sys-cluster/empi/ChangeLog12
-rw-r--r--sys-cluster/empi/Manifest12
-rw-r--r--sys-cluster/empi/empi-0.1.ebuild19
-rw-r--r--sys-cluster/empi/empi-0.2.ebuild27
-rw-r--r--sys-cluster/empi/empi-0.3.ebuild27
-rw-r--r--sys-cluster/empi/empi-0.4.ebuild25
-rw-r--r--sys-cluster/empi/empi-0.5.ebuild (renamed from sys-cluster/empi/empi-0.4-r1.ebuild)4
-rwxr-xr-xsys-cluster/empi/files/empi326
-rw-r--r--sys-cluster/empi/files/empi-0.2.patch110
-rw-r--r--sys-cluster/empi/files/empi-0.3.patch223
-rwxr-xr-xsys-cluster/empi/files/empi-0.5 (renamed from sys-cluster/empi/files/empi-0.4)132
-rw-r--r--sys-cluster/hpl/ChangeLog49
-rw-r--r--sys-cluster/hpl/Manifest3
-rw-r--r--sys-cluster/hpl/hpl-1.0-r3.ebuild13
-rw-r--r--sys-cluster/lam-mpi/Manifest4
-rw-r--r--sys-cluster/lam-mpi/files/eselect.mpi.lam-mpi14
-rw-r--r--sys-cluster/lam-mpi/lam-mpi-7.1.4-r1.ebuild34
-rw-r--r--sys-cluster/mpe2/Manifest2
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild66
-rw-r--r--sys-cluster/mpich2/Manifest6
-rw-r--r--sys-cluster/mpich2/files/eselect.mpi.mpich216
-rw-r--r--sys-cluster/mpich2/files/mpich2.envd2
-rw-r--r--sys-cluster/mpich2/mpich2-1.0.8.ebuild77
-rw-r--r--sys-cluster/openib-mvapich2/Manifest2
-rw-r--r--sys-cluster/openib-mvapich2/openib-mvapich2-1.0.1-r1.ebuild29
-rw-r--r--sys-cluster/openmpi/Manifest6
-rw-r--r--sys-cluster/openmpi/files/eselect.mpi.openmpi16
-rw-r--r--sys-cluster/openmpi/openmpi-1.2.7-r2.ebuild111
-rw-r--r--sys-cluster/openmpi/openmpi-1.2.8.ebuild38
37 files changed, 571 insertions, 1878 deletions
diff --git a/app-admin/eselect-mpi/ChangeLog b/app-admin/eselect-mpi/ChangeLog
deleted file mode 100644
index c13bd7e73..000000000
--- a/app-admin/eselect-mpi/ChangeLog
+++ /dev/null
@@ -1,11 +0,0 @@
-# ChangeLog for app-admin/eselect-mpi
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: $
-
- 01 Apr 2008; Justin Bronder <jsbronder@gentoo.org> ChangeLog:
- Remove old versions. Add support for both sh and csh style shells. Remove
- old versions (0.0.1, 0.0.2).
-
- 29 Feb 2008; Justin Bronder <jsbronder@gentoo.org> ChangeLog:
- Initial import
-
diff --git a/app-admin/eselect-mpi/Manifest b/app-admin/eselect-mpi/Manifest
index 1039c8c58..a022873a2 100644
--- a/app-admin/eselect-mpi/Manifest
+++ b/app-admin/eselect-mpi/Manifest
@@ -1,8 +1,4 @@
+AUX eselect.mpi-0.0.5 6313 RMD160 0746fc0326ab6690521118807e74db6c08b88109 SHA1 9369ca84ef6f491702c5b306f720ae1a256e313d SHA256 d81a2cff73f4b09c88a96a8adaba43380a77f9cc428d6d3f5f56c8bc39d4652e
AUX mpi.csh 105 RMD160 6f5d66e3ba735857bcc4602d557b6506accebcb2 SHA1 b3dcaa750a0d0b534624bf5000939326c654b88f SHA256 ee93756d2cb8b1f41775d786c408b38bf4502700c63f51604b0011fda9947b4e
-AUX mpi.eselect-0.0.3 6686 RMD160 bf322c55ffe26e35c9bda9e8705cc38bd23341dc SHA1 40d5e3f438a26a0b6c7ccc780a64ef6a6b209697 SHA256 9a68894b5535376688373f5b4a1450bf437e68e3950f0e77c7b44d3fdf4eac78
-AUX mpi.eselect-0.0.4 6432 RMD160 09740bcec922c14c8a06eb8afc83ad8c849d5d49 SHA1 f6f82d26a2ec191f2306c20e0a79239ddd80b30b SHA256 e08c95043d260092dff89d2220319b09885bb9e2c1629beb5f01550fb2955c8f
AUX mpi.sh 101 RMD160 aca45809ad649cdfa2cd43d21848ad049a9a262d SHA1 07877c648c103af7e8f13e27361e50592a77380d SHA256 d55162bdc58d24f77b9eca0a7a45cc0b32834513c3f94ca4caa8b28085eab354
-EBUILD eselect-mpi-0.0.3-r1.ebuild 762 RMD160 d09ee6bb35f6ee5f74d5dc38bf7b1dfe79602d41 SHA1 e6e800bf7bb8aa90f7bf9b881de5f6eb3a04598f SHA256 88315bef38a149b4be110e7bb8021e6226987fc704a5759100c4dcc5fa4e2b6a
-EBUILD eselect-mpi-0.0.3.ebuild 503 RMD160 b9bbe6d8b994948ed9f40945dd09b5e6a3264d4a SHA1 979fca1a9cc901798a38d84d2259e41d2d209f33 SHA256 1c00f8dbc1b83d0958179c0a7e86e32d1f06e1631b10a3fb0ab31c66308a4b92
-EBUILD eselect-mpi-0.0.4.ebuild 571 RMD160 7b02bf6c2037c328cdcbfc9b727bedb4a0cd5db8 SHA1 2c45b54b3114f709554ece171d5513d9a175f018 SHA256 4503bfeed8c2517293c59b5edc2e2c4a285ce1fa22273becace8fb1ae0c7d363
-MISC ChangeLog 378 RMD160 5df435e9f2ff9409dba31cd7e645fc794cdb7adf SHA1 aad5a2ad8e4bdfc3053c889ac08844675b5e04b6 SHA256 380c32841c8371e4f3ed025cdd0c6ffab9c56fe71871f059fbd4bac7f4bd32d8
+EBUILD eselect-mpi-0.0.5.ebuild 571 RMD160 58a3ae9771b59949a3a4890f104da97f4df6ad15 SHA1 652c7e4856f993e76b2650284bf03c9ac19d3ac5 SHA256 1bd5f43a15552c4c80f7c635a7ed0bb5d60bf258fa8d6b3e3e9d1de617bf176f
diff --git a/app-admin/eselect-mpi/eselect-mpi-0.0.3-r1.ebuild b/app-admin/eselect-mpi/eselect-mpi-0.0.3-r1.ebuild
deleted file mode 100644
index 5b6f8ca00..000000000
--- a/app-admin/eselect-mpi/eselect-mpi-0.0.3-r1.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-DESCRIPTION="eselect-mpi"
-HOMEPAGE="http://www.gentoo.org/proj/en/eselect/"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-DEPEND="app-admin/eselect"
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- MODULEDIR="/usr/share/eselect/modules"
- MODULE="mpi"
- mkdir -p "${S}"
- cp "${FILESDIR}"/${MODULE}.eselect-${PV} "${S}"/
- # Thanks to Bryan Green, bug #226105
- sed -i 's:\(setenv ESELECT_MPI_IMP\)=\(.*\):\1 \2:' "${S}/${MODULE}.eselect-${PV}"
- sed -i 's:\(setenv PATH\)=\(.*\):\1\2:' "${S}/${MODULE}.eselect-${PV}"
-}
-
-src_install() {
- dodir ${MODULEDIR}
- insinto ${MODULEDIR}
- newins "${S}"/${MODULE}.eselect-${PV} ${MODULE}.eselect
-}
diff --git a/app-admin/eselect-mpi/eselect-mpi-0.0.3.ebuild b/app-admin/eselect-mpi/eselect-mpi-0.0.3.ebuild
deleted file mode 100644
index dd8660dde..000000000
--- a/app-admin/eselect-mpi/eselect-mpi-0.0.3.ebuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-DESCRIPTION="eselect-mpi"
-HOMEPAGE="http://www.gentoo.org/proj/en/eselect/"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-
-DEPEND="app-admin/eselect"
-RDEPEND="${DEPEND}"
-
-src_install() {
- local MODULEDIR="/usr/share/eselect/modules"
- local MODULE="mpi"
- dodir ${MODULEDIR}
- insinto ${MODULEDIR}
- newins "${FILESDIR}"/${MODULE}.eselect-${PVR} ${MODULE}.eselect
-}
diff --git a/app-admin/eselect-mpi/eselect-mpi-0.0.4.ebuild b/app-admin/eselect-mpi/eselect-mpi-0.0.5.ebuild
index a71421c8d..b601701e3 100644
--- a/app-admin/eselect-mpi/eselect-mpi-0.0.4.ebuild
+++ b/app-admin/eselect-mpi/eselect-mpi-0.0.5.ebuild
@@ -19,7 +19,7 @@ src_install() {
MODULE="mpi"
dodir ${MODULEDIR}
insinto ${MODULEDIR}
- newins "${FILESDIR}"/${MODULE}.eselect-${PV} ${MODULE}.eselect
+ newins "${FILESDIR}"/eselect.${MODULE}-${PV} ${MODULE}.eselect
exeinto /etc/profile.d
doexe "${FILESDIR}"/mpi.csh
doexe "${FILESDIR}"/mpi.sh
diff --git a/app-admin/eselect-mpi/files/mpi.eselect-0.0.4 b/app-admin/eselect-mpi/files/eselect.mpi-0.0.5
index 64303ee9b..e7fafd284 100644
--- a/app-admin/eselect-mpi/files/mpi.eselect-0.0.4
+++ b/app-admin/eselect-mpi/files/eselect.mpi-0.0.5
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Id: $
-DESCRIPTION="Manage MPI implementations"
+DESCRIPTION="Manage MPI classes"
MAINTAINER="jsbronder@gentoo.org"
SVN_DATE='$Date: $'
VERSION="0.0.2"
@@ -19,22 +19,22 @@ inherit path-manipulation config
# If you can think of a better way to do this, while still allowing user's
# freedom, please let me know.
-# List the valid mpi implementations currently installed.
-find_implementations() {
- local imps
+# List the valid mpi classes currently installed.
+find_classes() {
+ local classes
for f in ${ROOT}/etc/env.d/mpi/*; do
[[ -f ${f} ]] || continue
f=$(basename ${f})
[[ "${f#mpi-}" == "${f}" ]] && continue
- imps=(${imps[@]} ${f})
+ classes=(${classes[@]} ${f})
done
- echo ${imps[@]}
+ echo ${classes[@]}
}
-# User's current environment has the implementation configured in it.
+# User's current environment has the class configured in it.
is_in_use() { [ "${ESELECT_MPI_IMP}" == "${1}" ]; }
-# User's env file is ready for sourcing for this implementation.
+# User's env file is ready for sourcing for this class
is_enabled() {
[ "$(var_from_user_envd ESELECT_MPI_IMP)" == "${1}" ]
}
@@ -44,10 +44,10 @@ var_from_user_envd(){
echo "$(source ${user_ev_sh}; echo ${!1})"
}
-# Is this a valid implementation?
-is_implementation() {
- local imps=$(find_implementations)
- for i in ${imps[@]}; do
+# Is this a valid class?
+is_class() {
+ local classes=$(find_classes)
+ for i in ${classes[@]}; do
[[ "${i}" == "${1}" ]] && return 0
done
return 1
@@ -78,14 +78,14 @@ global_env() {
}
clean_var() {
- local imp v
+ local class v
local value="${!1}"
- local d="$(canonicalise "${ROOT}/etc/env.d/mpi/${imp}")"
+ local d="$(canonicalise "${ROOT}/etc/env.d/mpi/${class}")"
[ -z "${value}" ] && return 0
[ -z "${d}" ] && continue
- for imp in $(find_implementations); do
- v=$(load_config ${d}/${imp} ${1})
+ for class in $(find_classes); do
+ v=$(load_config ${d}/${class} ${1})
[ -z "${v}" ] && continue
value="$(echo ${value} | sed -e "s|${v}:||g")"
done
@@ -95,26 +95,26 @@ clean_var() {
### list action ###
-describe_list() { echo "List available implementations"; }
+describe_list() { echo "List available classs"; }
describe_list_parameters() { echo "[-p]"; }
do_list() {
- imps=( $(find_implementations) )
+ classes=( $(find_classes) )
init
if [[ ${@} == *-p* ]]; then
- echo "${imps[@]}"
+ echo "${classes[@]}"
else
- write_list_start "Available MPI implementations:"
- if [[ -n "${imps[@]}" ]]; then
- for (( i=0; i<${#imps[@]}; i++ )); do
- if is_in_use ${imps[$i]} && is_enabled ${imps[$i]}; then
- write_kv_list_entry "${imps[$i]}" "Enabled, In Use"
- elif is_in_use ${imps[$i]}; then
- write_kv_list_entry "${imps[$i]}" "In Use"
- elif is_enabled ${imps[$i]}; then
- write_kv_list_entry "${imps[$i]}" "Enabled"
+ write_list_start "Available MPI classs:"
+ if [[ -n "${classes[@]}" ]]; then
+ for (( i=0; i<${#classes[@]}; i++ )); do
+ if is_in_use ${classes[$i]} && is_enabled ${classes[$i]}; then
+ write_kv_list_entry "${classes[$i]}" "Enabled, In Use"
+ elif is_in_use ${classes[$i]}; then
+ write_kv_list_entry "${classes[$i]}" "In Use"
+ elif is_enabled ${classes[$i]}; then
+ write_kv_list_entry "${classes[$i]}" "Enabled"
else
- write_kv_list_entry "${imps[$i]}" "--"
+ write_kv_list_entry "${classes[$i]}" "--"
fi
done
else
@@ -128,7 +128,7 @@ do_list() {
### set action ###
describe_set() {
- echo "Select a MPI implementation."
+ echo "Select a MPI class."
}
describe_set_parameters() {
@@ -141,9 +141,9 @@ do_set() {
init
global_env ${1}
- [[ -z ${1} ]] && die -q "You didnt specifiy any implementation for use."
- [[ ${#@} -ne 1 ]] && die -q "You may only select exactly one implementation."
- ! is_implementation ${1} && die -q "${1} is not an implementation."
+ [[ -z ${1} ]] && die -q "You didnt specifiy any class for use."
+ [[ ${#@} -ne 1 ]] && die -q "You may only select exactly one class."
+ ! is_class ${1} && die -q "${1} is not an class."
is_enabled ${1} && return 0
binpath="$(load_config ${ev} PATH):$(clean_var PATH)"
@@ -185,7 +185,7 @@ do_unset() {
### add action (from skel pretty much)
describe_add() {
- echo "Add a new mpi implementation"
+ echo "Add a new mpi class"
}
describe_add_parameters() {
@@ -193,9 +193,9 @@ describe_add_parameters() {
}
do_add() {
- local imp
+ local class
[[ ${#@} -ne 1 ]] \
- && die -q "Bad arguments, use: mpi add /some/full/path/<implementation>.eselect"
+ && die -q "Bad arguments, use: mpi add /some/full/path/<class>.eselect"
# If $D is set, we're adding from portage so we want to respect sandbox.
# Otherwise, respect the ROOT variable.
@@ -210,21 +210,21 @@ do_add() {
fi
fi
- imp=$(basename ${1}); imp=${imp%.eselect}
- if ! cp ${1} ${PREFIX}/etc/env.d/mpi/${imp}; then
- die -q "Installing ${1} as ${PREFIX}/etc/env.d/mpi/${imp} failed!"
+ class=$(basename ${1}); class=${class%.eselect}
+ if ! cp ${1} ${PREFIX}/etc/env.d/mpi/${class}; then
+ die -q "Installing ${1} as ${PREFIX}/etc/env.d/mpi/${class} failed!"
fi
}
### printvar action ###
describe_printvar() { echo "Print variables stored in global env.d file."; }
-describe_printvar_parameters() { echo "<implementation> <variable>"; }
+describe_printvar_parameters() { echo "<class> <variable>"; }
do_printvar() {
if [[ ${#@} -ne 2 ]] \
- || ! is_implementation ${1}; then
- die -q "Specify exactly 1 implementation and 1 variable."
+ || ! is_class ${1}; then
+ die -q "Specify exactly 1 class and 1 variable."
fi
global_env ${1}
echo "$(load_config ${ev} ${2})"
diff --git a/app-admin/eselect-mpi/files/mpi.eselect-0.0.3 b/app-admin/eselect-mpi/files/mpi.eselect-0.0.3
deleted file mode 100644
index 349d2471e..000000000
--- a/app-admin/eselect-mpi/files/mpi.eselect-0.0.3
+++ /dev/null
@@ -1,249 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id: $
-
-DESCRIPTION="Manage MPI implementations"
-MAINTAINER="jsbronder@gentoo.org"
-SVN_DATE='$Date: $'
-VERSION="0.0.2"
-
-inherit path-manipulation config
-
-# The basic idea is we want to allow every use to select their own mpi
-# implementation they want, and a ${HOME}/.env.d/mpi file is created for them.
-# A user then is -required- to source the env file. This sets PATH, MANPATH,
-# and LD_LIBRARY_PATH. I'm sure I'm forgetting something here.
-# Calling unset only wipes out the env file, replacing it with what we
-# previously added stripped out.
-
-# If you can think of a better way to do this, while still allowing user's
-# freedom, please let me know.
-
-# List the valid mpi implementations currently installed.
-find_implementations() {
- local imps
- for f in ${ROOT}/etc/env.d/mpi/*; do
- [[ -f ${f} ]] || continue
- f=$(basename ${f})
- [[ "${f#mpi-}" == "${f}" ]] && continue
- imps=(${imps[@]} ${f})
- done
- echo ${imps[@]}
-}
-
-# User's current environment has the implementation configured in it.
-is_in_use() { [ "${ESELECT_MPI_IMP}" == "${1}" ]; }
-
-# User's env file is ready for sourcing for this implementation.
-is_enabled() {
- [ "$(var_from_user_envd ESELECT_MPI_IMP)" == "${1}" ]
-}
-
-var_from_user_envd(){
- [ ! -f ${user_ev_sh} ] && return 0
- echo "$(source ${user_ev_sh}; echo ${!1})"
-}
-
-# Is this a valid implementation?
-is_implementation() {
- local imps=$(find_implementations)
- for i in ${imps[@]}; do
- [[ "${i}" == "${1}" ]] && return 0
- done
- return 1
-}
-
-init() {
- local d
- [[ ${UID} -eq 0 ]] && HOME="${ROOT}/root"
- d="$(canonicalise "${ROOT}/${HOME}")"
- d="${d}/.env.d/"
- user_ev_sh="${d}mpi.sh";
- user_ev_csh="${d}mpi.csh";
-
- if [[ ! -d "${d}" ]]; then
- mkdir "${d}" || die -q "Failed to create ${d}."
- elif [[ ! -w "${d}" ]]; then
- die -q "You do not have permission to mkdir ${d}."
- fi
- [[ -f "${user_ev_sh}" && ! -w "${user_ev_sh}" \
- && -f "${user_ev_csh}" && ! -w "${user_ev_csh}" ]] \
- && die -q "You do not have permission to write to ${user_ev_sh} or ${user_ev_csh}."
-}
-
-global_env() {
- local d=$(canonicalise "${ROOT}/etc/env.d/mpi/${1}")
- [ -z "${d}" ] && die "Cannot find global env file for ${1}"
- ev=${d}
-}
-
-clean_var() {
- local imp v
- local value="${!1}"
- local d="$(canonicalise "${ROOT}/etc/env.d/mpi/${imp}")"
- [ -z "${value}" ] && return 0
- [ -z "${d}" ] && continue
-
- for imp in $(find_implementations); do
- v=$(load_config ${d}/${imp} ${1})
- [ -z "${v}" ] && continue
- value="$(echo ${value} | sed -e "s|${v}:||g")"
- done
- echo ${value}
-}
-
-
-### list action ###
-
-describe_list() { echo "List available implementations"; }
-describe_list_parameters() { echo "[-p]"; }
-
-do_list() {
- imps=( $(find_implementations) )
- init
- if [[ ${@} == *-p* ]]; then
- echo "${imps[@]}"
- else
- write_list_start "Available MPI implementations:"
- if [[ -n "${imps[@]}" ]]; then
- for (( i=0; i<${#imps[@]}; i++ )); do
- if is_in_use ${imps[$i]} && is_enabled ${imps[$i]}; then
- write_kv_list_entry "${imps[$i]}" "Enabled, In Use"
- elif is_in_use ${imps[$i]}; then
- write_kv_list_entry "${imps[$i]}" "In Use"
- elif is_enabled ${imps[$i]}; then
- write_kv_list_entry "${imps[$i]}" "Enabled"
- else
- write_kv_list_entry "${imps[$i]}" "--"
- fi
- done
- else
- write_kv_list_entry "(none found)" ""
- fi
- fi
- return 0
-}
-
-
-### set action ###
-
-describe_set() {
- echo "Select a MPI implementation."
-}
-
-describe_set_parameters() {
- echo "<target>"
-}
-
-do_set() {
- local binpath lld manpath
-
- init
- global_env ${1}
-
- [[ -z ${1} ]] && die -q "You didnt specifiy any implementation for use."
- [[ ${#@} -ne 1 ]] && die -q "You may only select exactly one implementation."
- ! is_implementation ${1} && die -q "${1} is not an implementation."
- is_enabled ${1} && return 0
-
- binpath="$(load_config ${ev} PATH):$(clean_var PATH)"
- lld="$(load_config ${ev} LD_LIBRARY_PATH):$(clean_var LD_LIBRARY_PATH)"
- manpath="$(load_config ${ev} MANPATH):$(clean_var MANPATH)"
-
-cat <<-EOF >${user_ev_sh}
-export PATH="${binpath}"
-export MANPATH="${manpath}"
-export LD_LIBRARY_PATH="${lld}"
-export ESELECT_MPI_IMP="${1}"
-EOF
-
-cat <<-EOF >${user_ev_csh}
-setenv PATH "${binpath}"
-setenv MANPATH "${manpath}"
-setenv LD_LIBRARY_PATH "${lld}"
-setenv ESELECT_MPI_IMP="${1}"
-EOF
-
- echo "Remember to source ${user_ev_sh} or ${user_ev_csh}"
-}
-
-
-### unset action ###
-describe_unset() {
- echo "Restore MPI-less environment."
-}
-
-do_unset() {
- local binpath lld manpath
-
- init
-
- binpath="$(clean_var PATH)"
- lld="$(clean_var LD_LIBRARY_PATH)"
- manpath="$(clean_var MANPATH)"
-cat <<-EOF >${user_ev_sh}
-export PATH="${binpath}"
-export MANPATH="${manpath}"
-export LD_LIBRARY_PATH="${lld}"
-unset ESELECT_MPI_IMP
-EOF
-
-cat <<-EOF >${user_ev_csh}
-setenv PATH= ${binpath}"
-setenv MANPATH "${manpath}"
-setenv LD_LIBRARY_PATH ${lld}"
-setenv ESELECT_MPI_IMP ""
-EOF
-
- echo "Remember to source ${user_ev_sh} or ${user_ev_csh}"
-}
-
-### add action (from skel pretty much)
-describe_add() {
- echo "Add a new mpi implementation"
-}
-
-describe_add_parameters() {
- echo "<file>"
-}
-
-do_add() {
- local imp
- [[ ${#@} -ne 1 ]] \
- && die -q "Bad arguments, use: mpi add /some/full/path/<implementation>.eselect"
-
- # If $D is set, we're adding from portage so we want to respect sandbox.
- # Otherwise, respect the ROOT variable.
- local PREFIX=${D:-${ROOT}/}
-
- # Create directory if necessary
- if [[ ! -e ${PREFIX}/etc/env.d/mpi/ ]]; then
- mkdir -p ${PREFIX}/etc/env.d/mpi/
- else
- if [[ ! -d ${PREFIX}/etc/env.d/mpi/ ]]; then
- die -q "${PREFIX}/etc/env.d/mpi/ exists but isn't a directory!"
- fi
- fi
-
- imp=$(basename ${1}); imp=${imp%.eselect}
- if ! cp ${1} ${PREFIX}/etc/env.d/mpi/${imp}; then
- die -q "Installing ${1} as ${PREFIX}/etc/env.d/mpi/${imp} failed!"
- fi
-}
-
-
-### printvar action ###
-describe_printvar() { echo "Print variables stored in global env.d file."; }
-describe_printvar_parameters() { echo "<implementation> <variable>"; }
-
-do_printvar() {
- if [[ ${#@} -ne 2 ]] \
- || ! is_implementation ${1}; then
- die -q "Specify exactly 1 implementation and 1 variable."
- fi
- global_env ${1}
- echo "$(load_config ${ev} ${2})"
-}
-
-# vim: set ft=eselect :
-
diff --git a/eclass/mpi.eclass b/eclass/mpi.eclass
index 3692a0313..29d8629b1 100644
--- a/eclass/mpi.eclass
+++ b/eclass/mpi.eclass
@@ -2,351 +2,103 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-# Description: This eclass is used to allow for the separation of mpi
-# implementations and dependant programs/libraries in
-# /usr/lib/mpi/<implementation>.
-#
-# Author(s): Justin Bronder <jsbronder@gentoo.org>
-#
-# Basic idea is directly stolen from crossdev and hence really relies on using
-# sys-cluster/empi. EmergeMPI basically creates new categories, pulls in a
-# single MPI providing ebuild that uses this eclass and builds. This eclass
-# handles pushing the entire install to a save place, /usr/lib/mpi/<name>.
-# Packages that depend on MPI can also use this eclass to get installed to
-# the same place using the correct MPI implementation.
-
-# Currently only autotools-enabled packages are handled with any sort of
-# elegance, and dealing with the standard Makefile-style builds that
-# are typical in hpc probably can't be made much easier.
-
-# NOTE: If using this eclass to build an implementation, you need to define
-# MPI_ESELECT_FILE which is the path relative to FILESDIR where the eselect
-# definition file can be found.
-
-
-# FUNCTIONS, at least those that are worth caring about!
-
-# mpi_src_compile: For each implementation, set $S correctly and then run
-# through do_config and do_make. Finally restore $S
-
-# mpi_src_install: For each implementation, set $S correctly, run
-# do_make_install and restore $S.
-
-# mpi_pkg_deplist: Prints deps for mpi enabled packages. Basically if using
-# empi, then we dep on empi-enabled implementations,
-# otherwise, the dep is just on virtual/mpi
-
-# mpi_imp_deplist: Prints deps for mpi implementations. As empi guarantees
-# blockers cannot be installed at the same root, this deps
-# on eselect-mpi for empi builds. Otherwise, prints a list
-# of blockers (all other mpi implementations).
-
-# mpi_built_with: Get the ${PN} of the implementation that was used to get
-# mpicc etc.
-
-# get_mpi_dir: Given an implementation, returns the base directory to
-# that programs should install to. I.E. --prefix for
-# autoconf.
-
-# is_empi_build: Are we building with empi? [[ ${CATEGORY} == mpi-* ]] as
-# empi forces this just so we can do that.
-
-# FUNCTIONS, directly used by the above interesting ones.
-
-# mpi_set_env <imp>: For lack of a better name, just exports the following based
-# on the desired implementation: CC, CXX, F77, FC, PATH
-# Set $mpi_env to "mpi_none" to ensure that this function
-# is not called.
-
-# mpi_restore_env: Undo the above.
-
-# For the following functions and those that call them, I've used indirect
-# referencing to allow for a clean way to have both defaults and to allow
-# different actions to be taken per implementation. Preference is given first
-# to ${implementation}_${var}, then mpi_${var} and finally defaults will be
-# used. All variables also allow "mpi_none", which disables that action.
-#
-# *_conf_cmd: configure command, default: econf
-# *_conf_args: configure arguments, no default
-# HOWEVER, note that prefix, mandir, infodir and datadir are
-# set if ${S}/configure is executable. Pass "mpi_none" to
-# disable this.
-# *_make_cmd: make command, default emake
-# *_make_args: make arguments, no default
-# *_make_install_cmd: make install command, default emake
-# *_make_install_args: make install arguments, default 'DESTDIR=${D} install'
-
-
-
-# mpi_do_config: $S should be set correctly to some ${P}-${imp}. Changes to
-# that dir, calls mpi_set_env, $conf_cmd $conf_args, and
-# rcalls mpi_restore_env.
-
-# mpi_do_make: Same as above but for building.
-# mpi_do_make_install: Same as above but for installing.
-
-
-# Variables:
-# MPI_ESELECT_FILE: Name of the eselect file in ${FILESDIR}
-# MPI_NOEMPI_BLOCKERS: String of packages we should block against if not using
-# empi. See mpich2 and mpd.
-# MPI_EMPI_COMPAT: String of all base implementations that this package
-# works with. See __MPI_EMPI_COMPAT, this is a list of
-# [><=]${PN}-${PVR} put into DEPEND with ||.
-
-inherit multilib flag-o-matic
-
-__MPI_EMPI_COMPAT="
- >=openmpi-1.2.5-r1
- >=lam-mpi-7.1.4-r1
- >=openib-mvapich2-1.0.1-r1
- >=mpich2-1.0.8"
-MPI_ALL_IMPS="mpich mpich2 openmpi lam-mpi openib-mvapich2"
-
-MPI_EMPI_COMPAT="${MPI_EMPI_COMPAT:-${__MPI_EMPI_COMPAT}}"
-#TODO: doc
-mpi_pkg_deplist() {
- local i ver
- if [ -z "$(get_imp)" ]; then
- ver="virtual/mpi"
- for i in ${MPI_NOEMPI_BLOCKERS}; do
- ver="${ver} !${i}"
- done
- else
- for i in ${MPI_EMPI_COMPAT}; do
- ver="${ver} ${CATEGORY}/${i}"
- done
- ver="|| (${ver} ) app-admin/eselect-mpi"
- fi
- echo "${ver}"
-}
+inherit multilib
-mpi_imp_deplist() {
- local i ver
- if ! is_empi_imp_build; then
- for i in ${MPI_ALL_IMPS}; do
- [ "${i}" != "${PN}" ] && ver="${ver} !sys-cluster/${i}"
- done
- for i in ${MPI_NOEMPI_BLOCKERS}; do
- ver="${ver} !${i}"
- done
- else
- ver="app-admin/eselect-mpi"
- fi
- echo "${ver}"
-}
+# @ECLASS: mpi.eclass
+# @MAINTAINER:
+# Justin Bronder <jsbronder@gentoo.org>
+# @BLURB: Common functions for mpi-pkg.eclass and mpi-imp.eclass
-is_imp_build() { [[ ${MPI_ALL_IMPS} == *${PN}* ]]; }
-is_empi_build() { [[ ${CATEGORY} == mpi-* ]]; }
-is_empi_imp_build() { is_imp_build && is_empi_build; }
+# History: (Is there a standard for this?)
+# 2008-11-20 (jsbronder): Initial rewrite from old mpi.eclass
-get_imp() {
- [[ ${CATEGORY} == mpi-* ]] && echo "${CATEGORY}"
-}
+#####################
+# Private Variables #
+#####################
-get_mpi_dir() {
- if is_empi_build; then
- echo "/usr/$(get_libdir)/mpi/${MPI_IMP}"
- fi
-}
+# All known mpi implementations
+__MPI_ALL_IMPLEMENTATION_PNS="mpich mpich2 openmpi lam-mpi openib-mvapich2"
+# All mpi implentations that can be classed.
+__MPI_ALL_CLASSABLE_PNS="openmpi mpich2 lam-mpi"
-get_eselect_var() { echo "$(eselect mpi printvar ${MPI_IMP} ${1})"; }
-mpi_built_with() { echo "$(get_eselect_var MPI_BUILT_WITH)"; }
-# Internal use: Get out of messy functions if we're not using empi to build and
-# therefore avoid tons of file collisions.
-bail_if_not_empi() { [ -z "${MPI_IMP}" ] && return 0; }
-#TODO: There must be a better way?
-# Currently can be turned off with mpi_env="mpi_none"
-mpi_set_env() {
- local p
- [ -z "${MPI_IMP}" ] && return 0
- is_empi_imp_build && return 0
- [[ ${mpi_env} == mpi_none ]] && return 0
+###################################################################
+# Generic Functions that are used by Implementations and Packages #
+###################################################################
- p="$(get_mpi_dir)"
-
- oCC=$CC
- oCXX=$CXX
- oF77=$F77
- oFC=$FC
- oPATH=$PATH
- oLLP=${LD_LIBRARY_PATH}
- export CC=$(get_eselect_var MPI_CC)
- export CXX=$(get_eselect_var MPI_CXX)
- export F77=$(get_eselect_var MPI_F77)
- export FC=$(get_eselect_var MPI_F90)
- export PATH="$(get_eselect_var PATH):${PATH}"
- export LD_LIBRARY_PATH="$(get_eselect_var LD_LIBRARY_PATH):${LD_LIBRARY_PATH}"
-# Handled by the wrappers, at least it better be.
-# append-ldflags $(eselect mpi ldflags ${MPI_IMP})
-# append-flags $(eselect mpi cflags ${MPI_IMP})
-}
+# @ECLASS-VARIABLE: MPI_UNCLASSED_BLOCKERS
+# @DESCRIPTION: Packages that are blockers when not using a classed install.
-mpi_restore_env() {
- [ -z "${MPI_IMP}" ] && return 0
- is_empi_imp_build && return 0
- [[ ${mpi_env} == mpi_none ]] && return 0
-
- export CC=$oCC
- export CXX=$oCXX
- export F77=$oF77
- export FC=$oFC
- export PATH=$oPATH
- export LD_LIBRARY_PATH=$oLLP
+# @FUNCTION: mpi_classed
+# @USAGE:
+# @RETURN: True if this build is classed.
+mpi_classed() {
+ [[ ${CATEGORY} == mpi-* ]]
}
-
-# Here's what we try to get, in order.
-# ${IMP_BUILT_WITH}_${var}
-# mpi_${var}
-get_mpi_var() {
- local varname=${1}
- local t ret
-
- if is_imp_build; then
- t="${PN}_${varname}"
- elif is_empi_build; then
- t=$(mpi_built_with)
- t=${t%%-[0-9]*}
- t="${t}_${varname}"
- fi
- [ -n "${t}" ] && ret="${!t}"
-
- if [ -z "${ret}" ]; then
- t="mpi_${varname}"
- ret=${!t}
- fi
-
- if [ -z "${ret}" ]; then
- case ${varname} in
- conf_cmd)
- ret="econf"
- ;;
- make_cmd|make_install_cmd)
- ret="emake"
- ;;
- esac
- fi
- echo "${ret}"
+# @FUNCTION: mpi_class
+# @USAGE:
+# @RETURN: The name of the current class, or nothing if unclassed.
+mpi_class() {
+ mpi_classed && echo "${CATEGORY}"
}
-mpi_do_config() {
- local conf_cmd=$(get_mpi_var "conf_cmd")
- local conf_args=$(get_mpi_var "conf_args")
- local default_args rc d
-
- d="$(get_mpi_dir)"
- [[ "${conf_cmd}" == "mpi_none" ]] && return 0
- [[ -x ${S}/configure && -n "${MPI_IMP}" ]] \
- && default_args="--prefix=${d}/usr/
- --mandir=${d}/usr/share/man
- --infodir=${d}/usr/share/info
- --datadir=${d}/usr/share/
- --sysconfdir=/etc/${MPI_IMP}/
- --localstatedir=/var/lib/${MPI_IMP}"
- [[ "${conf_args}" == *mpi_none* ]] && default_args=""
-
- mpi_set_env
- ${conf_cmd} ${default_args} ${conf_args}; rc=$?
- mpi_restore_env
- return ${rc}
-}
-
-mpi_do_make() {
- local make_cmd=$(get_mpi_var "make_cmd")
- local make_args=$(get_mpi_var "make_args")
- local rc
-
- [[ "${make_cmd}" == "mpi_none" ]] && return 0
-
- mpi_set_env
- ${make_cmd} ${make_args}; rc=$?
- mpi_restore_env
- return ${rc}
-}
-
-
-mpi_do_make_install() {
- local make_cmd=$(get_mpi_var "make_install_cmd")
- local make_args=$(get_mpi_var "make_install_args")
- local default_args="DESTDIR=\"${D}\" install"
- local rc
-
- [[ "${make_cmd}" == "mpi_none" ]] && return 0
- [[ "${make_args}" == "mpi_none" ]] && default_args=""
-
- mpi_set_env
- ${make_cmd} ${default_args} ${make_args}; rc=$?
- mpi_restore_env
- return ${rc}
-}
-
-mpi_src_compile() {
- # Be nice and check at the earliest moment so the user doesn't watch
- # everything compile only to have the emerge blow up.
- if is_empi_imp_build && [ ! -f "${FILESDIR}"/${MPI_ESELECT_FILE} ]; then
- die "MPI_ESELECT_FILE is not defined/found. ${MPI_ESELECT_FILE}"
+# @FUNCTION: mpi_root
+# @USAGE:
+# @RETURN: The root path that packages should start installing to. In the end,
+# the majority of a package will will install to ${ROOT}$(mpi_root).
+mpi_root() {
+ if mpi_classed; then
+ echo "/usr/$(get_libdir)/mpi/$(mpi_class)/"
+ else
+ echo "/"
fi
-
- pushd "${S}" &>/dev/null
- mpi_do_config || die "mpi_src_compile: mpi_do_config failed."
- mpi_do_make || die "mpi_src_compile: mpi_do_make failed."
- popd &>/dev/null
}
-mpi_src_install() {
- pushd "${S}" &>/dev/null
- mpi_do_make_install \
- || die "mpi_src_install(${MPI_IMP}) mpi_do_make_install failed."
- popd &>/dev/null
-
- [ -z "${MPI_IMP}" ] && return 0
- if is_empi_imp_build; then
- mpi_add_eselect
+# @FUNCTION: mpi_econf_args
+# @USAGE:
+# @DESCRIPTION: If classed, returns a list of arguments for econf that sets the
+# default install locations correctly. Should be first in the list of arguments
+# to econf so that any unsuitable options can be overwritten.
+mpi_econf_args() {
+ if mpi_classed; then
+ local d=$(mpi_root)
+ local c=$(mpi_class)
+ local a="
+ --prefix=${d}usr
+ --mandir=${d}usr/share/man
+ --infodir=${d}usr/share/info
+ --datadir=${d}usr/share
+ --sysconfdir=/etc/${c}
+ --localstatedir=/var/lib/${c}"
+ echo "${a}"
fi
}
-mpi_pkg_setup() {
- # Make sure this eclass should be used.
- MPI_IMP=$(get_imp)
- [ -z "${MPI_IMP}" ] && return 0
-
- if [[ -z ${MPI_IMP} ]]; then
- die "Building without empi and bail_if_not_empi failed."
- fi
-
- if ! is_empi_imp_build; then
- einfo "mpi: Building against implementation ${MPI_IMP}."
- fi
-}
-
-mpi_add_eselect() {
- cp "${FILESDIR}"/${MPI_ESELECT_FILE} ${T}/${MPI_IMP}.eselect || die
- sed -i \
- -e "s|@ROOT@|$(get_mpi_dir)|g" \
- -e "s|@LIBDIR@|$(get_libdir)|g" \
- -e "s|@BUILT_WITH@|${PF}|g" \
- ${T}/${MPI_IMP}.eselect
-
- eselect mpi add "${T}"/${MPI_IMP}.eselect
-}
-
-
-
-# Handles all the mpi_{do,new} functions below.
-# Not handled because there is no good way:
-# doconfd doenvd domo doinitd
-mpi_do() {
+# @FUNCTION: _mpi_do
+# @USAGE: $1 - Standard ebuild command to replicate.
+# @DESCRIPTION: Large wrapping class for all of the {do,new}* commands that need
+# to respect the new root to install to. Works with unclassed builds as well.
+# Currently supports:
+# @CODE
+# dobin newbin dodoc newdoc
+# doexe newexe dohtml dolib
+# dolib.a newlib.a dolib.so newlib.so
+# dosbin newsbin doman newman
+# doinfo dodir dohard doins
+# dosym
+# @CODE
+
+_mpi_do() {
local rc prefix
local cmd=${1}
local ran=1
local slash=/
- local mdir="$(get_mpi_dir)/"
+ local mdir="$(mpi_root)"
- if ! is_empi_build; then
+ if ! mpi_classed; then
$*
return ${?}
fi
@@ -357,7 +109,7 @@ mpi_do() {
elif [ "${cmd#new}" != "${cmd}" ]; then
prefix="new"; cmd=${cmd#new}
else
- die "Unknown command passed to mpi_do: ${cmd}"
+ die "Unknown command passed to _mpi_do: ${cmd}"
fi
case ${cmd} in
bin|lib|lib.a|lib.so|sbin)
@@ -366,18 +118,26 @@ mpi_do() {
doc)
_E_DOCDESTTREE_="../../../../${mdir}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" \
${prefix}${cmd} $*
- rc=$?;;
+ rc=$?
+ for d in "/share/doc/${P}" "/share/doc" "/share"; do
+ rmdir ${D}/usr${d} &>/dev/null
+ done
+ ;;
html)
_E_DOCDESTTREE_="../../../../${mdir}usr/share/doc/${PF}/www/${_E_DOCDESTTREE_}" \
${prefix}${cmd} $*
- rc=$?;;
+ rc=$?
+ for d in "/share/doc/${P}/html" "/share/doc/${P}" "/share/doc" "/share"; do
+ rmdir ${D}/usr${d} &>/dev/null
+ done
+ ;;
exe)
_E_EXEDESTTREE_="${mdir}${_E_EXEDESTTREE_}" ${prefix}${cmd} $*
rc=$?;;
man|info)
[ -d "${D}"usr/share/${cmd} ] && mv "${D}"usr/share/${cmd}{,-orig}
[ ! -d "${D}"${mdir}usr/share/${cmd} ] \
- && install -d "${D}"${mdir}usr/share/${cmd}
+ && install -d "${D}"${mdir}usr/share/${cmd}
ln -snf ../../${mdir}usr/share/${cmd} ${D}usr/share/${cmd}
${prefix}${cmd} $*
@@ -390,7 +150,7 @@ mpi_do() {
hard|sym)
${prefix}${cmd} "${mdir}$1" "${mdir}/$2"; rc=$?;;
ins)
- INSDESTTREE="${mdir}${INSTREE}" ${cmd}${prefix} $*; rc=$?;;
+ INSDESTTREE="${mdir}${INSTREE}" ${prefix}${cmd} $*; rc=$?;;
*)
rc=0;;
esac
@@ -398,27 +158,207 @@ mpi_do() {
[[ ${ran} -eq 0 ]] && die "mpi_do passed unknown command: ${cmd}"
return ${rc}
}
+mpi_dobin() { _mpi_do "dobin" $*; }
+mpi_newbin() { _mpi_do "newbin" $*; }
+mpi_dodoc() { _mpi_do "dodoc" $*; }
+mpi_newdoc() { _mpi_do "newdoc" $*; }
+mpi_doexe() { _mpi_do "doexe" $*; }
+mpi_newexe() { _mpi_do "newexe" $*; }
+mpi_dohtml() { _mpi_do "dohtml" $*; }
+mpi_dolib() { _mpi_do "dolib" $*; }
+mpi_dolib.a() { _mpi_do "dolib.a" $*; }
+mpi_newlib.a() { _mpi_do "newlib.a" $*; }
+mpi_dolib.so() { _mpi_do "dolib.so" $*; }
+mpi_newlib.so() { _mpi_do "newlib.so" $*; }
+mpi_dosbin() { _mpi_do "dosbin" $*; }
+mpi_newsbin() { _mpi_do "newsbin" $*; }
+mpi_doman() { _mpi_do "doman" $*; }
+mpi_newman() { _mpi_do "newman" $*; }
+mpi_doinfo() { _mpi_do "doinfo" $*; }
+mpi_dodir() { _mpi_do "dodir" $*; }
+mpi_dohard() { _mpi_do "dohard" $*; }
+mpi_doins() { _mpi_do "doins" $*; }
+mpi_dosym() { _mpi_do "dosym" $*; }
+
+
+###########################################
+# Functions for MPI Implementation Builds #
+###########################################
+
+# @FUNCTION: mpi_imp_deplist
+# @USAGE:
+# @RETURNS: Returns a deplist that handles the blocking between mpi
+# implementations, the dep on eselect-mpi if a classed build, and any blockers
+# as specified in MPI_UNCLASSED_BLOCKERS
+mpi_imp_deplist() {
+ local c="sys-cluster"
+ local pn ver
+
+ mpi_classed && c="${CATEGORY}"
+ ver=""
+ for pn in ${__MPI_ALL_IMPLEMENTATION_PNS}; do
+ ver="${ver} !${c}/${pn}"
+ done
+ if mpi_classed; then
+ ver="${ver} >=app-admin/eselect-mpi-0.0.5"
+ else
+ for pn in ${MPI_UNCLASSED_BLOCKERS}; do
+ ver="${ver} !${MPI_UNCLASSED_BLOCKERS}"
+ done
+ fi
+ echo "${ver}"
+}
+
+mpi_imp_add_eselect() {
+ mpi_classed || return 0
+ local c=$(mpi_class)
+ cp "${FILESDIR}"/${MPI_ESELECT_FILE} ${T}/${c}.eselect || die
+ sed -i \
+ -e "s|@ROOT@|$(mpi_root)|g" \
+ -e "s|@LIBDIR@|$(get_libdir)|g" \
+ -e "s|@BASE_IMP@|${PN}|g" \
+ ${T}/${c}.eselect || die
+
+ eselect mpi add "${T}"/${c}.eselect || die
+}
+
+
+
+########################################
+# Functions for packages requiring MPI #
+########################################
+
+# @ECLASS-VARIABLE: MPI_PKG_NEED_IMPS
+# @DESCRIPTION: List of package names (${PN}) that this package is compatible
+# with. Default is the list of all mpi implementations
+MPI_PKG_NEED_IMPS="${MPI_PKG_NEED_IMPS:-${__MPI_ALL_CLASSABLE_PNS}}"
+
+# @FUNCTION: mpi_pkg_deplist
+# @USAGE:
+# @RETURN: Returns a deplist comprised of valid implementations and any blockers
+# depending on if this package is building with mpi class support.
+mpi_pkg_deplist() {
+ local c="sys-cluster"
+ local pn ver
+
+ mpi_classed && c="${CATEGORY}"
+ ver="|| ("
+ for pn in ${MPI_PKG_NEED_IMPS}; do
+ ver="${ver} ${c}/${pn}"
+ done
+ ver="${ver} )"
+
+ if ! mpi_classed && [ -n "${MPI_UNCLASSED_BLOCKERS}" ]; then
+ for pn in ${MPI_UNCLASSED_BLOCKERS}; do
+ ver="${ver} !${pn}"
+ done
+ fi
+ echo "${ver}"
+}
+
+# @FUNCTION: mpi_pkg_base_imp
+# @USAGE:
+# @DESCRIPTION: Returns the ${PN} of the package providing mpi support. Works
+# even when using an unclassed mpi build.
+mpi_pkg_base_imp() {
+ if mpi_classed; then
+ echo "$(_get_eselect_var CLASS_BASE_MPI_IMP)"
+ else
+ local pn
+ for pn in ${MPI_PKG_NEED_IMPS}; do
+ if has_version "sys-cluster/${pn}"; then
+ echo "${PN}"
+ fi
+ done
+ fi
+}
+
+# @FUNCTION: mpi_pkg_cc
+# @USAGE:
+# @DESCRIPTION: Returns the full path to the mpi C compiler. Trys to find one
+# even if this build is unclassed. If return is empty, user should assume the
+# implementation does not support this compiler
+# @FUNCTION: mpi_pkg_cxx
+# @USAGE:
+# @DESCRIPTION: Returns the full path to the mpi C++ compiler. Trys to find one
+# even if this build is unclassed. If return is empty, user should assume the
+# implementation does not support this compiler
+# @FUNCTION: mpi_pkg_fc
+# @USAGE:
+# @DESCRIPTION: Returns the full path to the mpi f90 compiler. Trys to find one
+# even if this build is unclassed. If return is empty, user should assume the
+# implementation does not support this compiler
+# @FUNCTION: mpi_pkg_f77
+# @USAGE:
+# @DESCRIPTION: Returns the full path to the mpi f77 compiler. Trys to find one
+# even if this build is unclassed. If return is empty, user should assume the
+# implementation does not support this compiler
+
+mpi_pkg_cc() { _mpi_pkg_compiler "MPI_CC" "cc"; }
+mpi_pkg_cxx() { _mpi_pkg_compiler "MPI_CXX" "cxx c++"; }
+mpi_pkg_f77() { _mpi_pkg_compiler "MPI_F77" "f77"; }
+mpi_pkg_fc() { _mpi_pkg_compiler "MPI_FC" "f90 fc"; }
+
+# If classed, we can ask eselect-mpi. Otherwise we'll look for some common
+# executable names in ${ROOT}usr/bin.
+_mpi_pkg_compiler() {
+ if mpi_classed; then
+ echo "$(eselect mpi printvar $(mpi_class) ${1})"
+ else
+ local suffixes=${2}
+ local p
+
+ for p in ${suffixes}; do
+ if [ -x ${ROOT}usr/bin/mpi${p} ]; then
+ echo "${ROOT}usr/bin/mpi${p}"
+ break
+ fi
+ done
+ fi
+}
-mpi_dobin() { mpi_do "dobin" $*; }
-mpi_newbin() { mpi_do "newbin" $*; }
-mpi_dodoc() { mpi_do "dodoc" $*; }
-mpi_newdoc() { mpi_do "newdoc" $*; }
-mpi_doexe() { mpi_do "doexe" $*; }
-mpi_newexe() { mpi_do "newexe" $*; }
-mpi_dohtml() { mpi_do "dohtml" $*; }
-mpi_dolib() { mpi_do "dolib" $*; }
-mpi_dolib.a() { mpi_do "dolib.a" $*; }
-mpi_newlib.a() { mpi_do "newlib.a" $*; }
-mpi_dolib.so() { mpi_do "dolib.so" $*; }
-mpi_newlib.so() { mpi_do "newlib.so" $*; }
-mpi_dosbin() { mpi_do "dosbin" $*; }
-mpi_newsbin() { mpi_do "newsbin" $*; }
-mpi_doman() { mpi_do "doman" $*; }
-mpi_newman() { mpi_do "newman" $*; }
-mpi_doinfo() { mpi_do "doinfo" $*; }
-mpi_dodir() { mpi_do "dodir" $*; }
-mpi_dohard() { mpi_do "dohard" $*; }
-mpi_doins() { mpi_do "doins" $*; }
-mpi_dosym() { mpi_do "dosym" $*; }
-
-EXPORT_FUNCTIONS src_compile src_install pkg_setup
+# @FUNCTION: mpi_pkg_set_env
+# @USAGE:
+# @DESCRIPTION: Exports 'some influential environment variables'. CC, CXX, F77, FC
+mpi_pkg_set_env() {
+ if mpi_classed; then
+ _mpi_oCC=$CC
+ _mpi_oCXX=$CXX
+ _mpi_oF77=$F77
+ _mpi_oFC=$FC
+ _mpi_oPCP=${PKG_CONFIG_PATH}
+ _mpi_oLLP=${LD_LIBRARY_PATH}
+ export CC=$(mpi_pkg_cc)
+ export CXX=$(mpi_pkg_cxx)
+ export F77=$(mpi_pkg_f77)
+ export FC=$(mpi_pkg_fc)
+ export PKG_CONFIG_PATH="$(mpi_root)$(get_libdir)/pkgconfig:${PKG_CONFIG_PATH}"
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(_get_eselect_var LD_LIBRARY_PATH)"
+ fi
+}
+
+# @FUNCTION: mpi_pkg_restore_env
+# @USAGE:
+# @DESCRIPTION: Attempts to undo the damage done by mpi_pkg_set_env
+mpi_pkg_restore_env() {
+ if mpi_classed; then
+ export CC=$_mpi_oCC
+ export CXX=$_mpi_oCXX
+ export F77=$_mpi_oF77
+ export FC=$_mpi_oFC
+ export PKG_CONFIG_PATH=$_mpi_oPCP
+ export LD_LIBRARY_PATH=$_mpi_oLLP
+ fi
+}
+
+
+
+# @FUNCTION: _get_eselect_var
+# @USAGE: $1 - Variable to get from the class definition
+# @RETURN: If classed, and given a valid variable, the contents; empty
+# otherwise.
+_get_eselect_var() {
+ if mpi_classed && [ -n "${1}" ]; then
+ echo "$(eselect mpi printvar $(mpi_class) ${1} 2>/dev/null)"
+ fi
+}
diff --git a/sys-cluster/empi/ChangeLog b/sys-cluster/empi/ChangeLog
deleted file mode 100644
index 530667a10..000000000
--- a/sys-cluster/empi/ChangeLog
+++ /dev/null
@@ -1,12 +0,0 @@
-# ChangeLog for sys-cluster/empi
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: $
-
- 27 Mar 2008; Justin Bronder <jsbronder@gentoo.org> ChangeLog:
- Only use -u in default emerge options. Add the --noemerge option. Fix
- deletion when an implementation hasn't been fully emerged. Thanks to
- Alexander Piavka for testing! This is empi-0.3.
-
- 29 Feb 2008; Justin Bronder <jsbronder@gentoo.org> ChangeLog:
- Initial import
-
diff --git a/sys-cluster/empi/Manifest b/sys-cluster/empi/Manifest
index bef750745..c617c844e 100644
--- a/sys-cluster/empi/Manifest
+++ b/sys-cluster/empi/Manifest
@@ -1,11 +1,3 @@
AUX README.txt 2765 RMD160 a3431068e0ab26ea89a72aae4b26d2c3b1ab64aa SHA1 0bb823dca71b0dd49ba1c3e04070d705f06e3765 SHA256 4bf70db39447f906bbf7f2fa3e641600234569a0b6b8093ad6f968e8bfb28ff5
-AUX empi 10260 RMD160 696101bbbcf318d152fe10e690af86fd49bbe139 SHA1 d21d0ab2338c3adfbfdd6f4ad059b81018d15051 SHA256 3c344cde5daa717e3cd779cb2792a58e99d098b9da81b6e00604e70528672569
-AUX empi-0.2.patch 4089 RMD160 265c6a4c887c3006294b430bc7c3aa2891e612a4 SHA1 42d90cc6a6aa4b5cfc544a7a98cf55c5f48dffc8 SHA256 4bd20fb11e0fdc4661836b5cf346224875ce7803b43b32fde2e425b3679c27b8
-AUX empi-0.3.patch 7947 RMD160 46f5c6afa9956eda4bda1e9b3d62c125c1bd4922 SHA1 d2c58978a4500d1132af25913ea75e8a6c2b6e3b SHA256 9199a19f5099d567d6bf636c0df45aca765653129540d42fe644c93ef8d70246
-AUX empi-0.4 11489 RMD160 31f9407ba1c390e0a46bb209831afbbf623fc20d SHA1 f4cc90a4d68725808024a701d7f9ca4556f75f32 SHA256 05ffb906193123c27ab4f68f219da6ff8ad91b74b4a1dca6ac9936564b02869f
-EBUILD empi-0.1.ebuild 356 RMD160 da691cd5e6d0efa60610e924afdf9f575d0c0af7 SHA1 82158037d357ab1995115606fc6e65ab644846ce SHA256 2e2f296e101e79207e02c55834ee38eb2eb8d375306bce5dc5bef0b8044a9242
-EBUILD empi-0.2.ebuild 467 RMD160 c67402c1eeba84f93319648605a0720184c19cb5 SHA1 1565fa234b6d7beb193df96400264586a792eaa1 SHA256 48c53593c8859beefc475c9f4c6ebe113972a54efe33f6983351c8cd8d8f3f93
-EBUILD empi-0.3.ebuild 471 RMD160 e6b3dfe3a59f381c33c28ab4db9823277265fec8 SHA1 6c0015fabf48f8b6a2174080d76707815e4e07c7 SHA256 83709588e15e674c1435805bf8c5f9c4e52e37d2592da5d01cddee63ed50d1a4
-EBUILD empi-0.4-r1.ebuild 444 RMD160 5e73c07dd012207358f0038067e02e5b45ad131b SHA1 29d06edc4eeb13349e01f30f445252c6171890ef SHA256 ff7d6ade98e0ac656972152b1992a55e798fb71c302e207952f8d5293c1838dc
-EBUILD empi-0.4.ebuild 427 RMD160 41e959d71b46731aee65ec00adc0e7476c13138a SHA1 56b518a2a91bd617f1ffa771738e9dd8932c6f53 SHA256 cbca96be40250c8ff60b5c1373c65c41e858c78615612e8f0b8a051439b8cccb
-MISC ChangeLog 461 RMD160 3f61e5b618105d1ca4d0d6b27fad6e3bc1c6e487 SHA1 677e1c14b4ef23ab0c0229748bec9fd72ac32905 SHA256 a5c5e30b987c82d009b0cb2c758c66021e1fc4eb8ea577e104633b1b3957688c
+AUX empi-0.5 11360 RMD160 b1058a33c9e3c2b55605e52fe2eaedf8286a8934 SHA1 45f6cd94dc375b778d0b9cb344c5352cad97d3e4 SHA256 427ac0124c84210e140018fd94122d8e38244b9413e777c06f0ebff245fd0c98
+EBUILD empi-0.5.ebuild 449 RMD160 a4739e87af29f48542039422475911706198c408 SHA1 ea78c5b5e79e04c7d4b0ecab134447b706a52b63 SHA256 b65b5b360207adc6bd871d80dd8be0b90873fa6364c1bd81e8a0d6d50290d573
diff --git a/sys-cluster/empi/empi-0.1.ebuild b/sys-cluster/empi/empi-0.1.ebuild
deleted file mode 100644
index 1a8508f8d..000000000
--- a/sys-cluster/empi/empi-0.1.ebuild
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-DESCRIPTION="empi"
-HOMEPAGE="http://dev.gentoo.org/~jsbronder"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE=""
-RDEPEND="app-admin/eselect-mpi"
-
-src_install() {
- dobin "${FILESDIR}"/empi
- dodoc "${FILESDIR}"/README.txt
-}
-
diff --git a/sys-cluster/empi/empi-0.2.ebuild b/sys-cluster/empi/empi-0.2.ebuild
deleted file mode 100644
index a17388a0a..000000000
--- a/sys-cluster/empi/empi-0.2.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils
-
-DESCRIPTION="empi"
-HOMEPAGE="http://dev.gentoo.org/~jsbronder"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE=""
-RDEPEND="app-admin/eselect-mpi"
-
-src_unpack() {
- mkdir -p "${S}"
- cp "${FILESDIR}"/empi "${S}"
- cd "${S}"
- epatch "${FILESDIR}"/${P}.patch
-}
-
-src_install() {
- dobin empi
- dodoc "${FILESDIR}"/README.txt
-}
diff --git a/sys-cluster/empi/empi-0.3.ebuild b/sys-cluster/empi/empi-0.3.ebuild
deleted file mode 100644
index 71c03df49..000000000
--- a/sys-cluster/empi/empi-0.3.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils
-
-DESCRIPTION="empi"
-HOMEPAGE="http://dev.gentoo.org/~jsbronder"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-RDEPEND="app-admin/eselect-mpi"
-
-src_unpack() {
- mkdir -p "${S}"
- cp "${FILESDIR}"/empi "${S}"
- cd "${S}"
- epatch "${FILESDIR}"/${P}.patch
-}
-
-src_install() {
- dobin empi
- dodoc "${FILESDIR}"/README.txt
-}
diff --git a/sys-cluster/empi/empi-0.4.ebuild b/sys-cluster/empi/empi-0.4.ebuild
deleted file mode 100644
index 4f7ce876e..000000000
--- a/sys-cluster/empi/empi-0.4.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils
-
-DESCRIPTION="empi"
-HOMEPAGE="http://dev.gentoo.org/~jsbronder"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE=""
-RDEPEND="app-admin/eselect-mpi"
-
-src_unpack() {
- mkdir -p "${S}"
- cp "${FILESDIR}"/empi "${S}"
-}
-
-src_install() {
- dobin ${PN}
- dodoc "${FILESDIR}"/README.txt
-}
diff --git a/sys-cluster/empi/empi-0.4-r1.ebuild b/sys-cluster/empi/empi-0.5.ebuild
index 5cd4290f8..683e93254 100644
--- a/sys-cluster/empi/empi-0.4-r1.ebuild
+++ b/sys-cluster/empi/empi-0.5.ebuild
@@ -5,7 +5,7 @@
inherit eutils
DESCRIPTION="empi"
-HOMEPAGE="http://dev.gentoo.org/~jsbronder"
+HOMEPAGE="http://dev.gentoo.org/~jsbronder/empi.xml"
SRC_URI=""
LICENSE="GPL-2"
@@ -16,7 +16,7 @@ RDEPEND="app-admin/eselect-mpi"
src_unpack() {
mkdir -p "${S}"
- cp "${FILESDIR}"/empi-0.4 "${S}"/${PN}
+ cp "${FILESDIR}"/${P} "${S}"/${PN}
}
src_install() {
diff --git a/sys-cluster/empi/files/empi b/sys-cluster/empi/files/empi
deleted file mode 100755
index 839e41c34..000000000
--- a/sys-cluster/empi/files/empi
+++ /dev/null
@@ -1,326 +0,0 @@
-#!/bin/bash
-
-source /etc/init.d/functions.sh
-#[ -f /etc/empi.conf ] && source /etc/empi.conf
-MPI_IMPS="openmpi lam-mpi"
-MPI_ALL_IMPS="mpich mpich2 openmpi lam-mpi"
-VERBOSE=0
-
-[[ -z ${MPI_PORTDIR} ]] \
- && MPI_PORTDIR="$(portageq portdir_overlay)" \
- && MPI_PORTDIR="${MPI_PORTDIR%% *}" \
-
-[[ -z ${COMPILER} ]] && COMPILER=gcc
-# imp (category) Implementation we're installing for. mpi-*
-# targets Packages to run action on. When creating, the implementation to use.
-# action create, add, update, remove.
-
-die(){
- if [ -n "${1}" ]; then
- echo; eerror $1; echo
- fi
- exit 1
-}
-
-usage(){
- local rc=${1:-0}
- shift
-cat <<-EOF
-Usage: ${HILITE}empi${NORMAL} ${GOOD}[options]${NORMAL} ${BRACKET}--implementation IMPLEMENTATION pkgspec${NORMAL}
-
-Options:
- ${GOOD}-c, --create${NORMAL} (Re)Initialize setup for implementation.
- ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified implementation.
- ${GOOD}-i, --implementation${NORMAL} imp Implementation to use.
- ${GOOD}-l, --list${NORMAL} List installed implementations.
- ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from.
- ${GOOD}-d, --delete${NORMAL} imp Remove everything related to specified implementation.
-
-pkgspec is specified by a package string. Without a version, the best_visible is used.
- openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5
-implementation (-i) is user defined but must be prefixed with "mpi-"
-
-EOF
- [[ -n $* ]] && echo && eerror "Error: $*"
- exit ${rc}
-}
-
-imp_is_valid() {
- [[ -z ${imp} ]] && usage 1 "No implementation defined."
- [[ ${imp} != mpi-* ]] && usage 1 "Implementations must be prefixed with mpi-"
- [[ ${imp//./} != ${imp} ]] && usage 1 "Implementations cannot contain . (period)"
-}
-
-is_imp_category() {
- local i
- for i in $(eselect mpi list -p); do
- [[ ${1} == ${i} ]] && return 0
- done
- return 1
-}
-
-split_atom() {
- local cpv c pf pn pv
- cpv=$(portageq best_visible / ${1})
- if [[ -z ${cpv} || ${rc} -ne 0 ]]; then
- cpv=$(portageq best_visible / =${1})
- [[ -z ${cpv} || ${rc} -ne 0 ]] && return 1
- fi
- c=${cpv%/*}; pf=${cpv#${c}/}; pn=${pf%%-[0-9]*}; pv=${pf#${pn}-}
- echo "${c} ${pn} ${pv}"
-}
-
-parse_pkgspecs() {
- local atom i
- for ((i=0; i<${#targets[@]}; i++)); do
- atom=($(split_atom ${targets[i]}))
- if [[ $? -ne 0 ]]; then
- eerror "Unable to find a unique package or valid version for ${targets[i]}"
- eerror "Is the package unmasked and unblocked normally?"
- die ""
- fi
- targets[i]=${atom[0]}/${atom[1]}-${atom[2]}
- done
-}
-
-# handle_etc_portage package_spec
-# parses /etc/portage/package.{keywords,use}. If ${imp}/${pn} is seen, we don't
-# do a thing. Otherwise copy any lines that have ${cat}/${pn} inserting them again
-# with the new category.
-handle_etc_portage() {
- local atom=( $(split_atom ${1}) )
- local ext line gfiles f
-
- for ext in "keywords" "use"; do
- if [ -d /etc/portage/package.${ext} ]; then
- gfiles="/etc/portage/package.${ext}/*"
- f=/etc/portage/package.${ext}/${imp}
- else
- gfiles="/etc/portage/package.${ext}"
- f=/etc/portage/package.${ext}
- fi
-
- if ! grep "[>=<]*${imp}/${atom[1]}" ${gfiles} &>/dev/null; then
- grep "[>=<]*${atom[0]}/${atom[1]}" ${gfiles} \
- | sed "s,${atom[0]},${imp}," \
- | while read line; do
- echo "${line}" >> ${f}
- [[ ${VERBOSE} -ne 0 ]] \
- && einfo "Addition to ${f}: ${line}"
- done
- elif [[ ${VERBOSE} -ne 0 ]]; then
- ewarn "Keys for ${imp}/${atom[1]} already exist in ${f}. Will not replicate them."
- fi
- done
-}
-
-
-
-get_ebuild_dir() {
- local d a
- local want_uses_mpi=${2:-0}
- local found=0
-
- a=($(split_atom ${1}))
- [[ $? -ne 0 ]] && die "Unable to find a unique package or valid version for ${1}."
- is_imp_category ${a[0]} && die "It makes no sense to build a new mpi-implementation from a current one."
-
- if [[ -z ${portage_tree} ]]; then
- for d in $(portageq portdir_overlay) $(portageq portdir); do
- if [[ ${want_uses_mpi} -ne 0 ]]; then
- [[ -f "${d}/${a[0]}/${a[1]}/${a[1]}-${a[2]}.ebuild" ]] \
- && ebuild_uses_mpi ${d}/${a[0]}/${a[1]} ${a[1]}-${a[2]} \
- && found=1
- else
- [[ -f "${d}/${a[0]}/${a[1]}/${a[1]}-${a[2]}.ebuild" ]] && found=1
- fi
- [[ ${found} -ne 0 ]] && break
- done
- if [[ ${found} -ne 0 ]]; then
- portage_tree=${d}
- else
- die "Could not find an ebuild for ${a[0]}/${a[1]}-${a[2]}."
- fi
- fi
-
- ebuild_dir="${portage_tree}/${a[0]}/${a[1]}"
-}
-
-ebuild_uses_mpi() {
- grep 'inherit .*mpi' "${1}/${2##*/}.ebuild" &>/dev/null
-}
-
-setup_portage_vars() {
- export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)"
- export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}"
-}
-
-link_ebuild_dir() {
- ln -snf "${ebuild_dir}" "${MPI_PORTDIR}"/${imp}/${ebuild_dir##*/} \
- || die "Failed to link ${ebuild_dir} to ${MPI_PORTDIR}/${imp}/${ebuild_dir##*/}"
-}
-
-do_emerge() {
- ebegin "Emerging $*"
- setup_portage_vars
- emerge ${emerge_opts} $* || die "emerge failed!"
- eend
-}
-
-# We should have only one target here.
-create_implementation() {
- local mpi_imp_pkg d mpi_imp_pn
-
- [[ ${#targets[@]} -ne 1 ]] && die "Can only create one implementation at a time."
-
- # Prevent laziness
- [[ ${targets[0]} == ${targets[0]##*/} ]] \
- && targets[0]="sys-cluster/${targets[0]}"
-
- parse_pkgspecs
- get_ebuild_dir ${targets[0]} 1
- mpi_imp_pn=${ebuild_dir##*/}
- mpi_imp_pkg=${targets[0]}
- handle_etc_portage ${targets[0]}
- targets[0]="=${imp}/${targets[0]##*/}"
-
- # Refuse to break systems. If there is already an implementation
- # installed in that directory, we're not going to add another one as
- # the eclass doesn't fix one problem just to introduce a bigger one.
- for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l);do
- d=${d##*/}
- [[ ${d} == ${mpi_imp_pn} ]] && continue
- for i in ${MPI_ALL_IMPS}; do
- [[ ${i} == ${d} ]] \
- && die "${imp} already has MPI implementation ${d}, refusing to add ${mpi_imp_pn}"
- done
- done
-
- if [[ -d "${MPI_PORTDIR}"/${imp} ]]; then
- [[ ${VERBOSE} -ne 0 ]] && ewarn "${imp} has already been created."
- else
- mkdir -p ${MPI_PORTDIR}/${imp}
- link_ebuild_dir
- fi
- if ! grep "^${imp}$" /etc/portage/categories &>/dev/null; then
- echo "${imp}" >> /etc/portage/categories
- fi
-
-
-cat << EOF
-Creating ${HILITE}${imp}${NORMAL}
- Implementation: ${GOOD}${imp}${NORMAL}
- MPI Package: ${GOOD}${mpi_imp_pkg}${NORMAL}
- Source: ${GOOD}${ebuild_dir}${NORMAL}
- Destination: ${GOOD}${MPI_PORTDIR}/${imp}${NORMAL}
-EOF
- do_emerge ${targets[0]}
-}
-
-
-add_packages(){
- local i j deps
-
- [[ -d "${MPI_PORTDIR}"/${imp} ]] || die "Implementation ${imp} has not been created yet."
- [[ ${#targets[@]} -lt 1 ]] && die "You need to specify at least one package"
-
- parse_pkgspecs
- for ((i=0;i<${#targets[@]};i++)); do
- get_ebuild_dir ${targets[i]}
- if ebuild_uses_mpi ${ebuild_dir} ${targets[i]}; then
- link_ebuild_dir
- handle_etc_portage ${targets[i]}
- targets[i]="=${imp}/${targets[i]##*/}"
- else
- targets[i]="=${targets[i]}"
- fi
-
- # I don't know about this, but do you have a better idea?
- deps="$(emerge --color=n --onlydeps -p --quiet ${targets[i]})"
- if [[ $? -ne 0 ]]; then
- emerge --onlydeps -p ${targets[i]}
- die "Unable to calculate deps for ${targets[i]}"
- fi
- deps=( $(echo ${deps} | sed -e 's:\[[a-z]* [A-Z] \] :=:g') )
- for ((j=0;j<${#deps[@]};j++)); do
- get_ebuild_dir ${deps[j]}
- if ebuild_uses_mpi ${deps[i]}; then
- link_ebuild_dir
- fi
- done
- done
-cat << EOF
-Adding packages to ${HILIGHT}${imp}${NORMAL}
- Packages: ${GOOD}${targets[@]}${NORMAL}
-EOF
- do_emerge ${targets[@]}
-}
-
-
-delete_implementation() {
- local pkgs=( $(ls /var/db/pkg/${imp}/) )
- local ext d i
- [[ -d "${MPI_PORTDIR}"/${imp} ]] || die "Implementation ${imp} has not been created yet."
-
- for (( i=0; i<${#pkgs[@]}; i++)); do
- pkgs[i]="=${imp}/${pkgs[i]}"
- done
-
- if ! emerge -C ${emerge_opts/-u/} ${pkgs[@]}; then
- die "Failed to unmerge ${pkgs[@]}"
- fi
-
- for ext in "keywords" "use"; do
- if [ -d /etc/portage/package.${ext} ]; then
- rm /etc/portage/package.${ext}/${imp} &>/dev/null
- else
- sed -i -e "/${imp}\//d" /etc/portage/package.${ext}
- fi
- done
- sed -i -e "/^${imp}$/d" /etc/portage/categories
-
- for d in $(ls "${MPI_PORTDIR}"/${imp}/); do
- rm "${MPI_PORTDIR}"/${imp}/${d}
- done
- rmdir "${MPI_PORTDIR}"/${imp}
- rmdir /var/db/pkg/${imp}
-}
-
-
-[[ ${UID} -ne 0 ]] && die "You must be root."
-targets=""
-emerge_opts="-u -a -v"
-portage_tree=""
-action=""
-while [[ $# -gt 0 ]]; do
- case $1 in
- -h|--help)
- usage;;
- -c|--create)
- action="${action}create";;
- -a|--add)
- action="${action}add";;
- -d|--delete)
- action="${action}delete"
- shift; imp=${1};;
- -i|--implementation)
- shift; imp=${1};;
- -t|--tree)
- shift; portage_tree=${1};;
- -v|--verbose)
- VERBOSE=1;;
- -*)
- emerge_opts="${emerge_opts} ${1}";;
- *)
- targets=( $(echo ${targets[@]}) ${1} );;
- esac
- shift
-done
-
-[[ -z ${action} ]] && usage 1 "No action defined."
-[[ -z ${imp} ]] && usage 1 "No implementation defined."
-imp_is_valid
-
-[[ ${action} == *create* ]] && create_implementation
-[[ ${action} == *add* ]] && add_packages
-[[ ${action} == *delete* ]] && delete_implementation
diff --git a/sys-cluster/empi/files/empi-0.2.patch b/sys-cluster/empi/files/empi-0.2.patch
deleted file mode 100644
index 6076034fd..000000000
--- a/sys-cluster/empi/files/empi-0.2.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-diff -urN a/empi b/empi
---- a/empi 2008-03-10 19:52:32.000000000 -0400
-+++ b/empi 2008-03-10 19:53:31.000000000 -0400
-@@ -1,16 +1,8 @@
- #!/bin/bash
-
- source /etc/init.d/functions.sh
--#[ -f /etc/empi.conf ] && source /etc/empi.conf
--MPI_IMPS="openmpi lam-mpi"
--MPI_ALL_IMPS="mpich mpich2 openmpi lam-mpi"
- VERBOSE=0
-
--[[ -z ${MPI_PORTDIR} ]] \
-- && MPI_PORTDIR="$(portageq portdir_overlay)" \
-- && MPI_PORTDIR="${MPI_PORTDIR%% *}" \
--
--[[ -z ${COMPILER} ]] && COMPILER=gcc
- # imp (category) Implementation we're installing for. mpi-*
- # targets Packages to run action on. When creating, the implementation to use.
- # action create, add, update, remove.
-@@ -32,9 +24,9 @@
- ${GOOD}-c, --create${NORMAL} (Re)Initialize setup for implementation.
- ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified implementation.
- ${GOOD}-i, --implementation${NORMAL} imp Implementation to use.
-- ${GOOD}-l, --list${NORMAL} List installed implementations.
- ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from.
- ${GOOD}-d, --delete${NORMAL} imp Remove everything related to specified implementation.
-+ ${GOOD}-o, --overlaydir${NORMAL} path Directory to use for the empi portage overlay.
-
- pkgspec is specified by a package string. Without a version, the best_visible is used.
- openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5
-@@ -150,11 +142,6 @@
- grep 'inherit .*mpi' "${1}/${2##*/}.ebuild" &>/dev/null
- }
-
--setup_portage_vars() {
-- export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)"
-- export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}"
--}
--
- link_ebuild_dir() {
- ln -snf "${ebuild_dir}" "${MPI_PORTDIR}"/${imp}/${ebuild_dir##*/} \
- || die "Failed to link ${ebuild_dir} to ${MPI_PORTDIR}/${imp}/${ebuild_dir##*/}"
-@@ -162,7 +149,6 @@
-
- do_emerge() {
- ebegin "Emerging $*"
-- setup_portage_vars
- emerge ${emerge_opts} $* || die "emerge failed!"
- eend
- }
-@@ -172,7 +158,11 @@
- local mpi_imp_pkg d mpi_imp_pn
-
- [[ ${#targets[@]} -ne 1 ]] && die "Can only create one implementation at a time."
--
-+
-+ for d in $(eselect mpi list -p); do
-+ [ "${d}" == "${imp}" ] && die "${imp} has already been created."
-+ done
-+
- # Prevent laziness
- [[ ${targets[0]} == ${targets[0]##*/} ]] \
- && targets[0]="sys-cluster/${targets[0]}"
-@@ -187,7 +177,7 @@
- # Refuse to break systems. If there is already an implementation
- # installed in that directory, we're not going to add another one as
- # the eclass doesn't fix one problem just to introduce a bigger one.
-- for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l);do
-+ for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l 2>/dev/null);do
- d=${d##*/}
- [[ ${d} == ${mpi_imp_pn} ]] && continue
- for i in ${MPI_ALL_IMPS}; do
-@@ -197,7 +187,7 @@
- done
-
- if [[ -d "${MPI_PORTDIR}"/${imp} ]]; then
-- [[ ${VERBOSE} -ne 0 ]] && ewarn "${imp} has already been created."
-+ [[ ${VERBOSE} -ne 0 ]] && ewarn "Overlay for ${imp} has already been created."
- else
- mkdir -p ${MPI_PORTDIR}/${imp}
- link_ebuild_dir
-@@ -307,6 +297,8 @@
- shift; imp=${1};;
- -t|--tree)
- shift; portage_tree=${1};;
-+ -o|--overlaydir)
-+ shift; MPI_PORTDIR=${1};;
- -v|--verbose)
- VERBOSE=1;;
- -*)
-@@ -317,6 +309,18 @@
- shift
- done
-
-+if [ -z "${MPI_PORTDIR}" ]; then
-+ MPI_PORTDIR="$(portageq portdir_overlay)"
-+ MPI_PORTDIR="${MPI_PORTDIR%% *}"
-+fi
-+
-+if [ ! -d "${MPI_PORTDIR}" ]; then
-+ mkdir -p "${MPI_PORTDIR}" || die "Failed to mkdir ${MPI_PORTDIR}"
-+fi
-+
-+export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)"
-+export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}"
-+
- [[ -z ${action} ]] && usage 1 "No action defined."
- [[ -z ${imp} ]] && usage 1 "No implementation defined."
- imp_is_valid
diff --git a/sys-cluster/empi/files/empi-0.3.patch b/sys-cluster/empi/files/empi-0.3.patch
deleted file mode 100644
index ab2f61261..000000000
--- a/sys-cluster/empi/files/empi-0.3.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-diff -urN a/empi b/empi
---- a/empi 2008-03-26 20:24:05.000000000 -0400
-+++ b/empi 2008-03-26 21:08:10.000000000 -0400
-@@ -1,16 +1,8 @@
- #!/bin/bash
-+VERSION=0.3
-
- source /etc/init.d/functions.sh
--#[ -f /etc/empi.conf ] && source /etc/empi.conf
--MPI_IMPS="openmpi lam-mpi"
--MPI_ALL_IMPS="mpich mpich2 openmpi lam-mpi"
--VERBOSE=0
--
--[[ -z ${MPI_PORTDIR} ]] \
-- && MPI_PORTDIR="$(portageq portdir_overlay)" \
-- && MPI_PORTDIR="${MPI_PORTDIR%% *}" \
-
--[[ -z ${COMPILER} ]] && COMPILER=gcc
- # imp (category) Implementation we're installing for. mpi-*
- # targets Packages to run action on. When creating, the implementation to use.
- # action create, add, update, remove.
-@@ -26,20 +18,33 @@
- local rc=${1:-0}
- shift
- cat <<-EOF
--Usage: ${HILITE}empi${NORMAL} ${GOOD}[options]${NORMAL} ${BRACKET}--implementation IMPLEMENTATION pkgspec${NORMAL}
-+empi-${VERSION}
-+Usage: ${HILITE}empi${NORMAL} ${GOOD}[actions]${NORMAL} ${BRACKET}[options]${NORMAL}
-
--Options:
-- ${GOOD}-c, --create${NORMAL} (Re)Initialize setup for implementation.
-+Actions:
-+ ${GOOD}-c, --create${NORMAL} pkgspec (Re)Initialize setup for implementation.
- ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified implementation.
-- ${GOOD}-i, --implementation${NORMAL} imp Implementation to use.
-- ${GOOD}-l, --list${NORMAL} List installed implementations.
-- ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from.
- ${GOOD}-d, --delete${NORMAL} imp Remove everything related to specified implementation.
-
--pkgspec is specified by a package string. Without a version, the best_visible is used.
-- openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5
--implementation (-i) is user defined but must be prefixed with "mpi-"
-+Options:
-+ ${GOOD}-i, --implementation${NORMAL} imp Implementation to use.
-+ ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from.
-+ ${GOOD}-o, --overlaydir${NORMAL} path Directory to use for the empi portage overlay.
-+ ${GOOD} --noemerge${NORMAL} Do not call emerge, only preform overlay setup.
-
-+Notes:
-+ ${HILITE}-${NORMAL} pkgspec is specified by a package string. Without a version, the
-+ portageq best_visible is used. For example, all of the following
-+ are valid: openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5.
-+ ${HILITE}-${NORMAL} implementation (-i) is user defined but must be prefixed with "mpi-"
-+
-+Examples:
-+${BRACKET}Create a new implementation based on openmpi.${NORMAL}
-+ empi --create sys-cluster/openmpi --implementation mpi-ompi
-+${BRACKET}Rebuild the above.${NORMAL}
-+ emerge mpi-ompi/openmpi
-+${BRACKET}Add hpl to mpi-ompi${NORMAL}
-+ empi --implementation mpi-ompi --add sys-cluster/hpl
- EOF
- [[ -n $* ]] && echo && eerror "Error: $*"
- exit ${rc}
-@@ -101,7 +106,7 @@
- fi
-
- if ! grep "[>=<]*${imp}/${atom[1]}" ${gfiles} &>/dev/null; then
-- grep "[>=<]*${atom[0]}/${atom[1]}" ${gfiles} \
-+ grep "[>=<]*${atom[0]}/${atom[1]}" ${gfiles} 2>/dev/null \
- | sed "s,${atom[0]},${imp}," \
- | while read line; do
- echo "${line}" >> ${f}
-@@ -150,19 +155,14 @@
- grep 'inherit .*mpi' "${1}/${2##*/}.ebuild" &>/dev/null
- }
-
--setup_portage_vars() {
-- export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)"
-- export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}"
--}
--
- link_ebuild_dir() {
- ln -snf "${ebuild_dir}" "${MPI_PORTDIR}"/${imp}/${ebuild_dir##*/} \
- || die "Failed to link ${ebuild_dir} to ${MPI_PORTDIR}/${imp}/${ebuild_dir##*/}"
- }
-
- do_emerge() {
-+ [[ ${DO_EMERGE} -eq 0 ]] && return 0
- ebegin "Emerging $*"
-- setup_portage_vars
- emerge ${emerge_opts} $* || die "emerge failed!"
- eend
- }
-@@ -172,7 +172,11 @@
- local mpi_imp_pkg d mpi_imp_pn
-
- [[ ${#targets[@]} -ne 1 ]] && die "Can only create one implementation at a time."
--
-+
-+ for d in $(eselect mpi list -p); do
-+ [ "${d}" == "${imp}" ] && die "${imp} has already been created."
-+ done
-+
- # Prevent laziness
- [[ ${targets[0]} == ${targets[0]##*/} ]] \
- && targets[0]="sys-cluster/${targets[0]}"
-@@ -187,7 +191,7 @@
- # Refuse to break systems. If there is already an implementation
- # installed in that directory, we're not going to add another one as
- # the eclass doesn't fix one problem just to introduce a bigger one.
-- for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l);do
-+ for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l 2>/dev/null);do
- d=${d##*/}
- [[ ${d} == ${mpi_imp_pn} ]] && continue
- for i in ${MPI_ALL_IMPS}; do
-@@ -197,7 +201,7 @@
- done
-
- if [[ -d "${MPI_PORTDIR}"/${imp} ]]; then
-- [[ ${VERBOSE} -ne 0 ]] && ewarn "${imp} has already been created."
-+ [[ ${VERBOSE} -ne 0 ]] && ewarn "Overlay for ${imp} has already been created."
- else
- mkdir -p ${MPI_PORTDIR}/${imp}
- link_ebuild_dir
-@@ -258,40 +262,56 @@
-
-
- delete_implementation() {
-- local pkgs=( $(ls /var/db/pkg/${imp}/) )
-- local ext d i
-+ local pkgs=( $(ls /var/db/pkg/${imp}/ 2>/dev/null) )
-+ local ext d i rc
- [[ -d "${MPI_PORTDIR}"/${imp} ]] || die "Implementation ${imp} has not been created yet."
-+ rc=0
-
- for (( i=0; i<${#pkgs[@]}; i++)); do
- pkgs[i]="=${imp}/${pkgs[i]}"
- done
-
-- if ! emerge -C ${emerge_opts/-u/} ${pkgs[@]}; then
-+ if [[ ${#pkgs[@]} -gt 0 ]] && ! emerge -C ${emerge_opts/-u/} ${pkgs[@]}; then
- die "Failed to unmerge ${pkgs[@]}"
- fi
-
- for ext in "keywords" "use"; do
- if [ -d /etc/portage/package.${ext} ]; then
- rm /etc/portage/package.${ext}/${imp} &>/dev/null
-- else
-+ rc=$((rc+$?))
-+ elif [ -f /etc/portage/package.${ext} ]; then
- sed -i -e "/${imp}\//d" /etc/portage/package.${ext}
-+ rc=$((rc+$?))
- fi
- done
-- sed -i -e "/^${imp}$/d" /etc/portage/categories
-
-- for d in $(ls "${MPI_PORTDIR}"/${imp}/); do
-+ [ ! -f /etc/portage/categories ] || sed -i -e "/^${imp}$/d" /etc/portage/categories
-+ rc=$((rc+$?))
-+
-+ for d in $(ls "${MPI_PORTDIR}"/${imp}/ 2>/dev/null); do
- rm "${MPI_PORTDIR}"/${imp}/${d}
-+ rc=$((rc+$?))
-+ done
-+
-+ for d in "${MPI_PORTDIR}/${imp}" /var/db/pkg/${imp}; do
-+ [ ! -d "${d}" ] || rmdir "${d}"
-+ rc=$((rc+$?))
- done
-- rmdir "${MPI_PORTDIR}"/${imp}
-- rmdir /var/db/pkg/${imp}
-+
-+ [[ ${rc} -ne 0 ]] \
-+ && ewarn "Errors were encountered during delete_implementation()"
-+ return ${rc}
- }
-
-
- [[ ${UID} -ne 0 ]] && die "You must be root."
-+DO_EMERGE=1
-+VERBOSE=0
- targets=""
--emerge_opts="-u -a -v"
-+emerge_opts="-u" # Packages can be recompiled by hand if necessary.
- portage_tree=""
- action=""
-+
- while [[ $# -gt 0 ]]; do
- case $1 in
- -h|--help)
-@@ -307,8 +327,12 @@
- shift; imp=${1};;
- -t|--tree)
- shift; portage_tree=${1};;
-+ -o|--overlaydir)
-+ shift; MPI_PORTDIR=${1};;
- -v|--verbose)
- VERBOSE=1;;
-+ --noemerge)
-+ DO_EMERGE=0;;
- -*)
- emerge_opts="${emerge_opts} ${1}";;
- *)
-@@ -317,6 +341,18 @@
- shift
- done
-
-+if [ -z "${MPI_PORTDIR}" ]; then
-+ MPI_PORTDIR="$(portageq portdir_overlay)"
-+ MPI_PORTDIR="${MPI_PORTDIR%% *}"
-+fi
-+
-+if [ ! -d "${MPI_PORTDIR}" ]; then
-+ mkdir -p "${MPI_PORTDIR}" || die "Failed to mkdir ${MPI_PORTDIR}"
-+fi
-+
-+export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)"
-+export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}"
-+
- [[ -z ${action} ]] && usage 1 "No action defined."
- [[ -z ${imp} ]] && usage 1 "No implementation defined."
- imp_is_valid
diff --git a/sys-cluster/empi/files/empi-0.4 b/sys-cluster/empi/files/empi-0.5
index 414700fdb..0ac1bd017 100755
--- a/sys-cluster/empi/files/empi-0.4
+++ b/sys-cluster/empi/files/empi-0.5
@@ -3,7 +3,7 @@ VERSION=0.3
source /etc/init.d/functions.sh
-# imp (category) Implementation we're installing for. mpi-*
+# class (category) Implementation we're installing for. mpi-*
# targets Packages to run action on. When creating, the implementation to use.
# action create, add, update, remove.
@@ -22,12 +22,12 @@ empi-${VERSION}
Usage: ${HILITE}empi${NORMAL} ${GOOD}[actions]${NORMAL} ${BRACKET}[options]${NORMAL}
Actions:
- ${GOOD}-c, --create${NORMAL} pkgspec (Re)Initialize setup for implementation.
- ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified implementation.
- ${GOOD}-d, --delete${NORMAL} imp Remove everything related to specified implementation.
+ ${GOOD}-c, --create${NORMAL} pkgspec (Re)Initialize setup for mpi class.
+ ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified mpi class.
+ ${GOOD}-d, --delete${NORMAL} class Remove everything related to specified class.
Options:
- ${GOOD}-i, --implementation${NORMAL} imp Implementation to use.
+ ${GOOD}-C, --class${NORMAL} class MPI class to use.
${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from.
${GOOD}-o, --overlaydir${NORMAL} path Directory to use for the empi portage overlay.
${GOOD} --noemerge${NORMAL} Do not call emerge, only preform overlay setup.
@@ -36,27 +36,27 @@ Notes:
${HILITE}-${NORMAL} pkgspec is specified by a package string. Without a version, the
portageq best_visible is used. For example, all of the following
are valid: openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5.
- ${HILITE}-${NORMAL} implementation (-i) is user defined but must be prefixed with "mpi-"
+ ${HILITE}-${NORMAL} class (-c) is user defined but must be prefixed with "mpi-"
Examples:
-${BRACKET}Create a new implementation based on openmpi.${NORMAL}
- empi --create sys-cluster/openmpi --implementation mpi-ompi
+${BRACKET}Create a new class based on openmpi.${NORMAL}
+ empi --create sys-cluster/openmpi --class mpi-ompi
${BRACKET}Rebuild the above.${NORMAL}
emerge mpi-ompi/openmpi
${BRACKET}Add hpl to mpi-ompi${NORMAL}
- empi --implementation mpi-ompi --add sys-cluster/hpl
+ empi --class mpi-ompi --add sys-cluster/hpl
EOF
[[ -n $* ]] && echo && eerror "Error: $*"
exit ${rc}
}
-imp_is_valid() {
- [[ -z ${imp} ]] && usage 1 "No implementation defined."
- [[ ${imp} != mpi-* ]] && usage 1 "Implementations must be prefixed with mpi-"
- [[ ${imp//./} != ${imp} ]] && usage 1 "Implementations cannot contain . (period)"
+class_is_valid() {
+ [[ -z ${class} ]] && usage 1 "No class defined."
+ [[ ${class} != mpi-* ]] && usage 1 "Classes must be prefixed with mpi-"
+ [[ ${class//./} != ${class} ]] && usage 1 "Classes cannot contain . (period)"
}
-is_imp_category() {
+is_class_category() {
local i
for i in $(eselect mpi list -p); do
[[ ${1} == ${i} ]] && return 0
@@ -89,7 +89,7 @@ parse_pkgspecs() {
}
# handle_etc_portage package_spec
-# parses /etc/portage/package.{keywords,use}. If ${imp}/${pn} is seen, we don't
+# parses /etc/portage/package.{keywords,use}. If ${class}/${pn} is seen, we don't
# do a thing. Otherwise copy any lines that have ${cat}/${pn} inserting them again
# with the new category.
handle_etc_portage() {
@@ -99,22 +99,22 @@ handle_etc_portage() {
for ext in "keywords" "use"; do
if [ -d /etc/portage/package.${ext} ]; then
gfiles="/etc/portage/package.${ext}/*"
- f=/etc/portage/package.${ext}/${imp}
+ f=/etc/portage/package.${ext}/${class}
else
gfiles="/etc/portage/package.${ext}"
f=/etc/portage/package.${ext}
fi
- if ! grep "[>=<]*${imp}/${atom[1]}" ${gfiles} &>/dev/null; then
+ if ! grep "[>=<]*${class}/${atom[1]}" ${gfiles} &>/dev/null; then
grep "[>=<]*${atom[0]}/${atom[1]}" ${gfiles} 2>/dev/null \
- | sed "s,.*:${atom[0]},${imp}," \
+ | sed "s,.*:${atom[0]},${class}," \
| while read line; do
echo "${line}" >> ${f}
[[ ${VERBOSE} -ne 0 ]] \
&& einfo "Addition to ${f}: ${line}"
done
elif [[ ${VERBOSE} -ne 0 ]]; then
- ewarn "Keys for ${imp}/${atom[1]} already exist in ${f}. Will not replicate them."
+ ewarn "Keys for ${class}/${atom[1]} already exist in ${f}. Will not replicate them."
fi
done
}
@@ -128,7 +128,7 @@ get_ebuild_dir() {
a=($(split_atom ${1}))
[[ $? -ne 0 ]] && die "Unable to find a unique package or valid version for ${1}."
- is_imp_category ${a[0]} && die "It makes no sense to build a new mpi-implementation from a current one."
+ is_class_category ${a[0]} && die "It makes no sense to build a new mpi-class from a current one."
if [[ -z ${portage_tree} ]]; then
for d in $(portageq portdir_overlay) $(portageq portdir); do
@@ -156,25 +156,24 @@ ebuild_uses_mpi() {
}
link_ebuild_dir() {
- ln -snf "${ebuild_dir}" "${MPI_PORTDIR}"/${imp}/${ebuild_dir##*/} \
- || die "Failed to link ${ebuild_dir} to ${MPI_PORTDIR}/${imp}/${ebuild_dir##*/}"
+ ln -snf "${ebuild_dir}" "${MPI_PORTDIR}"/${class}/${ebuild_dir##*/} \
+ || die "Failed to link ${ebuild_dir} to ${MPI_PORTDIR}/${class}/${ebuild_dir##*/}"
}
do_emerge() {
[[ ${DO_EMERGE} -eq 0 ]] && return 0
- ebegin "Emerging $*"
+ einfo "Emerging $*"
emerge ${emerge_opts} $* || die "emerge failed!"
- eend
}
# We should have only one target here.
-create_implementation() {
- local mpi_imp_pkg d mpi_imp_pn
+create_class() {
+ local mpi_class_pkg d mpi_class_pn
- [[ ${#targets[@]} -ne 1 ]] && die "Can only create one implementation at a time."
+ [[ ${#targets[@]} -ne 1 ]] && die "Can only create one class at a time."
for d in $(eselect mpi list -p); do
- [ "${d}" == "${imp}" ] && die "${imp} has already been created."
+ [ "${d}" == "${class}" ] && die "${class} has already been created."
done
# Prevent laziness
@@ -183,40 +182,40 @@ create_implementation() {
parse_pkgspecs
get_ebuild_dir ${targets[0]} 1
- mpi_imp_pn=${ebuild_dir##*/}
- mpi_imp_pkg=${targets[0]}
+ mpi_class_pn=${ebuild_dir##*/}
+ mpi_class_pkg=${targets[0]}
handle_etc_portage ${targets[0]}
- targets[0]="=${imp}/${targets[0]##*/}"
+ targets[0]="=${class}/${targets[0]##*/}"
- # Refuse to break systems. If there is already an implementation
+ # Refuse to break systems. If there is already a class
# installed in that directory, we're not going to add another one as
# the eclass doesn't fix one problem just to introduce a bigger one.
- for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l 2>/dev/null);do
+ for d in $(find ${MPI_PORTDIR}/${class} -maxdepth 1 -mindepth 1 -type l 2>/dev/null);do
d=${d##*/}
- [[ ${d} == ${mpi_imp_pn} ]] && continue
+ [[ ${d} == ${mpi_class_pn} ]] && continue
for i in ${MPI_ALL_IMPS}; do
[[ ${i} == ${d} ]] \
- && die "${imp} already has MPI implementation ${d}, refusing to add ${mpi_imp_pn}"
+ && die "${class} already has MPI implementation ${d}, refusing to add ${mpi_class_pn}"
done
done
- if [[ -d "${MPI_PORTDIR}"/${imp} ]]; then
- [[ ${VERBOSE} -ne 0 ]] && ewarn "Overlay for ${imp} has already been created."
+ if [[ -d "${MPI_PORTDIR}"/${class} ]]; then
+ [[ ${VERBOSE} -ne 0 ]] && ewarn "Overlay for ${class} has already been created."
else
- mkdir -p ${MPI_PORTDIR}/${imp}
+ mkdir -p ${MPI_PORTDIR}/${class}
link_ebuild_dir
fi
- if ! grep "^${imp}$" /etc/portage/categories &>/dev/null; then
- echo "${imp}" >> /etc/portage/categories
+ if ! grep "^${class}$" /etc/portage/categories &>/dev/null; then
+ echo "${class}" >> /etc/portage/categories
fi
cat << EOF
-Creating ${HILITE}${imp}${NORMAL}
- Implementation: ${GOOD}${imp}${NORMAL}
- MPI Package: ${GOOD}${mpi_imp_pkg}${NORMAL}
- Source: ${GOOD}${ebuild_dir}${NORMAL}
- Destination: ${GOOD}${MPI_PORTDIR}/${imp}${NORMAL}
+Creating ${HILITE}${class}${NORMAL}
+ Class: ${GOOD}${class}${NORMAL}
+ MPI Implementation: ${GOOD}${mpi_class_pkg}${NORMAL}
+ Source: ${GOOD}${ebuild_dir}${NORMAL}
+ Destination: ${GOOD}${MPI_PORTDIR}/${class}${NORMAL}
EOF
do_emerge ${targets[0]}
}
@@ -225,7 +224,7 @@ EOF
add_packages(){
local i j deps
- [[ -d "${MPI_PORTDIR}"/${imp} ]] || die "Implementation ${imp} has not been created yet."
+ [[ -d "${MPI_PORTDIR}"/${class} ]] || die "Class ${class} has not been created yet."
[[ ${#targets[@]} -lt 1 ]] && die "You need to specify at least one package"
parse_pkgspecs
@@ -234,7 +233,7 @@ add_packages(){
if ebuild_uses_mpi ${ebuild_dir} ${targets[i]}; then
link_ebuild_dir
handle_etc_portage ${targets[i]}
- targets[i]="=${imp}/${targets[i]##*/}"
+ targets[i]="=${class}/${targets[i]##*/}"
else
targets[i]="=${targets[i]}"
fi
@@ -254,21 +253,21 @@ add_packages(){
done
done
cat << EOF
-Adding packages to ${HILIGHT}${imp}${NORMAL}
+Adding packages to ${HILIGHT}${class}${NORMAL}
Packages: ${GOOD}${targets[@]}${NORMAL}
EOF
do_emerge ${targets[@]}
}
-delete_implementation() {
- local pkgs=( $(ls /var/db/pkg/${imp}/ 2>/dev/null) )
+delete_class() {
+ local pkgs=( $(ls /var/db/pkg/${class}/ 2>/dev/null) )
local ext d i rc
- [[ -d "${MPI_PORTDIR}"/${imp} ]] || die "Implementation ${imp} has not been created yet."
+ [[ -d "${MPI_PORTDIR}"/${class} ]] || die "Class ${class} has not been created yet."
rc=0
for (( i=0; i<${#pkgs[@]}; i++)); do
- pkgs[i]="=${imp}/${pkgs[i]}"
+ pkgs[i]="=${class}/${pkgs[i]}"
done
if [[ ${#pkgs[@]} -gt 0 ]] && ! emerge -C ${emerge_opts/-u/} ${pkgs[@]}; then
@@ -277,29 +276,29 @@ delete_implementation() {
for ext in "keywords" "use"; do
if [ -d /etc/portage/package.${ext} ]; then
- rm /etc/portage/package.${ext}/${imp} &>/dev/null
+ rm /etc/portage/package.${ext}/${class} &>/dev/null
rc=$((rc+$?))
elif [ -f /etc/portage/package.${ext} ]; then
- sed -i -e "/${imp}\//d" /etc/portage/package.${ext}
+ sed -i -e "/${class}\//d" /etc/portage/package.${ext}
rc=$((rc+$?))
fi
done
- [ ! -f /etc/portage/categories ] || sed -i -e "/^${imp}$/d" /etc/portage/categories
+ [ ! -f /etc/portage/categories ] || sed -i -e "/^${class}$/d" /etc/portage/categories
rc=$((rc+$?))
- for d in $(ls "${MPI_PORTDIR}"/${imp}/ 2>/dev/null); do
- rm "${MPI_PORTDIR}"/${imp}/${d}
+ for d in $(ls "${MPI_PORTDIR}"/${class}/ 2>/dev/null); do
+ rm "${MPI_PORTDIR}"/${class}/${d}
rc=$((rc+$?))
done
- for d in "${MPI_PORTDIR}/${imp}" /var/db/pkg/${imp}; do
+ for d in "${MPI_PORTDIR}/${class}" /var/db/pkg/${class}; do
[ ! -d "${d}" ] || rmdir "${d}"
rc=$((rc+$?))
done
[[ ${rc} -ne 0 ]] \
- && ewarn "Errors were encountered during delete_implementation()"
+ && ewarn "Errors were encountered during delete_class()"
return ${rc}
}
@@ -322,9 +321,9 @@ while [[ $# -gt 0 ]]; do
action="${action}add";;
-d|--delete)
action="${action}delete"
- shift; imp=${1};;
- -i|--implementation)
- shift; imp=${1};;
+ shift; class=${1};;
+ -C|--class)
+ shift; class=${1};;
-t|--tree)
shift; portage_tree=${1};;
-o|--overlaydir)
@@ -351,12 +350,11 @@ if [ ! -d "${MPI_PORTDIR}" ]; then
fi
export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)"
-export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}"
+export PKGDIR="$(portageq envvar PKGDIR)/mpi/${class}"
[[ -z ${action} ]] && usage 1 "No action defined."
-[[ -z ${imp} ]] && usage 1 "No implementation defined."
-imp_is_valid
+class_is_valid
-[[ ${action} == *create* ]] && create_implementation
+[[ ${action} == *create* ]] && create_class
[[ ${action} == *add* ]] && add_packages
-[[ ${action} == *delete* ]] && delete_implementation
+[[ ${action} == *delete* ]] && delete_class
diff --git a/sys-cluster/hpl/ChangeLog b/sys-cluster/hpl/ChangeLog
deleted file mode 100644
index bfba8ab8a..000000000
--- a/sys-cluster/hpl/ChangeLog
+++ /dev/null
@@ -1,49 +0,0 @@
-# ChangeLog for sys-cluster/hpl
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/hpl/ChangeLog,v 1.11 2007/04/26 06:04:44 dberkholz Exp $
-
- 07 Jul 2008; Tim Cera <timcera@earthlink.net> hpl-1.0-r3.ebuild:
- Minor repoman edits.
-
- 29 Feb 2008; Justin Bronder <jsbronder@gentoo.org> ChangeLog:
- Use mpi.eclass for empi support. Add ~amd64
-
- 26 Apr 2007; Donnie Berkholz <dberkholz@gentoo.org>; metadata.xml:
- Update for cluster herd split to hp-cluster and ha-cluster.
-
- 09 Feb 2007; Diego Pettenò <flameeyes@gentoo.org> ChangeLog:
- Regenerate digest in Manifest2 format.
-
- 28 Jan 2006; Simon Stelling <blubb@gentoo.org>
- -files/Make.gentoo_hpl_cblas_x86.diff.bz2:
- remove unneeded files
-
- 21 Nov 2005; Michael Imhof <tantive@gentoo.org> -hpl-1.0.ebuild,
- -hpl-1.0-r1.ebuild:
- Cleaned out old ebuilds.
-
- 17 Sep 2005; Ciaran McCreesh <ciaranm@gentoo.org> ChangeLog:
- Converted to UTF-8, fixed encoding screwups
-
-*hpl-1.0-r2 (01 Sep 2005)
-
- 01 Sep 2005; Peter Bienstman <pbienst@gentoo.org> +hpl-1.0-r2.ebuild:
- Move to virtual/blas and virtual/lapack.
-
-*hpl-1.0-r1 (06 Jul 2005)
-
- 06 Jul 2005; Robin H. Johnson <robbat2@gentoo.org> +hpl-1.0-r1.ebuild:
- Update hpl build to work with virtual/mpi including fixing it to compile via
- mpicc so it works with lam-mpi. Also include parameters to /usr/share/hpl
- and force the user to copy them instead of polluting /usr/bin.
-
- 28 Dec 2004; Olivier Fisette <ribosome@gentoo.org> hpl-1.0.ebuild:
- Dependency update: dev-libs/atlas -> sci-libs/atlas.
-
- 27 Apr 2004; Aron Griffis <agriffis@gentoo.org> hpl-1.0.ebuild:
- Add inherit eutils
-
-*hpl-1.0 (26 Mar 2004)
-
- 26 Mar 2004; Michael Imhof <tantive@gentoo.org> hpl-1.0.ebuild:
- Initial release. Made with the help of Kristian Jerpetjøn <unsolo@sysrq.no>.
diff --git a/sys-cluster/hpl/Manifest b/sys-cluster/hpl/Manifest
index cbe4b9ddf..655fb2acf 100644
--- a/sys-cluster/hpl/Manifest
+++ b/sys-cluster/hpl/Manifest
@@ -1,4 +1,3 @@
DIST hpl.tgz 523139 RMD160 3a2baecfe746d8ab5b5a9d6e1579a1aa5d249294 SHA1 42ae3b5173b22be41282568effccf46041079c1c SHA256 c0a08079a4c54e0ac32901d68d135fe17fffc3df322c95fbd9b23cb5d400827e
-EBUILD hpl-1.0-r3.ebuild 1924 RMD160 321c4411450f53227e517bfbb3cbf3106aed19cf SHA1 0f388435a202d6148b2f8009627fc21257d9f054 SHA256 03a9e12742d704bf7242d1cdb2c2e7cdf10e192a2db6f639be3faccec889707a
-MISC ChangeLog 1750 RMD160 5b22e29ff7cc0dbfd43a3508b0f37dbdfa6a54c3 SHA1 02f432ba400ec04eff6fbe8b305fb3d35aa7b1bf SHA256 a058874be27eee0c726d4a0dfada6ffd4b6711aab277a6195f5f09a075940d9d
+EBUILD hpl-1.0-r3.ebuild 1898 RMD160 d600decdc7f96c141e1b3a7c1490a6ebca2a2e52 SHA1 c9feecd6ac9d65fd9bd82e96b19e1809c57b50d8 SHA256 bfe01a03309e66434669929f7df5301e92dae21bf991196bf453f92b699a7a12
MISC metadata.xml 315 RMD160 12fe02dce4baa2046922f5865314c98555bd4132 SHA1 14bfa132c839c12f26e4ac1106227d2303c69e43 SHA256 d95f6835d819d4bf1bb74ac46c8259d1db23b0cfb8cd49a2a436b601f8953bd5
diff --git a/sys-cluster/hpl/hpl-1.0-r3.ebuild b/sys-cluster/hpl/hpl-1.0-r3.ebuild
index e0cd49fd1..7e7a95db5 100644
--- a/sys-cluster/hpl/hpl-1.0-r3.ebuild
+++ b/sys-cluster/hpl/hpl-1.0-r3.ebuild
@@ -17,7 +17,7 @@ DEPEND="$(mpi_pkg_deplist)
virtual/lapack"
src_unpack() {
- local mpicc_path="$(get_eselect_var MPI_CC)"
+ local mpicc_path="$(mpi_pkg_cc)"
unpack ${A}
cd "${S}"
@@ -31,18 +31,17 @@ src_unpack() {
-e "/^LINKER\>/s,= .*,= ${mpicc_path}," \
-e "/^CC\>/s,= .*,= ${mpicc_path}," \
Make.gentoo_hpl_fblas_x86
-
}
src_compile() {
# do NOT use emake here
- mpi_make_cmd="make"
- mpi_make_args="arch=gentoo_hpl_fblas_x86"
- HOME=${WORKDIR} mpi_do_make || die
+ mpi_pkg_set_env
+ HOME=${WORKDIR} make arch=gentoo_hpl_fblas_x86 || die
+ mpi_pkg_restore_env
}
src_install() {
- local d=$(get_mpi_dir)
+ local d=$(mpi_root)
mpi_dobin bin/gentoo_hpl_fblas_x86/xhpl || die "Failed to install bins"
mpi_dolib.a lib/gentoo_hpl_fblas_x86/libhpl.a || die "Failed to install lib"
mpi_dodoc INSTALL BUGS COPYRIGHT HISTORY README TUNING \
@@ -52,7 +51,7 @@ src_install() {
}
pkg_postinst() {
- einfo "Remember to copy $(get_mpi_dir)/usr/share/doc/${PF}/HPL.dat to your working directory first!"
+ einfo "Remember to copy $(mpi_root)usr/share/doc/${PF}/HPL.dat to your working directory first!"
einfo "For mpich, run linpack by executing this in your working directory"
einfo "\"mpirun -np 4 /usr/bin/xhpl\""
einfo "where -np specifies the number of processes."
diff --git a/sys-cluster/lam-mpi/Manifest b/sys-cluster/lam-mpi/Manifest
index 0f06014fa..588afc522 100644
--- a/sys-cluster/lam-mpi/Manifest
+++ b/sys-cluster/lam-mpi/Manifest
@@ -1,8 +1,8 @@
AUX 7.1.2-lam_prog_f77.m4.patch 529 RMD160 1693107a9e2fa7fbef0e6b59f082ab8082a61522 SHA1 263b63c1ca7a32621338e54bcf98cee8e4345eb6 SHA256 5164b1f5d6abffc93f1ec113ca1711e34938246d9d3f43318375ecc90201bf9b
AUX 7.1.2-liblam-use-extra-libs.patch 490 RMD160 f52c0c3490a5d7dd9fa3993032c64c5fd7ef4295 SHA1 dad163d483a8a35cf4cb3a5cb7c572e7f21fabf8 SHA256 580a84ef0364d9ea9bf204024906d18b7b00338e48cfafdc04f2d82d9c4b6870
AUX 7.1.4-as-needed.patch 3702 RMD160 ba3dd579d482d67ec47721a764ebe5cf9c12de6f SHA1 635660a50dcd4bb176fd62a234895383e37ebcb4 SHA256 8e2792244742180ca5f9e829c16597ad9a85e955f8fd512a81515c304ed4e2cf
-AUX eselect.mpi.lam-mpi 201 RMD160 bd458925228222b1109f6d8902132348c6e32571 SHA1 9b36f2b9ea10d578d183f3388fd0e149957f8bc9 SHA256 42aeba404585d0da00948029735239fe3fab30549f0ec9f99ae07ec0b73d3319
+AUX eselect.mpi.lam-mpi 197 RMD160 bde4d1483f8069eeca30d9f8a3f9007feabc2436 SHA1 911dc7fd2421d4ed8ae4cb63fd53be9d1973b92e SHA256 5d6e53a8ea31317cb327e17c21f852271d8b324fe59925c88ebc561b2b6e7de8
DIST lam-7.1.4.tar.bz2 7865813 RMD160 6c9c6338391472d4cd2572c409cb92360e7fd799 SHA1 ce8a983004f31d5960d34efe3ed9ac489e9dfc9d SHA256 d66c205f57d9ffc38dbfb81faef8b586ef2b9e08853034c0472ef4ae45803d2e
-EBUILD lam-mpi-7.1.4-r1.ebuild 3941 RMD160 0ab425ddce6bcb770a8749fc8db9ca8d311574e1 SHA1 08a6b98e71eeff13475302f295f4252a368fd721 SHA256 da9f8d2e9f31ecc4b5176540d14976e33950f1eaf21cd9c43cefe5f750d23d36
+EBUILD lam-mpi-7.1.4-r1.ebuild 3762 RMD160 f6ab319a94fa7ba60dae8f62856a862aa73ec264 SHA1 d1227c61f9d1375b61c07f21257212e4e214a951 SHA256 139c7b12f31359ca405f23f70a354214b5d0937a49878fe7d6d2d9d2c31e1554
MISC ChangeLog 11394 RMD160 4757bf338b07da5a7faf8021290860c9ab2d0099 SHA1 8eb431c97a7e651b2d24a8608074b741b5f97202 SHA256 5570dcc2d15b23edf7767a8196b603a994df749dbbaef882a6cd8cfb83156012
MISC metadata.xml 163 RMD160 ea1530cd45b9e04e8693261b9a94b5988e4b09a1 SHA1 443b7a3d8fb76c8d20647b165032ad358bfa3b6a SHA256 5a03bf3074b07158dffe793af69f7b0cd1e5c785537574713f9a7978032363a3
diff --git a/sys-cluster/lam-mpi/files/eselect.mpi.lam-mpi b/sys-cluster/lam-mpi/files/eselect.mpi.lam-mpi
index 848fc0daf..357a32824 100644
--- a/sys-cluster/lam-mpi/files/eselect.mpi.lam-mpi
+++ b/sys-cluster/lam-mpi/files/eselect.mpi.lam-mpi
@@ -1,7 +1,7 @@
-MPI_CC=@ROOT@/usr/bin/mpicc
-MPI_CXX=@ROOT@/usr/bin/mpic++
-MPI_F77=@ROOT@/usr/bin/mpif77
-MPI_BUILT_WITH=@BUILT_WITH@
-PATH=@ROOT@/usr/bin
-MANPATH=@ROOT@/usr/share/man
-LD_LIBRARY_PATH=@ROOT@/usr/@LIBDIR@
+MPI_CC=@ROOT@usr/bin/mpicc
+MPI_CXX=@ROOT@usr/bin/mpic++
+MPI_F77=@ROOT@usr/bin/mpif77
+CLASS_BASE_MPI_IMP=@BASE_IMP@
+PATH=@ROOT@usr/bin
+MANPATH=@ROOT@usr/share/man
+LD_LIBRARY_PATH=@ROOT@usr/@LIBDIR@
diff --git a/sys-cluster/lam-mpi/lam-mpi-7.1.4-r1.ebuild b/sys-cluster/lam-mpi/lam-mpi-7.1.4-r1.ebuild
index 9d5ece5ef..61a3169d8 100644
--- a/sys-cluster/lam-mpi/lam-mpi-7.1.4-r1.ebuild
+++ b/sys-cluster/lam-mpi/lam-mpi-7.1.4-r1.ebuild
@@ -23,7 +23,7 @@ KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
LICENSE="lam-mpi"
src_unpack() {
- local docdir=${D}$(get_mpi_dir)/usr/share/doc/${PF}
+ local docdir=${D}$(mpi_root)/usr/share/doc/${PF}
unpack ${A}
cd "${S}"
@@ -67,14 +67,15 @@ pkg_setup() {
einfo
# fortran_pkg_setup should -not- be run here.
- mpi_pkg_setup
}
src_compile() {
+ local c
+
if use crypt; then
- mpi_conf_args="${mpi_conf_args} --with-rsh=ssh"
+ c="${c} --with-rsh=ssh"
else
- mpi_conf_args="${mpi_conf_args} --with-rsh=rsh"
+ c="${c} --with-rsh=rsh"
fi
if ! use pbs; then
@@ -95,36 +96,35 @@ src_compile() {
fortran_pkg_setup
# this is NOT in pkg_setup as it is NOT needed for RDEPEND right away it
# can be installed after merging from binary, and still have things fine
- mpi_conf_args="${mpi_conf_args} --with-fc=${FORTRANC}"
+ c="${c} --with-fc=${FORTRANC}"
else
- mpi_conf_args="${mpi_conf_args} --without-fc"
+ c="${c} --without-fc"
fi
- mpi_conf_args="
- $(use_with xmpi trillium)
- --enable-shared
- --with-threads=posix
- $(use_with romio)
- ${mpi_conf_args}"
- mpi_src_compile
+ econf $(mpi_econf_args) ${c} \
+ $(use_with xmpi trillium) \
+ --enable-shared \
+ --with-threads=posix \
+ $(use_with romio) || die
+ emake || die
}
src_install () {
- mpi_src_install
+ emake DESTDIR="${D}" install || die
# There are a bunch more tex docs we could make and install too,
# but they are replicated in the pdfs!
mpi_dodoc README HISTORY VERSION
mpi_dodoc "${S}"/doc/{user,install}.pdf
- # It's your fault if you install lam-mpi multiple times and keep this
- # flag turned on, there's -a lot- of examples.
if use examples; then
cd "${S}"/examples
mpi_dodir /usr/share/${P}/examples
find -name README -or -iregex '.*\.[chf][c]?$' >"${T}"/testlist
while read p; do
- treecopy $p "${D}"/$(get_mpi_dir)/usr/share/${P}/examples ;
+ treecopy $p "${D}"/$(mpi_root)/usr/share/${P}/examples ;
done < "${T}"/testlist
fi
+
+ mpi_imp_add_eselect
}
diff --git a/sys-cluster/mpe2/Manifest b/sys-cluster/mpe2/Manifest
index cc2b2a69e..e96a16854 100644
--- a/sys-cluster/mpe2/Manifest
+++ b/sys-cluster/mpe2/Manifest
@@ -1,3 +1,3 @@
DIST mpe2-1.0.6p1.tar.gz 9313216 RMD160 1c52f379c3fff4bac5c68505ca657584d8092f7f SHA1 bc810c7a1f3ef5b9cf2563278053afadbc2029f2 SHA256 23cfef2b8a0a27408b5bdadeb216ba3adb3b02bf40d0fa6fc0a110cefd8c5863
-EBUILD mpe2-1.0.6_p1.ebuild 3752 RMD160 250378f8b6ff2370ff69a520cf91882387de2c59 SHA1 1779caa2911833538cb9eaf0120fa77d343a6124 SHA256 7566a0c7438c7c164f9f0981bfe020f70772a736b16be7a483dbc8511fb2556a
+EBUILD mpe2-1.0.6_p1.ebuild 3534 RMD160 5cc948ba5f2c109a16c25e5edf965139576b45c1 SHA1 1ffdb0c1cb303ac63d6f14ffe5ad65a9d449d63e SHA256 e6b7f30a7f312cb93e013bb23889121c923131b3d973136738f8c97c84d9cd5e
MISC metadata.xml 262 RMD160 28b216487d02e3543ce0ceac0e7e3fd60cbe63bc SHA1 b700ba0837d2e5d604092b3b44960885c785c5b4 SHA256 c34f39ce5df0360b6bd1b55f67e26f35a8d482be2082951e27102ff850c58be5
diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
index 68a68e9e8..cda046424 100644
--- a/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
+++ b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
+MPI_PKG_NEED_IMPS="openmpi mpich2"
inherit fortran eutils java-utils-2 mpi
MY_P=${P/_/}
@@ -14,8 +15,6 @@ SLOT="0"
KEYWORDS="~amd64"
IUSE="minimal fortran threads debug"
-MPI_EMPI_COMPAT="openmpi mpich2"
-
COMMON_DEPEND="$(mpi_pkg_deplist)
!minimal? ( x11-libs/libXtst
x11-libs/libXi )"
@@ -40,14 +39,7 @@ MPE_IMP=""
pkg_setup() {
local i
- mpi_pkg_setup
- if [ -n "${MPI_IMP}" ]; then
- MPE_IMP=$(mpi_built_with)
- else
- # Hack until mpi.eclass is fixed to store ${PN}
- has_version "sys-cluster/openmpi" && MPE_IMP="openmpi"
- has_version "sys-cluster/mpich2" && MPE_IMP="mpich2"
- fi
+ MPE_IMP=$(mpi_pkg_base_imp)
if use fortran ; then
FORTRAN="g77 gfortran ifort ifc"
@@ -64,7 +56,7 @@ pkg_setup() {
export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
- if [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
elog ""
elog "Currently src_test fails on collchk with openmpi, hence"
elog "testing is disabled by default. If you would like to"
@@ -85,11 +77,11 @@ src_unpack() {
}
src_compile() {
- local c="--with-mpicc=$(get_eselect_var MPI_CC)"
- local d=$(get_mpi_dir)
+ local c="--with-mpicc=$(mpi_pkg_cc)"
+ local d=$(mpi_root)
- if [ -n "${FORTRANC}" ]; then
- c="${c} --with-mpif77=$(get_eselect_var MPI_F77)"
+ if [ -n "${FORTRANC}" -a -n "$(mpi_pkg_f77)" ]; then
+ c="${c} --with-mpif77=$(mpi_pkg_f77)"
export F77=${FORTRANC}
else
c="${c} --disable-f77"
@@ -101,33 +93,33 @@ src_compile() {
c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
fi
- if [[ "${MPE_IMP}" == openmpi* ]]; then
+ if [[ "${MPE_IMP}" == openmpi ]]; then
c="${c} --disable-rlog --disable-sample"
fi
- mpi_conf_args="${c}
- --sysconfdir=/etc/${PN}
- --with-htmldir=${d}/usr/share/${PN}
- --with-docdir=${d}/usr/share/${PN}
- --enable-collchk
- --enable-wrappers
- $(use_enable !minimal graphics)
- $(use_enable threads threadlogging )
- $(use_enable debug g)"
- mpi_src_compile
-
-#--with-mpicc=/usr/bin/mpicc \
-#--with-mpif77=/usr/bin/mpif77 \
+ mpi_pkg_set_env
+ econf $(mpi_econf_args) ${c} \
+ --sysconfdir=/etc/$(mpi_class)/${PN} \
+ --with-htmldir=${d}usr/share/${PN} \
+ --with-docdir=${d}usr/share/${PN} \
+ --enable-collchk \
+ --enable-wrappers \
+ $(use_enable !minimal graphics) \
+ $(use_enable threads threadlogging) \
+ $(use_enable debug g) \
+ || die
+ emake || die
+ mpi_pkg_restore_env
}
src_test() {
local rc
- local d=$(get_mpi_dir)
+ local d=$(mpi_root)
cd "${S}"
- if [[ "${MPE_IMP}" == mpich2* ]]; then
- "${ROOT}"${d}/usr/bin/mpd -d --pidfile="${T}"/mpd.pid
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ "${ROOT}"${d}usr/bin/mpd -d --pidfile="${T}"/mpd.pid
elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
elog
elog "Skipping tests for openmpi"
@@ -138,20 +130,20 @@ src_test() {
emake \
CC="${S}"/bin/mpecc \
FC="${S}"/bin/mpefc \
- MPERUN="${ROOT}${d}/usr/bin/mpiexec -n 4" \
+ MPERUN="${ROOT}${d}usr/bin/mpiexec -n 4" \
CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
check;
rc=${?}
- if [[ "${MPE_IMP}" == mpich2* ]]; then
- "${ROOT}"${d}/usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
+ if [[ "${MPE_IMP}" == mpich2 ]]; then
+ "${ROOT}"${d}usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
fi
return ${rc}
}
src_install() {
- local d=$(get_mpi_dir)
+ local d=$(mpi_root)
cd "${S}"
emake DESTDIR="${D}" install || die
- rm -f "${D}"/${d}/usr/sbin/mpeuninstall
+ rm -f "${D}"/${d}usr/sbin/mpeuninstall
}
diff --git a/sys-cluster/mpich2/Manifest b/sys-cluster/mpich2/Manifest
index ef260bbec..f9b94b7aa 100644
--- a/sys-cluster/mpich2/Manifest
+++ b/sys-cluster/mpich2/Manifest
@@ -1,9 +1,9 @@
-AUX eselect.mpi.mpich2 231 RMD160 d4290065172c4a83d02777996bd862b1da2eb832 SHA1 879f4b7bdb29c1816dd3d59b12c1b22ea434bf8d SHA256 452b1c3fb9dca8896ec429843a41c0721f00be48d253b44c362923f33a1bd4f9
+AUX eselect.mpi.mpich2 226 RMD160 62e00e1f67ff5cc088d7aa3ef082241afef33bde SHA1 f89ddfb1a10251f5023093f6577ebb8265d55627 SHA256 ffad3f539f008c597077aee91a7c635968311c8b3124619acb727facd0d1e99e
AUX mpd.conf 48 RMD160 289de9bb40759e3f71229cf47e4d2af83703a85f SHA1 244eee76dbf4ff269e4489d5cc7c3577c6c1fa6b SHA256 ae740cacaf2cb798921cb2092f5af98de67445e27af3f88858f3e6d2bbb127f4
AUX mpich2-1.0.8-gforker-install-alt-fix.patch 621 RMD160 5b9904ae02f1c1098fdfd2dc4717610f89469afd SHA1 a33bcefa87d990a678436ebfac70976069a7f90d SHA256 a79e469b08e0a3f6c17ec7ec7ea01d3a56a553803fefd24f3794237eead36ced
AUX mpich2-1.0.8-mpdconf-env.patch 5041 RMD160 c3d9f6ebd43443a24614da030253cf8c503afd59 SHA1 5b453a171f8b1dce93e3c2e675e5b3d4f05514e8 SHA256 b8c81614bba8c748db2ec24a7683d27b3a0430950fecd5644fd1f97f8e5ab2f9
AUX mpich2-1.0.8-site-packages-py.patch 7534 RMD160 93b2cab20620da379615eaf3bfc7279384987722 SHA1 706313c20e1d4d6a4a060c8ac36befdb5ee3b926 SHA256 a857e7c0effa7cdd62c1bc1bd054b4746764246410062d373e7e0892bcd20df8
-AUX mpich2.envd 37 RMD160 bd41e2b43f62629d5f1922480bce70c7b7c4266a SHA1 c192f12edc72a9c9a708054ee3ff40091b289331 SHA256 a44e0a2e248c1112efe168e859f57ba1213a34003b657f72e401c1274fe5ba11
+AUX mpich2.envd 45 RMD160 e29a0d617bbc15cc42d3088f8a79c1c715b353fa SHA1 765b885d0e1d65fe7ba845cf72e3e923613d6514 SHA256 d6f128f84e1d015922af42e1280586b84737740b2517cc0b35f498b571f252f9
DIST mpich2-1.0.8.tar.gz 17237476 RMD160 646cf50fbdc60a49809f4d0a6bcaf2835844db1f SHA1 41d6f6ce1034ecec5c14fb03592730ae2dd071e5 SHA256 7551ce20f3ef366567c566d08782323360b5dbd2d15d816e41c10b5f96eaf369
-EBUILD mpich2-1.0.8.ebuild 5361 RMD160 13ace1817e5a56359aae00a1dbf7463a0c33a6ad SHA1 79930392a9ffc059008bcc963225500e3201d121 SHA256 323ac466fa11408c9138be1cf2eac489b80c65883d77d0110143e841043261c4
+EBUILD mpich2-1.0.8.ebuild 5588 RMD160 2c546d34d3398308f1015044aa944ed7da061eb0 SHA1 d0f92429a255250843b8bc694d303ffacb493d80 SHA256 1d2fd4122453043bcacb38b503d634d8e2f232df6ddb5d8c9c1f01840820d848
MISC metadata.xml 468 RMD160 98d955b7fd33a5b54c618424df4bc1237bb91a21 SHA1 eb055936e1a4ecafa846c1b7be6bc8c96d503ba1 SHA256 9516aa2c4536c5bc0555b42af1019a82e0f027ba8e52c0c46bcb5ee3fff8a765
diff --git a/sys-cluster/mpich2/files/eselect.mpi.mpich2 b/sys-cluster/mpich2/files/eselect.mpi.mpich2
index 3af30f07d..eca2a6232 100644
--- a/sys-cluster/mpich2/files/eselect.mpi.mpich2
+++ b/sys-cluster/mpich2/files/eselect.mpi.mpich2
@@ -1,8 +1,8 @@
-MPI_CC=@ROOT@/usr/bin/mpicc
-MPI_CXX=@ROOT@/usr/bin/mpicxx
-MPI_F77=@ROOT@/usr/bin/mpif77
-MPI_F90=@ROOT@/usr/bin/mpif90
-MPI_BUILT_WITH=@BUILT_WITH@
-PATH=@ROOT@/usr/bin
-MANPATH=@ROOT@/usr/share/man
-LD_LIBRARY_PATH=@ROOT@/usr/@LIBDIR@
+MPI_CC=@ROOT@usr/bin/mpicc
+MPI_CXX=@ROOT@usr/bin/mpicxx
+MPI_F77=@ROOT@usr/bin/mpif77
+MPI_F90=@ROOT@usr/bin/mpif90
+CLASS_BASE_MPI_IMP=@BASE_IMP@
+PATH=@ROOT@usr/bin
+MANPATH=@ROOT@usr/share/man
+LD_LIBRARY_PATH=@ROOT@usr/@LIBDIR@
diff --git a/sys-cluster/mpich2/files/mpich2.envd b/sys-cluster/mpich2/files/mpich2.envd
index 872f95fb0..624fedede 100644
--- a/sys-cluster/mpich2/files/mpich2.envd
+++ b/sys-cluster/mpich2/files/mpich2.envd
@@ -1 +1 @@
-MPD_CONF_FILE="/etc/mpich2/mpd.conf"
+MPD_CONF_FILE="@MPD_CONF_FILE_DIR@/mpd.conf"
diff --git a/sys-cluster/mpich2/mpich2-1.0.8.ebuild b/sys-cluster/mpich2/mpich2-1.0.8.ebuild
index d67e85d75..0defe2fd8 100644
--- a/sys-cluster/mpich2/mpich2-1.0.8.ebuild
+++ b/sys-cluster/mpich2/mpich2-1.0.8.ebuild
@@ -13,7 +13,7 @@ SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE="nocxx debug doc fortran pvfs2 threads romio mpi-threads"
-MPI_NOEMPI_BLOCKERS="media-sound/mpd"
+MPI_UNCLASSED_BLOCKERS="media-sound/mpd"
COMMON_DEPEND="dev-lang/perl
>=dev-lang/python-2.3
@@ -30,7 +30,6 @@ RDEPEND="${COMMON_DEPEND}
pkg_setup() {
MPI_ESELECT_FILE="eselect.mpi.mpich2"
- mpi_pkg_setup
if [ -n "${MPICH_CONFIGURE_OPTS}" ]; then
elog "User-specified configure options are ${MPICH_CONFIGURE_OPTS}."
@@ -48,6 +47,12 @@ pkg_setup() {
die "USE=mpi-threads requires USE=threads"
fi
+ if mpi_classed; then
+ MPD_CONF_FILE_DIR=/etc/$(mpi_class)
+ else
+ MPD_CONF_FILE_DIR=/etc/${PN}
+ fi
+
python_version
}
@@ -90,33 +95,33 @@ src_unpack() {
}
src_compile() {
- local mpi_conf_args="${MPICH_CONFIGURE_OPTS} --enable-sharedlibs=gcc"
+ local c="${MPICH_CONFIGURE_OPTS} --enable-sharedlibs=gcc"
local romio_conf
# The configure statements can be somewhat confusing, as they
# don't all show up in the top level configure, however, they
# are picked up in the children directories.
- use debug && mpi_conf_args="${mpi_conf_args} --enable-g=all --enable-debuginfo"
+ use debug && c="${c} --enable-g=all --enable-debuginfo"
if use threads ; then
- mpi_conf_args="${mpi_conf_args} --with-thread-package=pthreads"
+ c="${c} --with-thread-package=pthreads"
else
- mpi_conf_args="${mpi_conf_args} --with-thread-package=none"
+ c="${c} --with-thread-package=none"
fi
# enable f90 support for appropriate compilers
case "${FORTRANC}" in
gfortran|if*)
- mpi_conf_args="${mpi_conf_args} --enable-f77 --enable-f90";;
+ c="${c} --enable-f77 --enable-f90";;
g77)
- mpi_conf_args="${mpi_conf_args} --enable-f77 --disable-f90";;
+ c="${c} --enable-f77 --disable-f90";;
esac
if use mpi-threads; then
- mpi_conf_args="${mpi_conf_args} --enable-threads=multiple"
+ c="${c} --enable-threads=multiple"
else
- mpi_conf_args="${mpi_conf_args} --enable-threads=single"
+ c="${c} --enable-threads=single"
fi
if use pvfs2; then
@@ -124,19 +129,17 @@ src_compile() {
romio_conf="--with-file-system=pvfs2+nfs+ufs --with-pvfs2=/usr"
fi
- mpi_conf_args="
- ${mpi_conf_args}
- ${romio_conf}
- --sysconfdir=/etc/${PN}
- --with-pm=mpd:gforker
- --disable-mpe
- $(use_enable romio)
- $(use_enable !nocxx cxx)"
- # Oh, the irony, we can't parallel make.
+ ! mpi_classed && c="${c} --sysconfdir=/etc/${PN}"
+ econf $(mpi_econf_args) ${c} ${romio_conf} \
+ --with-pm=mpd:gforker \
+ --disable-mpe \
+ $(use_enable romio) \
+ $(use_enable !nocxx cxx) \
+ || die
+ # Oh, the irony.
# http://www.mcs.anl.gov/research/projects/mpich2/support/index.php?s=faqs#parmake
# https://trac.mcs.anl.gov/projects/mpich2/ticket/297
- mpi_make_args="-j1"
- mpi_src_compile
+ emake -j1 || die
}
src_test() {
@@ -161,12 +164,13 @@ src_test() {
}
src_install() {
- local d=$(get_mpi_dir)
- dodir /etc/"${PN}"
- insinto /etc/"${PN}"
- doins "${FILESDIR}"/mpd.conf || die
+ local d=$(mpi_root)
+
+ emake DESTDIR="${D}" install || die
- mpi_src_install
+ dodir ${MPD_CONF_FILE_DIR}
+ insinto ${MPD_CONF_FILE_DIR}
+ doins "${FILESDIR}"/mpd.conf || die
mpi_dodir /usr/share/doc/${PF}
mpi_dodoc COPYRIGHT README README.romio README.testing \
@@ -180,15 +184,26 @@ src_install() {
mv "${D}"/${d}/usr/share/doc/www*/* "${D}"/${d}/usr/share/doc/${PF}/www/
fi
- newenvd "${FILESDIR}"/${PN}.envd 25mpich2
+ #TODO: Need to handle python path here if mpi_classed?
+ cp "${FILESDIR}"/${PN}.envd "${T}"/
+ sed -i "s,@MPD_CONF_FILE_DIR@,${MPD_CONF_FILE_DIR}," \
+ "${T}"/${PN}.envd
+
+ if mpi_classed; then
+ newenvd "${T}"/${PN}.envd 25mpich2-$(mpi_class)
+ else
+ newenvd "${FILESDIR}"/${PN}.envd 25mpich2
+ fi
+
+ mpi_imp_add_eselect
}
pkg_postinst() {
# Here so we can play with ebuild commands as a normal user
- chown root:root "${ROOT}"etc/${PN}/mpd.conf
- chmod 600 "${ROOT}"etc/${PN}/mpd.conf
+ chown root:root "${ROOT}"${MPD_CONF_FILE_DIR}/mpd.conf
+ chmod 600 "${ROOT}"${MPD_CONF_FILE_DIR}/mpd.conf
- python_mod_optimize $(get_mpi_dir)/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
+ python_mod_optimize $(mpi_root)/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
elog ""
elog "MPE2 has been removed from this ebuild and now stands alone"
elog "as sys-cluster/mpe2."
@@ -196,6 +211,6 @@ pkg_postinst() {
}
pkg_postrm() {
- python_mod_cleanup $(get_mpi_dir)/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
+ python_mod_cleanup $(mpi_root)/usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
}
diff --git a/sys-cluster/openib-mvapich2/Manifest b/sys-cluster/openib-mvapich2/Manifest
index 632544b5e..f361aafb6 100644
--- a/sys-cluster/openib-mvapich2/Manifest
+++ b/sys-cluster/openib-mvapich2/Manifest
@@ -5,7 +5,7 @@ DIST mvapich2-1.0.1.tar.gz 14062480 RMD160 da9e4dd07998d82ead0276e8b264a487c4d4f
DIST mvapich2-1.0.tar.gz 14061056 RMD160 ba57d0d51bbdd3956dce446575d2ecbed4fe5b2f SHA1 b2f6ecf3e3b06c63b443bbcc55c2043f6d683f67 SHA256 30c0849dc7e8d4581cfee16a824f5e384e8198b60b7f54f880f4e25da7d1c143
EBUILD openib-mvapich2-0.9.5.ebuild 3227 RMD160 9d0d68e5fa9ff475294aa991094517478f0090ae SHA1 694729bfd02639f65e376187c6366731334c7142 SHA256 1e655c043996f86232e5ac1dab156d21c3fca4c4be3e202bcbb8f75d7b345b74
EBUILD openib-mvapich2-0.9.6.ebuild 3222 RMD160 722c4dbea3358ebb2810fd47f68433744bf70d59 SHA1 af556fe75370c979e6600c13d3354ffabf3cf027 SHA256 5dae03b9523bf5b72c859f34d41edd53a090ed09faaa00069dae581349a4b9d7
-EBUILD openib-mvapich2-1.0.1-r1.ebuild 4244 RMD160 5864fa78b2d8e9a9969fe4142542ac0a5c8e041e SHA1 74ceb316aea20421351147286cb8ee4f1e8bfa7b SHA256 df9f215afcdabbeff444386575eb7812520f9f763b98042295df86e71d74763d
+EBUILD openib-mvapich2-1.0.1-r1.ebuild 4310 RMD160 8f5cceb30096c60d73ff3c111e67a527bd89ae06 SHA1 45c52cf1265e5ff161854233c15fa2d7f471741f SHA256 9bc600bb4c362f9d150ed0a9573b72cdff29494427b400968074872b61f415be
EBUILD openib-mvapich2-1.0.1.ebuild 3124 RMD160 b5e931451462a275363ff3fe8764f5684deb0c6e SHA1 31f291fd15dd9651442af630be4a7418936ed9f6 SHA256 5748e92e739081c485b98c41b729234ba3bf1aa010fdf4dad6aae99d7732e7ee
EBUILD openib-mvapich2-1.0.ebuild 3124 RMD160 b5e931451462a275363ff3fe8764f5684deb0c6e SHA1 31f291fd15dd9651442af630be4a7418936ed9f6 SHA256 5748e92e739081c485b98c41b729234ba3bf1aa010fdf4dad6aae99d7732e7ee
MISC ChangeLog 828 RMD160 46d1432d2147f213a0d29b9989c6ec530b2511c2 SHA1 5e492d39c845a4387e9a7ac67af0b38c2f902a5a SHA256 bc2f305d1bd2516f7bc9f414a199be0a3f7d5148b2de5ffa334b3427a71c45af
diff --git a/sys-cluster/openib-mvapich2/openib-mvapich2-1.0.1-r1.ebuild b/sys-cluster/openib-mvapich2/openib-mvapich2-1.0.1-r1.ebuild
index af8935a8f..3728ff3f7 100644
--- a/sys-cluster/openib-mvapich2/openib-mvapich2-1.0.1-r1.ebuild
+++ b/sys-cluster/openib-mvapich2/openib-mvapich2-1.0.1-r1.ebuild
@@ -60,7 +60,6 @@ pkg_setup() {
die "unsupported architecture: ${ARCH}"
;;
esac
- mpi_pkg_setup
use fortran && fortran_pkg_setup
}
@@ -75,8 +74,7 @@ src_unpack() {
}
src_compile() {
- mpi_conf_args="
- --with-device=osu_ch3:mrail
+ local c="--with-device=osu_ch3:mrail
--with-rdma=gen2
--with-pm=mpd
$(use_enable romio)
@@ -103,29 +101,27 @@ src_compile() {
append-flags "-DONE_SIDED -D${MVAPICH_HCA_TYPE} ${vcluster}"
append-flags "-DMPID_USE_SEQUENCE_NUMBERS -DUSE_MPD_RING"
- use debug && mpi_conf_args="${mpi_conf_args} --enable-g=all --enable-debuginfo"
+ use debug && c="${c} --enable-g=all --enable-debuginfo"
if use threads; then
- mpi_conf_args="${mpi_conf_args} --enable-threads=multiple --with-thread-package=pthreads"
+ c="${c} --enable-threads=multiple --with-thread-package=pthreads"
append-flags "-pthread"
else
- mpi_conf_args="${mpi_conf_args} --with-thread-package=none"
+ c="${c} --with-thread-package=none"
fi
# enable f90 support for appropriate compilers
if use fortran; then
case "${FORTRANC}" in
gfortran|ifc|ifort|f95)
- mpi_conf_args="${mpi_conf_args} --enable-f77 --enable-f90";;
+ c="${c} --enable-f77 --enable-f90";;
g77|f77|f2c)
- mpi_conf_args="${mpi_conf_args} --enable-f77 --disable-f90";;
+ c="${c} --enable-f77 --disable-f90";;
esac
else
- mpi_conf_args="${mpi_conf_args} --disable-f77 --disable-f90"
+ c="${c} --disable-f77 --disable-f90"
fi
- mpi_make_args="-j1"
-
sed -i \
-e 's/ ${exec_prefix}/ ${DESTDIR}${exec_prefix}/' \
-e 's/ ${libdir}/ ${DESTDIR}${libdir}/' \
@@ -133,13 +129,20 @@ src_compile() {
sed -i '/bindir/s/ ${bindir}/ ${DESTDIR}${bindir}/' ${S/-beta2/}/src/pm/mpd/Makefile.in
cd ${S/-beta2/}
- mpi_src_compile
+ ! mpi_classed && c="${c} --sysconfdir=/etc/${PN}"
+ econf $(mpi_econf_args) ${c}
+
+ # http://www.mcs.anl.gov/research/projects/mpich2/support/index.php?s=faqs#parmake
+ # https://trac.mcs.anl.gov/projects/mpich2/ticket/297
+ emake -j1 || die
+
}
src_install() {
- mpi_src_install
+ emake DESTDIR="${D}"|| die
mpi_dodoc CHANGES_MPICH2 COPYRIGHT COPYRIGHT_MVAPICH2 LICENSE.TXT \
README* RELEASE_NOTES*
+ mpi_imp_add_eselect
}
pkg_postinst() {
diff --git a/sys-cluster/openmpi/Manifest b/sys-cluster/openmpi/Manifest
index ebc00f1e3..94682f8a5 100644
--- a/sys-cluster/openmpi/Manifest
+++ b/sys-cluster/openmpi/Manifest
@@ -1,6 +1,4 @@
-AUX eselect.mpi.openmpi 231 RMD160 a3f09385b6f2c4872398758f8195c156e07b3921 SHA1 660be0ad7d06a386173c714942bca32b01908aa9 SHA256 363bd1efd2bf2593ee34145cc9e6f0c9705c204368c380d07088ba0d041b446d
-DIST openmpi-1.2.7.tar.bz2 3555597 RMD160 6707fba2f2de240c25f6135cd37bb42eb78c6590 SHA1 fd377ff52c5b6f61c293b0daa9d681046e673e22 SHA256 d66c7f0bb11494023451651d0e61afaef9d2199ed9a91ed08f0dedeb51541c36
+AUX eselect.mpi.openmpi 226 RMD160 39353fd5d350b26684f8e1258f689c95ec3b5011 SHA1 f7ec4f1848edf9fcfa9b67d528dd41f6ae755b26 SHA256 2666fdd2d39ff2290b0e52da8ba97e225fb3b1ac01c97bfc23c63b261f343cf0
DIST openmpi-1.2.8.tar.bz2 3556787 RMD160 59f0d0397d499eb7b3a08ca68ca9778ef2cb61fc SHA1 140ae223263e20b7bde8ac59b966924ba4a454bb SHA256 75b286cb3b1bf6528a7e64ee019369e0601b8acb5c3c167a987f755d1e41c95c
-EBUILD openmpi-1.2.7-r2.ebuild 2952 RMD160 90a10f049aa7e4fe93d78ccf9823313e2c4cf76a SHA1 150e74cabe57285afa9c453d3ae8fb44d278f5ae SHA256 36f2979ebfa3d0aeebdcf7feb79fcbc415a8dcade47d9f8881874abfb6bcb6d5
-EBUILD openmpi-1.2.8.ebuild 2952 RMD160 90a10f049aa7e4fe93d78ccf9823313e2c4cf76a SHA1 150e74cabe57285afa9c453d3ae8fb44d278f5ae SHA256 36f2979ebfa3d0aeebdcf7feb79fcbc415a8dcade47d9f8881874abfb6bcb6d5
+EBUILD openmpi-1.2.8.ebuild 2878 RMD160 c7178e3a5cc7c9fec0d21e567d3c357705e6d84a SHA1 d668964b008539e753ac6ba1c5d2a30c7030142e SHA256 ef242eab774e8888d69b4515cdf51f7a7924eedac6d5e30aed56a8811b3c50ae
MISC metadata.xml 714 RMD160 3a1b1cfafed8b2a9f674bbf03613a176a3c33894 SHA1 99ad99472912c4dd79eb9b1efd2439ff57f0becc SHA256 5139ae14e69e5edca9117ec6f4bb4f5c7654f41ef5050d5d777d47f0b1d05236
diff --git a/sys-cluster/openmpi/files/eselect.mpi.openmpi b/sys-cluster/openmpi/files/eselect.mpi.openmpi
index d1d2131a1..aada6074a 100644
--- a/sys-cluster/openmpi/files/eselect.mpi.openmpi
+++ b/sys-cluster/openmpi/files/eselect.mpi.openmpi
@@ -1,8 +1,8 @@
-MPI_CC=@ROOT@/usr/bin/mpicc
-MPI_CXX=@ROOT@/usr/bin/mpic++
-MPI_F77=@ROOT@/usr/bin/mpif77
-MPI_F90=@ROOT@/usr/bin/mpif90
-MPI_BUILT_WITH=@BUILT_WITH@
-PATH=@ROOT@/usr/bin
-MANPATH=@ROOT@/usr/share/man
-LD_LIBRARY_PATH=@ROOT@/usr/@LIBDIR@
+MPI_CC=@ROOT@usr/bin/mpicc
+MPI_CXX=@ROOT@usr/bin/mpic++
+MPI_F77=@ROOT@usr/bin/mpif77
+MPI_F90=@ROOT@usr/bin/mpif90
+CLASS_BASE_MPI_IMP=@BASE_IMP@
+PATH=@ROOT@usr/bin
+MANPATH=@ROOT@usr/share/man
+LD_LIBRARY_PATH=@ROOT@usr/@LIBDIR@
diff --git a/sys-cluster/openmpi/openmpi-1.2.7-r2.ebuild b/sys-cluster/openmpi/openmpi-1.2.7-r2.ebuild
deleted file mode 100644
index cdf4d9697..000000000
--- a/sys-cluster/openmpi/openmpi-1.2.7-r2.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmpi/openmpi-1.2.4.ebuild,v 1.2 2007/12/13 22:39:53 jsbronder Exp $
-
-inherit eutils multilib flag-o-matic toolchain-funcs fortran mpi
-
-MY_P=${P/-mpi}
-S=${WORKDIR}/${MY_P}
-
-DESCRIPTION="A high-performance message passing library (MPI)"
-HOMEPAGE="http://www.open-mpi.org"
-SRC_URI="http://www.open-mpi.org/software/ompi/v1.2/downloads/${MY_P}.tar.bz2"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-RESTRICT="mpi-threads? ( test )"
-IUSE="fortran heterogeneous ipv6 mpi-threads nocxx pbs romio threads"
-RDEPEND="pbs? ( sys-cluster/torque )
- $(mpi_imp_deplist)"
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- MPI_ESELECT_FILE="eselect.mpi.openmpi"
- mpi_pkg_setup
- if use mpi-threads; then
- ewarn
- ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
- ewarn "default and officially unsupported by upstream."
- ewarn "You may stop now and set USE=-mpi-threads"
- ewarn
- epause 5
- fi
-
- elog
- elog "OpenMPI has an overwhelming count of configuration options."
- elog "Don't forget the EXTRA_ECONF environment variable can let you"
- elog "specify configure options if you find them necessary."
- elog
-
- if use fortran; then
- FORTRAN="g77 gfortran ifc"
- fortran_pkg_setup
- fi
-}
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- # Fix --as-needed problems with f77 and f90.
- sed -i 's:^libs=:libs=-Wl,--no-as-needed :' \
- ompi/tools/wrappers/mpif{77,90}-wrapper-data.txt.in
-
- # Necessary for scalibility, see
- # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
- if use threads; then
- echo 'oob_tcp_listen_mode = listen_thread' \
- >> opal/etc/openmpi-mca-params.conf
- fi
-}
-
-src_compile() {
- mpi_conf_args="
- --without-xgrid
- --enable-pretty-print-stacktrace
- --enable-orterun-prefix-by-default
- --without-slurm"
-
- if use mpi-threads; then
- mpi_conf_args="${mpi_conf_args}
- --enable-mpi-threads
- --with-progress-threads"
- fi
-
- if use fortran; then
- if [[ "${FORTRANC}" = "g77" ]]; then
- mpi_conf_args="${mpi_conf_args} --disable-mpi-f90"
- elif [[ "${FORTRANC}" = "gfortran" ]]; then
- # Because that's just a pain in the butt.
- mpi_conf_args="${mpi_conf_args} --with-wrapper-fflags=-I/usr/include"
- elif [[ "${FORTRANC}" = if* ]]; then
- # Enabled here as gfortran compile times are huge with this enabled.
- mpi_conf_args="${mpi_conf_args} --with-mpi-f90-size=medium"
- fi
- else
- mpi_conf_args="${mpi_conf_args}
- --disable-mpi-f90
- --disable-mpi-f77"
- fi
-
- mpi_conf_args="
- ${mpi_conf_args}
- $(use_enable !nocxx mpi-cxx)
- $(use_enable romio io-romio)
- $(use_enable heterogeneous)
- $(use_with pbs tm)
- $(use_enable ipv6)"
- mpi_src_compile
-}
-
-src_install () {
- mpi_src_install
- mpi_dodoc README AUTHORS NEWS VERSION
-}
-
-src_test() {
- # Doesn't work with the default src_test as the dry run (-n) fails.
- cd "${S}"
- mpi_do_make -j1 check || die "emake check failed"
-}
-
diff --git a/sys-cluster/openmpi/openmpi-1.2.8.ebuild b/sys-cluster/openmpi/openmpi-1.2.8.ebuild
index cdf4d9697..0f253a9b7 100644
--- a/sys-cluster/openmpi/openmpi-1.2.8.ebuild
+++ b/sys-cluster/openmpi/openmpi-1.2.8.ebuild
@@ -21,7 +21,7 @@ DEPEND="${RDEPEND}"
pkg_setup() {
MPI_ESELECT_FILE="eselect.mpi.openmpi"
- mpi_pkg_setup
+
if use mpi-threads; then
ewarn
ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
@@ -60,52 +60,56 @@ src_unpack() {
}
src_compile() {
- mpi_conf_args="
+ local c="
--without-xgrid
--enable-pretty-print-stacktrace
--enable-orterun-prefix-by-default
--without-slurm"
if use mpi-threads; then
- mpi_conf_args="${mpi_conf_args}
+ c="${c}
--enable-mpi-threads
--with-progress-threads"
fi
if use fortran; then
if [[ "${FORTRANC}" = "g77" ]]; then
- mpi_conf_args="${mpi_conf_args} --disable-mpi-f90"
+ c="${c} --disable-mpi-f90"
elif [[ "${FORTRANC}" = "gfortran" ]]; then
# Because that's just a pain in the butt.
- mpi_conf_args="${mpi_conf_args} --with-wrapper-fflags=-I/usr/include"
+ c="${c} --with-wrapper-fflags=-I/usr/include"
elif [[ "${FORTRANC}" = if* ]]; then
# Enabled here as gfortran compile times are huge with this enabled.
- mpi_conf_args="${mpi_conf_args} --with-mpi-f90-size=medium"
+ c="${c} --with-mpi-f90-size=medium"
fi
else
- mpi_conf_args="${mpi_conf_args}
+ c="${c}
--disable-mpi-f90
--disable-mpi-f77"
fi
- mpi_conf_args="
- ${mpi_conf_args}
- $(use_enable !nocxx mpi-cxx)
- $(use_enable romio io-romio)
- $(use_enable heterogeneous)
- $(use_with pbs tm)
- $(use_enable ipv6)"
- mpi_src_compile
+ econf $(mpi_econf_args) ${c} \
+ $(use_enable !nocxx mpi-cxx) \
+ $(use_enable romio io-romio) \
+ $(use_enable heterogeneous) \
+ $(use_with pbs tm) \
+ $(use_enable ipv6) \
+ || die
+ emake || die
}
src_install () {
- mpi_src_install
+ emake DESTDIR="${D}" install || die
+ echo
+ echo
+ echo
mpi_dodoc README AUTHORS NEWS VERSION
+ mpi_imp_add_eselect
}
src_test() {
# Doesn't work with the default src_test as the dry run (-n) fails.
cd "${S}"
- mpi_do_make -j1 check || die "emake check failed"
+ emake -j1 check || die "emake check failed"
}