]> git.pld-linux.org Git - packages/php.git/commitdiff
upstream patch to fix build with icu >= 70
authorJan Palus <atler@pld-linux.org>
Wed, 19 Jan 2022 10:07:07 +0000 (11:07 +0100)
committerJan Palus <atler@pld-linux.org>
Wed, 19 Jan 2022 11:04:15 +0000 (12:04 +0100)
icu70.patch [new file with mode: 0644]
php.spec

diff --git a/icu70.patch b/icu70.patch
new file mode 100644 (file)
index 0000000..3460bbf
--- /dev/null
@@ -0,0 +1,45 @@
+From 81b3f95622b1da2433f7d1e992c3ae6ad745e704 Mon Sep 17 00:00:00 2001
+From: Ben Ramsey <ramsey@php.net>
+Date: Tue, 19 Oct 2021 23:59:11 -0500
+Subject: [PATCH] Change UBool to bool for equality operators in ICU >= 70.1
+
+Refer to:
+- https://github.com/unicode-org/icu/commit/633438f8da99fee815e2c61626ea779a84567a3d
+- https://github.com/unicode-org/icu/commit/f6325d49ba57ec26f320b2865ce09ca47db458d9
+---
+ ext/intl/breakiterator/codepointiterator_internal.cpp | 4 ++++
+ ext/intl/breakiterator/codepointiterator_internal.h   | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
+index bf44678efc06..143c181590e9 100644
+--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
++++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
+@@ -75,7 +75,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
+       clearCurrentCharIter();
+ }
++#if U_ICU_VERSION_MAJOR_NUM >= 70
++bool CodePointBreakIterator::operator==(const BreakIterator& that) const
++#else
+ UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
++#endif
+ {
+       if (typeid(*this) != typeid(that)) {
+               return FALSE;
+diff --git a/ext/intl/breakiterator/codepointiterator_internal.h b/ext/intl/breakiterator/codepointiterator_internal.h
+index 7ecf12deb5ae..0baf607782d0 100644
+--- a/ext/intl/breakiterator/codepointiterator_internal.h
++++ b/ext/intl/breakiterator/codepointiterator_internal.h
+@@ -39,7 +39,11 @@ namespace PHP {
+               virtual ~CodePointBreakIterator();
++#if U_ICU_VERSION_MAJOR_NUM >= 70
++              virtual bool operator==(const BreakIterator& that) const;
++#else
+               virtual UBool operator==(const BreakIterator& that) const;
++#endif
+               virtual CodePointBreakIterator* clone(void) const;
index 86e519c774251cd89c3c9e70a384027a6176ba0c..1c52b6f9fec71364cb08c8cf78c49be58e5488bc 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -203,6 +203,7 @@ Patch67:    mysql-lib-ver-mismatch.patch
 Patch68:       php-mysql-ssl-context.patch
 Patch71:       libdb-info.patch
 Patch72:       openssl.patch
+Patch73:       icu70.patch
 URL:           http://php.net/
 %{?with_pdo_firebird:%{!?with_interbase_inst:BuildRequires:    Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
@@ -1916,6 +1917,7 @@ cp -p php.ini-production php.ini
 #%patch68 -p1 DROP or update to 7.0 APIs
 %patch71 -p1
 %patch72 -p1
+%patch73 -p1
 
 sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \
       ext/ext_skel.php \
This page took 0.804074 seconds and 4 git commands to generate.