@@ -38,14 +38,14 @@ ARCHIVE_SDIR=pillow-depends-main
3838
3939# Package versions for fresh source builds
4040FREETYPE_VERSION=2.13.3
41- HARFBUZZ_VERSION=10.1 .0
42- LIBPNG_VERSION=1.6.45
41+ HARFBUZZ_VERSION=10.2 .0
42+ LIBPNG_VERSION=1.6.46
4343JPEGTURBO_VERSION=3.1.0
4444OPENJPEG_VERSION=2.5.3
45- XZ_VERSION=5.6.3
45+ XZ_VERSION=5.6.4
4646TIFF_VERSION=4.6.0
4747LCMS2_VERSION=2.16
48- ZLIB_NG_VERSION=2.2.3
48+ ZLIB_NG_VERSION=2.2.4
4949LIBWEBP_VERSION=1.5.0
5050BZIP2_VERSION=1.0.8
5151LIBXCB_VERSION=1.17.0
@@ -54,13 +54,10 @@ BROTLI_VERSION=1.1.0
5454function build_pkg_config {
5555 if [ -e pkg-config-stamp ]; then return ; fi
5656 # This essentially duplicates the Homebrew recipe
57- ORIGINAL_CFLAGS=$CFLAGS
58- CFLAGS=" $CFLAGS -Wno-int-conversion"
59- build_simple pkg-config 0.29.2 https://pkg-config.freedesktop.org/releases tar.gz \
57+ CFLAGS=" $CFLAGS -Wno-int-conversion" build_simple pkg-config 0.29.2 https://pkg-config.freedesktop.org/releases tar.gz \
6058 --disable-debug --disable-host-tool --with-internal-glib \
6159 --with-pc-path=$BUILD_PREFIX /share/pkgconfig:$BUILD_PREFIX /lib/pkgconfig \
6260 --with-system-include-path=$( xcrun --show-sdk-path --sdk macosx) /usr/include
63- CFLAGS=$ORIGINAL_CFLAGS
6461 export PKG_CONFIG=$BUILD_PREFIX /bin/pkg-config
6562 touch pkg-config-stamp
6663}
@@ -72,6 +69,14 @@ function build_zlib_ng {
7269 && ./configure --prefix=$BUILD_PREFIX --zlib-compat \
7370 && make -j4 \
7471 && make install)
72+
73+ if [ -n " $IS_MACOS " ]; then
74+ # Ensure that on macOS, the library name is an absolute path, not an
75+ # @rpath, so that delocate picks up the right library (and doesn't need
76+ # DYLD_LIBRARY_PATH to be set). The default Makefile doesn't have an
77+ # option to control the install_name.
78+ install_name_tool -id $BUILD_PREFIX /lib/libz.1.dylib $BUILD_PREFIX /lib/libz.1.dylib
79+ fi
7580 touch zlib-stamp
7681}
7782
@@ -130,15 +135,13 @@ function build {
130135 build_lcms2
131136 build_openjpeg
132137
133- ORIGINAL_CFLAGS=$CFLAGS
134- CFLAGS=" $CFLAGS -O3 -DNDEBUG"
138+ webp_cflags=" -O3 -DNDEBUG"
135139 if [[ -n " $IS_MACOS " ]]; then
136- CFLAGS =" $CFLAGS -Wl,-headerpad_max_install_names"
140+ webp_cflags =" $webp_cflags -Wl,-headerpad_max_install_names"
137141 fi
138- build_simple libwebp $LIBWEBP_VERSION \
142+ CFLAGS= " $CFLAGS $webp_cflags " build_simple libwebp $LIBWEBP_VERSION \
139143 https://storage.googleapis.com/downloads.webmproject.org/releases/webp tar.gz \
140144 --enable-libwebpmux --enable-libwebpdemux
141- CFLAGS=$ORIGINAL_CFLAGS
142145
143146 build_brotli
144147
0 commit comments