aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2020-12-16 13:04:18 -0800
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2020-12-16 21:31:29 +0000
commitbf45e8c3f1ee600b42cee186e81f1a3ad0b61cb3 (patch)
tree50e172fa557c614ec920c38b3507bedfbbc7a7a3 /packaging
parent6deafe8afa1c8552f8c7f92ddab6a4dc9234da40 (diff)
macOS: Add a workaround for libsnappy.
Work around an issue with libsnappy similar to what we do with libssh.
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/macosx/osx-app.sh.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/packaging/macosx/osx-app.sh.in b/packaging/macosx/osx-app.sh.in
index 94b4db0a31..b0b00f4ba2 100755
--- a/packaging/macosx/osx-app.sh.in
+++ b/packaging/macosx/osx-app.sh.in
@@ -176,6 +176,9 @@ while $endl; do
# @rpath/libssh.4.dylib, rather than /usr/local/lib/libssh.4.dylib,
# when built by tools/macos-setup.sh;
#
+ # replace "@rpath/libsnappy" with "/usr/local/lib/libssnappy" so that
+ # it isn't excluded from subsequent filtering.
+
# replace "\tlibbrotli" with "\t/usr/local/lib/libbrotli" so that
# it isn't excluded from subsequent filtering.
# libbrotli, for some reason, doesn't have a path prefix in its
@@ -186,11 +189,18 @@ while $endl; do
#
# eliminate duplicates.
#
+ # We might want to let dyld do some of the work for us, e.g. by
+ # parsing the output of
+ #
+ # `DYLD_PRINT_LIBRARIES=1 $bundle_binary`
+ #
+ # instead.
libs="$(
# shellcheck disable=SC2086
otool -L $bundle_binary_list "$pkglib"/*.dylib 2>/dev/null \
| grep -F compatibility \
| cut -d\( -f1 \
+ | sed '1,$s;^ @rpath/libsnappy; /usr/local/lib/libsnappy;' \
| sed '1,$s;^ @rpath/libssh; /usr/local/lib/libssh;' \
| sed '1,$s;^ libbrotli; /usr/local/lib/libbrotli;' \
| grep -E -v "$exclude_prefixes" \