mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Link opcache to ext_dir on macOS
This commit is contained in:
parent
9c77701ae5
commit
5b2015e8fe
@ -104,6 +104,15 @@ link_libraries() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Link opcache extension to extensions directory.
|
||||||
|
link_opcache() {
|
||||||
|
opcache_ini="$brew_prefix"/etc/php/"$version"/conf.d/ext-opcache.ini
|
||||||
|
if [ -e "$opcache_ini" ]; then
|
||||||
|
opcache_ext=$(grep -Eo "zend_extension.*opcache.*\.so" "$opcache_ini" | cut -d '"' -f 2)
|
||||||
|
sudo ln -sf "$opcache_ext" "$ext_dir"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Patch brew to overwrite packages.
|
# Patch brew to overwrite packages.
|
||||||
patch_brew() {
|
patch_brew() {
|
||||||
formula_installer="${brew_repo:?}"/Library/Homebrew/formula_installer.rb
|
formula_installer="${brew_repo:?}"/Library/Homebrew/formula_installer.rb
|
||||||
@ -233,6 +242,7 @@ setup_php() {
|
|||||||
semver="$(php_semver)"
|
semver="$(php_semver)"
|
||||||
extra_version="$(php_extra_version)"
|
extra_version="$(php_extra_version)"
|
||||||
configure_php
|
configure_php
|
||||||
|
link_opcache
|
||||||
set_output "php-version" "$semver"
|
set_output "php-version" "$semver"
|
||||||
if [ "${semver%.*}" != "$version" ]; then
|
if [ "${semver%.*}" != "$version" ]; then
|
||||||
add_log "${cross:?}" "PHP" "Could not setup PHP $version"
|
add_log "${cross:?}" "PHP" "Could not setup PHP $version"
|
||||||
|
Loading…
Reference in New Issue
Block a user