Fix pecl support on PHP 5.3

Remove pecl suffix option support from PHP 5.3 as Console_Getopt version used does not support it
This commit is contained in:
Shivam Mathur 2022-05-19 11:53:35 +05:30
parent 6cba851606
commit f0db57dcab
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -162,7 +162,11 @@ pecl_install() {
suffix_opts="$(parse_args "$extension" CONFIGURE_OPTS) $(parse_args "$extension" CONFIGURE_SUFFIX_OPTS)" suffix_opts="$(parse_args "$extension" CONFIGURE_OPTS) $(parse_args "$extension" CONFIGURE_SUFFIX_OPTS)"
IFS=' ' read -r -a libraries <<<"$(parse_args "$extension" LIBS) $(parse_args "$extension" "$(uname -s)"_LIBS)" IFS=' ' read -r -a libraries <<<"$(parse_args "$extension" LIBS) $(parse_args "$extension" "$(uname -s)"_LIBS)"
(( ${#libraries[@]} )) && add_libs "${libraries[@]}" >/dev/null 2>&1 (( ${#libraries[@]} )) && add_libs "${libraries[@]}" >/dev/null 2>&1
yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f -D "$(parse_pecl_configure_options "$suffix_opts")" "$extension" >/dev/null 2>&1 if [ "$version" = "5.3" ]; then
yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f "$extension" >/dev/null 2>&1
else
yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f -D "$(parse_pecl_configure_options "$suffix_opts")" "$extension" >/dev/null 2>&1
fi
} }
# Function to install a specific version of PECL extension. # Function to install a specific version of PECL extension.