summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2019-10-05 20:37:44 -0500
committerGitHub <noreply@github.com>2019-10-05 20:37:44 -0500
commit608f7321016d5a9937930d3163fdef9af0a194af (patch)
tree91c5e2270d1cc6dcc1be51ccd018d073d0ef6ed6
parente78ca6608796f6ba67ddd348f2e6df9b9c457a9b (diff)
downloadspack-608f7321016d5a9937930d3163fdef9af0a194af.tar.gz
spack-608f7321016d5a9937930d3163fdef9af0a194af.tar.bz2
spack-608f7321016d5a9937930d3163fdef9af0a194af.tar.xz
spack-608f7321016d5a9937930d3163fdef9af0a194af.zip
expect: fix darwin install name (#13042)
* expect: fix darwin install name * Fix expect binary as well
-rw-r--r--var/spack/repos/builtin/packages/expect/package.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/expect/package.py b/var/spack/repos/builtin/packages/expect/package.py
index 01becf4b3f..1c431e9d99 100644
--- a/var/spack/repos/builtin/packages/expect/package.py
+++ b/var/spack/repos/builtin/packages/expect/package.py
@@ -58,3 +58,15 @@ class Expect(AutotoolsPackage):
link_name = join_path(self.prefix.lib, link_name)
symlink(target, link_name)
+
+ @run_after('install')
+ def darwin_fix(self):
+ # The shared library is not installed correctly on Darwin; fix this
+ if self.spec.satisfies('platform=darwin'):
+ fix_darwin_install_name(
+ join_path(self.prefix.lib, 'expect{0}'.format(self.version)))
+
+ old = 'libexpect{0}.dylib'.format(self.version)
+ new = glob.glob(join_path(self.prefix.lib, 'expect*', 'libexpect*'))[0]
+ install_name_tool = Executable('install_name_tool')
+ install_name_tool('-change', old, new, self.prefix.bin.expect)