From b2566771ca22c2659e63357cfaa1f58d0f429d45 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 1 Jul 2020 14:03:00 +0200 Subject: update to 65.1 https://github.com/remicollet/remirepo/issues/153 --- armv7hl-disable-tests.patch | 96 ---------------------- icu-64.1-data_archive_generation.patch | 14 ++++ icu-last.spec | 21 ++--- rhbz1646703-icu4c-ICU-20246-integer-overflow.patch | 50 ----------- 4 files changed, 25 insertions(+), 156 deletions(-) delete mode 100644 armv7hl-disable-tests.patch create mode 100644 icu-64.1-data_archive_generation.patch delete mode 100644 rhbz1646703-icu4c-ICU-20246-integer-overflow.patch diff --git a/armv7hl-disable-tests.patch b/armv7hl-disable-tests.patch deleted file mode 100644 index 2d869b1..0000000 --- a/armv7hl-disable-tests.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff -ru orig.icu/source/test/cintltst/cnmdptst.c icu/source/test/cintltst/cnmdptst.c ---- orig.icu/source/test/cintltst/cnmdptst.c 2016-03-23 21:48:18.000000000 +0100 -+++ icu/source/test/cintltst/cnmdptst.c 2016-04-15 18:34:06.148251985 +0200 -@@ -186,6 +186,12 @@ - /* Test exponential pattern*/ - static void TestExponential(void) - { -+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ -+#if 1 -+ /* Actually only 3 tests fail, but given the nested structure depending on -+ * array sizes there's no simple "disable this and that". */ -+ return; -+#endif - int32_t pat_length, val_length, lval_length; - int32_t ival, ilval, p, v, lneed; - UNumberFormat *fmt; -diff -ru orig.icu/source/test/intltest/dcfmtest.cpp icu/source/test/intltest/dcfmtest.cpp ---- orig.icu/source/test/intltest/dcfmtest.cpp 2016-03-23 21:48:38.000000000 +0100 -+++ icu/source/test/intltest/dcfmtest.cpp 2016-04-15 18:34:06.148251985 +0200 -@@ -279,6 +279,13 @@ - // - formatLineMat.reset(testLine); - if (formatLineMat.lookingAt(status)) { -+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ -+#if 1 -+// [Formattable] file dcfmtest.txt, line 62: expected "12.35E5", got "1.235E6" -+// [StringPiece] file dcfmtest.txt, line 62: expected "12.35E5", got "1.235E6" -+ if (lineNum == 62) -+ continue; -+#endif - execFormatTest(lineNum, - formatLineMat.group(1, status), // Pattern - formatLineMat.group(2, status), // rounding mode -diff -ru orig.icu/source/test/intltest/numfmtspectest.cpp icu/source/test/intltest/numfmtspectest.cpp ---- orig.icu/source/test/intltest/numfmtspectest.cpp 2016-03-23 21:48:40.000000000 +0100 -+++ icu/source/test/intltest/numfmtspectest.cpp 2016-04-15 18:34:06.148251985 +0200 -@@ -137,11 +137,14 @@ - - void NumberFormatSpecificationTest::TestScientificNotation() { - assertPatternFr("1,23E4", 12345.0, "0.00E0", TRUE); -+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ -+#if 0 - assertPatternFr("123,00E2", 12300.0, "000.00E0", TRUE); - assertPatternFr("123,0E2", 12300.0, "000.0#E0", TRUE); - assertPatternFr("123,0E2", 12300.1, "000.0#E0", TRUE); - assertPatternFr("123,01E2", 12301.0, "000.0#E0", TRUE); - assertPatternFr("123,01E+02", 12301.0, "000.0#E+00", TRUE); -+#endif - assertPatternFr("12,3E3", 12345.0, "##0.00E0", TRUE); - assertPatternFr("12,300E3", 12300.1, "##0.0000E0", TRUE); - assertPatternFr("12,30E3", 12300.1, "##0.000#E0", TRUE); -@@ -221,6 +224,8 @@ - assertEquals("", "USD (433.22)", result, TRUE); - } - } -+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ -+#if 0 - const char *paddedSciPattern = "QU**00.#####E0"; - assertPatternFr("QU***43,3E-1", 4.33, paddedSciPattern, TRUE); - { -@@ -242,6 +247,7 @@ - } - // padding cannot work as intended with scientific notation. - assertPatternFr("QU**43,32E-1", 4.332, paddedSciPattern, TRUE); -+#endif - } - - void NumberFormatSpecificationTest::assertPatternFr( -diff -ru orig.icu/source/test/intltest/numfmtst.cpp icu/source/test/intltest/numfmtst.cpp ---- orig.icu/source/test/intltest/numfmtst.cpp 2016-03-23 21:48:40.000000000 +0100 -+++ icu/source/test/intltest/numfmtst.cpp 2016-04-15 18:34:06.150251997 +0200 -@@ -730,6 +730,12 @@ - void - NumberFormatTest::TestExponential(void) - { -+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ -+#if 1 -+ /* Actually only 3 tests fail, but given the nested structure depending on -+ * array sizes there's no simple "disable this and that". */ -+ return; -+#endif - UErrorCode status = U_ZERO_ERROR; - DecimalFormatSymbols sym(Locale::getUS(), status); - if (U_FAILURE(status)) { errcheckln(status, "FAIL: Bad status returned by DecimalFormatSymbols ct - %s", u_errorName(status)); return; } -@@ -1846,8 +1852,11 @@ - (int32_t) 45678000, "5E7", status); - expect(new DecimalFormat("00E0", US, status), - (int32_t) 45678000, "46E6", status); -+/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ -+#if 0 - expect(new DecimalFormat("000E0", US, status), - (int32_t) 45678000, "457E5", status); -+#endif - /* - expect(new DecimalFormat("###E0", US, status), - new Object[] { new Double(0.0000123), "12.3E-6", diff --git a/icu-64.1-data_archive_generation.patch b/icu-64.1-data_archive_generation.patch new file mode 100644 index 0000000..48ddcd9 --- /dev/null +++ b/icu-64.1-data_archive_generation.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/682170 + +--- a/source/data/Makefile.in ++++ b/source/data/Makefile.in +@@ -148,7 +148,8 @@ + # and convert it to the current type. + ifneq ($(ICUDATA_ARCHIVE),) + ICUDATA_SOURCE_ARCHIVE = $(OUTDIR)/$(ICUDATA_PLATFORM_NAME).dat +-$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) $(OUTDIR) ++$(ICUDATA_SOURCE_ARCHIVE): $(ICUDATA_ARCHIVE) ++ $(MKINSTALLDIRS) $(OUTDIR) + $(INVOKE) $(TOOLBINDIR)/icupkg -t$(ICUDATA_CHAR) $(ICUDATA_ARCHIVE) $(ICUDATA_SOURCE_ARCHIVE) + endif + else diff --git a/icu-last.spec b/icu-last.spec index 3b5f7ad..0c4d056 100644 --- a/icu-last.spec +++ b/icu-last.spec @@ -10,21 +10,21 @@ # %global srcname icu -%global soname 62 +%global soname 65 # Regression tests take a long time, you can skip 'em with this %{!?runselftest: %{expand: %%global runselftest 1}} Name: icu%{soname} -Version: %{soname}.2 +Version: %{soname}.1 Release: 1%{?dist} Summary: International Components for Unicode License: MIT and UCD and Public Domain URL: http://site.icu-project.org/ -Source0: https://github.com/unicode-org/icu/releases/download/release-62-2/icu4c-62_2-src.tgz +Source0: https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz Source1: icu-config.sh -BuildRequires: doxygen, autoconf >= 2.69, python2 +BuildRequires: doxygen, autoconf >= 2.69, python3 BuildRequires: gcc BuildRequires: gcc-c++ @@ -34,10 +34,10 @@ Conflicts: %{srcname} < %{version} Provides: %{srcname} = %{version}-%{release} Provides: %{srcname}%{?_isa} = %{version}-%{release} +# Fix the build on s390x +Patch0: icu-64.1-data_archive_generation.patch Patch4: gennorm2-man.patch Patch5: icuinfo-man.patch -Patch6: rhbz1646703-icu4c-ICU-20246-integer-overflow.patch -Patch100: armv7hl-disable-tests.patch %description Tools and utilities for developing with icu. @@ -87,12 +87,9 @@ Provides: lib%{srcname}-doc = %{version}-%{release} %prep %setup -q -n %{srcname} +%patch0 -p1 -b .arc-gen %patch4 -p1 -b .gennorm2-man.patch %patch5 -p1 -b .icuinfo-man.patch -%patch6 -p2 -b .rhbz1646703-icu4c-ICU-20246-integer-overflow.patch -%ifarch armv7hl -%patch100 -p1 -b .armv7hl-disable-tests.patch -%endif %build pushd source @@ -215,6 +212,10 @@ LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l %changelog +* Wed Jul 1 2020 Remi Collet - 65.1-1 +- update to 65.1 + https://github.com/remicollet/remirepo/issues/153 + * Thu May 7 2020 Remi Collet - 62.2-1 - update to 62.2 https://github.com/remicollet/remirepo/issues/149 diff --git a/rhbz1646703-icu4c-ICU-20246-integer-overflow.patch b/rhbz1646703-icu4c-ICU-20246-integer-overflow.patch deleted file mode 100644 index 3debd3f..0000000 --- a/rhbz1646703-icu4c-ICU-20246-integer-overflow.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 Mon Sep 17 00:00:00 2001 -From: Shane Carr -Date: Mon, 29 Oct 2018 23:52:44 -0700 -Subject: [PATCH] ICU-20246 Fixing another integer overflow in number parsing. - ---- - icu4c/source/i18n/fmtable.cpp | 2 +- - icu4c/source/i18n/number_decimalquantity.cpp | 5 ++++- - icu4c/source/test/intltest/numfmtst.cpp | 8 ++++++++ - .../icu/impl/number/DecimalQuantity_AbstractBCD.java | 5 ++++- - .../impl/number/DecimalQuantity_DualStorageBCD.java | 10 +++++++++- - .../com/ibm/icu/dev/test/format/NumberFormatTest.java | 5 +++++ - 6 files changed, 31 insertions(+), 4 deletions(-) - -erAck: -* obviously removed the icu4j *.java patch parts -* stripped the icu4c/source/test/intltest/numfmtst.cpp part because it - added code to a test that does not exist yet in ICU 62.1 - * TODO: when upgrading to ICU 63.1 add that back in from - https://github.com/unicode-org/icu/commit/53d8c8f3d181d87a6aa925b449b51c4a2c922a51.patch - -diff --git a/icu4c/source/i18n/fmtable.cpp b/icu4c/source/i18n/fmtable.cpp -index 45c7024fc29..8601d95f4a6 100644 ---- a/icu4c/source/i18n/fmtable.cpp -+++ b/icu4c/source/i18n/fmtable.cpp -@@ -734,7 +734,7 @@ CharString *Formattable::internalGetCharString(UErrorCode &status) { - // not print scientific notation for magnitudes greater than -5 and smaller than some amount (+5?). - if (fDecimalQuantity->isZero()) { - fDecimalStr->append("0", -1, status); -- } else if (std::abs(fDecimalQuantity->getMagnitude()) < 5) { -+ } else if (fDecimalQuantity->getMagnitude() != INT32_MIN && std::abs(fDecimalQuantity->getMagnitude()) < 5) { - fDecimalStr->appendInvariantChars(fDecimalQuantity->toPlainString(), status); - } else { - fDecimalStr->appendInvariantChars(fDecimalQuantity->toScientificString(), status); -diff --git a/icu4c/source/i18n/number_decimalquantity.cpp b/icu4c/source/i18n/number_decimalquantity.cpp -index 47b930a564b..d5dd7ae694c 100644 ---- a/icu4c/source/i18n/number_decimalquantity.cpp -+++ b/icu4c/source/i18n/number_decimalquantity.cpp -@@ -898,7 +898,10 @@ UnicodeString DecimalQuantity::toScientificString() const { - } - result.append(u'E'); - int32_t _scale = upperPos + scale; -- if (_scale < 0) { -+ if (_scale == INT32_MIN) { -+ result.append({u"-2147483648", -1}); -+ return result; -+ } else if (_scale < 0) { - _scale *= -1; - result.append(u'-'); - } else { -- cgit