Skip to content

Commit

Permalink
apply a workaround for libpng on xcode 13.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Apr 21, 2024
1 parent 3b054eb commit e78b795
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/apple/libpng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit e78b795

Please sign in to comment.