From 277ab2d355ce80c6cff14615df9e9a90b7859bf9 Mon Sep 17 00:00:00 2001 From: Geoffrey Oxberry Date: Wed, 14 Feb 2018 13:52:44 -0800 Subject: [PATCH] libtool: symlink correctly on darwin (#7179) To accommodate build systems on Darwin which look for glibtool/ize, #7060 attempted to provide glibtool/ize symlinks for libtool/ize but accidentally created the same symlink twice. #7073 reverted this and replaced libtool/ize with glibtool/ize on Darwin. This led to #7163 since AutotoolsPackages depend on the presence of the 'libtool' binary, so this returns to the approach of #7160 but makes the correct symlinks. --- var/spack/repos/builtin/packages/libtool/package.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index b5d5c9b2b1..e9daa69ed8 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -56,13 +56,15 @@ def setup_dependent_package(self, module, dependent_spec): for name in executables: setattr(module, name, self._make_executable(name)) - @when('platform=darwin') - def configure_args(self): + @run_after('install') + def post_install(self): # Some platforms name GNU libtool and GNU libtoolize # 'glibtool' and 'glibtoolize', respectively, to differentiate # them from BSD libtool and BSD libtoolize. On these BSD # platforms, build systems sometimes expect to use the assumed # GNU commands glibtool and glibtoolize instead of the BSD # variant; this happens frequently, for instance, on Darwin - args = ['--program-prefix=g'] - return args + symlink(join_path(self.prefix.bin, 'libtool'), + join_path(self.prefix.bin, 'glibtool')) + symlink(join_path(self.prefix.bin, 'libtoolize'), + join_path(self.prefix.bin, 'glibtoolize'))