tcl package: Install sources (#8153)
The tcl package references the original sources upon install, and the tk build requires the tcl sources. This updates the tcl package to install its sources following the example of #4102, and also updates the tclConfig.sh file to properly reference the installed sources (rather than the staging directory created by Spack).
This commit is contained in:
parent
cd860d7554
commit
4a53942ee1
@ -61,9 +61,30 @@ def install(self, spec, prefix):
|
|||||||
with working_dir(self.build_directory):
|
with working_dir(self.build_directory):
|
||||||
make('install')
|
make('install')
|
||||||
|
|
||||||
|
# http://wiki.tcl.tk/17463
|
||||||
|
if self.spec.satisfies('@8.6:'):
|
||||||
|
make('install-headers')
|
||||||
|
|
||||||
# Some applications like Expect require private Tcl headers.
|
# Some applications like Expect require private Tcl headers.
|
||||||
make('install-private-headers')
|
make('install-private-headers')
|
||||||
|
|
||||||
|
# Copy source to install tree
|
||||||
|
# A user-provided install option might re-do this
|
||||||
|
# https://github.com/spack/spack/pull/4102/files
|
||||||
|
installed_src = join_path(
|
||||||
|
self.spec.prefix, 'share', self.name, 'src')
|
||||||
|
stage_src = os.path.realpath(self.stage.source_path)
|
||||||
|
install_tree(stage_src, installed_src)
|
||||||
|
|
||||||
|
# Replace stage dir -> installed src dir in tclConfig
|
||||||
|
filter_file(
|
||||||
|
stage_src, installed_src,
|
||||||
|
join_path(self.spec.prefix, 'lib', 'tclConfig.sh'))
|
||||||
|
|
||||||
|
# Don't install binaries in src/ tree
|
||||||
|
with working_dir(join_path(installed_src, self.configure_directory)):
|
||||||
|
make('clean')
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
def symlink_tclsh(self):
|
def symlink_tclsh(self):
|
||||||
with working_dir(self.prefix.bin):
|
with working_dir(self.prefix.bin):
|
||||||
|
Loading…
Reference in New Issue
Block a user