From 8e8e37c203b44b957c6eba657b7ff1ecbff190bd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 5 Feb 2019 14:42:54 +0100 Subject: backport RHEL-7.6 changes --- icu-last.spec | 72 ++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 26 deletions(-) (limited to 'icu-last.spec') diff --git a/icu-last.spec b/icu-last.spec index 38b5c1f..248140f 100644 --- a/icu-last.spec +++ b/icu-last.spec @@ -1,18 +1,11 @@ %global srcname icu -# Have autoconf 2.68 -%if 0%{?fedora} >= 15 -%global with_autoconf 1 -%else -%global with_autoconf 0 -%endif - # Regression tests take a long time, you can skip 'em with this %{!?runselftest: %{expand: %%global runselftest 1}} Name: icu-last Version: 50.1.2 -Release: 15%{?dist} +Release: 17%{?dist} Summary: International Components for Unicode Group: Development/Tools License: MIT and UCD and Public Domain @@ -22,8 +15,15 @@ Source0: http://download.icu-project.org/files/icu4c/50.1.2/icu4c-50_1_2-src.t # See also http://site.icu-project.org/download/51#TOC-Known-Issues Source1: http://download.icu-project.org/files/icu4c/51.1/icu-51-layout-fix-10107.tgz Source2: icu-config.sh - +Source10: http://source.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2018e/44/metaZones.txt +Source11: http://source.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2018e/44/timezoneTypes.txt +Source12: http://source.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2018e/44/windowsZones.txt +Source13: http://source.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2018e/44/zoneinfo64.txt +%if 0%{?rhel} == 6 +BuildRequires: doxygen, autoconf268, python +%else BuildRequires: doxygen, autoconf, python +%endif Requires: lib%{name}%{?_isa} = %{version}-%{release} Conflicts: %{srcname} < %{version} Provides: %{srcname} = %{version}-%{release} @@ -38,6 +38,7 @@ Patch7: icu.10143.memory.leak.crash.patch Patch8: icu.10318.CVE-2013-2924_changeset_34076.patch Patch9: icu.rhbz1074549.CVE-2013-5907.patch Patch10: icu-testtwodigityear.patch +Patch11: do-not-fail-intltest-because-of-changed-data.patch %description Tools and utilities for developing with icu. @@ -74,9 +75,7 @@ Includes and definitions for developing with icu. %package -n lib%{name}-doc Summary: Documentation for International Components for Unicode Group: Documentation -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 BuildArch: noarch -%endif Conflicts: lib%{srcname}-doc < %{version} Provides: lib%{srcname}-doc = %{version}-%{release} @@ -93,18 +92,32 @@ Provides: lib%{srcname}-doc = %{version}-%{release} %patch2 -p1 -b .icu8800.freeserif.crash.patch %patch3 -p1 -b .icu7601.Indic-ccmp.patch %patch4 -p1 -b .icu9948.mlym-crash.patch -%if %{with_autoconf} %patch5 -p1 -b .gennorm2-man.patch %patch6 -p1 -b .icuinfo-man.patch -%endif %patch7 -p1 -b .icu10143.memory.leak.crash.patch %patch8 -p1 -b .icu10318.CVE-2013-2924_changeset_34076.patch %patch9 -p1 -b .icurhbz1074549.CVE-2013-5907.patch %patch10 -p1 -b .icu-testtwodigityear.patch +%patch11 -p1 -b .do-not-fail-intltest-because-of-changed-data.patch + +# http://userguide.icu-project.org/datetime/timezone#TOC-Updating-the-Time-Zone-Data +# says: +# +# > ICU4C TZ update when ICU data is built into a shared library +# > [...] +# > Copy the downloaded .txt files into the ICU sources for your installation, +# > in the subdirectory source/data/misc/ +# > [...] +cp %{SOURCE10} source/data/misc/ +cp %{SOURCE11} source/data/misc/ +cp %{SOURCE12} source/data/misc/ +cp %{SOURCE13} source/data/misc/ %build cd source -%if %{with_autoconf} +%if 0%{?rhel} == 6 +autoconf268 +%else autoconf %endif CFLAGS='%optflags -fno-strict-aliasing' @@ -136,6 +149,17 @@ test -f uconfig.h.prepend && sed -e '/^#define __UCONFIG_H__/ r uconfig.h.prepen make %{?_smp_mflags} make %{?_smp_mflags} doc +# remove the original timezone data and build the new data from the updated +# zoneinfo64.txt file: +%ifarch s390 s390x ppc ppc64 +rm -f ./data/out/build/icudt50b/zoneinfo64.res +make -C data ./out/build/icudt50b/zoneinfo64.res +%else +rm -f ./data/out/build/icudt50l/zoneinfo64.res +make -C data ./out/build/icudt50l/zoneinfo64.res +%endif +make + %install rm -rf $RPM_BUILD_ROOT source/__docs make %{?_smp_mflags} -C source install DESTDIR=$RPM_BUILD_ROOT @@ -143,15 +167,7 @@ make %{?_smp_mflags} -C source install-doc docdir=__docs chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so.* ( cd $RPM_BUILD_ROOT%{_bindir} -%if 0%{?__isa_bits} mv icu-config icu-config-%{__isa_bits} -%else -%ifarch x86_64 s390x ppc64 sparc64 aarch64 - mv icu-config icu-config-64 -%else - mv icu-config icu-config-32 -%endif -%endif ) install -p -m755 -D %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/icu-config @@ -161,7 +177,10 @@ if grep -q @VERSION@ source/tools/*/*.8 source/tools/*/*.1 source/config/*.1; th exit 1 fi %if %runselftest -make %{?_smp_mflags} -C source check +# add CINTLTST_OPTS=-w and INTLTEST_OPTS=-w +# to turn the errors caused by the timezone data update +# into warnings: +make %{?_smp_mflags} -C source check CINTLTST_OPTS=-w INTLTEST_OPTS=-w %endif %post -n lib%{name} -p /sbin/ldconfig @@ -201,9 +220,7 @@ make %{?_smp_mflags} -C source check %{_bindir}/%{srcname}-config* %{_bindir}/icuinfo %{_mandir}/man1/%{srcname}-config.1* -%if %{with_autoconf} %{_mandir}/man1/icuinfo.1* -%endif %{_includedir}/layout %{_includedir}/unicode %{_libdir}/*.so @@ -222,8 +239,11 @@ make %{?_smp_mflags} -C source check %doc source/__docs/%{srcname}/html/* %changelog +* Tue Feb 5 2019 Remi Collet - 50.1.2-17 +- backport RHEL-7.6 changes + * Tue Sep 12 2017 Remi Collet - 50.1.2-15 -- backport RHEL-7 changes +- backport RHEL-7.2 changes * Tue Aug 19 2014 Eike Rathke - 50.1.2-15 - Resolves: rhbz#1126237 correct sources list file -- cgit