diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index 2eac4d3d71e..719017df883 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -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 }