diff options
author | Patrik Plihal | 2024-01-08 18:35:06 +0100 |
---|---|---|
committer | Patrik Plihal | 2024-01-08 18:44:20 +0100 |
commit | 457c19f0138f3722ba0aa923d283325bf2d5e6a6 (patch) | |
tree | 93883e86698596aced47292afee957873016d022 | |
parent | fcc34653b37aefb5d461db74f035014f2f8c96b0 (diff) | |
download | aur-457c19f0138f3722ba0aa923d283325bf2d5e6a6.tar.gz |
patch: fix TestHebrewCalendarInTemporalLeapYear
backport of f3b869cbb0b9ced42d7ca4e24626a868a14ddcfc
taken from
https://github.com/unicode-org/icu/commit/f3b869cbb0b9ced42d7ca4e24626a868a14ddcfc
discovered via https://unicode-org.atlassian.net/browse/ICU-22512
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 19 | ||||
-rw-r--r-- | fix-broken-TestHebrewCalendarInTemporalLeapYear.patch | 33 |
3 files changed, 52 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = icu73 pkgdesc = International Components for Unicode library (version 73) pkgver = 73.2 - pkgrel = 1 + pkgrel = 2 url = http://www.icu-project.org/ arch = i686 arch = x86_64 @@ -13,7 +13,9 @@ pkgbase = icu73 depends = gcc-libs depends = sh conflicts = icu73-bin + source = fix-broken-TestHebrewCalendarInTemporalLeapYear.patch source = https://github.com/unicode-org/icu/releases/download/release-73-2/icu4c-73_2-src.tgz + sha512sums = 4323b585827cc2a5ad8fea39e036c5537b4a20bf67959fba185a56f72fb54c54fab89a78602801ed7586a4d7cb9c10f32e72dc386440a99d87105309345d7904 sha512sums = 76dd782db6205833f289d7eb68b60860dddfa3f614f0ba03fe7ec13117077f82109f0dc1becabcdf4c8a9c628b94478ab0a46134bdb06f4302be55f74027ce62 pkgname = icu73 @@ -1,9 +1,11 @@ # Maintainer: Patrik Plihal <patrik.plihal at gmail dot com> +# PKGBUILD: based of https://aur.archlinux.org/packages/icu71 + _pkgname=icu pkgname=icu73 pkgver=73.2 -pkgrel=1 +pkgrel=2 pkgdesc='International Components for Unicode library (version 73)' arch=('i686' 'x86_64') url="http://www.icu-project.org/" @@ -11,8 +13,19 @@ license=('custom:icu') conflicts=('icu73-bin') depends=('gcc-libs' 'sh') makedepends=('python' 'clang' 'make' 'patch') -source=("https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/icu4c-${pkgver//./_}-src.tgz") -sha512sums=('76dd782db6205833f289d7eb68b60860dddfa3f614f0ba03fe7ec13117077f82109f0dc1becabcdf4c8a9c628b94478ab0a46134bdb06f4302be55f74027ce62') +source=("fix-broken-TestHebrewCalendarInTemporalLeapYear.patch" + "https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/icu4c-${pkgver//./_}-src.tgz") +sha512sums=('4323b585827cc2a5ad8fea39e036c5537b4a20bf67959fba185a56f72fb54c54fab89a78602801ed7586a4d7cb9c10f32e72dc386440a99d87105309345d7904' + '76dd782db6205833f289d7eb68b60860dddfa3f614f0ba03fe7ec13117077f82109f0dc1becabcdf4c8a9c628b94478ab0a46134bdb06f4302be55f74027ce62') + +prepare() +{ + cd "${_pkgname}" + + # backport fix + # https://github.com/unicode-org/icu/commit/f3b869cbb0b9ced42d7ca4e24626a868a14ddcfc + patch -p2 -i "../fix-broken-TestHebrewCalendarInTemporalLeapYear.patch" +} build() { diff --git a/fix-broken-TestHebrewCalendarInTemporalLeapYear.patch b/fix-broken-TestHebrewCalendarInTemporalLeapYear.patch new file mode 100644 index 000000000000..579b782d90da --- /dev/null +++ b/fix-broken-TestHebrewCalendarInTemporalLeapYear.patch @@ -0,0 +1,33 @@ +From f3b869cbb0b9ced42d7ca4e24626a868a14ddcfc Mon Sep 17 00:00:00 2001 +From: Frank Tang <ftang@chromium.org> +Date: Mon, 18 Sep 2023 20:20:42 -0700 +Subject: [PATCH] ICU-22512 Fix broken TestHebrewCalendarInTemporalLeapYear + +Fix broken test mistakenly landed in +https://github.com/unicode-org/icu/pull/2274 + +Some important steps were missed in the last landing. +--- + icu4c/source/test/intltest/caltest.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/icu4c/source/test/intltest/caltest.cpp b/icu4c/source/test/intltest/caltest.cpp +index 9d89f468eef0..18b96f231ba3 100644 +--- a/icu4c/source/test/intltest/caltest.cpp ++++ b/icu4c/source/test/intltest/caltest.cpp +@@ -4028,6 +4028,7 @@ void CalendarTest::TestHebrewCalendarInTemporalLeapYear() { + for (gc.set(startYear, UCAL_JANUARY, 1); + gc.get(UCAL_YEAR, status) <= stopYear; + gc.add(UCAL_DATE, incrementDays, status)) { ++ cal->setTime(gc.getTime(status), status); + if (failure(status, "add/get/set/getTime/setTime incorrect")) return; + + int32_t cal_year = cal->get(UCAL_EXTENDED_YEAR, status); +@@ -4036,6 +4037,7 @@ void CalendarTest::TestHebrewCalendarInTemporalLeapYear() { + leapTest->set(UCAL_MONTH, 0); + leapTest->set(UCAL_DATE, 1); + // If 10 months after TISHRI is TAMUZ, then it is a leap year. ++ leapTest->add(UCAL_MONTH, 10, status); + hasLeapMonth = leapTest->get(UCAL_MONTH, status) == icu::HebrewCalendar::TAMUZ; + yearForHasLeapMonth = cal_year; + } |