@@ -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}
@@ -138,15 +135,13 @@ function build {
138135 build_lcms2
139136 build_openjpeg
140137
141- ORIGINAL_CFLAGS=$CFLAGS
142- CFLAGS=" $CFLAGS -O3 -DNDEBUG"
138+ webp_cflags=" -O3 -DNDEBUG"
143139 if [[ -n " $IS_MACOS " ]]; then
144- CFLAGS =" $CFLAGS -Wl,-headerpad_max_install_names"
140+ webp_cflags =" $webp_cflags -Wl,-headerpad_max_install_names"
145141 fi
146- build_simple libwebp $LIBWEBP_VERSION \
142+ CFLAGS= " $CFLAGS $webp_cflags " build_simple libwebp $LIBWEBP_VERSION \
147143 https://storage.googleapis.com/downloads.webmproject.org/releases/webp tar.gz \
148144 --enable-libwebpmux --enable-libwebpdemux
149- CFLAGS=$ORIGINAL_CFLAGS
150145
151146 build_brotli
152147
0 commit comments