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 120ba1c commit 6cc0ed4
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/wheels-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,15 @@ 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
ORIGINAL_LDFLAGS=$LDFLAGS
if [ -n "$IS_MACOS" ]; then
LDFLAGS="-dynamiclib -install_name $BUILD_PREFIX/lib/libz.1.dylib"
fi
(cd zlib-ng-$ZLIB_NG_VERSION \
&& ./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
LDFLAGS=$ORIGINAL_LDFLAGS
touch zlib-stamp
}

Expand Down

0 comments on commit 6cc0ed4

Please sign in to comment.