summaryrefslogtreecommitdiff
path: root/dev-lang/php/files/php-8.1.29-gcc14-intl.patch
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2024-09-22 08:26:51 -0400
committerMichael Orlitzky <mjo@gentoo.org>2024-09-22 10:07:17 -0400
commitf4f0dc497fd14287fea99d345e5d815fb7fa4bb1 (patch)
tree7dd524e508f542712c0fb08dc81f2f8a811e0787 /dev-lang/php/files/php-8.1.29-gcc14-intl.patch
parentc2e7c51b34aebf4f20f89b48c0d36cb0d00e0c0f (diff)
downloadgentoo-f4f0dc497fd14287fea99d345e5d815fb7fa4bb1.tar.gz
gentoo-f4f0dc497fd14287fea99d345e5d815fb7fa4bb1.tar.bz2
gentoo-f4f0dc497fd14287fea99d345e5d815fb7fa4bb1.zip
dev-lang/php: fix the 8.1.x build with gcc-14, icu-74, and USE=intl
Thanks to Brian Evans for backporting the patch. We're still re-running autoconf for the 8.1.x series so this isn't too much work to add. Closes: https://bugs.gentoo.org/936235 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'dev-lang/php/files/php-8.1.29-gcc14-intl.patch')
-rw-r--r--dev-lang/php/files/php-8.1.29-gcc14-intl.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/dev-lang/php/files/php-8.1.29-gcc14-intl.patch b/dev-lang/php/files/php-8.1.29-gcc14-intl.patch
new file mode 100644
index 000000000000..c951f48e8ba3
--- /dev/null
+++ b/dev-lang/php/files/php-8.1.29-gcc14-intl.patch
@@ -0,0 +1,21 @@
+diff '--color=auto' -aurN a/ext/intl/config.m4 b/ext/intl/config.m4
+--- a/ext/intl/config.m4 2024-07-17 18:54:08.645892664 -0400
++++ b/ext/intl/config.m4 2024-07-17 18:54:29.506419432 -0400
+@@ -85,7 +85,16 @@
+ breakiterator/codepointiterator_methods.cpp"
+
+ PHP_REQUIRE_CXX()
+- PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
++
++ AC_MSG_CHECKING([if intl requires -std=gnu++17])
++ AS_IF([$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 $PHP_INTL_STDCXX $ICU_CXXFLAGS"
+ case $host_alias in
+ *cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"