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.
This commit is contained in:
Geoffrey Oxberry 2018-02-14 13:52:44 -08:00 committed by scheibelp
parent a7b8d26fa7
commit 277ab2d355

View file

@ -56,13 +56,15 @@ def setup_dependent_package(self, module, dependent_spec):
for name in executables: for name in executables:
setattr(module, name, self._make_executable(name)) setattr(module, name, self._make_executable(name))
@when('platform=darwin') @run_after('install')
def configure_args(self): def post_install(self):
# Some platforms name GNU libtool and GNU libtoolize # Some platforms name GNU libtool and GNU libtoolize
# 'glibtool' and 'glibtoolize', respectively, to differentiate # 'glibtool' and 'glibtoolize', respectively, to differentiate
# them from BSD libtool and BSD libtoolize. On these BSD # them from BSD libtool and BSD libtoolize. On these BSD
# platforms, build systems sometimes expect to use the assumed # platforms, build systems sometimes expect to use the assumed
# GNU commands glibtool and glibtoolize instead of the BSD # GNU commands glibtool and glibtoolize instead of the BSD
# variant; this happens frequently, for instance, on Darwin # variant; this happens frequently, for instance, on Darwin
args = ['--program-prefix=g'] symlink(join_path(self.prefix.bin, 'libtool'),
return args join_path(self.prefix.bin, 'glibtool'))
symlink(join_path(self.prefix.bin, 'libtoolize'),
join_path(self.prefix.bin, 'glibtoolize'))