diff options
-rw-r--r-- | var/spack/repos/builtin/packages/lmod/package.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index cf22c80aa2..2f12d47587 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -46,6 +46,9 @@ class Lmod(AutotoolsPackage): depends_on('lua-luafilesystem', type=('build', '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('0001-fix-problem-with-MODULESHOME-and-issue-271.patch', when='@7.3.28:7.4.10') @@ -65,3 +68,18 @@ class Lmod(AutotoolsPackage): if self.spec.version <= Version('6.4.3'): for tclscript in glob('src/*.tcl'): 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 |