summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/lmod/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/lmod/package.py')
-rw-r--r--var/spack/repos/builtin/packages/lmod/package.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py
index efa235f646..01911c1a30 100644
--- a/var/spack/repos/builtin/packages/lmod/package.py
+++ b/var/spack/repos/builtin/packages/lmod/package.py
@@ -23,6 +23,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
+from glob import glob
class Lmod(Package):
@@ -44,6 +45,7 @@ class Lmod(Package):
depends_on('lua@5.2:')
depends_on('lua-luaposix', type=nolink)
depends_on('lua-luafilesystem', type=nolink)
+ depends_on('tcl', type=nolink)
parallel = False
@@ -53,6 +55,16 @@ class Lmod(Package):
spack_env.append_path('LUA_PATH', stage_lua_path.format(
version=self.version), separator=';')
+ patch('fix_tclsh_paths.patch')
+
+ def patch(self):
+ """The tcl scripts should use the tclsh that was discovered
+ by the configure script. Touch up their #! lines so that the
+ sed in the Makefile's install step has something to work on.
+ Requires the change in the associated patch file.fg"""
+ for tclscript in glob('src/*.tcl'):
+ filter_file(r'^#!.*tclsh', '#!@path_to_tclsh@', tclscript)
+
def install(self, spec, prefix):
configure('--prefix=%s' % prefix)
make('install')