diff options
author | jsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb> | 2009-01-14 02:15:21 +0000 |
---|---|---|
committer | jsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb> | 2009-01-14 02:15:21 +0000 |
commit | 82d8c8febd94f7eecfe09a06270b50f6f97ec9f6 (patch) | |
tree | 89d3e3624809203c3d71e756322fa33c9c12eda7 /sys-cluster | |
parent | Finite state toolkit foma. Initial ebuild. (diff) | |
download | sci-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
Diffstat (limited to 'sys-cluster')
29 files changed, 238 insertions, 1167 deletions
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" } |