diff --git a/packaging/macosx/osx-app.sh.in b/packaging/macosx/osx-app.sh.in index fa32b38034..149b395f54 100755 --- a/packaging/macosx/osx-app.sh.in +++ b/packaging/macosx/osx-app.sh.in @@ -320,6 +320,17 @@ rpathify_file () { echo "Changing reference to $dep_lib to $to in $1" /usr/bin/install_name_tool -change "$dep_lib" "$to" "$1" done + + # + # Try to work around brotli's lack of a full path + # https://github.com/google/brotli/issues/934 + # + otool -L "$1" | grep '^ libbrotli' | awk '{print $1}' | \ + while read -r base ; do + to="@rpath/$base" + echo "Changing reference to $base to $to in $1" + /usr/bin/install_name_tool -change "$base" "$to" "$1" + done fi #