From f0db57dcabd11f9fd4bfeec4b021a0410961db5c Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 19 May 2022 11:53:35 +0530 Subject: [PATCH] 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 --- src/scripts/extensions/add_extensions.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scripts/extensions/add_extensions.sh b/src/scripts/extensions/add_extensions.sh index 6e22f099..d2fc7c0b 100644 --- a/src/scripts/extensions/add_extensions.sh +++ b/src/scripts/extensions/add_extensions.sh @@ -162,7 +162,11 @@ pecl_install() { 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)" (( ${#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.