|
|
|
@ -196,16 +196,15 @@ fi |
|
|
|
|
|
|
|
|
|
if [ "${PREPARE_BUILD_INSTALL_DEPS_PHP}" == "true" ] |
|
|
|
|
then |
|
|
|
|
# php7.4 should already be installed on kokoro monterey image, so this should be instantaneous. |
|
|
|
|
time brew install php@7.4 || true |
|
|
|
|
export LDFLAGS="-L/usr/local/opt/php@7.4/lib ${LDFLAGS}" |
|
|
|
|
export CPPFLAGS="-I/usr/local/opt/php@7.4/include ${CPPFLAGS}" |
|
|
|
|
export PATH="/usr/local/opt/php@7.4/bin:/usr/local/opt/php@7.4/sbin:${PATH}" |
|
|
|
|
time brew install php@8.1 || true |
|
|
|
|
export LDFLAGS="-L/usr/local/opt/php@8.1/lib ${LDFLAGS}" |
|
|
|
|
export CPPFLAGS="-I/usr/local/opt/php@8.1/include ${CPPFLAGS}" |
|
|
|
|
export PATH="/usr/local/opt/php@8.1/bin:/usr/local/opt/php@8.1/sbin:${PATH}" |
|
|
|
|
|
|
|
|
|
# the exit code from "brew install php@7.4" is useless |
|
|
|
|
# the exit code from "brew install php@8.1" is useless |
|
|
|
|
# so instead we check if PHP was indeed installed successfully. |
|
|
|
|
# Failing early is better than cryptic errors later in the build process. |
|
|
|
|
/usr/local/opt/php@7.4/bin/php --version |
|
|
|
|
/usr/local/opt/php@8.1/bin/php --version |
|
|
|
|
|
|
|
|
|
# Workaround for https://github.com/Homebrew/homebrew-core/issues/41081 |
|
|
|
|
mkdir -p /usr/local/lib/php/pecl |
|
|
|
|