package: add additional configuration options to lmod (#15682)
* Add further configuration options * Convert auto-swap to auto_swap. Might eventually switch to key-value pair instead.
This commit is contained in:
parent
05b7ec48c5
commit
e9d573d110
@ -46,6 +46,9 @@ class Lmod(AutotoolsPackage):
|
|||||||
depends_on('lua-luafilesystem', type=('build', 'run'))
|
depends_on('lua-luafilesystem', type=('build', 'run'))
|
||||||
depends_on('tcl', type=('build', 'link', 'run'))
|
depends_on('tcl', type=('build', 'link', 'run'))
|
||||||
|
|
||||||
|
variant('auto_swap', default=False, description='Enable auto swapping conflicting modules')
|
||||||
|
variant('redirect', default=True, description='Enables redirect instead of pager')
|
||||||
|
|
||||||
patch('fix_tclsh_paths.patch', when='@:6.4.3')
|
patch('fix_tclsh_paths.patch', when='@:6.4.3')
|
||||||
patch('0001-fix-problem-with-MODULESHOME-and-issue-271.patch', when='@7.3.28:7.4.10')
|
patch('0001-fix-problem-with-MODULESHOME-and-issue-271.patch', when='@7.3.28:7.4.10')
|
||||||
|
|
||||||
@ -65,3 +68,18 @@ def patch(self):
|
|||||||
if self.spec.version <= Version('6.4.3'):
|
if self.spec.version <= Version('6.4.3'):
|
||||||
for tclscript in glob('src/*.tcl'):
|
for tclscript in glob('src/*.tcl'):
|
||||||
filter_file(r'^#!.*tclsh', '#!@path_to_tclsh@', tclscript)
|
filter_file(r'^#!.*tclsh', '#!@path_to_tclsh@', tclscript)
|
||||||
|
|
||||||
|
def configure_args(self):
|
||||||
|
args = []
|
||||||
|
|
||||||
|
if '+auto_swap' in self.spec:
|
||||||
|
args.append('--with-autoSwap=yes')
|
||||||
|
else:
|
||||||
|
args.append('--with-autoSwap=no')
|
||||||
|
|
||||||
|
if '+redirect' in self.spec:
|
||||||
|
args.append('--with-redirect=yes')
|
||||||
|
else:
|
||||||
|
args.append('--with-redirect=no')
|
||||||
|
|
||||||
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user