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

atler atler at pld-linux.org
Wed Jan 19 12:03:14 CET 2022


commit 7b0f44816f4cb66dfb8551b9f1747e53f66a3f17
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 8df38eb..fd6fc8e 100644
--- a/php.spec
+++ b/php.spec
@@ -223,6 +223,7 @@ Patch70:	mysqlnd-ssl.patch
 Patch71:	libdb-info.patch
 Patch72:	phar-hash-shared.patch
 Patch73:	openssl.patch
+Patch74:	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}
@@ -2040,6 +2041,7 @@ cp -p php.ini-production php.ini
 %patch71 -p1
 %patch72 -p1 -b .phar-shared
 %patch73 -p1
+%patch74 -p1
 
 sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \
       ext/ext_skel.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/096e38fa447a546db9d6df4a988b241ff10c1f77



More information about the pld-cvs-commit mailing list