]> 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 10:56:10 +0000 (11:56 +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 6650ec3e0c676749cdcfb0fada1b8ee1c8f08331..3212f21874cfa479ee3fd99ac47ed8224ad608e7 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -219,6 +219,7 @@ Patch71:    libdb-info.patch
 Patch72:       phar-hash-shared.patch
 Patch73:       icu69.patch
 Patch74:       openssl.patch
+Patch75:       icu70.patch
 URL:           http://php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:       Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:  aspell-devel >= 2:0.50.0}
@@ -2043,6 +2044,7 @@ cp -p php.ini-production php.ini
 %patch72 -p1
 %patch73 -p1
 %patch74 -p1
+%patch75 -p1
 
 sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \
       run-tests.php
This page took 0.055651 seconds and 4 git commands to generate.