summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--icu-last.spec38
-rw-r--r--timezone-update-2022a.patch30
-rw-r--r--timezone-update.patch24
4 files changed, 88 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index fc9aa8c..441c774 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,5 @@ package-*.xml
*.tar.xz.asc
*.src.rpm
*/*rpm
+*.txt
+*.zip
diff --git a/icu-last.spec b/icu-last.spec
index 22e5739..752f6d3 100644
--- a/icu-last.spec
+++ b/icu-last.spec
@@ -13,6 +13,12 @@
%global soname 69
%global subver 1
+# Set to 0 when upgrading to a new ICU release that contains up-to-date timezone data.
+# (or update the timezone data update..).
+%global use_tzdata_update 1
+# Adjust to version major; used in tzdata update.
+%global icu_major 69
+
%if 0%{?fedora} == 34 || 0%{?rhel} == 9
# rhbz#2003359 crash in umtx_initImplPreInit() from unorm_normalize()
%global _lto_cflags %nil
@@ -20,12 +26,19 @@
Name: icu%{soname}
Version: %{soname}.%{subver}
-Release: 3%{?dist}
+Release: 4%{?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-%{soname}-%{subver}/icu4c-%{soname}_%{subver}-src.tgz
-Source1: icu-config.sh
+%if 0%{?use_tzdata_update}
+Source1: https://github.com/unicode-org/icu/releases/download/release-69-1/icu4c-69_1-data.zip
+Source2: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2022a/44/metaZones.txt
+Source3: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2022a/44/timezoneTypes.txt
+Source4: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2022a/44/windowsZones.txt
+Source5: https://raw.githubusercontent.com/unicode-org/icu-data/main/tzdata/icunew/2022a/44/zoneinfo64.txt
+%endif
+Source10: icu-config.sh
BuildRequires: doxygen, autoconf >= 2.69, python3
%if 0%{?rhel} == 7
@@ -47,13 +60,14 @@ Provides: %{srcname}%{?_isa} = %{version}-%{release}
Patch4: gennorm2-man.patch
Patch5: icuinfo-man.patch
+Patch10: timezone-update.patch
+Patch11: timezone-update-2022a.patch
%description
Tools and utilities for developing with icu.
%package -n lib%{name}
Summary: International Components for Unicode - libraries
-Group: System Environment/Libraries
%description -n lib%{name}
The International Components for Unicode (ICU) libraries provide
@@ -71,7 +85,6 @@ This package is designed to be installable beside lib%{srcname}.
%package -n lib%{name}-devel
Summary: Development files for International Components for Unicode
-Group: Development/Libraries
Requires: lib%{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Conflicts: lib%{srcname}-last-devel < %{version}
@@ -86,7 +99,6 @@ Includes and definitions for developing with icu.
%package -n lib%{name}-doc
Summary: Documentation for International Components for Unicode
-Group: Documentation
BuildArch: noarch
Conflicts: lib%{srcname}-last-doc < %{version}
Conflicts: lib%{srcname}62-doc < %{version}
@@ -102,10 +114,21 @@ Provides: lib%{srcname}-doc = %{version}-%{release}
%setup -q -n %{srcname}
%patch4 -p1 -b .gennorm2-man.patch
%patch5 -p1 -b .icuinfo-man.patch
+%patch10 -p1 -b .up1
+%patch11 -p1 -b .up2
+
%if 0%{?fedora} == 34 || 0%{?rhel} == 9
sed -e '/SELFCHECK=1/d' -i source/Makefile.in
%endif
+%if 0%{?use_tzdata_update}
+pushd source
+unzip -o %{SOURCE1}
+rm -f data/in/icudt%{icu_major}l.dat
+cp -v -f %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} data/misc
+popd
+%endif
+
%build
%{?dtsenable}
@@ -154,7 +177,7 @@ chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so.*
cd $RPM_BUILD_ROOT%{_bindir}
mv icu-config icu-config-%{__isa_bits}
)
-install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/icu-config
+install -p -m755 -D %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/icu-config
%check
%{?dtsenable}
@@ -230,6 +253,9 @@ LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l
%changelog
+* Tue Jul 26 2022 Remi Collet <remi@remirepo.net> - 69.1-4
+- Update timezone data to 2022a
+
* Thu Nov 4 2021 Remi Collet <remi@remirepo.net> - 69.1-3
- EL-9 build
diff --git a/timezone-update-2022a.patch b/timezone-update-2022a.patch
new file mode 100644
index 0000000..147a5b4
--- /dev/null
+++ b/timezone-update-2022a.patch
@@ -0,0 +1,30 @@
+diff -ru icu.orig/source/test/intltest/tztest.cpp icu/source/test/intltest/tztest.cpp
+--- icu.orig/source/test/intltest/tztest.cpp 2022-05-04 17:26:12.863669497 +0200
++++ icu/source/test/intltest/tztest.cpp 2022-05-05 12:37:17.599192452 +0200
+@@ -2011,6 +2011,25 @@
+ const char *alias;
+ const char *zone;
+ } excluded1[] = {
++ {"Africa/Accra", "Africa/Abidjan"},
++ {"America/Blanc-Sablon", "America/Port_of_Spain"},
++ {"America/Curacao", "America/Port_of_Spain"},
++ {"America/Kralendijk", "America/Port_of_Spain"},
++ {"America/Lower_Princes", "America/Port_of_Spain"},
++ {"America/Puerto_Rico", "America/Port_of_Spain"},
++ {"PRT", "America/Port_of_Spain"},
++ {"America/Aruba", "America/Port_of_Spain"},
++ {"America/Cayman", "America/Coral_Harbour"},
++ {"America/Panama", "America/Coral_Harbour"},
++ {"America/Curacao", "America/Port_of_Spain"},
++ {"America/Phoenix", "America/Creston"},
++ {"America/Nassau", "America/Montreal"},
++ {"Pacific/Port_Moresby", "Antarctica/DumontDUrville"},
++ {"Asia/Aden", "Antarctica/Syowa"},
++ {"Asia/Kuwait", "Antarctica/Syowa"},
++ {"Asia/Riyadh", "Antarctica/Syowa"},
++ {"US/Arizona", "America/Creston"},
++ {"PNT", "America/Creston"},
+ {"Africa/Addis_Ababa", "Africa/Nairobi"},
+ {"Africa/Asmera", "Africa/Nairobi"},
+ {"Africa/Bamako", "Africa/Abidjan"},
+icu/source/test/intltest のみに存在: tztest.cpp.~1~
diff --git a/timezone-update.patch b/timezone-update.patch
new file mode 100644
index 0000000..190a9f8
--- /dev/null
+++ b/timezone-update.patch
@@ -0,0 +1,24 @@
+diff -ru icu.orig/source/test/cintltst/ccaltst.c icu/source/test/cintltst/ccaltst.c
+--- icu.orig/source/test/cintltst/ccaltst.c 2021-04-08 02:10:27.000000000 +0200
++++ icu/source/test/cintltst/ccaltst.c 2021-12-08 18:48:26.731171253 +0100
+@@ -274,7 +274,7 @@
+ tzver = ucal_getTZDataVersion(&status);
+ if (U_FAILURE(status)) {
+ log_err_status(status, "FAIL: ucal_getTZDataVersion() => %s\n", u_errorName(status));
+- } else if (uprv_strlen(tzver) != 5 /*4 digits + 1 letter*/) {
++ } else if (uprv_strlen(tzver) != 5 /*4 digits + 1 letter*/ && uprv_strlen(tzver) != 6) {
+ log_err("FAIL: Bad version string was returned by ucal_getTZDataVersion\n");
+ } else {
+ log_verbose("PASS: ucal_getTZDataVersion returned %s\n", tzver);
+diff -ru icu.orig/source/test/intltest/tztest.cpp icu/source/test/intltest/tztest.cpp
+--- icu.orig/source/test/intltest/tztest.cpp 2021-04-08 02:10:27.000000000 +0200
++++ icu/source/test/intltest/tztest.cpp 2021-12-09 08:53:50.576419996 +0100
+@@ -152,7 +152,7 @@
+ const char* tzver = TimeZone::getTZDataVersion(status);
+ if (U_FAILURE(status)) {
+ errcheckln(status, "FAIL: getTZDataVersion failed - %s", u_errorName(status));
+- } else if (uprv_strlen(tzver) != 5 /* 4 digits + 1 letter */) {
++ } else if (uprv_strlen(tzver) != 5 && uprv_strlen(tzver) != 6 /* 4 digits + 1 letter */) {
+ errln((UnicodeString)"FAIL: getTZDataVersion returned " + tzver);
+ } else {
+ logln((UnicodeString)"tzdata version: " + tzver);