Git's gitk needs TK's wish to be found in PATH (#8360)
* Git's gitk needs TK's wish to be found in PATH * Add a _runtime_ dependency on `tk` * Add an environment rule to add the path to TK's `wish` program to $PATH for the generated `git` modulefile. * Make TclTk run environment an optional variant for git. * Cleanup based on PR recommendations.
This commit is contained in:
parent
15c98fa57c
commit
689e0cb24b
@ -160,6 +160,9 @@ class Git(AutotoolsPackage):
|
||||
placement='git-manpages',
|
||||
when='@{0}'.format(release['version']))
|
||||
|
||||
variant('tcltk', default=False,
|
||||
description='Gitk: provide Tcl/Tk in the run environment')
|
||||
|
||||
depends_on('curl')
|
||||
depends_on('expat')
|
||||
depends_on('gettext')
|
||||
@ -174,6 +177,7 @@ class Git(AutotoolsPackage):
|
||||
depends_on('automake', type='build')
|
||||
depends_on('libtool', type='build')
|
||||
depends_on('m4', type='build')
|
||||
depends_on('tk', type=('build', 'link'), when='+tcltk')
|
||||
|
||||
# See the comment in setup_environment re EXTLIBS.
|
||||
def patch(self):
|
||||
@ -202,7 +206,7 @@ def setup_environment(self, spack_env, run_env):
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
|
||||
return [
|
||||
configure_args = [
|
||||
'--with-curl={0}'.format(spec['curl'].prefix),
|
||||
'--with-expat={0}'.format(spec['expat'].prefix),
|
||||
'--with-iconv={0}'.format(spec['libiconv'].prefix),
|
||||
@ -212,6 +216,14 @@ def configure_args(self):
|
||||
'--with-zlib={0}'.format(spec['zlib'].prefix),
|
||||
]
|
||||
|
||||
if '+tcltk' in self.spec:
|
||||
configure_args.append('--with-tcltk={0}'.format(
|
||||
self.spec['tk'].prefix.bin.wish))
|
||||
else:
|
||||
configure_args.append('--without-tcltk')
|
||||
|
||||
return configure_args
|
||||
|
||||
@run_after('configure')
|
||||
def filter_rt(self):
|
||||
if sys.platform == 'darwin':
|
||||
|
Loading…
Reference in New Issue
Block a user