From e78b7956c7efd76e61930d9b3571773804c30565 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Sun, 21 Apr 2024 15:21:51 +0100 Subject: [PATCH] apply a workaround for libpng on xcode 13.4.1 --- scripts/apple/libpng.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/apple/libpng.sh b/scripts/apple/libpng.sh index 2c36e66..46e73f0 100755 --- a/scripts/apple/libpng.sh +++ b/scripts/apple/libpng.sh @@ -24,6 +24,13 @@ if [[ ! -f "${BASEDIR}"/src/"${LIB_NAME}"/configure ]] || [[ ${RECONF_libpng} -e autoreconf_library "${LIB_NAME}" 1>>"${BASEDIR}"/build.log 2>&1 || return 1 fi +# WORKAROUND TO FIX ZLIB VERSION DETECTED - OCCURS ON XCODE 14.3.1 +if [[ -n "$DETECTED_IOS_SDK_VERSION" && $(compare_versions "$DETECTED_IOS_SDK_VERSION" "16.4") -ge 0 ]] || + [[ -n "$DETECTED_MACOS_SDK_VERSION" && $(compare_versions "$DETECTED_MACOS_SDK_VERSION" "13.3") -eq 0 ]] || + [[ -n "$DETECTED_TVOS_SDK_VERSION" && $(compare_versions "$DETECTED_TVOS_SDK_VERSION" "16.4") -ge 0 ]]; then + ${SED_INLINE} "s|ZLIB_VERNUM default .*|ZLIB_VERNUM default 0|g" "${BASEDIR}"/src/"${LIB_NAME}"/scripts/pnglibconf.dfa +fi + ./configure \ --prefix="${LIB_INSTALL_PREFIX}" \ --with-pic \