From: Jan Rękorajski Date: Fri, 27 Aug 2021 21:29:11 +0000 (+0200) Subject: - fix building with icu 69 X-Git-Tag: auto/th/php56-5.6.40-11~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fphp.git;a=commitdiff_plain;h=eab2b2d - fix building with icu 69 --- diff --git a/icu69.patch b/icu69.patch new file mode 100644 index 0000000..f3f7530 --- /dev/null +++ b/icu69.patch @@ -0,0 +1,168 @@ +--- php-7.2.34/ext/intl/collator/collator_sort.c~ 2020-09-30 07:15:54.000000000 +0200 ++++ php-7.2.34/ext/intl/collator/collator_sort.c 2021-08-27 22:44:44.636032116 +0200 +@@ -30,6 +30,11 @@ + typedef long ptrdiff_t; + #endif + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + /** + * Declare 'index' which will point to sort key in sort key + * buffer. +--- php-7.2.34/ext/intl/normalizer/normalizer_normalize.c~ 2020-09-30 07:15:54.000000000 +0200 ++++ php-7.2.34/ext/intl/normalizer/normalizer_normalize.c 2021-08-27 22:50:28.139941746 +0200 +@@ -25,6 +25,11 @@ + #include "normalizer_normalize.h" + #include "intl_convert.h" + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + /* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] ) + * Normalize a string. }}} */ + /* {{{ proto string normalizer_normalize( string $input [, string $form = FORM_C] ) +--- php-7.2.34/ext/intl/dateformat/dateformat_attr.c~ 2020-09-30 07:15:54.000000000 +0200 ++++ php-7.2.34/ext/intl/dateformat/dateformat_attr.c 2021-08-27 22:52:05.242621694 +0200 +@@ -26,6 +26,11 @@ + #include + #include + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + /* {{{ proto unicode IntlDateFormatter::getDateType( ) + * Get formatter datetype. }}} */ + /* {{{ proto string datefmt_get_datetype( IntlDateFormatter $mf ) +--- php-7.2.34/ext/intl/timezone/timezone_class.cpp~ 2020-09-30 07:15:54.000000000 +0200 ++++ php-7.2.34/ext/intl/timezone/timezone_class.cpp 2021-08-27 22:52:48.582342940 +0200 +@@ -37,6 +37,11 @@ + #include + } + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + using icu::Calendar; + + /* {{{ Global variables */ +--- php-7.2.34/ext/intl/timezone/timezone_methods.cpp~ 2020-09-30 07:15:54.000000000 +0200 ++++ php-7.2.34/ext/intl/timezone/timezone_methods.cpp 2021-08-27 22:53:23.048792982 +0200 +@@ -37,6 +37,11 @@ + } + #include "common/common_enum.h" + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + using icu::Locale; + using icu::Calendar; + +--- php-7.2.34/ext/intl/breakiterator/codepointiterator_internal.cpp~ 2020-09-30 07:15:54.000000000 +0200 ++++ php-7.2.34/ext/intl/breakiterator/codepointiterator_internal.cpp 2021-08-27 22:54:10.761833238 +0200 +@@ -20,6 +20,11 @@ + #include + #include + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + //copied from cmemory.h, which is not public + typedef union { + long t1; +--- php-5.6.40/ext/intl/collator/collator_compare.c~ 2019-01-09 10:54:13.000000000 +0100 ++++ php-5.6.40/ext/intl/collator/collator_compare.c 2021-08-27 23:22:52.663489553 +0200 +@@ -24,6 +24,11 @@ + #include "collator_compare.h" + #include "intl_convert.h" + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + /* {{{ proto int Collator::compare( string $str1, string $str2 ) + * Compare two strings. }}} */ + /* {{{ proto int collator_compare( Collator $coll, string $str1, string $str2 ) +--- php-5.6.40/ext/intl/collator/collator_convert.c~ 2019-01-09 10:54:13.000000000 +0100 ++++ php-5.6.40/ext/intl/collator/collator_convert.c 2021-08-27 23:23:18.900123085 +0200 +@@ -28,6 +28,11 @@ + #include + #include + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + #if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION <= 1) + #define CAST_OBJECT_SHOULD_FREE ,0 + #else +--- php-5.6.40/ext/intl/collator/collator_locale.c~ 2019-01-09 10:54:13.000000000 +0100 ++++ php-5.6.40/ext/intl/collator/collator_locale.c 2021-08-27 23:23:58.503409685 +0200 +@@ -26,6 +26,11 @@ + + #include + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + /* {{{ proto string Collator::getLocale( int $type ) + * Gets the locale name of the collator. }}} */ + /* {{{ proto string collator_get_locale( Collator $coll, int $type ) +--- php-5.6.40/ext/intl/collator/collator_error.c~ 2019-01-09 10:54:13.000000000 +0100 ++++ php-5.6.40/ext/intl/collator/collator_error.c 2021-08-27 23:25:04.760005650 +0200 +@@ -23,6 +23,11 @@ + #include "collator_class.h" + #include "collator_error.h" + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + /* {{{ proto int Collator::getErrorCode( Collator $coll ) + * Get collator's last error code. }}} */ + /* {{{ proto int collator_get_error_code( Collator $coll ) +--- php-5.6.40/ext/intl/common/common_error.c~ 2019-01-09 10:54:13.000000000 +0100 ++++ php-5.6.40/ext/intl/common/common_error.c 2021-08-27 23:26:12.666607596 +0200 +@@ -23,6 +23,11 @@ + #include "intl_error.h" + #include "common_error.h" + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + /* {{{ proto int intl_get_error_code() + * Get code of the last occurred error. + */ +--- php-5.6.40/ext/intl/locale/locale_methods.c~ 2019-01-09 10:54:13.000000000 +0100 ++++ php-5.6.40/ext/intl/locale/locale_methods.c 2021-08-27 23:27:01.749897995 +0200 +@@ -38,6 +38,11 @@ + #include "main/php_ini.h" + #include "ext/standard/php_smart_str.h" + ++#if !defined(FALSE) ++#define FALSE 0 ++#define TRUE 1 ++#endif ++ + ZEND_EXTERN_MODULE_GLOBALS( intl ) + + /* Sizes required for the strings "variant15" , "extlang11", "private12" etc. */ diff --git a/php.spec b/php.spec index 5f01c3a..25e586c 100644 --- a/php.spec +++ b/php.spec @@ -240,6 +240,7 @@ Patch70: mysqlnd-ssl.patch Patch72: phar-hash-shared.patch Patch73: php-pdo-ssl.patch Patch74: php-icu64.patch +Patch75: icu69.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} @@ -2163,6 +2164,7 @@ exit 1 %patch72 -p1 %patch73 -p1 %patch74 -p1 +%patch75 -p1 sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \ run-tests.php