From 0f553b67fa305d37a8eeeb43859446d86ce1382e Mon Sep 17 00:00:00 2001 From: Geoff Lankow Date: Tue, 1 Oct 2019 12:13:50 +1300 Subject: [PATCH] Bug 1585195 - Port Bug 1562684 "[10.15][Mac] PR_GetLibraryFilePathname is returning absolute paths in MacOS Catalina" to Thunderbird; r=rjl --HG-- extra : rebase_source : 0226889c792ad7c3029cb7e7b8f0efa2b2735417 extra : amend_source : 30844e601b6c81da4e41c36b4e9474599231bb6f --- mail/app/Makefile.in | 3 +++ mail/app/macbuild/Contents/MacOS-files-copy.in | 11 +++++++++++ mail/app/macbuild/Contents/MacOS-files.in | 1 - 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 mail/app/macbuild/Contents/MacOS-files-copy.in diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in index b3efd71beb..47265d9324 100644 --- a/mail/app/Makefile.in +++ b/mail/app/Makefile.in @@ -150,6 +150,9 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > '$(DIST)/$(MOZ_MACBUNDLE_NAME)/$(LPROJ)/InfoPlist.strings' rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources' rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS' + # MacOS-files-copy.in is a list of files that should be copies rather + # than symlinks and placed in .app/Contents/MacOS. + rsync -aL --include-from='$(srcdir)/macbuild/Contents/MacOS-files-copy.in' --exclude '*' $(DIST)/bin/ '$(dist_dest)/Contents/MacOS' $(RM) '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/$(MOZ_APP_NAME)' rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS' $(MKDIR) -p '$(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Library/Spotlight' diff --git a/mail/app/macbuild/Contents/MacOS-files-copy.in b/mail/app/macbuild/Contents/MacOS-files-copy.in new file mode 100644 index 0000000000..e9d0f0efb9 --- /dev/null +++ b/mail/app/macbuild/Contents/MacOS-files-copy.in @@ -0,0 +1,11 @@ +# Specifies files that should be copied (via deep copy, resolving symlinks) +# from dist/bin to the .app/Contents/MacOS directory. Linking is preferred to +# reduce disk I/O during builds, so just include dylibs which need to be in the +# same directory as returned by dladddr(3). +# +# Some of these dylibs load other dylibs which are assumed to be siblings in +# the same directory obtained from dladdr(3). With macOS 10.15, dladdr returns +# absolute resolved paths which breaks this assumption if symlinks are used +# because the symlink targets are in different directories. Hence the need for +# them to be copied to the same directory. +/*.dylib diff --git a/mail/app/macbuild/Contents/MacOS-files.in b/mail/app/macbuild/Contents/MacOS-files.in index a0cc04b06f..8eb28308a4 100644 --- a/mail/app/macbuild/Contents/MacOS-files.in +++ b/mail/app/macbuild/Contents/MacOS-files.in @@ -1,5 +1,4 @@ /*.app/*** -/*.dylib /certutil /thunderbird-bin /pingsender