macOS: Add a workaround for libpcre2.

Work around an issue with libpcre2 similar to what we do for libsnappy
and libssh.
This commit is contained in:
Gerald Combs 2021-11-14 17:05:59 -08:00
parent d8e33efb3c
commit e3159ae631
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,9 @@ while $endl; do
#
# replace "@rpath/libsnappy" with "/usr/local/lib/libssnappy" so that
# it isn't excluded from subsequent filtering.
#
# replace "@rpath/libpcre2" with "/usr/local/lib/libpcre2" 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.
@ -200,6 +203,7 @@ while $endl; do
otool -L $bundle_binary_list "$pkglib"/*.dylib 2>/dev/null \
| grep -F compatibility \
| cut -d\( -f1 \
| sed '1,$s;^ @rpath/libpcre2; /usr/local/lib/libpcre2;' \
| 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;' \