Skip to content

Commit

Permalink
Use LDFLAGS instead of install_name_tool
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 8, 2025
1 parent 56a72a3 commit 12cc5e6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/wheels-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,13 @@ function build_pkg_config {
function build_zlib_ng {
if [ -e zlib-stamp ]; then return; fi
fetch_unpack https://github.com/zlib-ng/zlib-ng/archive/$ZLIB_NG_VERSION.tar.gz zlib-ng-$ZLIB_NG_VERSION.tar.gz
if [ -n "$IS_MACOS" ]; then
install_name_flags="-dynamiclib -install_name $BUILD_PREFIX/lib/libz.1.dylib"
fi
(cd zlib-ng-$ZLIB_NG_VERSION \
&& ./configure --prefix=$BUILD_PREFIX --zlib-compat \
&& LDFLAGS="$LDFLAGS $install_name_flags" ./configure --prefix=$BUILD_PREFIX --zlib-compat \
&& make -j4 \
&& make install)

if [ -n "$IS_MACOS" ]; then
# Ensure that on macOS, the library name is an absolute path, not an
# @rpath, so that delocate picks up the right library (and doesn't need
# DYLD_LIBRARY_PATH to be set). The default Makefile doesn't have an
# option to control the install_name.
install_name_tool -id $BUILD_PREFIX/lib/libz.1.dylib $BUILD_PREFIX/lib/libz.1.dylib
fi
touch zlib-stamp
}

Expand Down

0 comments on commit 12cc5e6

Please sign in to comment.