diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index eca530ce0c1481ca4c9ab4066eb24d1d921ea936..9e9005ccc54566b3ef937cb366a647f0145d366f 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -46,8 +46,24 @@ def setup_dependent_environment(self, spack_env, run_env, dependent_spec): join_path(self.prefix.share, 'aclocal')) def setup_dependent_package(self, module, dependent_spec): - # Automake is very likely to be a build dependency, - # so we add the tools it provides to the dependent module - executables = ['libtoolize', 'libtool'] + # Automake is very likely to be a build dependency, so we add + # the tools it provides to the dependent module. Some build + # systems differentiate between BSD libtool (e.g., Darwin) and + # GNU libtool, so also add 'glibtool' and 'glibtoolize' to the + # list of executables. + executables = ['libtoolize', 'libtool', 'glibtoolize', 'glibtool'] for name in executables: setattr(module, name, self._make_executable(name)) + + @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 + symlink(join_path(self.prefix.bin, 'libtoolize'), + join_path(self.prefix.bin, 'glibtoolize')) + symlink(join_path(self.prefix.bin, 'libtoolize'), + join_path(self.prefix.bin, 'glibtoolize'))