From 5afed16e5feadaa4b8c19a6c4673f64b02eb88c8 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sat, 10 Jul 2021 00:50:50 +0530 Subject: [PATCH] Fix support for imagick for PHP 5.3 to 5.5 on macOS --- src/scripts/darwin.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 955e1eb0..846fbdd1 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -86,9 +86,12 @@ add_extension() { if check_extension "$extension"; then add_log "${tick:?}" "$extension" "Enabled" else - [[ "$version" =~ 5.[4-5] ]] && [ "$extension" = "imagick" ] && brew install -f pkg-config imagemagick >/dev/null 2>&1 - pecl_install "$extension" >/dev/null 2>&1 && + if [[ "$version" =~ ${old_versions:?} ]] && [ "$extension" = "imagick" ]; then + run_script "php5-darwin" "${version/./}" "$extension" >/dev/null 2>&1 + else + pecl_install "$extension" >/dev/null 2>&1 && if [[ "$version" =~ ${old_versions:?} ]]; then echo "$prefix=$ext_dir/$extension.so" >>"$ini_file"; fi + fi add_extension_log "$extension" "Installed and enabled" fi }