File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,11 +158,12 @@ sanitize_cxxflags_for_modern_php() {
158158 local icu_prefix
159159 icu_prefix=$( brew --prefix icu4c 2> /dev/null || echo " " )
160160 if [ -n " $icu_prefix " ] && [ -e " $icu_prefix " ]; then
161- local icu_version
161+ local icu_version icu_major
162162 icu_version=$( " ${icu_prefix} /bin/icu-config" --version 2> /dev/null || echo " 0" )
163- if [[ " $icu_version " > " 61" ]]; then
163+ icu_major=$( echo " $icu_version " | cut -d. -f1)
164+ if [ " $icu_major " -gt 61 ]; then
164165 stripped_cxxflags=" -stdlib=libc++ -DU_USING_ICU_NAMESPACE=1"
165- elif [[ " $icu_version " > " 59 " ] ]; then
166+ elif [ " $icu_major " -gt 59 ]; then
166167 stripped_cxxflags=" -stdlib=libc++"
167168 fi
168169 fi
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ setup() {
99
1010 # Extract only the target function to avoid executing the rest of the install
1111 # script which has side effects (php-build setup, version resolution, etc.)
12- sed -n ' /^# Prior PHP installations via ICU /,/^}$/p' \
12+ sed -n ' /^sanitize_cxxflags_for_modern_php() /,/^}$/p' \
1313 " ${PLUGIN_DIR} /bin/install" > " ${TEST_TEMP_DIR} /function.sh"
1414 source " ${TEST_TEMP_DIR} /function.sh"
1515}
You can’t perform that action at this time.
0 commit comments