diff options
author | Carson Woods <carsonwoods@users.noreply.github.com> | 2020-03-30 08:14:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 08:14:07 -0500 |
commit | e9d573d1101002b127d5c789d86d3c1e92d81309 (patch) | |
tree | 55ef7a2bc63c836241af9053a85196ac8c75752c | |
parent | 05b7ec48c5d38b70e4bcd010979869302032cb81 (diff) | |
download | spack-e9d573d1101002b127d5c789d86d3c1e92d81309.tar.gz spack-e9d573d1101002b127d5c789d86d3c1e92d81309.tar.bz2 spack-e9d573d1101002b127d5c789d86d3c1e92d81309.tar.xz spack-e9d573d1101002b127d5c789d86d3c1e92d81309.zip |
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.
-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 |