Merge pull request #1263 from hartzell/lmod-needs-tcl
The lmod package should depend_on('tcl')
This commit is contained in:
commit
4707362ccd
10
var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch
Normal file
10
var/spack/repos/builtin/packages/lmod/fix_tclsh_paths.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/Makefile.in 2016-07-21 13:03:27.861000000 -0400
|
||||||
|
+++ b/Makefile.in 2016-07-21 13:03:58.416000000 -0400
|
||||||
|
@@ -197,6 +197,7 @@
|
||||||
|
-e 's|@colorize@|$(COLORIZE)|g' \
|
||||||
|
-e 's|@duplicate_paths@|$(DUPLICATE_PATHS)|g' \
|
||||||
|
-e 's|@allow_tcl_mfiles@|$(ALLOW_TCL_MFILES)|g' \
|
||||||
|
+ -e 's|@path_to_tclsh@|$(PATH_TO_TCLSH)|g' \
|
||||||
|
-e 's|@mpath_avail@|$(MPATH_AVAIL)|g' \
|
||||||
|
-e 's|@short_time@|$(SHORT_TIME)|g' \
|
||||||
|
-e 's|@cacheDirs@|$(SPIDER_CACHE_DIRS)|g' \
|
@ -23,6 +23,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
##############################################################################
|
##############################################################################
|
||||||
from spack import *
|
from spack import *
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
|
|
||||||
class Lmod(Package):
|
class Lmod(Package):
|
||||||
@ -44,6 +45,7 @@ class Lmod(Package):
|
|||||||
depends_on('lua@5.2:')
|
depends_on('lua@5.2:')
|
||||||
depends_on('lua-luaposix', type=nolink)
|
depends_on('lua-luaposix', type=nolink)
|
||||||
depends_on('lua-luafilesystem', type=nolink)
|
depends_on('lua-luafilesystem', type=nolink)
|
||||||
|
depends_on('tcl', type=nolink)
|
||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
@ -53,6 +55,16 @@ def setup_environment(self, spack_env, run_env):
|
|||||||
spack_env.append_path('LUA_PATH', stage_lua_path.format(
|
spack_env.append_path('LUA_PATH', stage_lua_path.format(
|
||||||
version=self.version), separator=';')
|
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):
|
def install(self, spec, prefix):
|
||||||
configure('--prefix=%s' % prefix)
|
configure('--prefix=%s' % prefix)
|
||||||
make('install')
|
make('install')
|
||||||
|
@ -57,3 +57,5 @@ def install(self, spec, prefix):
|
|||||||
configure("--prefix={0}".format(prefix))
|
configure("--prefix={0}".format(prefix))
|
||||||
make()
|
make()
|
||||||
make("install")
|
make("install")
|
||||||
|
with working_dir(prefix.bin):
|
||||||
|
symlink('tclsh{0}'.format(self.version.up_to(2)), 'tclsh')
|
||||||
|
Loading…
Reference in New Issue
Block a user