Skip to content

Commit 554a85d

Browse files
committed
Use LDFLAGS instead of install_name_tool
1 parent 56a72a3 commit 554a85d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/wheels-dependencies.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,16 @@ function build_pkg_config {
6868
function build_zlib_ng {
6969
if [ -e zlib-stamp ]; then return; fi
7070
fetch_unpack https://github.com/zlib-ng/zlib-ng/archive/$ZLIB_NG_VERSION.tar.gz zlib-ng-$ZLIB_NG_VERSION.tar.gz
71-
(cd zlib-ng-$ZLIB_NG_VERSION \
72-
&& ./configure --prefix=$BUILD_PREFIX --zlib-compat \
73-
&& make -j4 \
74-
&& make install)
75-
7671
if [ -n "$IS_MACOS" ]; then
7772
# Ensure that on macOS, the library name is an absolute path, not an
7873
# @rpath, so that delocate picks up the right library (and doesn't need
79-
# DYLD_LIBRARY_PATH to be set). The default Makefile doesn't have an
80-
# option to control the install_name.
81-
install_name_tool -id $BUILD_PREFIX/lib/libz.1.dylib $BUILD_PREFIX/lib/libz.1.dylib
74+
# DYLD_LIBRARY_PATH to be set).
75+
install_name_flags="-dynamiclib -install_name $BUILD_PREFIX/lib/libz.1.dylib"
8276
fi
77+
(cd zlib-ng-$ZLIB_NG_VERSION \
78+
&& LDFLAGS="$LDFLAGS $install_name_flags" ./configure --prefix=$BUILD_PREFIX --zlib-compat \
79+
&& make -j4 \
80+
&& make install)
8381
touch zlib-stamp
8482
}
8583

0 commit comments

Comments
 (0)