Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/icu/files/, dev-libs/icu/
Date: Fri, 24 Sep 2021 18:15:05
Message-Id: 1632507224.7a771de8495a19e73ee8c2bd3cd7f08fbe341e7d.sam@gentoo
1 commit: 7a771de8495a19e73ee8c2bd3cd7f08fbe341e7d
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 24 18:13:44 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 24 18:13:44 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a771de8
7
8 dev-libs/icu: add upstream patch for test failure
9
10 This may cause runtime breakage (not just a failure
11 in a test, but exposed by it on hppa and actually riscv) and
12 it's a straightforward patch, so let's `git mv` in stable.
13
14 Bug: https://bugs.gentoo.org/788112
15 Closes: https://bugs.gentoo.org/807893
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 dev-libs/icu/files/icu-69.1-fix-ub-units.patch | 23 ++++++++++++++++++++++
19 .../icu/{icu-69.1.ebuild => icu-69.1-r1.ebuild} | 3 +++
20 2 files changed, 26 insertions(+)
21
22 diff --git a/dev-libs/icu/files/icu-69.1-fix-ub-units.patch b/dev-libs/icu/files/icu-69.1-fix-ub-units.patch
23 new file mode 100644
24 index 00000000000..6847d585155
25 --- /dev/null
26 +++ b/dev-libs/icu/files/icu-69.1-fix-ub-units.patch
27 @@ -0,0 +1,23 @@
28 +https://github.com/unicode-org/icu/pull/1715
29 +https://bugs.gentoo.org/788112
30 +
31 +From 29f1188d191a7a75ac7ffa4bfa390f625da39c53 Mon Sep 17 00:00:00 2001
32 +From: Andreas Schwab <schwab@××××.de>
33 +Date: Tue, 11 May 2021 19:04:24 +0200
34 +Subject: [PATCH] ICU-21613 Fix undefined behaviour in
35 + ComplexUnitsConverter::applyRounder
36 +
37 +--- a/i18n/units_complexconverter.cpp
38 ++++ b/i18n/units_complexconverter.cpp
39 +@@ -237,6 +237,11 @@ void ComplexUnitsConverter::applyRounder(MaybeStackArray<int64_t, 5> &intValues,
40 + }
41 + quantity = decimalQuantity.toDouble();
42 +
43 ++ if (uprv_isNaN(quantity) || uprv_isInfinite(quantity)) {
44 ++ // Do nothing for non-finite values, since conversion to int64_t is undefined
45 ++ return;
46 ++ }
47 ++
48 + int32_t lastIndex = unitsConverters_.length() - 1;
49 + if (lastIndex == 0) {
50 + // Only one element, no need to bubble up the carry
51
52 diff --git a/dev-libs/icu/icu-69.1.ebuild b/dev-libs/icu/icu-69.1-r1.ebuild
53 similarity index 96%
54 rename from dev-libs/icu/icu-69.1.ebuild
55 rename to dev-libs/icu/icu-69.1-r1.ebuild
56 index 1d2630ee16e..b540e57c81b 100644
57 --- a/dev-libs/icu/icu-69.1.ebuild
58 +++ b/dev-libs/icu/icu-69.1-r1.ebuild
59 @@ -32,6 +32,9 @@ PATCHES=(
60 "${FILESDIR}/${PN}-65.1-remove-bashisms.patch"
61 "${FILESDIR}/${PN}-64.2-darwin.patch"
62 "${FILESDIR}/${PN}-68.1-nonunicode.patch"
63 + # Should be in the next rleease, but check
64 + # https://bugs.gentoo.org/788112
65 + "${FILESDIR}/${PN}-69.1-fix-ub-units.patch"
66 )
67
68 src_prepare() {