Skip to content

Commit

Permalink
Correct the lookup of libfribidi on x86 macOS installs.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Nov 13, 2024
1 parent 681a03b commit 9dc6904
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/wheels-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,18 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
# However, we *do* need Homebrew to provide a copy of fribidi for
# testing purposes so that we can verify the fribidi shim works as expected.
if [[ "$(uname -m)" == "x86_64" ]]; then
# Use the "installed" location, rather than /usr/local, for two reasons:
# firstly, Homebrew allows libraries to be *installed*, but not linked;
# and secondly, we don't want any *other* leakage from /usr/local.
HOMEBREW_HOME=/usr/local/Homebrew
HOMEBREW_PREFIX=/usr/local
else
HOMEBREW_HOME=/opt/homebrew
HOMEBREW_PREFIX=/opt/homebrew
fi
$HOMEBREW_HOME/bin/brew install fribidi
$HOMEBREW_PREFIX/bin/brew install fribidi

# Add the lib folder for fribidi so that the vendored library can be found.
# Don't use /opt/homebrew/lib directly - use the lib folder where the
# Don't use $HOMEWBREW_PREFIX/lib directly - use the lib folder where the
# installed copy of fribidi is cellared. This ensures we don't pick up the
# Homebrew version of any other library that we're dependent on (most notably,
# freetype).
export DYLD_LIBRARY_PATH=$(dirname $(realpath $HOMEBREW_HOME/lib/libfribidi.dylib))
export DYLD_LIBRARY_PATH=$(dirname $(realpath $HOMEBREW_PREFIX/lib/libfribidi.dylib))
elif [ "${AUDITWHEEL_POLICY::9}" == "musllinux" ]; then
apk add curl fribidi
else
Expand Down

0 comments on commit 9dc6904

Please sign in to comment.