From 988afcaa7d84c88e54881d86cbfef4a864901aff4425f48ba9decdbb8972dc27 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 29 Jul 2018 09:29:47 +0000 Subject: [PATCH 1/4] - Update to new upstream release 62.1 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=91 --- baselibs.conf | 4 ++-- icu-avoid-x87-excess-precision.diff | 17 ----------------- icu-number-grouping.diff | 24 ------------------------ icu-versioning.diff | 10 +++++----- icu.changes | 15 +++++++++++++++ icu.spec | 13 +++++-------- icu4c-61_1-docs.zip | 3 --- icu4c-61_1-src.tgz | 3 --- icu4c-62_1-docs.zip | 3 +++ icu4c-62_1-src.tgz | 3 +++ xlocale.patch | 25 ------------------------- 11 files changed, 33 insertions(+), 87 deletions(-) delete mode 100644 icu-avoid-x87-excess-precision.diff delete mode 100644 icu-number-grouping.diff delete mode 100644 icu4c-61_1-docs.zip delete mode 100644 icu4c-61_1-src.tgz create mode 100644 icu4c-62_1-docs.zip create mode 100644 icu4c-62_1-src.tgz delete mode 100644 xlocale.patch diff --git a/baselibs.conf b/baselibs.conf index 2e8dd7a..721d054 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,4 @@ -libicu-suse61_1 +libicu-suse62_1 libicu-devel requires -libicu- - requires "libicu-suse61_1- = " + requires "libicu-suse62_1- = " diff --git a/icu-avoid-x87-excess-precision.diff b/icu-avoid-x87-excess-precision.diff deleted file mode 100644 index 91b8d4c..0000000 --- a/icu-avoid-x87-excess-precision.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- - source/i18n/precision.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: icu/source/i18n/precision.cpp -=================================================================== ---- icu.orig/source/i18n/precision.cpp -+++ icu/source/i18n/precision.cpp -@@ -227,7 +227,7 @@ FixedPrecision::initVisibleDigits( - } - // Try to find n such that value * 10^n is an integer - int32_t n = -1; -- double scaled; -+ volatile double scaled; // make sure scaled is in memory to avoid excess precision with x87 math - for (int32_t i = 0; i < UPRV_LENGTHOF(gPower10); ++i) { - scaled = value * gPower10[i]; - if (scaled > MAX_INT64_IN_DOUBLE || scaled < -MAX_INT64_IN_DOUBLE) { diff --git a/icu-number-grouping.diff b/icu-number-grouping.diff deleted file mode 100644 index 7ac690b..0000000 --- a/icu-number-grouping.diff +++ /dev/null @@ -1,24 +0,0 @@ -From: Jan Engelhardt -Date: 2018-04-05 01:42:48.090215154 +0200 - -make the compiler and rpmlint happy - -[ 59s] number_grouping.cpp: In static member function 'static icu_61_1::number::impl::Grouper icu_61_1::number::impl::Grouper::forStrategy(UGroupingStrategy)': -[ 59s] number_grouping.cpp:52:1: warning: control reaches end of non-void function [-Wreturn-type] - ---- - source/i18n/number_grouping.cpp | 1 + - 1 file changed, 1 insertion(+) - -Index: icu/source/i18n/number_grouping.cpp -=================================================================== ---- icu.orig/source/i18n/number_grouping.cpp -+++ icu/source/i18n/number_grouping.cpp -@@ -48,6 +48,7 @@ Grouper Grouper::forStrategy(UGroupingSt - return {3, 3, 1}; - default: - U_ASSERT(FALSE); -+ return {}; - } - } - diff --git a/icu-versioning.diff b/icu-versioning.diff index 936ef4e..a1edd92 100644 --- a/icu-versioning.diff +++ b/icu-versioning.diff @@ -78,8 +78,8 @@ Index: icu/source/common/unicode/uvernum.h @@ -59,6 +59,7 @@ * @stable ICU 2.4 */ - #define U_ICU_VERSION_MAJOR_NUM 61 -+#define U_ICU_VERSION_MAJOR_STR "61" + #define U_ICU_VERSION_MAJOR_NUM 62 ++#define U_ICU_VERSION_MAJOR_STR "62" /** The current ICU minor version as an integer. * This value will change in the subsequent releases of ICU @@ -87,7 +87,7 @@ Index: icu/source/common/unicode/uvernum.h * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ --#define U_ICU_VERSION_SUFFIX _61 +-#define U_ICU_VERSION_SUFFIX _62 +#define ___icu_version_expand(major, minor) _ ## major ## _ ## minor +#define ___icu_version_glue(major, minor) ___icu_version_expand(major, minor) +#define U_ICU_VERSION_SUFFIX ___icu_version_glue(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM) @@ -98,8 +98,8 @@ Index: icu/source/common/unicode/uvernum.h * * @stable ICU 2.6 */ --#define U_ICU_VERSION_SHORT "61" -+#define U_ICU_VERSION_SHORT "61_1" +-#define U_ICU_VERSION_SHORT "62" ++#define U_ICU_VERSION_SHORT "62_1" #ifndef U_HIDE_INTERNAL_API /** Data version in ICU4C. diff --git a/icu.changes b/icu.changes index 9437fc1..61a40d1 100644 --- a/icu.changes +++ b/icu.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sun Jul 29 09:20:28 UTC 2018 - jengelh@inai.de + +- Update to new upstream release 62.1 + * Unicode 11: 684 new characters, including 7 new scripts, + Mtavruli Georgian capital letters, 5 new Han characters, and + 66 new emoji characters. + * CLDR 33.1 + * Under-the-hood overhaul of number parsing. Behavior is mostly + compatible with previous versions, but there are some known + differences. +- Remove icu-avoid-x87-excess-precision.diff, xlocale.patch + (code to patch is gone), icu-number-grouping.diff (merged + upstream) + ------------------------------------------------------------------- Mon Jun 4 07:53:56 UTC 2018 - jengelh@inai.de diff --git a/icu.spec b/icu.spec index 6ea79f0..b5f3694 100644 --- a/icu.spec +++ b/icu.spec @@ -16,16 +16,16 @@ # -%define lname libicu-suse61_1 -%define amajor 61 -%define aversion 61_1 +%define lname libicu-suse62_1 +%define amajor 62 +%define aversion 62_1 %ifarch %armb hppa mips mips64 ppc ppc64 %sparc s390 s390x m68k %define be_platform 1 %else %define be_platform 0 %endif Name: icu -Version: 61.1 +Version: 62.1 Release: 0 Summary: International Components for Unicode License: ICU @@ -38,9 +38,6 @@ Patch2: icu-versioning.diff Patch3: icu-susevers.diff Patch4: icu-fix-install-mode-files.diff Patch6: icu-error-reporting.diff -Patch7: icu-avoid-x87-excess-precision.diff -Patch8: xlocale.patch -Patch9: icu-number-grouping.diff BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkg-config @@ -140,7 +137,7 @@ This package contains the HTML documentation. %prep %setup -q -n icu -%patch -P 2 -P 3 -P 4 -P 6 -P 7 -P 8 -P 9 -p1 +%patch -P 2 -P 3 -P 4 -P 6 -p1 # docs are special mkdir html pushd html/ diff --git a/icu4c-61_1-docs.zip b/icu4c-61_1-docs.zip deleted file mode 100644 index b7851c2..0000000 --- a/icu4c-61_1-docs.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:62bb6b1bee62472a1e3a0ee0b58c19b4bd24bed278d328db985075b65851dd2a -size 7270472 diff --git a/icu4c-61_1-src.tgz b/icu4c-61_1-src.tgz deleted file mode 100644 index c25759f..0000000 --- a/icu4c-61_1-src.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef -size 23400587 diff --git a/icu4c-62_1-docs.zip b/icu4c-62_1-docs.zip new file mode 100644 index 0000000..2a8e1e1 --- /dev/null +++ b/icu4c-62_1-docs.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d775f17996f94b22fee948991defc35eb3c5a4ed493e8790d2568fdd2243f9a9 +size 7404744 diff --git a/icu4c-62_1-src.tgz b/icu4c-62_1-src.tgz new file mode 100644 index 0000000..54e18fe --- /dev/null +++ b/icu4c-62_1-src.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3dd9868d666350dda66a6e305eecde9d479fb70b30d5b55d78a1deffb97d5aa3 +size 23468750 diff --git a/xlocale.patch b/xlocale.patch deleted file mode 100644 index 1e396e3..0000000 --- a/xlocale.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Andrews Schwab -Date: Mon, 31 Jul 2017 12:19:40 +0000 - -don't use obsolete - ---- - source/i18n/digitlst.cpp | 4 ---- - 1 file changed, 4 deletions(-) - -Index: icu/source/i18n/digitlst.cpp -=================================================================== ---- icu.orig/source/i18n/digitlst.cpp -+++ icu/source/i18n/digitlst.cpp -@@ -62,11 +62,7 @@ - #endif - - #if U_USE_STRTOD_L --# if U_HAVE_XLOCALE_H --# include --# else - # include --# endif - #endif - - // *************************************************************************** From e7a70e6ab8f9da37edcdb46b9945e9e1cf4329e6be564953a5e3c1c69c3839f8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 29 Jul 2018 10:17:10 +0000 Subject: [PATCH 2/4] - Remove xlocale.patch (code to patch is gone), icu-number-grouping.diff (merged upstream) OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=92 --- icu-avoid-x87-excess-precision.diff | 24 ++++++++++++++++++++++++ icu.changes | 5 ++--- icu.spec | 3 ++- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 icu-avoid-x87-excess-precision.diff diff --git a/icu-avoid-x87-excess-precision.diff b/icu-avoid-x87-excess-precision.diff new file mode 100644 index 0000000..538627b --- /dev/null +++ b/icu-avoid-x87-excess-precision.diff @@ -0,0 +1,24 @@ +--- + source/i18n/plurrule.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: icu/source/i18n/plurrule.cpp +=================================================================== +--- icu.orig/source/i18n/plurrule.cpp ++++ icu/source/i18n/plurrule.cpp +@@ -1566,13 +1566,13 @@ int64_t FixedDecimal::getFractionalDigit + return 0; + } + n = fabs(n); +- double fract = n - floor(n); ++ volatile double fract = n - floor(n); + switch (v) { + case 1: return (int64_t)(fract*10.0 + 0.5); + case 2: return (int64_t)(fract*100.0 + 0.5); + case 3: return (int64_t)(fract*1000.0 + 0.5); + default: +- double scaled = floor(fract * pow(10.0, (double)v) + 0.5); ++ volatile double scaled = floor(fract * pow(10.0, (double)v) + 0.5); + if (scaled > U_INT64_MAX) { + return U_INT64_MAX; + } else { diff --git a/icu.changes b/icu.changes index 61a40d1..e178a7d 100644 --- a/icu.changes +++ b/icu.changes @@ -9,9 +9,8 @@ Sun Jul 29 09:20:28 UTC 2018 - jengelh@inai.de * Under-the-hood overhaul of number parsing. Behavior is mostly compatible with previous versions, but there are some known differences. -- Remove icu-avoid-x87-excess-precision.diff, xlocale.patch - (code to patch is gone), icu-number-grouping.diff (merged - upstream) +- Remove xlocale.patch (code to patch is gone), + icu-number-grouping.diff (merged upstream) ------------------------------------------------------------------- Mon Jun 4 07:53:56 UTC 2018 - jengelh@inai.de diff --git a/icu.spec b/icu.spec index b5f3694..19e0d7b 100644 --- a/icu.spec +++ b/icu.spec @@ -38,6 +38,7 @@ Patch2: icu-versioning.diff Patch3: icu-susevers.diff Patch4: icu-fix-install-mode-files.diff Patch6: icu-error-reporting.diff +Patch7: icu-avoid-x87-excess-precision.diff BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkg-config @@ -137,7 +138,7 @@ This package contains the HTML documentation. %prep %setup -q -n icu -%patch -P 2 -P 3 -P 4 -P 6 -p1 +%patch -P 2 -P 3 -P 4 -P 6 -P 7 -p1 # docs are special mkdir html pushd html/ From ae11f22b17393314b0c9f0b4ea49a9afbfe1191876788fd4255204ed8c7b4c1b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 6 Aug 2018 21:02:49 +0000 Subject: [PATCH 3/4] update icu-avoid-x87-excess-precision.diff OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=93 --- icu-avoid-x87-excess-precision.diff | 64 +++++++++++++++++++---------- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/icu-avoid-x87-excess-precision.diff b/icu-avoid-x87-excess-precision.diff index 538627b..bc04971 100644 --- a/icu-avoid-x87-excess-precision.diff +++ b/icu-avoid-x87-excess-precision.diff @@ -1,24 +1,46 @@ ---- - source/i18n/plurrule.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) +From: Jan Engelhardt +Date: 2018-08-06 22:57:07.717647182 +0200 -Index: icu/source/i18n/plurrule.cpp +getPluralOperand returns double, which causes the other operand to get +upconverted from long long to double, and there seems to be rounding errors on +i586 (possibly from excess precision, aka 80-bit floats). + +Since the result of getPluralOption is printed with %lld at one point, this +suggests that the result is intended to be downconverted to long long instead +of upconverting the LL constant. That's why we do not use a (volatile double) +cast here like in opensuse icu 61. + +--- + source/test/intltest/dcfmapts.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: icu/source/test/intltest/dcfmapts.cpp =================================================================== ---- icu.orig/source/i18n/plurrule.cpp -+++ icu/source/i18n/plurrule.cpp -@@ -1566,13 +1566,13 @@ int64_t FixedDecimal::getFractionalDigit - return 0; +--- icu.orig/source/test/intltest/dcfmapts.cpp ++++ icu/source/test/intltest/dcfmapts.cpp +@@ -851,7 +851,7 @@ void IntlTestDecimalFormatAPI::TestFixed + ASSERT_EQUAL(22, fd.getPluralOperand(PLURAL_OPERAND_V)); + ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_F)); + ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_T)); +- ASSERT_EQUAL(345678901234567890LL, fd.getPluralOperand(PLURAL_OPERAND_I)); ++ ASSERT_EQUAL(345678901234567890LL, (long long)fd.getPluralOperand(PLURAL_OPERAND_I)); + ASSERT_EQUAL(FALSE, fd.hasIntegerValue()); + ASSERT_EQUAL(FALSE, fd.isNegative()); + +@@ -948,13 +948,13 @@ void IntlTestDecimalFormatAPI::TestFixed + // int64_t fields to 18 digits. See ticket Ticket #10374 + // ASSERT_EQUAL(223372036854775807LL, fd.getPluralOperand(PLURAL_OPERAND_I); + if (!( +- fd.getPluralOperand(PLURAL_OPERAND_I) == 223372036854775807LL || +- fd.getPluralOperand(PLURAL_OPERAND_I) == 9223372036854775807LL)) { ++ (long long)fd.getPluralOperand(PLURAL_OPERAND_I) == 223372036854775807LL || ++ (long long)fd.getPluralOperand(PLURAL_OPERAND_I) == 9223372036854775807LL)) { + dataerrln( + "File %s, Line %d, fd.getPluralOperand(PLURAL_OPERAND_I = %lld", + __FILE__, + __LINE__, +- fd.getPluralOperand(PLURAL_OPERAND_I)); ++ (long long)fd.getPluralOperand(PLURAL_OPERAND_I)); } - n = fabs(n); -- double fract = n - floor(n); -+ volatile double fract = n - floor(n); - switch (v) { - case 1: return (int64_t)(fract*10.0 + 0.5); - case 2: return (int64_t)(fract*100.0 + 0.5); - case 3: return (int64_t)(fract*1000.0 + 0.5); - default: -- double scaled = floor(fract * pow(10.0, (double)v) + 0.5); -+ volatile double scaled = floor(fract * pow(10.0, (double)v) + 0.5); - if (scaled > U_INT64_MAX) { - return U_INT64_MAX; - } else { + ASSERT_EQUAL(TRUE, fd.hasIntegerValue()); + ASSERT_EQUAL(FALSE, fd.isNegative()); From 7c06f078d1d264d1df111de8e02fcd9f952681d63143bcf3e3693b8637330f97 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 7 Aug 2018 12:01:01 +0000 Subject: [PATCH 4/4] another try at icu-avoid-x87-excess-precision.diff OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=94 --- icu-avoid-x87-excess-precision.diff | 30 +++++++++++------------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/icu-avoid-x87-excess-precision.diff b/icu-avoid-x87-excess-precision.diff index bc04971..7424ddc 100644 --- a/icu-avoid-x87-excess-precision.diff +++ b/icu-avoid-x87-excess-precision.diff @@ -1,46 +1,38 @@ -From: Jan Engelhardt -Date: 2018-08-06 22:57:07.717647182 +0200 - -getPluralOperand returns double, which causes the other operand to get -upconverted from long long to double, and there seems to be rounding errors on -i586 (possibly from excess precision, aka 80-bit floats). - -Since the result of getPluralOption is printed with %lld at one point, this -suggests that the result is intended to be downconverted to long long instead -of upconverting the LL constant. That's why we do not use a (volatile double) -cast here like in opensuse icu 61. --- - source/test/intltest/dcfmapts.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) + source/test/intltest/dcfmapts.cpp | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) Index: icu/source/test/intltest/dcfmapts.cpp =================================================================== --- icu.orig/source/test/intltest/dcfmapts.cpp +++ icu/source/test/intltest/dcfmapts.cpp -@@ -851,7 +851,7 @@ void IntlTestDecimalFormatAPI::TestFixed +@@ -851,7 +851,8 @@ void IntlTestDecimalFormatAPI::TestFixed ASSERT_EQUAL(22, fd.getPluralOperand(PLURAL_OPERAND_V)); ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_F)); ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_T)); - ASSERT_EQUAL(345678901234567890LL, fd.getPluralOperand(PLURAL_OPERAND_I)); -+ ASSERT_EQUAL(345678901234567890LL, (long long)fd.getPluralOperand(PLURAL_OPERAND_I)); ++ volatile double xxa = fd.getPluralOperand(PLURAL_OPERAND_I); ++ ASSERT_EQUAL(345678901234567890LL, xxa); ASSERT_EQUAL(FALSE, fd.hasIntegerValue()); ASSERT_EQUAL(FALSE, fd.isNegative()); -@@ -948,13 +948,13 @@ void IntlTestDecimalFormatAPI::TestFixed +@@ -947,14 +948,15 @@ void IntlTestDecimalFormatAPI::TestFixed + // note: going through DigitList path to FixedDecimal, which is trimming // int64_t fields to 18 digits. See ticket Ticket #10374 // ASSERT_EQUAL(223372036854775807LL, fd.getPluralOperand(PLURAL_OPERAND_I); ++ volatile double xxb = fd.getPluralOperand(PLURAL_OPERAND_I); if (!( - fd.getPluralOperand(PLURAL_OPERAND_I) == 223372036854775807LL || - fd.getPluralOperand(PLURAL_OPERAND_I) == 9223372036854775807LL)) { -+ (long long)fd.getPluralOperand(PLURAL_OPERAND_I) == 223372036854775807LL || -+ (long long)fd.getPluralOperand(PLURAL_OPERAND_I) == 9223372036854775807LL)) { ++ xxb == 223372036854775807LL || ++ xxb == 9223372036854775807LL)) { dataerrln( "File %s, Line %d, fd.getPluralOperand(PLURAL_OPERAND_I = %lld", __FILE__, __LINE__, - fd.getPluralOperand(PLURAL_OPERAND_I)); -+ (long long)fd.getPluralOperand(PLURAL_OPERAND_I)); ++ xxb); } ASSERT_EQUAL(TRUE, fd.hasIntegerValue()); ASSERT_EQUAL(FALSE, fd.isNegative());