1 |
commit: 4d41973331898406b86f2a3f11da50b7a1812336 |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Sat Sep 26 15:43:58 2020 +0000 |
4 |
Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
5 |
CommitDate: Sat Sep 26 19:11:03 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=4d419733 |
7 |
|
8 |
sys-cluster/modules: version bump + new maintainer |
9 |
|
10 |
Closes: https://github.com/gentoo/sci/pull/952 |
11 |
|
12 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
13 |
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> |
14 |
|
15 |
sys-cluster/modules/files/createmodule.py | 186 --------------------- |
16 |
sys-cluster/modules/files/createmodule.sh | 166 ------------------ |
17 |
.../modules/files/modules-3.2.10-avail.patch | 12 -- |
18 |
.../modules/files/modules-3.2.10-bindir.patch | 11 -- |
19 |
.../modules/files/modules-3.2.10-clear.patch | 11 -- |
20 |
.../modules/files/modules-3.2.10-defs.patch | 20 --- |
21 |
.../modules/files/modules-3.2.10-errorline.patch | 14 -- |
22 |
.../modules/files/modules-3.2.10-versioning.patch | 10 -- |
23 |
.../modules/files/modules-3.2.9c-errorline.patch | 14 -- |
24 |
sys-cluster/modules/files/modules.sh.in | 7 - |
25 |
sys-cluster/modules/metadata.xml | 23 +-- |
26 |
sys-cluster/modules/modules-3.2.10-r2.ebuild | 66 -------- |
27 |
sys-cluster/modules/modules-3.2.9c-r1.ebuild | 48 ------ |
28 |
sys-cluster/modules/modules-4.6.0.ebuild | 64 +++++++ |
29 |
14 files changed, 77 insertions(+), 575 deletions(-) |
30 |
|
31 |
diff --git a/sys-cluster/modules/files/createmodule.py b/sys-cluster/modules/files/createmodule.py |
32 |
deleted file mode 100644 |
33 |
index 60c6ba7fa..000000000 |
34 |
--- a/sys-cluster/modules/files/createmodule.py |
35 |
+++ /dev/null |
36 |
@@ -1,186 +0,0 @@ |
37 |
-#!/usr/bin/python |
38 |
-# |
39 |
-# createmodule.py - Takes the name of a environment init script and |
40 |
-# produces a modulefile that duplicates the changes made by the init script |
41 |
-# |
42 |
-# Copyright (C) 2012 by Orion E. Poplawski <orion@×××××××××.com> |
43 |
-# |
44 |
-# This program is free software: you can redistribute it and/or modify |
45 |
-# it under the terms of the GNU General Public License as published by |
46 |
-# the Free Software Foundation, either version 2 of the License, or |
47 |
-# (at your option) any later version. |
48 |
- |
49 |
-# This program is distributed in the hope that it will be useful, |
50 |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of |
51 |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
52 |
-# GNU General Public License for more details. |
53 |
- |
54 |
-# You should have received a copy of the GNU General Public License |
55 |
-# along with this program. If not, see <http://www.gnu.org/licenses/>. |
56 |
- |
57 |
-from optparse import OptionParser |
58 |
-import os,sys |
59 |
-from subprocess import * |
60 |
- |
61 |
-# Handle options |
62 |
-usage = "Usage: %prog [-p prefix] <initscript> [args]" |
63 |
-parser = OptionParser() |
64 |
-parser.set_usage(usage) |
65 |
-parser.add_option('-p', '--prefix', dest='prefix', help='Specify path prefix') |
66 |
-(options, args) = parser.parse_args() |
67 |
- |
68 |
-# Need a script name |
69 |
-if not args: |
70 |
- parser.print_usage() |
71 |
- exit(1) |
72 |
- |
73 |
-# Return environment after a command |
74 |
-def getenv(cmd = ':'): |
75 |
- env = {} |
76 |
- p = Popen(cmd + ";env", shell=True, stdout=PIPE, stderr=PIPE) |
77 |
- (stdout, stderr) = p.communicate() |
78 |
- if p.returncode != 0: |
79 |
- print "EROR: Could not execute initscript:" |
80 |
- print "%s returned exit code %d" % (cmd, p.returncode) |
81 |
- print stderr |
82 |
- exit(1) |
83 |
- if stderr != '': |
84 |
- print "WARNING: initscript sent the following to stderr:" |
85 |
- print stderr |
86 |
- # Parse the output key=value pairs |
87 |
- for line in stdout.splitlines(): |
88 |
- try: |
89 |
- (var,value) = line.split('=',1) |
90 |
- except ValueError: |
91 |
- print "ERROR: Could not parse output:" |
92 |
- print stdout |
93 |
- exit(1) |
94 |
- env[var] = value |
95 |
- return env |
96 |
- |
97 |
-#Record initial environment |
98 |
-env1=getenv() |
99 |
- |
100 |
-#Record environment after sourcing the initscript |
101 |
-env2=getenv(". " + " ".join(args)) |
102 |
- |
103 |
-# Initialize our variables for storing modifications |
104 |
-chdir = None |
105 |
-appendpath = {} |
106 |
-prependpath = {} |
107 |
-setenv = {} |
108 |
-unsetenv = [] |
109 |
-pathnames = [] |
110 |
- |
111 |
-# Function to nomalize all paths in a list of paths and remove duplicate items |
112 |
-def normpaths(paths): |
113 |
- newpaths = [] |
114 |
- for path in paths: |
115 |
- normpath = os.path.normpath(path) |
116 |
- if normpath not in newpaths: |
117 |
- newpaths.append(os.path.normpath(path)) |
118 |
- return newpaths |
119 |
- |
120 |
-# Start with existing keys and look for changes |
121 |
-for key in env1.keys(): |
122 |
- # Test for delete |
123 |
- if key not in env2: |
124 |
- unsetenv.append(key) |
125 |
- continue |
126 |
- # No change |
127 |
- if env1[key] == env2[key]: |
128 |
- del env2[key] |
129 |
- continue |
130 |
- #Working directory change |
131 |
- if key == 'PWD': |
132 |
- chdir=os.path.normpath(env2[key]) |
133 |
- pathnames.append(chdir) |
134 |
- del env2[key] |
135 |
- continue |
136 |
- # Determine modifcations to beginning and end of the string |
137 |
- (prepend,append) = env2[key].split(env1[key]) |
138 |
- if prepend: |
139 |
- prependpaths = prepend.strip(':').split(':') |
140 |
- # LICENSE variables often include paths outside install directory |
141 |
- if 'LICENSE' not in key: |
142 |
- pathnames += prependpaths |
143 |
- prependpath[key] = ':'.join(normpaths(prependpaths)) |
144 |
- if append: |
145 |
- appendpaths = append.strip(':').split(':') |
146 |
- # LICENSE variables often include paths outside install directory |
147 |
- if 'LICENSE' not in key: |
148 |
- pathnames += appendpaths |
149 |
- appendpath[key] = ':'.join(normpaths(appendpaths)) |
150 |
- del env2[key] |
151 |
- |
152 |
-# We're left with new keys in env2 |
153 |
-for key in env2.keys(): |
154 |
- # Use prepend-path for new paths |
155 |
- if ('PATH' in key) or (':' in env2[key]): |
156 |
- prependpaths = env2[key].strip(':').split(':') |
157 |
- # MANPATH can have system defaults added it it wasn't previously set |
158 |
- # LICENSE variables often include paths outside install directory |
159 |
- if key != 'MANPATH' and 'LICENSE' not in key: |
160 |
- pathnames += prependpaths |
161 |
- prependpath[key] = ':'.join(normpaths(prependpaths)) |
162 |
- continue |
163 |
- # Set new variables |
164 |
- setenv[key] = os.path.normpath(env2[key]) |
165 |
- if 'LICENSE' not in key: |
166 |
- pathnames.append(setenv[key]) |
167 |
- |
168 |
-# Determine a prefix |
169 |
-prefix = None |
170 |
-if options.prefix: |
171 |
- prefix = options.prefix |
172 |
-else: |
173 |
- prefix = os.path.commonprefix(pathnames).rstrip('/') |
174 |
- if prefix == '': |
175 |
- prefix = None |
176 |
- |
177 |
-# Print out the modulefile |
178 |
-print "#%Module 1.0" |
179 |
- |
180 |
-# Prefix |
181 |
-if prefix is not None: |
182 |
- print "\nset prefix " + prefix + "\n" |
183 |
- |
184 |
-# Chdir |
185 |
-if chdir is not None: |
186 |
- print "chdir\t" + chdir |
187 |
- |
188 |
-# Function to format output line with tabs and substituting prefix |
189 |
-def formatline(item, key, value=None): |
190 |
- print item, |
191 |
- print "\t"*(2-(len(item)+1)/8), |
192 |
- print key, |
193 |
- if value is not None: |
194 |
- print "\t"*(3-(len(key)+1)/8), |
195 |
- if prefix is not None: |
196 |
- print value.replace(prefix,'$prefix') |
197 |
- else: |
198 |
- print value |
199 |
- |
200 |
-# Paths first, grouped by variable name |
201 |
-pathkeys = appendpath.keys() + prependpath.keys() |
202 |
-pathkeys.sort() |
203 |
-for key in pathkeys: |
204 |
- if key in prependpath: |
205 |
- formatline("prepend-path",key,prependpath[key]) |
206 |
- if key in appendpath: |
207 |
- formatline("append-path",key,appendpath[key]) |
208 |
- |
209 |
-# Setenv |
210 |
-setenvkeys = setenv.keys() |
211 |
-setenvkeys.sort() |
212 |
-if setenvkeys: |
213 |
- print |
214 |
-for key in setenvkeys: |
215 |
- formatline("setenv",key,setenv[key]) |
216 |
- |
217 |
-# Unsetenv |
218 |
-unsetenv.sort() |
219 |
-if unsetenv: |
220 |
- print |
221 |
-for key in unsetenv: |
222 |
- formatline("unsetenv",key) |
223 |
|
224 |
diff --git a/sys-cluster/modules/files/createmodule.sh b/sys-cluster/modules/files/createmodule.sh |
225 |
deleted file mode 100644 |
226 |
index b44cf0512..000000000 |
227 |
--- a/sys-cluster/modules/files/createmodule.sh |
228 |
+++ /dev/null |
229 |
@@ -1,166 +0,0 @@ |
230 |
-#!/bin/bash |
231 |
-# |
232 |
-# createmodule.sh - Takes the name of a environment init script and |
233 |
-# produces a modulefile that duplicates the changes made by the init script |
234 |
-# |
235 |
-# Copyright (C) 2010-2012 by Orion E. Poplawski <orion@×××××××××.com> |
236 |
-# |
237 |
-# This program is free software: you can redistribute it and/or modify |
238 |
-# it under the terms of the GNU General Public License as published by |
239 |
-# the Free Software Foundation, either version 2 of the License, or |
240 |
-# (at your option) any later version. |
241 |
- |
242 |
-# This program is distributed in the hope that it will be useful, |
243 |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of |
244 |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
245 |
-# GNU General Public License for more details. |
246 |
- |
247 |
-# You should have received a copy of the GNU General Public License |
248 |
-# along with this program. If not, see <http://www.gnu.org/licenses/>. |
249 |
- |
250 |
-usage="Usage: $0 [-p prefix] <initscript> [args]" |
251 |
- |
252 |
-usage() { |
253 |
- echo $usage 1>&2 |
254 |
- exit 1 |
255 |
-} |
256 |
- |
257 |
-while getopts "p:" opt |
258 |
-do |
259 |
- case $opt in |
260 |
- p) prefix=$OPTARG; shift 2;; |
261 |
- *) usage;; |
262 |
- esac |
263 |
-done |
264 |
- |
265 |
-# Need a script name |
266 |
-[ -z "$1" ] && usage |
267 |
- |
268 |
-# Need to be a readable script |
269 |
-if [ ! -r "$1" ] |
270 |
-then |
271 |
- echo "ERROR: Cannot read $1" 1>&2 |
272 |
- exit 1 |
273 |
-fi |
274 |
- |
275 |
-#Will print out array assignment list |
276 |
-printenvarray () { |
277 |
- env | while read x |
278 |
- do |
279 |
- key=${x%%=*} |
280 |
- value=${x#*=} |
281 |
- echo [$key]="'$value'" |
282 |
- done |
283 |
-} |
284 |
- |
285 |
-#Apparently we need to declare the associative arrays |
286 |
-declare -A env1 env2 |
287 |
- |
288 |
-#Record starting environment |
289 |
-eval env1=(`printenvarray`) |
290 |
- |
291 |
-#Source the environment script |
292 |
-. "$@" |
293 |
- |
294 |
-#Record ending environment |
295 |
-eval env2=(`printenvarray`) |
296 |
- |
297 |
-#Print out the modulefile |
298 |
-echo "#%Module 1.0" |
299 |
- |
300 |
-#Prefix |
301 |
-[ -n "$prefix" ] && echo -e "\nset prefix $prefix\n" |
302 |
- |
303 |
-#Subshell so we can sort the output |
304 |
-( |
305 |
-dedup() { |
306 |
- list=`mktemp` |
307 |
- echo $1 | sed -r -e 's,[^/]+/\.\./,,g' -e 's,[^/]+/\.\./,,g' -e 's/:/\n/g' | |
308 |
- while read x |
309 |
- do |
310 |
- grep -Fx ${x} $list && continue |
311 |
- if [ -n "$prefix" ] |
312 |
- then |
313 |
- echo $x | sed -e s,$prefix,\$prefix, |
314 |
- else |
315 |
- echo $x |
316 |
- fi |
317 |
- echo $x >> $list |
318 |
- done | tr '\n' : | sed -e 's/:$//' |
319 |
- rm $list |
320 |
-} |
321 |
- |
322 |
-#Keys that changed |
323 |
-for key in "${!env1[@]}" |
324 |
-do |
325 |
- if [ "${env1[$key]}" != "${env2[$key]}" ] |
326 |
- then |
327 |
- #Working directory change |
328 |
- if [ "$key" = PWD ] |
329 |
- then |
330 |
- if [ -n "$prefix" ] |
331 |
- then |
332 |
- echo -e "chdir\t\t${env2[PWD]}" | sed -e s,$prefix,\$prefix,g |
333 |
- else |
334 |
- echo -e "chdir\t\t${env2[PWD]}" |
335 |
- fi |
336 |
- #Test for delete |
337 |
- elif [ -z "${env2[$key]}" ] |
338 |
- then |
339 |
- echo -e "unsetenv\t${key}\t${env2[$key]}" |
340 |
- #Test for prepend |
341 |
- elif [ "${env2[$key]%${env1[$key]}}" != "${env2[$key]}" ] |
342 |
- then |
343 |
- added=$(dedup ${env2[$key]%:${env1[$key]}}) |
344 |
- echo -e "prepend-path\t$key\t${added}" |
345 |
- #Test for prepend plus : added at end (MANPATH) |
346 |
- elif [ "${env2[$key]%${env1[$key]}:}" != "${env2[$key]}" ] |
347 |
- then |
348 |
- added=$(dedup ${env2[$key]%${env1[$key]}:}) |
349 |
- echo -e "prepend-path\t$key\t${added}" |
350 |
- #Test for append |
351 |
- elif [ "${env2[$key]#${env1[$key]}}" != "${env2[$key]}" ] |
352 |
- then |
353 |
- added=$(dedup ${env2[$key]#:${env1[$key]}}) |
354 |
- echo -e "append-path\t$key\t${added}" |
355 |
- #Test for prepend plus append |
356 |
- elif [ "${env2[$key]%${env1[$key]}:*}" != "${env2[$key]}" ] |
357 |
- then |
358 |
- added=$(dedup ${env2[$key]%:${env1[$key]}*}) |
359 |
- echo -e "prepend-path\t$key\t${added}" |
360 |
- added=$(dedup ${env2[$key]#*${env1[$key]}:}) |
361 |
- echo -e "append-path\t$key\t${added}" |
362 |
- else |
363 |
- #Unhandled |
364 |
- echo "Unhandled change of $key" 1>&2 |
365 |
- echo "Before <${env1[$key]}>" 1>&2 |
366 |
- echo "After <${env2[$key]}>" 1>&2 |
367 |
- fi |
368 |
- fi |
369 |
- #Delete keys we've handled |
370 |
- unset env1[$key] |
371 |
- unset env2[$key] |
372 |
-done |
373 |
- |
374 |
-#New keys |
375 |
-for key in "${!env2[@]}" |
376 |
-do |
377 |
- if [ "$key" = OLDPWD ] |
378 |
- then |
379 |
- continue |
380 |
- fi |
381 |
- #Use prepend-path for new paths |
382 |
- if [ "${key/PATH/}" != "$key" ] |
383 |
- then |
384 |
- # TODO - Need to handle stripping of default MANPATH |
385 |
- echo -e "prepend-path\t${key}\t"$(dedup ${env2[$key]}) |
386 |
- else |
387 |
- if [ -n "$prefix" ] |
388 |
- then |
389 |
- echo -e "setenv\t\t${key}\t${env2[$key]}" | sed -e s,$prefix,\$prefix,g |
390 |
- else |
391 |
- echo -e "setenv\t\t${key}\t${env2[$key]}" |
392 |
- fi |
393 |
- fi |
394 |
-done |
395 |
-) | sort |
396 |
|
397 |
diff --git a/sys-cluster/modules/files/modules-3.2.10-avail.patch b/sys-cluster/modules/files/modules-3.2.10-avail.patch |
398 |
deleted file mode 100644 |
399 |
index 8d6f52b92..000000000 |
400 |
--- a/sys-cluster/modules/files/modules-3.2.10-avail.patch |
401 |
+++ /dev/null |
402 |
@@ -1,12 +0,0 @@ |
403 |
-diff -up modules-3.2.10/init/bash_completion.in.avail modules-3.2.10/init/bash_completion.in |
404 |
---- modules-3.2.10/init/bash_completion.in.avail 2012-10-25 13:33:34.000000000 -0600 |
405 |
-+++ modules-3.2.10/init/bash_completion.in 2013-01-15 12:05:37.247309733 -0700 |
406 |
-@@ -56,7 +56,7 @@ _module() { |
407 |
- unuse) COMPREPLY=( $(IFS=: compgen -W "${MODULEPATH}" -- "$cur") );; |
408 |
- use|*-a*) ;; # let readline handle the completion |
409 |
- -u|--userlvl) COMPREPLY=( $(compgen -W "novice expert advanced" -- "$cur") );; |
410 |
-- display|help|show|whatis) |
411 |
-+ av*|disp*|help|show|whatis) |
412 |
- COMPREPLY=( $(compgen -W "$(_module_avail)" -- "$cur") );; |
413 |
- *) if test $COMP_CWORD -gt 2 |
414 |
- then |
415 |
|
416 |
diff --git a/sys-cluster/modules/files/modules-3.2.10-bindir.patch b/sys-cluster/modules/files/modules-3.2.10-bindir.patch |
417 |
deleted file mode 100644 |
418 |
index 2066d7f13..000000000 |
419 |
--- a/sys-cluster/modules/files/modules-3.2.10-bindir.patch |
420 |
+++ /dev/null |
421 |
@@ -1,11 +0,0 @@ |
422 |
---- modules-3.2.10.orig/init/Makefile.in 2009-09-22 12:13:52.000000000 -0600 |
423 |
-+++ modules-3.2.10/init/Makefile.in 2009-09-23 12:19:50.797470155 -0600 |
424 |
-@@ -404,7 +404,7 @@ |
425 |
- sed -e "/@$(if $(subst 0,,$(WANTS_VERSIONING)),NOT,)VERSIONING\@/d; \ |
426 |
- s,@$(if $(subst 0,,$(WANTS_VERSIONING)),,NOT)VERSIONING\@,,g; \ |
427 |
- s,@prefix\@,${prefix},g; \ |
428 |
-- s,@bindir\@,${exec_prefix}/bin,g; \ |
429 |
-+ s,@bindir\@,${bindir},g; \ |
430 |
- s,@VERSION\@,@VERSION@,g; \ |
431 |
- s,@BASEPREFIX\@,@BASEPREFIX@,g;" < $< > $@ |
432 |
- |
433 |
|
434 |
diff --git a/sys-cluster/modules/files/modules-3.2.10-clear.patch b/sys-cluster/modules/files/modules-3.2.10-clear.patch |
435 |
deleted file mode 100644 |
436 |
index 0817db5c2..000000000 |
437 |
--- a/sys-cluster/modules/files/modules-3.2.10-clear.patch |
438 |
+++ /dev/null |
439 |
@@ -1,11 +0,0 @@ |
440 |
---- modules-3.2.9/utility.c 2011-11-28 22:27:13.000000000 +0100 |
441 |
-+++ modules-3.2.9-new/utility.c 2012-06-13 15:17:41.570629148 +0200 |
442 |
-@@ -727,7 +727,7 @@ int Output_Modulefile_Changes( Tcl_Inter |
443 |
- output_unset_variable( (char*) key); |
444 |
- } else { |
445 |
- val = EMGetEnv(interp, key); |
446 |
-- if(val && *val) |
447 |
-+ if(val) |
448 |
- output_set_variable(interp, (char*) key, val); |
449 |
- null_free((void *)&val); |
450 |
- } |
451 |
|
452 |
diff --git a/sys-cluster/modules/files/modules-3.2.10-defs.patch b/sys-cluster/modules/files/modules-3.2.10-defs.patch |
453 |
deleted file mode 100644 |
454 |
index 412abebd7..000000000 |
455 |
--- a/sys-cluster/modules/files/modules-3.2.10-defs.patch |
456 |
+++ /dev/null |
457 |
@@ -1,20 +0,0 @@ |
458 |
---- modules-3.2.10/modules_def.h.orig 2017-04-21 19:33:52.698720482 +0300 |
459 |
-+++ modules-3.2.10/modules_def.h 2017-04-21 19:35:19.506727343 +0300 |
460 |
-@@ -616,6 +616,9 @@ |
461 |
- /** ModuleCmd_Purge.c **/ |
462 |
- extern int ModuleCmd_Purge( Tcl_Interp*, int, char*[]); |
463 |
- |
464 |
-+/** ModuleCmd_Refresh.c **/ |
465 |
-+extern int ModuleCmd_Refresh( Tcl_Interp*, int argc, char*[]); |
466 |
-+ |
467 |
- /** ModuleCmd_Switch.c **/ |
468 |
- extern int ModuleCmd_Switch( Tcl_Interp*, int, char*[]); |
469 |
- |
470 |
-@@ -753,6 +756,7 @@ |
471 |
- extern char *EMGetEnv(Tcl_Interp *, char const *); |
472 |
- extern char *EMSetEnv(Tcl_Interp *, char const *, char const *); |
473 |
- extern int is_interactive(void); |
474 |
-+extern void regex_quote(const char *, char *, int len); |
475 |
- |
476 |
- #ifndef HAVE_STRDUP |
477 |
- # undef strdup |
478 |
|
479 |
diff --git a/sys-cluster/modules/files/modules-3.2.10-errorline.patch b/sys-cluster/modules/files/modules-3.2.10-errorline.patch |
480 |
deleted file mode 100644 |
481 |
index b2962f104..000000000 |
482 |
--- a/sys-cluster/modules/files/modules-3.2.10-errorline.patch |
483 |
+++ /dev/null |
484 |
@@ -1,14 +0,0 @@ |
485 |
-diff -ru modules-3.2.9-old/cmdModule.c modules-3.2.9/cmdModule.c |
486 |
---- modules-3.2.9-old/cmdModule.c 2013-06-02 22:46:09.196302980 +0200 |
487 |
-+++ modules-3.2.9/cmdModule.c 2013-06-02 22:53:36.706298800 +0200 |
488 |
-@@ -640,8 +640,8 @@ |
489 |
- case TCL_OK: gotPartial = 0; |
490 |
- continue; /** while **/ |
491 |
- |
492 |
-- case TCL_ERROR: interp->errorLine = ((linenum-1)-gotPartial) + |
493 |
-- interp->errorLine; |
494 |
-+ case TCL_ERROR: Tcl_SetErrorLine(interp, ((linenum-1)-gotPartial) + |
495 |
-+ Tcl_GetErrorLine(interp)); |
496 |
- /* FALLTHROUGH */ |
497 |
- |
498 |
- case TCL_LEVEL0_RETURN: |
499 |
|
500 |
diff --git a/sys-cluster/modules/files/modules-3.2.10-versioning.patch b/sys-cluster/modules/files/modules-3.2.10-versioning.patch |
501 |
deleted file mode 100644 |
502 |
index 7bda92023..000000000 |
503 |
--- a/sys-cluster/modules/files/modules-3.2.10-versioning.patch |
504 |
+++ /dev/null |
505 |
@@ -1,10 +0,0 @@ |
506 |
-diff -up modules-3.2.10/modulefiles/modules.in.versioning modules-3.2.10/modulefiles/modules.in |
507 |
---- modules-3.2.10/modulefiles/modules.in.versioning 2012-10-25 13:33:34.000000000 -0600 |
508 |
-+++ modules-3.2.10/modulefiles/modules.in 2013-01-15 11:30:22.046031158 -0700 |
509 |
-@@ -26,5 +26,5 @@ setenv MODULESHOME $prefix |
510 |
- prepend-path PATH @bindir@ |
511 |
- prepend-path MANPATH @mandir@ |
512 |
- |
513 |
--module use @VERSIONPATH@ |
514 |
-+@VERSIONING@module use @VERSIONPATH@ |
515 |
- |
516 |
|
517 |
diff --git a/sys-cluster/modules/files/modules-3.2.9c-errorline.patch b/sys-cluster/modules/files/modules-3.2.9c-errorline.patch |
518 |
deleted file mode 100644 |
519 |
index b2962f104..000000000 |
520 |
--- a/sys-cluster/modules/files/modules-3.2.9c-errorline.patch |
521 |
+++ /dev/null |
522 |
@@ -1,14 +0,0 @@ |
523 |
-diff -ru modules-3.2.9-old/cmdModule.c modules-3.2.9/cmdModule.c |
524 |
---- modules-3.2.9-old/cmdModule.c 2013-06-02 22:46:09.196302980 +0200 |
525 |
-+++ modules-3.2.9/cmdModule.c 2013-06-02 22:53:36.706298800 +0200 |
526 |
-@@ -640,8 +640,8 @@ |
527 |
- case TCL_OK: gotPartial = 0; |
528 |
- continue; /** while **/ |
529 |
- |
530 |
-- case TCL_ERROR: interp->errorLine = ((linenum-1)-gotPartial) + |
531 |
-- interp->errorLine; |
532 |
-+ case TCL_ERROR: Tcl_SetErrorLine(interp, ((linenum-1)-gotPartial) + |
533 |
-+ Tcl_GetErrorLine(interp)); |
534 |
- /* FALLTHROUGH */ |
535 |
- |
536 |
- case TCL_LEVEL0_RETURN: |
537 |
|
538 |
diff --git a/sys-cluster/modules/files/modules.sh.in b/sys-cluster/modules/files/modules.sh.in |
539 |
deleted file mode 100644 |
540 |
index e3d6d43b2..000000000 |
541 |
--- a/sys-cluster/modules/files/modules.sh.in |
542 |
+++ /dev/null |
543 |
@@ -1,7 +0,0 @@ |
544 |
-shell=$(basename $(ps -p $$ -ocomm=)) |
545 |
-if [ -f @EPREFIX@/usr/share/Modules/init/${shell} ] |
546 |
-then |
547 |
- . @EPREFIX@/usr/share/Modules/init/${shell} |
548 |
-else |
549 |
- . @EPREFIX@/usr/share/Modules/init/sh |
550 |
-fi |
551 |
|
552 |
diff --git a/sys-cluster/modules/metadata.xml b/sys-cluster/modules/metadata.xml |
553 |
index 60ab20673..a67a56343 100644 |
554 |
--- a/sys-cluster/modules/metadata.xml |
555 |
+++ b/sys-cluster/modules/metadata.xml |
556 |
@@ -2,21 +2,24 @@ |
557 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
558 |
<pkgmetadata> |
559 |
<maintainer type="person"> |
560 |
- <email>nicolasbock@g.o</email> |
561 |
- <name>Nicolas Bock</name> |
562 |
+ <email>btbn@××××.de</email> |
563 |
+ <name>Timo Rothenpieler</name> |
564 |
</maintainer> |
565 |
<maintainer type="project"> |
566 |
- <email>cluster@g.o</email> |
567 |
- <name>Gentoo Cluster Project</name> |
568 |
+ <email>sci@g.o</email> |
569 |
+ <name>Gentoo Science Project</name> |
570 |
</maintainer> |
571 |
<longdescription lang="en"> |
572 |
-The environment modules package provides for an easy dynamic |
573 |
-modification of a user's environment via modulefiles. which |
574 |
-typically instruct the module command to alter or set shell |
575 |
-environment variables such as PATH, MANPATH, etc. as well as define |
576 |
-aliases over a variety of shells. |
577 |
-</longdescription> |
578 |
+ The environment modules package provides for an easy dynamic |
579 |
+ modification of a user's environment via modulefiles. which |
580 |
+ typically instruct the module command to alter or set shell |
581 |
+ environment variables such as PATH, MANPATH, etc. as well as define |
582 |
+ aliases over a variety of shells. |
583 |
+ </longdescription> |
584 |
<upstream> |
585 |
<remote-id type="sourceforge">modules</remote-id> |
586 |
</upstream> |
587 |
+ <use> |
588 |
+ <flag name="compat">Build Modules version 3 compat support</flag> |
589 |
+ </use> |
590 |
</pkgmetadata> |
591 |
|
592 |
diff --git a/sys-cluster/modules/modules-3.2.10-r2.ebuild b/sys-cluster/modules/modules-3.2.10-r2.ebuild |
593 |
deleted file mode 100644 |
594 |
index 33ff8a591..000000000 |
595 |
--- a/sys-cluster/modules/modules-3.2.10-r2.ebuild |
596 |
+++ /dev/null |
597 |
@@ -1,66 +0,0 @@ |
598 |
-# Copyright 1999-2017 Gentoo Foundation |
599 |
-# Distributed under the terms of the GNU General Public License v2 |
600 |
- |
601 |
-EAPI=6 |
602 |
- |
603 |
-inherit autotools |
604 |
- |
605 |
-DESCRIPTION="Dynamic modification of a user's environment via modulefiles" |
606 |
-HOMEPAGE="http://modules.sourceforge.net/" |
607 |
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" |
608 |
- |
609 |
-LICENSE="GPL-2" |
610 |
-SLOT="0" |
611 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
612 |
-IUSE="test X" |
613 |
- |
614 |
-RDEPEND=" |
615 |
- dev-lang/tcl:0= |
616 |
- dev-tcltk/tclx |
617 |
- X? ( x11-libs/libX11 )" |
618 |
-DEPEND="${RDEPEND} |
619 |
- test? ( dev-util/dejagnu )" |
620 |
- |
621 |
-S="${WORKDIR}/${P%[a-z]}" |
622 |
- |
623 |
-PATCHES=( |
624 |
- "${FILESDIR}"/${P}-bindir.patch |
625 |
- "${FILESDIR}"/${P}-versioning.patch |
626 |
- "${FILESDIR}"/${P}-clear.patch |
627 |
- "${FILESDIR}"/${P}-avail.patch |
628 |
- "${FILESDIR}"/${P}-defs.patch |
629 |
-) |
630 |
- |
631 |
-DOCS=(ChangeLog README NEWS TODO) |
632 |
- |
633 |
-src_prepare() { |
634 |
- has_version ">=dev-lang/tcl-8.6.0" && |
635 |
- eapply "${FILESDIR}"/${P}-errorline.patch |
636 |
- default |
637 |
- sed -e "s:@EPREFIX@:${EPREFIX}:g" \ |
638 |
- "${FILESDIR}"/modules.sh.in > modules.sh || die |
639 |
- |
640 |
- eautoreconf |
641 |
-} |
642 |
- |
643 |
-src_configure() { |
644 |
- local myconf=( |
645 |
- --disable-versioning |
646 |
- --prefix="${EPREFIX}/usr/share" |
647 |
- --exec-prefix="${EPREFIX}/usr/share/Modules" |
648 |
- --with-module-path="${EPREFIX}/etc/modulefiles" |
649 |
- --with-tcl="${EPREFIX}/usr/$(get_libdir)" |
650 |
- $(use_with X x) |
651 |
- ) |
652 |
- econf ${myconf[@]} |
653 |
-} |
654 |
- |
655 |
-src_install() { |
656 |
- default |
657 |
- insinto /etc/profile.d |
658 |
- doins modules.sh |
659 |
- exeinto /usr/share/Modules/bin |
660 |
- doexe "${FILESDIR}"/createmodule.{sh,py} |
661 |
- dosym ../../../usr/share/Modules/init/csh /etc/profile.d/modules.csh |
662 |
- dodir /etc/modulefiles |
663 |
-} |
664 |
|
665 |
diff --git a/sys-cluster/modules/modules-3.2.9c-r1.ebuild b/sys-cluster/modules/modules-3.2.9c-r1.ebuild |
666 |
deleted file mode 100644 |
667 |
index 43f0ab91d..000000000 |
668 |
--- a/sys-cluster/modules/modules-3.2.9c-r1.ebuild |
669 |
+++ /dev/null |
670 |
@@ -1,48 +0,0 @@ |
671 |
-# Copyright 1999-2015 Gentoo Foundation |
672 |
-# Distributed under the terms of the GNU General Public License v2 |
673 |
- |
674 |
-EAPI=5 |
675 |
- |
676 |
-inherit autotools-utils |
677 |
- |
678 |
-DESCRIPTION="Dynamic modification of a user's environment via modulefiles" |
679 |
-HOMEPAGE="http://modules.sourceforge.net/" |
680 |
-SRC_URI="http://sourceforge.net/projects/modules/files/Modules/${P%[a-z]}/${P}.tar.bz2/download -> ${P}.tar.bz2" |
681 |
- |
682 |
-LICENSE="GPL-2" |
683 |
-SLOT="0" |
684 |
-KEYWORDS="~amd64 ~x86" |
685 |
-IUSE="X" |
686 |
- |
687 |
-DEPEND=" |
688 |
- dev-lang/tcl:0= |
689 |
- dev-tcltk/tclx |
690 |
- X? ( x11-libs/libX11 ) |
691 |
- " |
692 |
-RDEPEND="${DEPEND}" |
693 |
- |
694 |
-S="${WORKDIR}/${P%[a-z]}" |
695 |
- |
696 |
-DOCS=(ChangeLog README NEWS TODO) |
697 |
- |
698 |
-src_prepare() { |
699 |
- has_version ">=dev-lang/tcl-8.6.0" && epatch "${FILESDIR}/${P}-errorline.patch" |
700 |
-} |
701 |
- |
702 |
-src_configure() { |
703 |
- local myeconfargs=( |
704 |
- $(use_with X x) |
705 |
- --prefix=/opt |
706 |
- ) |
707 |
- autotools-utils_src_configure |
708 |
-} |
709 |
- |
710 |
-src_install() { |
711 |
- autotools-utils_src_install |
712 |
- dosym ${PV%[a-z]} /opt/Modules/default |
713 |
-} |
714 |
- |
715 |
-pkg_postinst() { |
716 |
- elog "Add this line at the end of your bashrc:" |
717 |
- elog "[ -f /opt/Modules/default/init/bash ] && source /opt/Modules/default/init/bash" |
718 |
-} |
719 |
|
720 |
diff --git a/sys-cluster/modules/modules-4.6.0.ebuild b/sys-cluster/modules/modules-4.6.0.ebuild |
721 |
new file mode 100644 |
722 |
index 000000000..d4053b39c |
723 |
--- /dev/null |
724 |
+++ b/sys-cluster/modules/modules-4.6.0.ebuild |
725 |
@@ -0,0 +1,64 @@ |
726 |
+# Copyright 2020 Gentoo Authors |
727 |
+# Distributed under the terms of the GNU General Public License v2 |
728 |
+ |
729 |
+EAPI=7 |
730 |
+ |
731 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
732 |
+ |
733 |
+inherit autotools python-single-r1 |
734 |
+ |
735 |
+DESCRIPTION="Dynamic modification of a user's environment via modulefiles" |
736 |
+HOMEPAGE="http://modules.sourceforge.net/" |
737 |
+SRC_URI="https://github.com/cea-hpc/modules/releases/download/v${PV}/${P}.tar.bz2" |
738 |
+ |
739 |
+LICENSE="GPL-2" |
740 |
+SLOT="0" |
741 |
+KEYWORDS="~amd64 ~x86" |
742 |
+IUSE="compat test" |
743 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
744 |
+ |
745 |
+DEPEND=" |
746 |
+ ${PYTHON_DEPS} |
747 |
+ dev-lang/tcl:0= |
748 |
+ dev-tcltk/tclx |
749 |
+ compat? ( x11-libs/libX11 ) |
750 |
+" |
751 |
+RDEPEND="${DEPEND}" |
752 |
+BDEPEND=" |
753 |
+ test? ( dev-util/dejagnu ) |
754 |
+" |
755 |
+ |
756 |
+src_prepare() { |
757 |
+ default |
758 |
+ |
759 |
+ cd "${S}/lib" || die |
760 |
+ eautoreconf |
761 |
+ |
762 |
+ if use compat; then |
763 |
+ cd "${S}/compat" || die |
764 |
+ eautoreconf |
765 |
+ fi |
766 |
+} |
767 |
+ |
768 |
+src_configure() { |
769 |
+ local myconf=( |
770 |
+ --disable-versioning |
771 |
+ --prefix="${EPREFIX}/usr/share/Modules" |
772 |
+ --mandir="${EPREFIX}/usr/share/man" |
773 |
+ --docdir="${EPREFIX}/usr/share/doc/${P}" |
774 |
+ --libdir="${EPREFIX}/usr/share/Modules/$(get_libdir)" |
775 |
+ --datarootdir="${EPREFIX}/usr/share" |
776 |
+ --modulefilesdir="${EPREFIX}/etc/modulefiles" |
777 |
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" |
778 |
+ --with-python="${PYTHON}" |
779 |
+ $(use_enable compat compat-version) |
780 |
+ ) |
781 |
+ ./configure "${myconf[@]}" ${EXTRA_ECONF[@]} || die "configure failed" |
782 |
+} |
783 |
+ |
784 |
+src_install() { |
785 |
+ default |
786 |
+ dosym ../../usr/share/Modules/init/profile.sh /etc/profile.d/modules.sh |
787 |
+ dosym ../../usr/share/Modules/init/profile.csh /etc/profile.d/modules.csh |
788 |
+ dodir /etc/modulefiles |
789 |
+} |