From 881a52bcd9b40305846859ebf0e565e16a13e959 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 11 Sep 2024 12:58:05 +0000 Subject: [PATCH] Try to fix support for icu 75.1 --- patches/intl/intl-icu-75.1-php7.1-8.0.patch | 34 --------------------- patches/intl/series-php5.6 | 1 - patches/intl/series-php7.1 | 1 - patches/intl/series-php7.2 | 1 - patches/intl/series-php7.3 | 1 - patches/intl/series-php7.4 | 1 - src/build-intl.sh | 5 +-- 7 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 patches/intl/intl-icu-75.1-php7.1-8.0.patch diff --git a/patches/intl/intl-icu-75.1-php7.1-8.0.patch b/patches/intl/intl-icu-75.1-php7.1-8.0.patch deleted file mode 100644 index 810fd45..0000000 --- a/patches/intl/intl-icu-75.1-php7.1-8.0.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c5fdeb3072ad3558db7918c9da09ffc529796aca Mon Sep 17 00:00:00 2001 -From: Shivam Mathur -Date: Sat, 20 Jul 2024 22:05:11 +0000 -Subject: [PATCH] [PATCH] ext/intl: level up c++ runtime std for icu 74 and - onwards. - ---- - ext/intl/config.m4 | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 -index 4b9f469b38..7b5a9dd658 100644 ---- a/ext/intl/config.m4 -+++ b/ext/intl/config.m4 -@@ -89,6 +89,16 @@ if test "$PHP_INTL" != "no"; then - breakiterator/rulebasedbreakiterator_methods.cpp \ - breakiterator/codepointiterator_internal.cpp \ - breakiterator/codepointiterator_methods.cpp" -+ -+ AC_MSG_CHECKING([if intl requires -std=gnu++17]) -+ AS_IF([test "$PKG_CONFIG icu-uc --atleast-version=74"],[ -+ AC_MSG_RESULT([yes]) -+ PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX) -+ ],[ -+ AC_MSG_RESULT([no]) -+ PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX) -+ ]) -+ - PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS" - if test "$ext_shared" = "no"; then - PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS) --- -2.45.2 - diff --git a/patches/intl/series-php5.6 b/patches/intl/series-php5.6 index d03ad03..bbddaad 100644 --- a/patches/intl/series-php5.6 +++ b/patches/intl/series-php5.6 @@ -5,5 +5,4 @@ intl-icu-73.1-php5.6-8.0.patch intl-icu-73.2-php5.6-8.0.patch intl-icu-74.1-php5.6-8.0.patch intl-icu-74.2-php5.6-8.0.patch -intl-icu-75.1-php5.6-7.0.patch intl-icu-75.1-php5.6-8.0.patch diff --git a/patches/intl/series-php7.1 b/patches/intl/series-php7.1 index d665b38..bbddaad 100644 --- a/patches/intl/series-php7.1 +++ b/patches/intl/series-php7.1 @@ -5,5 +5,4 @@ intl-icu-73.1-php5.6-8.0.patch intl-icu-73.2-php5.6-8.0.patch intl-icu-74.1-php5.6-8.0.patch intl-icu-74.2-php5.6-8.0.patch -intl-icu-75.1-php7.1-8.0.patch intl-icu-75.1-php5.6-8.0.patch diff --git a/patches/intl/series-php7.2 b/patches/intl/series-php7.2 index d665b38..bbddaad 100644 --- a/patches/intl/series-php7.2 +++ b/patches/intl/series-php7.2 @@ -5,5 +5,4 @@ intl-icu-73.1-php5.6-8.0.patch intl-icu-73.2-php5.6-8.0.patch intl-icu-74.1-php5.6-8.0.patch intl-icu-74.2-php5.6-8.0.patch -intl-icu-75.1-php7.1-8.0.patch intl-icu-75.1-php5.6-8.0.patch diff --git a/patches/intl/series-php7.3 b/patches/intl/series-php7.3 index d665b38..bbddaad 100644 --- a/patches/intl/series-php7.3 +++ b/patches/intl/series-php7.3 @@ -5,5 +5,4 @@ intl-icu-73.1-php5.6-8.0.patch intl-icu-73.2-php5.6-8.0.patch intl-icu-74.1-php5.6-8.0.patch intl-icu-74.2-php5.6-8.0.patch -intl-icu-75.1-php7.1-8.0.patch intl-icu-75.1-php5.6-8.0.patch diff --git a/patches/intl/series-php7.4 b/patches/intl/series-php7.4 index f056681..86a90d2 100644 --- a/patches/intl/series-php7.4 +++ b/patches/intl/series-php7.4 @@ -6,4 +6,3 @@ intl-icu-73.2-php5.6-8.0.patch intl-icu-74.1-php5.6-8.0.patch intl-icu-74.2-php5.6-8.0.patch intl-icu-75.1-php7.4-8.1.patch -intl-icu-75.1-php5.6-8.0.patch diff --git a/src/build-intl.sh b/src/build-intl.sh index ae940b9..9545a81 100644 --- a/src/build-intl.sh +++ b/src/build-intl.sh @@ -46,11 +46,12 @@ install_intl() { while read patch || [[ $patch ]]; do [[ "$patch" =~ $ICU ]] && patch -d /tmp/php-src -N -p1 -s < "patches/intl/$patch" done < patches/intl/series-php"$VERSION" - cd "/tmp/php-src/ext/intl" || exit 1 + cd "/tmp/php-src/ext/intl" || exit 1 phpize && sudo ./configure --with-php-config="$(command -v php-config)" --enable-intl echo "#define FALSE 0" >> config.h echo "#define TRUE 1" >> config.h - make CXXFLAGS="-O2 -std=c++11 -DU_USING_ICU_NAMESPACE=1 -DTRUE=1 -DFALSE=0 $CXXFLAGS" + [[ "${ICU%.*}" -ge 75 ]] && CXX=17 || CXX=11 + make CXXFLAGS="-O2 -std=c++$CXX -DU_USING_ICU_NAMESPACE=1 -DTRUE=1 -DFALSE=0 $CXXFLAGS" sudo cp ./modules/* "$ext_dir/" enable_extension intl extension )