Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(build): fix exec script of LuaRocks on macOS #13782

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions build/luarocks/templates/luarocks_exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,26 @@ OPENSSL_DIR=$root_path/$openssl_path
# but the linker expects `libexpat.so` to be present.
# So we create a symlink to the actual file
# if it doesn't exist.
if ! test -e $EXPAT_DIR/lib/libexpat.so; then
so=$(ls $EXPAT_DIR/lib/libexpat.*)
if [[ -z $so ]]; then
echo "No expat library found in $EXPAT_DIR/lib"
exit 1
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS uses `.dylib``
if ! test -e $EXPAT_DIR/lib/libexpat.dylib; then
dylib=$(ls $EXPAT_DIR/lib/libexpat.*)
if [[ -z $dylib ]]; then
echo "No expat library found in $EXPAT_DIR/lib"
exit 1
fi
ln -s $dylib $EXPAT_DIR/lib/libexpat.dylib
fi
else
# Linux uses `.so``
if ! test -e $EXPAT_DIR/lib/libexpat.so; then
so=$(ls $EXPAT_DIR/lib/libexpat.*)
if [[ -z $so ]]; then
echo "No expat library found in $EXPAT_DIR/lib"
exit 1
fi
ln -s $so $EXPAT_DIR/lib/libexpat.so
fi
ln -s $so $EXPAT_DIR/lib/libexpat.so
fi

# we use system libyaml on macos
Expand Down
Loading