1 |
commit: a42f9583abb3ccd778376c64d783c1f41ca02ba6 |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Sat Sep 26 01:21:27 2020 +0000 |
4 |
Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
5 |
CommitDate: Sat Sep 26 01:21:27 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=a42f9583 |
7 |
|
8 |
sys-cluster/empi: drop dead package |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> |
12 |
|
13 |
sys-cluster/empi/empi-0.10.ebuild | 31 -- |
14 |
sys-cluster/empi/files/ChangeLog-0.10 | 121 -------- |
15 |
sys-cluster/empi/files/README.txt | 76 ----- |
16 |
sys-cluster/empi/files/empi-0.10 | 497 -------------------------------- |
17 |
sys-cluster/empi/files/eselect.mpi-0.10 | 273 ------------------ |
18 |
sys-cluster/empi/files/mpi.csh | 3 - |
19 |
sys-cluster/empi/files/mpi.sh | 3 - |
20 |
sys-cluster/empi/metadata.xml | 11 - |
21 |
8 files changed, 1015 deletions(-) |
22 |
|
23 |
diff --git a/sys-cluster/empi/empi-0.10.ebuild b/sys-cluster/empi/empi-0.10.ebuild |
24 |
deleted file mode 100644 |
25 |
index 5f24f1107..000000000 |
26 |
--- a/sys-cluster/empi/empi-0.10.ebuild |
27 |
+++ /dev/null |
28 |
@@ -1,31 +0,0 @@ |
29 |
-# Copyright 1999-2014 Gentoo Foundation |
30 |
-# Distributed under the terms of the GNU General Public License v2 |
31 |
- |
32 |
-EAPI=5 |
33 |
- |
34 |
-inherit eutils |
35 |
- |
36 |
-DESCRIPTION="Handling Multiple MPI Implementations" |
37 |
-HOMEPAGE="http://dev.gentoo.org/~jsbronder/empi.xml" |
38 |
-SRC_URI="" |
39 |
- |
40 |
-LICENSE="GPL-2" |
41 |
-SLOT="0" |
42 |
-KEYWORDS="~amd64 ~x86" |
43 |
-IUSE="" |
44 |
-DEPEND="app-admin/eselect" |
45 |
-RDEPEND="${DEPEND}" |
46 |
- |
47 |
-S="${WORKDIR}" |
48 |
- |
49 |
-src_install() { |
50 |
- newbin "${FILESDIR}"/${P} ${PN} |
51 |
- dodoc "${FILESDIR}"/README.txt |
52 |
- dodoc "${FILESDIR}"/ChangeLog-${PV} |
53 |
- |
54 |
- insinto /usr/share/eselect/modules |
55 |
- newins "${FILESDIR}"/eselect.mpi-${PV} mpi.eselect |
56 |
- exeinto /etc/profile.d |
57 |
- doexe "${FILESDIR}"/mpi.sh |
58 |
- doexe "${FILESDIR}"/mpi.csh |
59 |
-} |
60 |
|
61 |
diff --git a/sys-cluster/empi/files/ChangeLog-0.10 b/sys-cluster/empi/files/ChangeLog-0.10 |
62 |
deleted file mode 100644 |
63 |
index ac5eff065..000000000 |
64 |
--- a/sys-cluster/empi/files/ChangeLog-0.10 |
65 |
+++ /dev/null |
66 |
@@ -1,121 +0,0 @@ |
67 |
-commit ab2dc2e2210f81d24b42180359d0842eb33f994a (HEAD, tag: v0.10, origin/master, origin/HEAD, master) |
68 |
-Author: Justin Bronder <jsbronder@×××××.com> |
69 |
-Date: Wed Jul 10 20:22:13 2013 -0400 |
70 |
- |
71 |
- empi-0.10 |
72 |
- |
73 |
-commit d84c6ce3949f9eeeb1bab816e3e25eef0dd75661 |
74 |
-Author: Justin Bronder <jsbronder@×××××.com> |
75 |
-Date: Tue Jul 9 18:48:01 2013 -0400 |
76 |
- |
77 |
- empi: support make.conf move |
78 |
- |
79 |
- Later versions of portage moved /etc/make.conf to /etc/portage/make.conf |
80 |
- by default while still supporting the old location. |
81 |
- |
82 |
-commit 914c277799fd0f44266864fa16fef338046be5f6 |
83 |
-Author: Justin Bronder <jsbronder@×××××.com> |
84 |
-Date: Tue Jul 9 18:12:50 2013 -0400 |
85 |
- |
86 |
- eclass: add sys-cluster/mpich |
87 |
- |
88 |
- upstream renamed mpich2 to mpich. |
89 |
- |
90 |
-commit 5c80290f4f0d90fe84fa0f18f2264052c544c008 |
91 |
-Author: Justin Bronder <jsbronder@×××××.com> |
92 |
-Date: Mon Jul 1 22:16:04 2013 -0400 |
93 |
- |
94 |
- Revert "eclass: workaround OpenMPI build issue #462602" |
95 |
- |
96 |
- This reverts commit 5e9b1be531ca02607e730a5b43765850eae9a0c5. |
97 |
- |
98 |
-commit a5d63455bf53a1ca6ab0220e3f308707a852b0cc (tag: v0.9) |
99 |
-Author: Justin Bronder <jsbronder@×××××.com> |
100 |
-Date: Mon Jul 1 20:06:50 2013 -0400 |
101 |
- |
102 |
- empi-0.9 |
103 |
- |
104 |
-commit 4540a319542ddc7c0fbcea47174fe85e1810561c |
105 |
-Author: Justin Bronder <jsbronder@×××××.com> |
106 |
-Date: Mon Jul 1 20:05:35 2013 -0400 |
107 |
- |
108 |
- empi: better filtering of emerge output |
109 |
- |
110 |
- Ignore extra information spit out by emerge, like news. |
111 |
- |
112 |
-commit 5e9b1be531ca02607e730a5b43765850eae9a0c5 |
113 |
-Author: Justin Bronder <jsbronder@×××××.com> |
114 |
-Date: Mon Jul 1 20:04:58 2013 -0400 |
115 |
- |
116 |
- eclass: workaround OpenMPI build issue #462602 |
117 |
- |
118 |
- export FAKEROOTKEY=1 to stop OpenMPI from replacing malloc. |
119 |
- |
120 |
-commit a17e4452cb93014e2a4d5f7615e5d09f2df9c6a2 (tag: v0.8) |
121 |
-Author: Justin Bronder <jsbronder@×××××.com> |
122 |
-Date: Thu Feb 21 22:56:27 2013 -0500 |
123 |
- |
124 |
- empi-0.8 |
125 |
- |
126 |
-commit b38f48aa70933858d410abce58964e55708471c9 |
127 |
-Author: Justin Bronder <jsbronder@×××××.com> |
128 |
-Date: Thu Feb 21 22:54:28 2013 -0500 |
129 |
- |
130 |
- empi: manage overlay metadata |
131 |
- |
132 |
- Add overlay metadata management. Snagged from crossdev. |
133 |
- http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git |
134 |
- |
135 |
-commit 4305d879c232acd663a8bb13505e5cfa403c5df5 |
136 |
-Author: Justin Bronder <jsbronder@×××××.com> |
137 |
-Date: Thu Feb 21 21:05:19 2013 -0500 |
138 |
- |
139 |
- empi: provide and set overlay default |
140 |
- |
141 |
- Set default overlay path to /var/cache/overlays/mpi |
142 |
- |
143 |
-commit fd7eed35034cb54dbe0d8f553c57abceee3c0eea |
144 |
-Author: Justin Bronder <jsbronder@×××××.com> |
145 |
-Date: Thu Feb 21 20:40:36 2013 -0500 |
146 |
- |
147 |
- empi: allow all users to see usage screen |
148 |
- |
149 |
-commit 84aa3a41dbbf2924dc223614c267ff6e79bfce2e |
150 |
-Author: Justin Bronder <jsbronder@×××××.com> |
151 |
-Date: Fri Jan 11 16:43:08 2013 -0500 |
152 |
- |
153 |
- rename MPI_PORTDIR and pull it from the portage env |
154 |
- |
155 |
-commit 77318d28462f05b4a8a6f1ac7b270aa07b5ebc8a |
156 |
-Author: Justin Bronder <jsbronder@×××××.com> |
157 |
-Date: Fri Jan 11 16:07:14 2013 -0500 |
158 |
- |
159 |
- rename global variables to be obvious |
160 |
- |
161 |
-commit 07beb4baf6af2a45bd382d6b7ba87d8bcbeda7a7 |
162 |
-Author: Justin Bronder <jsbronder@×××××.com> |
163 |
-Date: Fri Jan 11 15:44:50 2013 -0500 |
164 |
- |
165 |
- sanitize whitespace |
166 |
- |
167 |
-commit 7c7fb4f0669d554a5301e70a46ae82e584685aff |
168 |
-Author: Justin Bronder <jsbronder@×××××.com> |
169 |
-Date: Tue Mar 22 10:27:53 2011 -0400 |
170 |
- |
171 |
- mpi.eclass: Improve handling of unclassed dep strings |
172 |
- |
173 |
- Instead of requiring a list of packages to block when calculating the |
174 |
- dep list for an unclassed ebuild, simply inject a dep string. This |
175 |
- will allow the use of USE-conditional blockers. |
176 |
- |
177 |
-commit 0319e9cac8325bda7440f0f48eeac30056658b7e |
178 |
-Author: Nicolas Bigaouette <nbigaouette@×××××.com> |
179 |
-Date: Wed Nov 24 22:42:49 2010 -0500 |
180 |
- |
181 |
- Typo: 'classs' to 'classes' |
182 |
- |
183 |
-commit 7f0ce9ea97ee8f72dc275ebdf3ce7ab44ad6538a |
184 |
-Author: Justin Bronder <jsbronder@×××××.com> |
185 |
-Date: Mon Nov 29 11:51:31 2010 -0500 |
186 |
- |
187 |
- Initial import to git. |
188 |
|
189 |
diff --git a/sys-cluster/empi/files/README.txt b/sys-cluster/empi/files/README.txt |
190 |
deleted file mode 100644 |
191 |
index 0148775fd..000000000 |
192 |
--- a/sys-cluster/empi/files/README.txt |
193 |
+++ /dev/null |
194 |
@@ -1,76 +0,0 @@ |
195 |
-= Introduction = |
196 |
-Empi is basically a reworking of vapier's crossdev script to |
197 |
-handle installing multiple mpi implementations and applications |
198 |
-that depend on them. This is done through trickery involving |
199 |
-adding categories that portage will recognize, moving mpi-enabled |
200 |
-packages (defined as those using mpi.eclass) to a local overlay |
201 |
-directory and then emerging these packages using the new |
202 |
-category. |
203 |
- |
204 |
-Empi handles getting mpi application ebuilds into the overlay, |
205 |
-copying anything in package.{use,keywords}, and wrapping the |
206 |
-emerge process. The eclass handles putting the package files |
207 |
-into separate "root" directories based on the category name as |
208 |
-well as making sure the applications build against the |
209 |
-appropriate environment. |
210 |
- |
211 |
-I also provide eselect-mpi, which unlike every other eselect |
212 |
-module I've ever used, is designed to manage a users personal |
213 |
-environment by writing to ${HOME}/.env.d/mpi. This provides a |
214 |
-quick and easy way for users to experiment with various |
215 |
-implementations while imposing on any other user's ability to |
216 |
-use their preferred implementation. |
217 |
- |
218 |
-The newly written mpi.eclass should handle empi-based and standard |
219 |
-emerging of packages in a manner that enables package maintainers |
220 |
-to quickly port their applications without much knowledge of the |
221 |
-underlying mechanics. At least, that was my intent, maybe I |
222 |
-succeeded. |
223 |
- |
224 |
- |
225 |
-= Definitions = |
226 |
-Class: Fake category name used by empi. Must be |
227 |
- prefixed with mpi- |
228 |
-Base Implementation: Actual mpi-implementation package that will |
229 |
- provide all mpi functionality to the above. |
230 |
- |
231 |
- |
232 |
-= Instructions = |
233 |
- |
234 |
-The following creates a class called "mpi-openmpi" |
235 |
-using sys-cluster/openmpi as the base implementation. We also |
236 |
-set some USE flags and make sure to unmask the appropriate |
237 |
-version of sys-cluster/openmpi. Long options and full package |
238 |
-atoms are used, but not required. |
239 |
- |
240 |
-1.) Sync the science overlay. |
241 |
- |
242 |
-2.) Emerge empi |
243 |
- |
244 |
-3.) Setup /etc/portage/package stuff. |
245 |
- # echo ">=sys-cluster/openmpi-1.2.5-r1 pbs fortran romio smp" >> /etc/portage/package.use |
246 |
- # echo ">=sys-cluster/openmpi-1.2.5-r1" >> /etc/portage/package.keywords |
247 |
- |
248 |
-4.) Create the implementation. |
249 |
- # empi --create --class mpi-openmpi =sys-cluster/openmpi-1.2.5-r1 |
250 |
- |
251 |
-5.) Add packages. |
252 |
- # empi --add --class mpi-openmpi hpl mpi-examples |
253 |
- |
254 |
-6.) Setup your user. |
255 |
- $ eselect mpi set mpi-openmpi |
256 |
- $ echo <<-EOF >> .bash_profile |
257 |
-for i in $(ls ${HOME}/.env.d/*); do |
258 |
- source ${i} |
259 |
-done |
260 |
-EOF |
261 |
- $ source .bash_profile |
262 |
- |
263 |
-7.) Do stuff, or decide this is all worthless and cleanup the mess. |
264 |
- # empi --delete mpi-openmpi |
265 |
- |
266 |
- |
267 |
-= Links = |
268 |
-http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO |
269 |
-http://archives.gentoo.org/gentoo-cluster/msg_f29032b0d85f7f47d9e52940e9322d91.xml |
270 |
-http://dev.gentoo.org/~jsbronder/empi.xml |
271 |
|
272 |
diff --git a/sys-cluster/empi/files/empi-0.10 b/sys-cluster/empi/files/empi-0.10 |
273 |
deleted file mode 100644 |
274 |
index cf41dbbce..000000000 |
275 |
--- a/sys-cluster/empi/files/empi-0.10 |
276 |
+++ /dev/null |
277 |
@@ -1,497 +0,0 @@ |
278 |
-#!/bin/bash |
279 |
-VERSION=0.10 |
280 |
- |
281 |
-source /etc/init.d/functions.sh |
282 |
- |
283 |
-die(){ |
284 |
- if [ -n "${1}" ]; then |
285 |
- echo; eerror $1; echo |
286 |
- fi |
287 |
- exit 1 |
288 |
-} |
289 |
- |
290 |
-has() { |
291 |
- [[ " ${@:2} " == *" $1 "* ]] |
292 |
-} |
293 |
- |
294 |
-usage(){ |
295 |
- local rc=${1:-0} |
296 |
- shift |
297 |
-cat <<-EOF |
298 |
-empi-${VERSION} |
299 |
-Usage: ${HILITE}empi${NORMAL} ${GOOD}[actions]${NORMAL} ${BRACKET}[options]${NORMAL} |
300 |
- |
301 |
-Actions: |
302 |
- ${GOOD}-c, --create${NORMAL} pkgspec (Re)Initialize setup for mpi class. |
303 |
- ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified mpi class. |
304 |
- ${GOOD}-d, --delete${NORMAL} class Remove everything related to specified class. |
305 |
- |
306 |
-Options: |
307 |
- ${GOOD}-C, --class${NORMAL} class MPI class to use. |
308 |
- ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from. |
309 |
- ${GOOD}-o, --overlaydir${NORMAL} path Directory to use for the empi portage overlay. |
310 |
- Defaults to MPI_OVERLAY_DIR [${DEFAULT_MPI_OVERLAY_DIR}] |
311 |
- ${GOOD} --noemerge${NORMAL} Do not call emerge, only preform overlay setup. |
312 |
- |
313 |
-Notes: |
314 |
- ${HILITE}-${NORMAL} pkgspec is specified by a package string. Without a version, the |
315 |
- portageq best_visible is used. For example, all of the following |
316 |
- are valid: openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5. |
317 |
- ${HILITE}-${NORMAL} class (-c) is user defined but must be prefixed with "mpi-" |
318 |
- |
319 |
-Examples: |
320 |
-${BRACKET}Create a new class based on openmpi.${NORMAL} |
321 |
- empi --create sys-cluster/openmpi --class mpi-ompi |
322 |
-${BRACKET}Rebuild the above.${NORMAL} |
323 |
- emerge mpi-ompi/openmpi |
324 |
-${BRACKET}Add hpl to mpi-ompi${NORMAL} |
325 |
- empi --class mpi-ompi --add sys-cluster/hpl |
326 |
-EOF |
327 |
- [[ -n $* ]] && echo && eerror "Error: $*" |
328 |
- exit ${rc} |
329 |
-} |
330 |
- |
331 |
-class_is_valid() { |
332 |
- [[ -z ${CLASS} ]] && usage 1 "No class defined." |
333 |
- [[ ${CLASS} != mpi-* ]] && usage 1 "Classes must be prefixed with mpi-" |
334 |
- [[ ${CLASS//./} != ${CLASS} ]] && usage 1 "Classes cannot contain . (period)" |
335 |
-} |
336 |
- |
337 |
-is_class_category() { |
338 |
- local i |
339 |
- for i in $(eselect mpi list -p); do |
340 |
- [[ ${1} == ${i} ]] && return 0 |
341 |
- done |
342 |
- return 1 |
343 |
-} |
344 |
- |
345 |
-split_atom() { |
346 |
- local cpv c pf pn pv |
347 |
- cpv=$(portageq best_visible / ${1}) |
348 |
- if [[ -z ${cpv} || ${rc} -ne 0 ]]; then |
349 |
- cpv=$(portageq best_visible / =${1}) |
350 |
- [[ -z ${cpv} || ${rc} -ne 0 ]] && return 1 |
351 |
- fi |
352 |
- c=${cpv%/*}; pf=${cpv#${c}/}; pn=${pf%%-[0-9]*}; pv=${pf#${pn}-} |
353 |
- echo "${c} ${pn} ${pv}" |
354 |
-} |
355 |
- |
356 |
-parse_pkgspecs() { |
357 |
- local atom i |
358 |
- for ((i=0; i<${#TARGETS[@]}; i++)); do |
359 |
- atom=($(split_atom ${TARGETS[i]})) |
360 |
- if [[ $? -ne 0 ]]; then |
361 |
- eerror "Unable to find a unique package or valid version for ${TARGETS[i]}" |
362 |
- eerror "Is the package unmasked and unblocked normally?" |
363 |
- die "" |
364 |
- fi |
365 |
- TARGETS[i]=${atom[0]}/${atom[1]}-${atom[2]} |
366 |
- done |
367 |
-} |
368 |
- |
369 |
-# handle_etc_portage package_spec |
370 |
-# parses /etc/portage/package.{keywords,use}. If ${CLASS}/${pn} is seen, we don't |
371 |
-# do a thing. Otherwise copy any lines that have ${cat}/${pn} inserting them again |
372 |
-# with the new category. Also keywords virtual/${CLASS} if necessary. |
373 |
-handle_etc_portage() { |
374 |
- local atom=( $(split_atom ${1}) ) |
375 |
- local ext line gfiles f |
376 |
- |
377 |
- for ext in "keywords" "use"; do |
378 |
- if [ -d /etc/portage/package.${ext} ]; then |
379 |
- gfiles="/etc/portage/package.${ext}/*" |
380 |
- f=/etc/portage/package.${ext}/${CLASS} |
381 |
- else |
382 |
- gfiles="/etc/portage/package.${ext}" |
383 |
- f=/etc/portage/package.${ext} |
384 |
- fi |
385 |
- |
386 |
- if ! grep "^[>=<]*${CLASS}/${atom[1]}" ${gfiles} &>/dev/null; then |
387 |
- grep -h "^[>=<]*${atom[0]}/${atom[1]}" ${gfiles} 2>/dev/null \ |
388 |
- | sed "s,${atom[0]},${CLASS}," \ |
389 |
- | while read line; do |
390 |
- echo "${line}" >> ${f} |
391 |
- [[ ${VERBOSE} -ne 0 ]] \ |
392 |
- && einfo "Addition to ${f}: ${line}" |
393 |
- done |
394 |
- elif [[ ${VERBOSE} -ne 0 ]]; then |
395 |
- ewarn "Keys for ${CLASS}/${atom[1]} already exist in ${f}. Will not replicate them." |
396 |
- fi |
397 |
- |
398 |
- if ! grep "^${CLASS}/mpi" ${gfiles} &>/dev/null; then |
399 |
- grep -h "^virtual/mpi" ${gfiles} 2>/dev/null \ |
400 |
- | sed "s,/mpi,/${CLASS}," \ |
401 |
- | while read line; do |
402 |
- echo "${line}" >> ${f} |
403 |
- [[ ${VERBOSE} -ne 0 ]] \ |
404 |
- && einfo "Addition to ${f}: ${line}" |
405 |
- done |
406 |
- elif [[ ${VERBOSE} -ne 0 ]]; then |
407 |
- ewarn "Keys for virtual/${CLASS} already exist. Will not replicate." |
408 |
- fi |
409 |
- done |
410 |
-} |
411 |
- |
412 |
- |
413 |
- |
414 |
-get_ebuild_dir() { |
415 |
- local d a |
416 |
- local want_uses_mpi=${2:-0} |
417 |
- local found=0 |
418 |
- |
419 |
- a=($(split_atom ${1})) |
420 |
- [[ $? -ne 0 ]] && die "Unable to find a unique package or valid version for ${1}." |
421 |
- is_class_category ${a[0]} && die "It makes no sense to build a new mpi-class from a current one." |
422 |
- |
423 |
- if [[ -z ${PORTAGE_TREE} ]]; then |
424 |
- for d in $(portageq portdir_overlay) $(portageq portdir); do |
425 |
- if [[ ${want_uses_mpi} -ne 0 ]]; then |
426 |
- [[ -f "${d}/${a[0]}/${a[1]}/${a[1]}-${a[2]}.ebuild" ]] \ |
427 |
- && ebuild_uses_mpi ${d}/${a[0]}/${a[1]} ${a[1]}-${a[2]} \ |
428 |
- && found=1 |
429 |
- else |
430 |
- [[ -f "${d}/${a[0]}/${a[1]}/${a[1]}-${a[2]}.ebuild" ]] && found=1 |
431 |
- fi |
432 |
- [[ ${found} -ne 0 ]] && break |
433 |
- done |
434 |
- if [[ ${found} -ne 0 ]]; then |
435 |
- PORTAGE_TREE=${d} |
436 |
- else |
437 |
- die "Could not find an ebuild for ${a[0]}/${a[1]}-${a[2]}." |
438 |
- fi |
439 |
- fi |
440 |
- |
441 |
- EBUILD_DIR="${PORTAGE_TREE}/${a[0]}/${a[1]}" |
442 |
-} |
443 |
- |
444 |
-ebuild_uses_mpi() { |
445 |
- grep 'inherit .*mpi' "${1}/${2##*/}.ebuild" &>/dev/null |
446 |
-} |
447 |
- |
448 |
-link_ebuild_dir() { |
449 |
- ln -snf "${EBUILD_DIR}" "${MPI_OVERLAY_DIR}"/${CLASS}/${EBUILD_DIR##*/} \ |
450 |
- || die "Failed to link ${EBUILD_DIR} to ${MPI_OVERLAY_DIR}/${CLASS}/${EBUILD_DIR##*/}" |
451 |
-} |
452 |
- |
453 |
-# TODO: Needs to be called after get_ebuild_dir which sets $PORTAGE_TREE |
454 |
-create_virtual_mpi() { |
455 |
- local d_dir="${MPI_OVERLAY_DIR}"/virtual/${CLASS} |
456 |
- local version d_file mpi_ebuild s_dir |
457 |
- |
458 |
- # Try to get virtual/mpi from the same tree as the other ebuilds. |
459 |
- # Otherwise we fall back and get it from anywhere. |
460 |
- version=$(portageq best_visible / ${__VIRTUAL_MPI_VERSION}) |
461 |
- version=${version#virtual/mpi-} |
462 |
- |
463 |
- for s_dir in ${PORTAGE_TREE} $(portageq portdir_overlay) $(portageq portdir); do |
464 |
- mpi_ebuild="${s_dir}"/virtual/mpi/mpi-${version}.ebuild |
465 |
- [ -f "${mpi_ebuild}" ] && break; |
466 |
- done |
467 |
- |
468 |
- [[ ! -f "${mpi_ebuild}" ]] \ |
469 |
- && die "Cannot satisfy ${__VIRTUAL_MPI_VERSION}" |
470 |
- |
471 |
- d_file=${CLASS}-${version}.ebuild |
472 |
- |
473 |
- mkdir -p "${d_dir}" || die "Could not create ${d_dir}" |
474 |
- |
475 |
- cp "${mpi_ebuild}" "${d_dir}"/${d_file} \ |
476 |
- || die "Could not copy ${mpi_ebuild} to ${d_dir}/${d_file}" |
477 |
- |
478 |
- sed -i "s,sys-cluster/,${CLASS}/," ${d_dir}/${d_file} |
479 |
- ebuild ${d_dir}/${d_file} digest > /dev/null \ |
480 |
- || die "Failed to digest ${d_dir}/${d_file}" |
481 |
-} |
482 |
- |
483 |
-set_metadata() { |
484 |
- # Snagged from crossdev: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git |
485 |
- # 3cab8c394fec72f2353e209d98429dd1aaf1d337 |
486 |
- |
487 |
- # for people who have eclasses spread over their overlays, generate |
488 |
- # a layout.conf file so portage can find them. this is a crapshoot |
489 |
- # when diff overlay sources have conflicting eclasses, but nothing |
490 |
- # we really can do about that. |
491 |
- local autogen_tag="# Autogenerated and managed by empi" |
492 |
- local meta=${MPI_OVERLAY_DIR}/metadata |
493 |
- local layout=${meta}/layout.conf |
494 |
- local d name masters thin_manifests="false" |
495 |
- |
496 |
- mkdir -p "${meta}" |
497 |
- if [[ -e ${layout} ]] ; then |
498 |
- if ! grep -qs "^${autogen_tag}" "${layout}" ; then |
499 |
- einfo "leaving metadata/layout.conf alone in ${MPI_OVERLAY_DIR}" |
500 |
- return |
501 |
- fi |
502 |
- |
503 |
- # We are managing it, so blow it away |
504 |
- rm -f "${layout}" |
505 |
- fi |
506 |
- |
507 |
- # build up a list of possible repos where we can pull from |
508 |
- for d in ${PORTDIR_OVERLAY} "${PORTDIR}" ; do |
509 |
- [[ -z ${d} ]] && continue |
510 |
- |
511 |
- name= |
512 |
- if [[ -e ${d}/profiles/repo_name ]] ; then |
513 |
- name=$(<"${d}"/profiles/repo_name) |
514 |
- fi |
515 |
- [[ -z ${name} ]] && continue |
516 |
- |
517 |
- # If this repo has an eclass dir, mark it as a master. |
518 |
- # Note: portage reads the masters list in reverse order, |
519 |
- # so we have to prepare it the same way. |
520 |
- if [[ -d ${d}/eclass ]] ; then |
521 |
- has ${name} ${masters} || masters="${name} ${masters}" |
522 |
- fi |
523 |
- |
524 |
- # If one of the overlays uses thin manifests, then turn it on |
525 |
- if [[ -z ${this_manifests} ]] && has ${name} ${masters} && \ |
526 |
- sed \ |
527 |
- -e 's:#.*::' \ |
528 |
- -e 's:^[[:space:]]*::' \ |
529 |
- -e 's:[[:space:]]*$::' \ |
530 |
- -e 's:[[:space:]]*=[[:space:]]*:=:' \ |
531 |
- "${d}/metadata/layout.conf" 2>/dev/null | \ |
532 |
- gawk -F= '{ |
533 |
- if ($1 == "use-manifests") um = $2 |
534 |
- if ($1 == "thin-manifests") tm = $2 |
535 |
- } |
536 |
- END { |
537 |
- exit !(um != "false" && tm == "true") |
538 |
- }' |
539 |
- then |
540 |
- einfo "enabling thin-manifests due to ${d}" |
541 |
- this_manifests="use-manifests = true\nthin-manifests = true" |
542 |
- fi |
543 |
- done |
544 |
- |
545 |
- # write out that layout.conf! |
546 |
- cat <<-EOF > "${layout}" |
547 |
- ${autogen_tag} |
548 |
- # Delete the above line if you want to manage this file yourself |
549 |
- masters = ${masters% } |
550 |
- $(printf '%b' "${this_manifests}") |
551 |
- EOF |
552 |
-} |
553 |
- |
554 |
-do_emerge() { |
555 |
- [[ ${DO_EMERGE} -eq 0 ]] && return 0 |
556 |
- einfo "Emerging $*" |
557 |
- emerge ${EMERGE_OPTS} $* || die "emerge failed!" |
558 |
-} |
559 |
- |
560 |
-# We should have only one target here. |
561 |
-create_class() { |
562 |
- local mpi_class_pkg d mpi_class_pn |
563 |
- |
564 |
- [[ ${#TARGETS[@]} -ne 1 ]] && die "Can only create one class at a time." |
565 |
- |
566 |
- for d in $(eselect mpi list -p); do |
567 |
- [ "${d}" == "${CLASS}" ] && die "${CLASS} has already been created." |
568 |
- done |
569 |
- |
570 |
- # Prevent laziness |
571 |
- [[ ${TARGETS[0]} == ${TARGETS[0]##*/} ]] \ |
572 |
- && TARGETS[0]="sys-cluster/${TARGETS[0]}" |
573 |
- |
574 |
- parse_pkgspecs |
575 |
- get_ebuild_dir ${TARGETS[0]} 1 |
576 |
- create_virtual_mpi |
577 |
- mpi_class_pn=${EBUILD_DIR##*/} |
578 |
- mpi_class_pkg=${TARGETS[0]} |
579 |
- handle_etc_portage ${TARGETS[0]} |
580 |
- TARGETS[0]="=${CLASS}/${TARGETS[0]##*/}" |
581 |
- |
582 |
- # Refuse to break systems. If there is already a class |
583 |
- # installed in that directory, we're not going to add another one as |
584 |
- # the eclass doesn't fix one problem just to introduce a bigger one. |
585 |
- for d in $(find ${MPI_OVERLAY_DIR}/${CLASS} -maxdepth 1 -mindepth 1 -type l 2>/dev/null);do |
586 |
- d=${d##*/} |
587 |
- [[ ${d} == ${mpi_class_pn} ]] && continue |
588 |
- for i in ${MPI_ALL_IMPS}; do |
589 |
- [[ ${i} == ${d} ]] \ |
590 |
- && die "${CLASS} already has MPI implementation ${d}, refusing to add ${mpi_class_pn}" |
591 |
- done |
592 |
- done |
593 |
- |
594 |
- if [[ -d "${MPI_OVERLAY_DIR}"/${CLASS} ]]; then |
595 |
- [[ ${VERBOSE} -ne 0 ]] && ewarn "Overlay for ${CLASS} has already been created." |
596 |
- else |
597 |
- mkdir -p ${MPI_OVERLAY_DIR}/${CLASS} |
598 |
- link_ebuild_dir |
599 |
- set_metadata |
600 |
- fi |
601 |
- if ! grep "^${CLASS}$" /etc/portage/categories &>/dev/null; then |
602 |
- echo "${CLASS}" >> /etc/portage/categories |
603 |
- fi |
604 |
- |
605 |
- |
606 |
-cat << EOF |
607 |
-Creating ${HILITE}${CLASS}${NORMAL} |
608 |
- Class: ${GOOD}${CLASS}${NORMAL} |
609 |
- MPI Implementation: ${GOOD}${mpi_class_pkg}${NORMAL} |
610 |
- Source: ${GOOD}${EBUILD_DIR}${NORMAL} |
611 |
- Destination: ${GOOD}${MPI_OVERLAY_DIR}/${CLASS}${NORMAL} |
612 |
-EOF |
613 |
- do_emerge ${TARGETS[0]} |
614 |
-} |
615 |
- |
616 |
- |
617 |
-add_packages(){ |
618 |
- local i j deps |
619 |
- |
620 |
- [[ -d "${MPI_OVERLAY_DIR}"/${CLASS} ]] || die "Class ${CLASS} has not been created yet." |
621 |
- [[ ${#TARGETS[@]} -lt 1 ]] && die "You need to specify at least one package" |
622 |
- |
623 |
- parse_pkgspecs |
624 |
- for ((i=0;i<${#TARGETS[@]};i++)); do |
625 |
- get_ebuild_dir ${TARGETS[i]} |
626 |
- create_virtual_mpi |
627 |
- if ebuild_uses_mpi ${EBUILD_DIR} ${TARGETS[i]}; then |
628 |
- link_ebuild_dir |
629 |
- handle_etc_portage ${TARGETS[i]} |
630 |
- TARGETS[i]="=${CLASS}/${TARGETS[i]##*/}" |
631 |
- else |
632 |
- TARGETS[i]="=${TARGETS[i]}" |
633 |
- fi |
634 |
- |
635 |
- # I don't know about this, but do you have a better idea? |
636 |
- deps="$(emerge --color=n --onlydeps -p --quiet ${TARGETS[i]} | grep '^\[')" |
637 |
- if [[ $? -ne 0 ]]; then |
638 |
- emerge --onlydeps -p ${TARGETS[i]} |
639 |
- die "Unable to calculate deps for ${TARGETS[i]}" |
640 |
- fi |
641 |
- deps=( $(echo ${deps} | sed -e 's:\[[a-z]* [A-Z] \] :=:g') ) |
642 |
- for ((j=0;j<${#deps[@]};j++)); do |
643 |
- get_ebuild_dir ${deps[j]} |
644 |
- if ebuild_uses_mpi ${deps[i]}; then |
645 |
- link_ebuild_dir |
646 |
- fi |
647 |
- done |
648 |
- done |
649 |
-cat << EOF |
650 |
-Adding packages to ${HILIGHT}${CLASS}${NORMAL} |
651 |
- Packages: ${GOOD}${TARGETS[@]}${NORMAL} |
652 |
-EOF |
653 |
- do_emerge ${TARGETS[@]} |
654 |
-} |
655 |
- |
656 |
- |
657 |
-delete_class() { |
658 |
- local pkgs=( $(ls /var/db/pkg/${CLASS}/ 2>/dev/null) ) |
659 |
- local ext d i rc |
660 |
- [[ -d "${MPI_OVERLAY_DIR}"/${CLASS} ]] || die "Class ${CLASS} has not been created yet." |
661 |
- rc=0 |
662 |
- |
663 |
- for (( i=0; i<${#pkgs[@]}; i++)); do |
664 |
- pkgs[i]="=${CLASS}/${pkgs[i]}" |
665 |
- done |
666 |
- |
667 |
- if [[ ${#pkgs[@]} -gt 0 ]] && ! emerge -C ${EMERGE_OPTS/-u/} ${pkgs[@]}; then |
668 |
- die "Failed to unmerge ${pkgs[@]}" |
669 |
- fi |
670 |
- |
671 |
- for ext in "keywords" "use"; do |
672 |
- if [ -d /etc/portage/package.${ext} ]; then |
673 |
- rm /etc/portage/package.${ext}/${CLASS} &>/dev/null |
674 |
- rc=$((rc+$?)) |
675 |
- elif [ -f /etc/portage/package.${ext} ]; then |
676 |
- sed -i -e "/^${CLASS}\//d" /etc/portage/package.${ext} |
677 |
- rc=$((rc+$?)) |
678 |
- fi |
679 |
- done |
680 |
- |
681 |
- [ ! -f /etc/portage/categories ] || sed -i -e "/^${CLASS}$/d" /etc/portage/categories |
682 |
- rc=$((rc+$?)) |
683 |
- |
684 |
- for d in $(ls "${MPI_OVERLAY_DIR}"/${CLASS}/ 2>/dev/null); do |
685 |
- rm "${MPI_OVERLAY_DIR}"/${CLASS}/${d} |
686 |
- rc=$((rc+$?)) |
687 |
- done |
688 |
- |
689 |
- for d in "${MPI_OVERLAY_DIR}/${CLASS}" /var/db/pkg/${CLASS}; do |
690 |
- [ ! -d "${d}" ] || rmdir "${d}" |
691 |
- rc=$((rc+$?)) |
692 |
- done |
693 |
- |
694 |
- [[ ${rc} -ne 0 ]] \ |
695 |
- && ewarn "Errors were encountered during delete_class()" |
696 |
- return ${rc} |
697 |
-} |
698 |
- |
699 |
-# Internal variables. |
700 |
-__VIRTUAL_MPI_VERSION=">=virtual/mpi-2.0" |
701 |
- |
702 |
-ACTION="" |
703 |
-CLASS="" |
704 |
-PORTAGE_TREE="" |
705 |
-MPI_OVERLAY_DIR="" |
706 |
-VERBOSE=0 |
707 |
-DO_EMERGE=1 |
708 |
-EMERGE_OPTS="-u" # Packages can be recompiled by hand if necessary. |
709 |
-TARGETS="" |
710 |
-DEFAULT_MPI_OVERLAY_DIR=/var/cache/overlays/mpi |
711 |
-MAKE_CONF=/etc/make.conf |
712 |
- |
713 |
-PORTDIR_OVERLAY="" |
714 |
-PKGDIR="" |
715 |
- |
716 |
-EBUILD_DIR="" |
717 |
- |
718 |
-while [[ $# -gt 0 ]]; do |
719 |
- case $1 in |
720 |
- -h|--help) |
721 |
- usage;; |
722 |
- -c|--create) |
723 |
- ACTION="${ACTION}create";; |
724 |
- -a|--add) |
725 |
- ACTION="${ACTION}add";; |
726 |
- -d|--delete) |
727 |
- ACTION="${ACTION}delete" |
728 |
- shift; CLASS=${1};; |
729 |
- -C|--class) |
730 |
- shift; CLASS=${1};; |
731 |
- -t|--tree) |
732 |
- shift; PORTAGE_TREE=${1};; |
733 |
- -o|--overlaydir) |
734 |
- shift; MPI_OVERLAY_DIR=${1};; |
735 |
- -v|--verbose) |
736 |
- VERBOSE=1;; |
737 |
- --noemerge) |
738 |
- DO_EMERGE=0;; |
739 |
- -*) |
740 |
- EMERGE_OPTS="${EMERGE_OPTS} ${1}";; |
741 |
- *) |
742 |
- TARGETS=( $(echo ${TARGETS[@]}) ${1} );; |
743 |
- esac |
744 |
- shift |
745 |
-done |
746 |
- |
747 |
-[[ ${UID} -ne 0 ]] && die "You must be root to preform any actions." |
748 |
- |
749 |
-if [ -s /etc/portage/make.conf ]; then |
750 |
- MAKE_CONF=/etc/portage/make.conf |
751 |
-fi |
752 |
- |
753 |
-: ${MPI_OVERLAY_DIR:=$(portageq envvar MPI_OVERLAY_DIR)} |
754 |
-if [ -z "${MPI_OVERLAY_DIR}" ]; then |
755 |
- MPI_OVERLAY_DIR=${DEFAULT_MPI_OVERLAY_DIR} |
756 |
- einfo "MPI_OVERLAY_DIR not set, defaulting to ${MPI_OVERLAY_DIR} and updating make.conf" |
757 |
- echo "MPI_OVERLAY_DIR=\"${MPI_OVERLAY_DIR}\"" >> ${MAKE_CONF} |
758 |
-fi |
759 |
- |
760 |
-if [ ! -d "${MPI_OVERLAY_DIR}" ]; then |
761 |
- mkdir -p "${MPI_OVERLAY_DIR}" || die "Failed to mkdir ${MPI_OVERLAY_DIR}" |
762 |
-fi |
763 |
- |
764 |
-export PORTDIR_OVERLAY="${MPI_OVERLAY_DIR} $(portageq portdir_overlay)" |
765 |
-export PKGDIR="$(portageq envvar PKGDIR)/mpi/${CLASS}" |
766 |
-export PORTDIR="$(portageq envvar PORTDIR)" |
767 |
- |
768 |
-[[ -z ${ACTION} ]] && usage 1 "No action defined." |
769 |
-class_is_valid |
770 |
- |
771 |
-set_metadata |
772 |
-[[ ${ACTION} == *create* ]] && create_class |
773 |
-[[ ${ACTION} == *add* ]] && add_packages |
774 |
-[[ ${ACTION} == *delete* ]] && delete_class |
775 |
|
776 |
diff --git a/sys-cluster/empi/files/eselect.mpi-0.10 b/sys-cluster/empi/files/eselect.mpi-0.10 |
777 |
deleted file mode 100644 |
778 |
index 2c7a56776..000000000 |
779 |
--- a/sys-cluster/empi/files/eselect.mpi-0.10 |
780 |
+++ /dev/null |
781 |
@@ -1,273 +0,0 @@ |
782 |
-# Copyright 1999-2013 Gentoo Foundation |
783 |
-# Distributed under the terms of the GNU General Public License v2 |
784 |
- |
785 |
-DESCRIPTION="Manage MPI classes" |
786 |
-MAINTAINER="jsbronder@g.o" |
787 |
-SVN_DATE='$Date: $' |
788 |
-VERSION="0.0.2" |
789 |
- |
790 |
-inherit path-manipulation config |
791 |
- |
792 |
-# The basic idea is we want to allow every use to select their own mpi |
793 |
-# implementation they want, and a ${HOME}/.env.d/mpi file is created for them. |
794 |
-# A user then is -required- to source the env file. This sets PATH, MANPATH, |
795 |
-# and LD_LIBRARY_PATH. I'm sure I'm forgetting something here. |
796 |
-# Calling unset only wipes out the env file, replacing it with what we |
797 |
-# previously added stripped out. |
798 |
- |
799 |
-# If you can think of a better way to do this, while still allowing user's |
800 |
-# freedom, please let me know. |
801 |
- |
802 |
-# List the valid mpi classes currently installed. |
803 |
-find_classes() { |
804 |
- local classes |
805 |
- for f in ${ROOT}/etc/env.d/mpi/*; do |
806 |
- [[ -f ${f} ]] || continue |
807 |
- f=$(basename ${f}) |
808 |
- [[ "${f#mpi-}" == "${f}" ]] && continue |
809 |
- classes=(${classes[@]} ${f}) |
810 |
- done |
811 |
- echo ${classes[@]} |
812 |
-} |
813 |
- |
814 |
-# User's current environment has the class configured in it. |
815 |
-is_in_use() { [ "${ESELECT_MPI_IMP}" == "${1}" ]; } |
816 |
- |
817 |
-# User's env file is ready for sourcing for this class |
818 |
-is_enabled() { |
819 |
- [ "$(var_from_user_envd ESELECT_MPI_IMP)" == "${1}" ] |
820 |
-} |
821 |
- |
822 |
-var_from_user_envd(){ |
823 |
- [ ! -f ${user_ev_sh} ] && return 0 |
824 |
- echo "$(source ${user_ev_sh}; echo ${!1})" |
825 |
-} |
826 |
- |
827 |
-# Is this a valid class? |
828 |
-is_class() { |
829 |
- local classes=$(find_classes) |
830 |
- for i in ${classes[@]}; do |
831 |
- [[ "${i}" == "${1}" ]] && return 0 |
832 |
- done |
833 |
- return 1 |
834 |
-} |
835 |
- |
836 |
-init() { |
837 |
- local d |
838 |
- [[ ${UID} -eq 0 ]] && HOME="${ROOT}/root" |
839 |
- d="$(canonicalise "${ROOT}/${HOME}")" |
840 |
- d="${d}/.env.d/" |
841 |
- user_ev_sh="${d}mpi.sh"; |
842 |
- user_ev_csh="${d}mpi.csh"; |
843 |
- |
844 |
- if [[ ! -d "${d}" ]]; then |
845 |
- mkdir "${d}" || die -q "Failed to create ${d}." |
846 |
- elif [[ ! -w "${d}" ]]; then |
847 |
- die -q "You do not have permission to mkdir ${d}." |
848 |
- fi |
849 |
- [[ -f "${user_ev_sh}" && ! -w "${user_ev_sh}" \ |
850 |
- && -f "${user_ev_csh}" && ! -w "${user_ev_csh}" ]] \ |
851 |
- && die -q "You do not have permission to write to ${user_ev_sh} or ${user_ev_csh}." |
852 |
-} |
853 |
- |
854 |
-global_env() { |
855 |
- local d=$(canonicalise "${ROOT}/etc/env.d/mpi/${1}") |
856 |
- [ -z "${d}" ] && die "Cannot find global env file for ${1}" |
857 |
- ev=${d} |
858 |
-} |
859 |
- |
860 |
-### list action ### |
861 |
- |
862 |
-describe_list() { echo "List available classs"; } |
863 |
-describe_list_parameters() { echo "[-p]"; } |
864 |
- |
865 |
-do_list() { |
866 |
- classes=( $(find_classes) ) |
867 |
- init |
868 |
- if [[ ${@} == *-p* ]]; then |
869 |
- echo "${classes[@]}" |
870 |
- else |
871 |
- write_list_start "Available MPI classs:" |
872 |
- if [[ -n "${classes[@]}" ]]; then |
873 |
- for (( i=0; i<${#classes[@]}; i++ )); do |
874 |
- if is_in_use ${classes[$i]} && is_enabled ${classes[$i]}; then |
875 |
- write_kv_list_entry "${classes[$i]}" "Enabled, In Use" |
876 |
- elif is_in_use ${classes[$i]}; then |
877 |
- write_kv_list_entry "${classes[$i]}" "In Use" |
878 |
- elif is_enabled ${classes[$i]}; then |
879 |
- write_kv_list_entry "${classes[$i]}" "Enabled" |
880 |
- else |
881 |
- write_kv_list_entry "${classes[$i]}" "--" |
882 |
- fi |
883 |
- done |
884 |
- else |
885 |
- write_kv_list_entry "(none found)" "" |
886 |
- fi |
887 |
- fi |
888 |
- return 0 |
889 |
-} |
890 |
- |
891 |
- |
892 |
-### set action ### |
893 |
- |
894 |
-describe_set() { |
895 |
- echo "Select a MPI class." |
896 |
-} |
897 |
- |
898 |
-describe_set_parameters() { |
899 |
- echo "<target>" |
900 |
-} |
901 |
- |
902 |
-do_set() { |
903 |
- local binpath lld manpath current_imp |
904 |
- |
905 |
- init |
906 |
- current_imp="$(var_from_user_envd ESELECT_MPI_IMP)" |
907 |
- global_env ${1} |
908 |
- |
909 |
- [[ -z ${1} ]] && die -q "You didnt specifiy any class for use." |
910 |
- [[ ${#@} -ne 1 ]] && die -q "You may only select exactly one class." |
911 |
- ! is_class ${1} && die -q "${1} is not an class." |
912 |
- if is_enabled ${1}; then |
913 |
- echo "${1} implemention is currently in use. This is a no-op." |
914 |
- return |
915 |
- elif [ -n "${current_imp}" ]; then |
916 |
- echo "Cannot select ${1} when ${current_imp} is in use." |
917 |
- return 1 |
918 |
- fi |
919 |
- |
920 |
- binpath="$(load_config ${ev} PATH)" |
921 |
- lld="$(load_config ${ev} LD_LIBRARY_PATH)" |
922 |
- manpath="$(load_config ${ev} MANPATH)" |
923 |
- |
924 |
-cat <<-EOF >${user_ev_sh} |
925 |
-bpl=\`expr "\${PATH}" : ".*${binpath}:"\` |
926 |
-mpl=\`expr "\${MANPATH}" : ".*${manpath}:"\` |
927 |
-llpl=\`expr "\${LD_LIBRARY_PATH}" : ".*${lld}:"\` |
928 |
- |
929 |
-if [ \${bpl} -eq 0 ]; then |
930 |
- export PATH="${binpath}:\${PATH}" |
931 |
-fi |
932 |
- |
933 |
-if [ \${mpl} -eq 0 ]; then |
934 |
- export MANPATH="${manpath}:\${MANPATH}" |
935 |
-fi |
936 |
- |
937 |
-if [ \${llpl} -eq 0 ]; then |
938 |
- export LD_LIBRARY_PATH="${lld}:\${LD_LIBRARY_PATH}" |
939 |
-fi |
940 |
-export ESELECT_MPI_IMP="${1}" |
941 |
-EOF |
942 |
- |
943 |
-cat <<-EOF >${user_ev_csh} |
944 |
-set bpl=\`expr "\${PATH}" : ".*${binpath}:"\` |
945 |
-set mpl=\`expr "\${MANPATH}" : ".*${manpath}:"\` |
946 |
-set llpl=\`expr "\${LD_LIBRARY_PATH}" : ".*${lld}:"\` |
947 |
- |
948 |
-if ( \$bpl == 0 ) \ |
949 |
- setenv PATH "${binpath}:\${PATH}" |
950 |
- |
951 |
-if ( \$mpl == 0 ) \ |
952 |
- setenv MANPATH "${manpath}:\${MANPATH}" |
953 |
- |
954 |
-if ( \$llpl == 0 ) \ |
955 |
- setenv LD_LIBRARY_PATH "${lld}:\${LD_LIBRARY_PATH}" |
956 |
- |
957 |
-setenv ESELECT_MPI_IMP "${1}" |
958 |
-EOF |
959 |
- |
960 |
- echo "Remember to source /etc/profile or /etc/csh.login" |
961 |
-} |
962 |
- |
963 |
- |
964 |
-### unset action ### |
965 |
-describe_unset() { |
966 |
- echo "Restore MPI-less environment." |
967 |
-} |
968 |
- |
969 |
-do_unset() { |
970 |
- local lld current_imp |
971 |
- init |
972 |
- |
973 |
- current_imp="$(var_from_user_envd ESELECT_MPI_IMP)" |
974 |
- |
975 |
- if [ -z "${current_imp}" ]; then |
976 |
- echo "No implemention currently in use. This is a no-op." |
977 |
- return |
978 |
- fi |
979 |
- |
980 |
- global_env "${ESELECT_MPI_IMP}" |
981 |
- lld="$(load_config ${ev} LD_LIBRARY_PATH)" |
982 |
- |
983 |
- # PATH and MANPATH are reset in /etc/profile. |
984 |
-cat <<-EOF > ${user_ev_sh} |
985 |
-unset ESELECT_MPI_IMP |
986 |
-l=\`expr "\${LD_LIBRARY_PATH}:" : ".*${lld}:"\` |
987 |
-l=\$(( \${l} + 1 )) |
988 |
- |
989 |
-if [ \${l} -gt 1 ]; then |
990 |
- export LD_LIBRARY_PATH="\`expr substr \${LD_LIBRARY_PATH} \${l} 1024\`" |
991 |
-fi |
992 |
-EOF |
993 |
- |
994 |
-cat <<-EOF > ${user_ev_csh} |
995 |
-unsetenv ESELECT_MPI_IMP |
996 |
-set l=\`expr "\${LD_LIBRARY_PATH}:" : ".*${lld}:"\` |
997 |
-@ l = ( \${l} + 1 ) |
998 |
- |
999 |
-if ( \${l} > 1 ) \ |
1000 |
- setenv LD_LIBRARY_PATH "\`expr substr \${LD_LIBRARY_PATH} \${l} 1024\`" |
1001 |
-EOF |
1002 |
- |
1003 |
- echo "Remember to source /etc/profile or /etc/csh.login" |
1004 |
-} |
1005 |
- |
1006 |
-### add action (from skel pretty much) |
1007 |
-describe_add() { |
1008 |
- echo "Add a new mpi class" |
1009 |
-} |
1010 |
- |
1011 |
-describe_add_parameters() { |
1012 |
- echo "<file>" |
1013 |
-} |
1014 |
- |
1015 |
-do_add() { |
1016 |
- local class |
1017 |
- [[ ${#@} -ne 1 ]] \ |
1018 |
- && die -q "Bad arguments, use: mpi add /some/full/path/<class>.eselect" |
1019 |
- |
1020 |
- # If $D is set, we're adding from portage so we want to respect sandbox. |
1021 |
- # Otherwise, respect the ROOT variable. |
1022 |
- local PREFIX=${D:-${ROOT}/} |
1023 |
- |
1024 |
- # Create directory if necessary |
1025 |
- if [[ ! -e ${PREFIX}/etc/env.d/mpi/ ]]; then |
1026 |
- mkdir -p ${PREFIX}/etc/env.d/mpi/ |
1027 |
- else |
1028 |
- if [[ ! -d ${PREFIX}/etc/env.d/mpi/ ]]; then |
1029 |
- die -q "${PREFIX}/etc/env.d/mpi/ exists but isn't a directory!" |
1030 |
- fi |
1031 |
- fi |
1032 |
- |
1033 |
- class=$(basename ${1}); class=${class%.eselect} |
1034 |
- if ! cp ${1} ${PREFIX}/etc/env.d/mpi/${class}; then |
1035 |
- die -q "Installing ${1} as ${PREFIX}/etc/env.d/mpi/${class} failed!" |
1036 |
- fi |
1037 |
-} |
1038 |
- |
1039 |
- |
1040 |
-### printvar action ### |
1041 |
-describe_printvar() { echo "Print variables stored in global env.d file."; } |
1042 |
-describe_printvar_parameters() { echo "<class> <variable>"; } |
1043 |
- |
1044 |
-do_printvar() { |
1045 |
- if [[ ${#@} -ne 2 ]] \ |
1046 |
- || ! is_class ${1}; then |
1047 |
- die -q "Specify exactly 1 class and 1 variable." |
1048 |
- fi |
1049 |
- global_env ${1} |
1050 |
- echo "$(load_config ${ev} ${2})" |
1051 |
-} |
1052 |
- |
1053 |
-# vim: ft=eselect:noet |
1054 |
- |
1055 |
|
1056 |
diff --git a/sys-cluster/empi/files/mpi.csh b/sys-cluster/empi/files/mpi.csh |
1057 |
deleted file mode 100644 |
1058 |
index 32506b4cc..000000000 |
1059 |
--- a/sys-cluster/empi/files/mpi.csh |
1060 |
+++ /dev/null |
1061 |
@@ -1,3 +0,0 @@ |
1062 |
-if ( -d "${HOME}"/.env.d && -f "${HOME}"/.env.d/mpi.csh ) then |
1063 |
- source "${HOME}"/.env.d/mpi.csh |
1064 |
-endif |
1065 |
|
1066 |
diff --git a/sys-cluster/empi/files/mpi.sh b/sys-cluster/empi/files/mpi.sh |
1067 |
deleted file mode 100644 |
1068 |
index 5483247e5..000000000 |
1069 |
--- a/sys-cluster/empi/files/mpi.sh |
1070 |
+++ /dev/null |
1071 |
@@ -1,3 +0,0 @@ |
1072 |
-if [ -d "${HOME}"/.env.d -a -f "${HOME}"/.env.d/mpi.sh ]; then |
1073 |
- source "${HOME}"/.env.d/mpi.sh |
1074 |
-fi |
1075 |
|
1076 |
diff --git a/sys-cluster/empi/metadata.xml b/sys-cluster/empi/metadata.xml |
1077 |
deleted file mode 100644 |
1078 |
index c74b39b01..000000000 |
1079 |
--- a/sys-cluster/empi/metadata.xml |
1080 |
+++ /dev/null |
1081 |
@@ -1,11 +0,0 @@ |
1082 |
-<?xml version="1.0" encoding="UTF-8"?> |
1083 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
1084 |
-<pkgmetadata> |
1085 |
- <maintainer type="person"> |
1086 |
- <email>jsbronder@g.o</email> |
1087 |
- </maintainer> |
1088 |
- <maintainer type="project"> |
1089 |
- <email>cluster@g.o</email> |
1090 |
- <name>Gentoo Cluster Project</name> |
1091 |
- </maintainer> |
1092 |
-</pkgmetadata> |