[packages/php/PHP_7_1] upstream patch to fix build with icu >= 70

atler atler at pld-linux.org
Wed Jan 19 11:58:03 CET 2022


commit 9b613679b1980515400dd1c3ab5f91e04a2d63bf
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Jan 19 11:07:07 2022 +0100

    upstream patch to fix build with icu >= 70

 icu70.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
 php.spec    |  2 ++
 2 files changed, 47 insertions(+)
---
diff --git a/php.spec b/php.spec
index 6650ec3..3212f21 100644
--- 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
diff --git a/icu70.patch b/icu70.patch
new file mode 100644
index 0000000..3460bbf
--- /dev/null
+++ b/icu70.patch
@@ -0,0 +1,45 @@
+From 81b3f95622b1da2433f7d1e992c3ae6ad745e704 Mon Sep 17 00:00:00 2001
+From: Ben Ramsey <ramsey at 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;
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/9ccf509733f752fd9af6888d4f2b04c0d5dd90eb



More information about the pld-cvs-commit mailing list