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

atler atler at pld-linux.org
Wed Jan 19 11:12:55 CET 2022


commit 733528ace1b5e4f2d0655d7f47eb113e6e9724df
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 c9c2cac..766ae01 100644
--- a/php.spec
+++ b/php.spec
@@ -226,6 +226,7 @@ Patch68:	x32.patch
 Patch69:	fpm-conf-split.patch
 Patch70:	php-icu64.patch
 Patch71:	icu69.patch
+Patch72:	icu70.patch
 URL:		http://www.php.net/
 %{?with_interbase:%{!?with_interbase_inst:BuildRequires:	Firebird-devel >= 1.0.2.908-2}}
 %{?with_pspell:BuildRequires:	aspell-devel >= 2:0.50.0}
@@ -2105,6 +2106,7 @@ exit 1
 %patch67 -p1
 %patch70 -p1
 %patch71 -p1
+%patch72 -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/692dea6698297102613179879a767bb431c8c976



More information about the pld-cvs-commit mailing list