2014-06-17 16:24:23 +04:00
|
|
|
%define major %(echo %{version} |cut -d. -f1)
|
2012-08-07 00:14:51 +00:00
|
|
|
%define libicudata %mklibname %{name}data %{major}
|
|
|
|
%define libicui18n %mklibname %{name}i18n %{major}
|
|
|
|
%define libicuio %mklibname %{name}io %{major}
|
|
|
|
%define libicule %mklibname %{name}le %{major}
|
|
|
|
%define libiculx %mklibname %{name}lx %{major}
|
|
|
|
%define libicutest %mklibname %{name}test %{major}
|
|
|
|
%define libicutu %mklibname %{name}tu %{major}
|
|
|
|
%define libicuuc %mklibname %{name}uc %{major}
|
2014-06-17 16:24:23 +04:00
|
|
|
%define devname %mklibname %{name} -d
|
2012-08-07 00:14:51 +00:00
|
|
|
|
2014-06-17 16:24:23 +04:00
|
|
|
%define tarballver %(echo %{version}|sed -e 's|\\.|_|g')
|
2016-09-07 12:33:55 +10:00
|
|
|
%bcond_with crosscompile
|
2019-05-20 16:19:32 +10:00
|
|
|
%bcond_with tests
|
2012-02-01 14:13:44 +04:00
|
|
|
|
|
|
|
Summary: International Components for Unicode
|
|
|
|
Name: icu
|
|
|
|
Epoch: 1
|
2016-09-07 12:33:55 +10:00
|
|
|
Version: 57.1
|
2020-09-15 10:55:54 +03:00
|
|
|
Release: 9
|
2012-02-01 14:13:44 +04:00
|
|
|
License: MIT
|
|
|
|
Group: System/Libraries
|
2014-06-17 16:24:23 +04:00
|
|
|
Url: http://www.icu-project.org/index.html
|
2012-02-01 14:13:44 +04:00
|
|
|
Source0: http://download.icu-project.org/files/icu4c/%{version}/%{name}4c-%{tarballver}-src.tgz
|
|
|
|
Source1: http://download.icu-project.org/files/icu4c/%{version}/%{name}4c-%{tarballver}-docs.zip
|
2012-08-07 00:14:51 +00:00
|
|
|
Patch0: %{name}4c-49.1-setBreakType.patch
|
2019-05-20 15:52:05 +10:00
|
|
|
Patch1: icu-57.1-ICU-12936.patch
|
2016-09-07 12:33:55 +10:00
|
|
|
# From Fedora package
|
|
|
|
Patch10: icu.7601.Indic-ccmp.patch
|
|
|
|
Patch11: icu.8198.revert.icu5431.patch
|
|
|
|
Patch12: icu.8800.freeserif.crash.patch
|
2020-09-15 10:55:54 +03:00
|
|
|
# From Debian
|
|
|
|
Patch20: CVE-2016-6293.patch
|
|
|
|
Patch21: CVE-2016-7415.patch
|
|
|
|
Patch22: CVE-2017-7867_CVE-2017-7868.patch
|
|
|
|
Patch23: CVE-2017-14952.patch
|
|
|
|
Patch24: CVE-2017-15422.patch
|
|
|
|
Patch25: CVE-2020-10531.patch
|
|
|
|
|
2012-02-01 14:13:44 +04:00
|
|
|
BuildRequires: doxygen
|
|
|
|
|
|
|
|
%description
|
|
|
|
The International Components for Unicode (ICU) libraries provide robust and
|
|
|
|
full-featured Unicode services on a wide variety of platforms. ICU supports
|
|
|
|
the most current version of the Unicode standard, and they provide support
|
|
|
|
for supplementary Unicode characters (needed for GB 18030 repertoire support).
|
|
|
|
|
|
|
|
As computing environments become more heterogeneous, software portability
|
|
|
|
becomes more important. ICU lets you produce the same results across all the
|
|
|
|
various platforms you support, without sacrificing performance. It offers
|
|
|
|
great flexibility to extend and customize the supplied services, which
|
|
|
|
include:
|
|
|
|
|
|
|
|
* Text: Unicode text handling, full character properties and character set
|
|
|
|
conversions (500+ codepages)
|
|
|
|
* Analysis: Unicode regular expressions; full Unicode sets; character, word
|
|
|
|
and line boundaries
|
|
|
|
* Comparison: Language sensitive collation and searching
|
|
|
|
* Transformations: normalization, upper/lowercase, script transliterations
|
|
|
|
(50+ pairs)
|
|
|
|
* Locales: Comprehensive locale data (230+) and resource bundle architecture
|
|
|
|
* Complex Text Layout: Arabic, Hebrew, Indic and Thai
|
|
|
|
* Time: Multi-calendar and time zone
|
|
|
|
* Formatting and Parsing: dates, times, numbers, currencies, messages and
|
|
|
|
rule based
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files
|
|
|
|
%{_bindir}/*
|
|
|
|
%exclude %{_bindir}/icu-config
|
|
|
|
%{_sbindir}/*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-02-01 14:13:44 +04:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation for the International Components for Unicode
|
2016-09-07 12:33:55 +10:00
|
|
|
Group: Documentation
|
2012-08-07 00:14:51 +00:00
|
|
|
Requires: %{name} >= %{EVRD}
|
2012-02-01 14:13:44 +04:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for the International Components for Unicode.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files doc
|
|
|
|
%doc readme.html docs/*
|
|
|
|
%{_mandir}/man1/*
|
|
|
|
%{_mandir}/man8/*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libicudata}
|
|
|
|
Summary: Library for the International Components for Unicode - icudata
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libicudata}
|
|
|
|
Library for the International Components for Unicode - icudata.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libicudata}
|
|
|
|
%{_libdir}/libicudata.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libicui18n}
|
|
|
|
Summary: Library for the International Components for Unicode - icui18n
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libicui18n}
|
|
|
|
Library for the International Components for Unicode - icui18n.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libicui18n}
|
|
|
|
%{_libdir}/libicui18n.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libicuio}
|
|
|
|
Summary: Library for the International Components for Unicode - icuio
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libicuio}
|
|
|
|
Library for the International Components for Unicode - icuio.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libicuio}
|
|
|
|
%{_libdir}/libicuio.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libicule}
|
|
|
|
Summary: Library for the International Components for Unicode - icule
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libicule}
|
|
|
|
Library for the International Components for Unicode - icule.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libicule}
|
|
|
|
%{_libdir}/libicule.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libiculx}
|
|
|
|
Summary: Library for the International Components for Unicode - iculx
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libiculx}
|
|
|
|
Library for the International Components for Unicode - iculx.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libiculx}
|
|
|
|
%{_libdir}/libiculx.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libicutest}
|
|
|
|
Summary: Library for the International Components for Unicode - icutest
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libicutest}
|
|
|
|
Library for the International Components for Unicode - icutest.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libicutest}
|
|
|
|
%{_libdir}/libicutest.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libicutu}
|
|
|
|
Summary: Library for the International Components for Unicode - icutu
|
2012-02-01 14:13:44 +04:00
|
|
|
Group: System/Libraries
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%description -n %{libicutu}
|
|
|
|
Library for the International Components for Unicode - icutu.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libicutu}
|
|
|
|
%{_libdir}/libicutu.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:14:51 +00:00
|
|
|
%package -n %{libicuuc}
|
|
|
|
Summary: Library for the International Components for Unicode - icuuc
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libicuuc}
|
|
|
|
Library for the International Components for Unicode - icuuc.
|
2012-02-01 14:13:44 +04:00
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{libicuuc}
|
|
|
|
%{_libdir}/libicuuc.so.%{major}*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2014-06-17 16:24:23 +04:00
|
|
|
%package -n %{devname}
|
2012-02-01 14:13:44 +04:00
|
|
|
Summary: Development files for the International Components for Unicode
|
|
|
|
Group: Development/Other
|
2016-09-07 12:33:55 +10:00
|
|
|
Requires: %{libicudata} = %{EVRD}
|
|
|
|
Requires: %{libicui18n} = %{EVRD}
|
|
|
|
Requires: %{libicuio} = %{EVRD}
|
|
|
|
Requires: %{libicule} = %{EVRD}
|
|
|
|
Requires: %{libiculx} = %{EVRD}
|
|
|
|
Requires: %{libicutest} = %{EVRD}
|
|
|
|
Requires: %{libicutu} = %{EVRD}
|
|
|
|
Requires: %{libicuuc} = %{EVRD}
|
2012-08-07 00:14:51 +00:00
|
|
|
Provides: %{name}%{major}-devel = %{EVRD}
|
|
|
|
Provides: %{name}-devel = %{EVRD}
|
2012-02-01 14:13:44 +04:00
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%description -n %{devname}
|
2012-02-01 14:13:44 +04:00
|
|
|
Development files and headers for the International Components for Unicode.
|
|
|
|
|
2016-09-07 12:33:55 +10:00
|
|
|
%files -n %{devname}
|
|
|
|
%{_bindir}/icu-config
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%dir %{_includedir}/layout
|
|
|
|
%dir %{_includedir}/unicode
|
|
|
|
%{_includedir}/layout/*
|
|
|
|
%{_includedir}/unicode/*
|
|
|
|
%dir %{_libdir}/%{name}
|
|
|
|
%{_libdir}/%{name}/*
|
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%{_datadir}/%{name}/*
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-02-01 14:13:44 +04:00
|
|
|
%prep
|
2014-06-17 16:24:23 +04:00
|
|
|
%setup -qn %{name}
|
2012-02-01 14:13:44 +04:00
|
|
|
%patch0 -p1 -b .setBreakType
|
2019-05-20 15:52:05 +10:00
|
|
|
%patch1 -p1
|
2016-09-07 12:33:55 +10:00
|
|
|
%patch10 -p1
|
|
|
|
%patch11 -p2 -R
|
|
|
|
%patch12 -p1
|
2020-09-15 10:55:54 +03:00
|
|
|
%patch20 -p1
|
|
|
|
%patch21 -p1
|
|
|
|
%patch22 -p1
|
|
|
|
%patch23 -p1
|
|
|
|
%patch24 -p1
|
|
|
|
%patch25 -p1
|
2012-02-01 14:13:44 +04:00
|
|
|
|
|
|
|
mkdir -p docs
|
|
|
|
cd docs
|
|
|
|
unzip -q %{SOURCE1}
|
|
|
|
cd -
|
|
|
|
|
|
|
|
%build
|
|
|
|
pushd source
|
|
|
|
# (tpg) needed for patch 2
|
2012-08-07 00:14:51 +00:00
|
|
|
export CFLAGS='%{optflags} -fno-strict-aliasing'
|
|
|
|
export CXXFLAGS='%{optflags} -fno-strict-aliasing'
|
2014-06-17 16:24:23 +04:00
|
|
|
# If we want crosscompile icu we need to built ICU package
|
|
|
|
# and add --with-cross-build=/path/to/icu
|
|
|
|
# disable bits and do unset TARGET twice, after configure
|
|
|
|
# and before makeinstall
|
2012-02-01 14:13:44 +04:00
|
|
|
%configure2_5x \
|
2014-06-17 16:24:23 +04:00
|
|
|
%if !%{with crosscompile}
|
2012-02-01 14:13:44 +04:00
|
|
|
--with-library-bits=64else32 \
|
2014-06-17 16:24:23 +04:00
|
|
|
%endif
|
2012-02-01 14:13:44 +04:00
|
|
|
--with-data-packaging=library \
|
2014-06-17 16:24:23 +04:00
|
|
|
%if %{with crosscompile}
|
|
|
|
--with-cross-build=/path/to/built/icu/source/ \
|
|
|
|
%endif
|
2012-02-01 14:13:44 +04:00
|
|
|
--disable-samples
|
2014-06-17 16:24:23 +04:00
|
|
|
%if %{with crosscompile}
|
|
|
|
unset TARGET
|
|
|
|
%endif
|
2012-02-01 14:13:44 +04:00
|
|
|
%make
|
|
|
|
%make doc
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
2014-06-17 16:24:23 +04:00
|
|
|
%if %{with crosscompile}
|
|
|
|
unset TARGET
|
|
|
|
%endif
|
|
|
|
%makeinstall_std -C source
|
2012-02-01 14:13:44 +04:00
|
|
|
|
2019-05-20 16:19:32 +10:00
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
pushd source
|
|
|
|
make check
|
|
|
|
popd
|
|
|
|
%endif
|
|
|
|
|