summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorElizabeth Fischer <rpf2116@columbia.edu>2018-06-08 14:10:40 -0400
committerscheibelp <scheibel1@llnl.gov>2018-06-08 11:10:40 -0700
commit4a53942ee1d1797c32c5039ae7a4bd878f37189c (patch)
tree47f9e1a36f5cd28e74253a90bb7ec4545ef7e327 /var
parentcd860d755427aa088995fb26b39111d9ca69dd1f (diff)
downloadspack-4a53942ee1d1797c32c5039ae7a4bd878f37189c.tar.gz
spack-4a53942ee1d1797c32c5039ae7a4bd878f37189c.tar.bz2
spack-4a53942ee1d1797c32c5039ae7a4bd878f37189c.tar.xz
spack-4a53942ee1d1797c32c5039ae7a4bd878f37189c.zip
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).
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/tcl/package.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py
index 6c4278d514..e899ab55b4 100644
--- a/var/spack/repos/builtin/packages/tcl/package.py
+++ b/var/spack/repos/builtin/packages/tcl/package.py
@@ -61,9 +61,30 @@ class Tcl(AutotoolsPackage):
with working_dir(self.build_directory):
make('install')
+ # http://wiki.tcl.tk/17463
+ if self.spec.satisfies('@8.6:'):
+ make('install-headers')
+
# Some applications like Expect require private Tcl 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')
def symlink_tclsh(self):
with working_dir(self.prefix.bin):