This commit is contained in:
Sergey Zhemoytel 2022-10-11 00:28:37 +03:00
parent 54da52d6ab
commit 3ae2d8d8b4
2 changed files with 43 additions and 32 deletions

View file

@ -1,3 +1,5 @@
sources: sources:
icu4c-57_1-src.tgz: ca5f5cc584f45e87bf56bf8b7f9244d12a5ada67
icu4c-57_1-docs.zip: 1678cf37ce454c967e046926f92c6235b796956f icu4c-57_1-docs.zip: 1678cf37ce454c967e046926f92c6235b796956f
icu4c-57_1-src.tgz: ca5f5cc584f45e87bf56bf8b7f9244d12a5ada67
icu4c-68_1-docs.zip: eca7b9cb843211b0ebe4241d4d93d4c8e48bac85
icu4c-68_1-src.tgz: 7660c573d496c2a54eb3369ccf241976e164af02

View file

@ -10,19 +10,21 @@
%define devname %mklibname %{name} -d %define devname %mklibname %{name} -d
%define tarballver %(echo %{version}|sed -e 's|\\.|_|g') %define tarballver %(echo %{version}|sed -e 's|\\.|_|g')
%define releasever %(echo %{version}|sed -e 's|\\.|-|g')
%bcond_with crosscompile %bcond_with crosscompile
%bcond_with tests %bcond_with tests
Summary: International Components for Unicode Summary: International Components for Unicode
Name: icu Name: icu
Epoch: 1 #Epoch: 1
Version: 57.1 Version: 68.1
Release: 9 Release: 1
License: MIT License: MIT
Group: System/Libraries Group: System/Libraries
Url: http://www.icu-project.org/index.html URL: https://icu.unicode.org
Source0: http://download.icu-project.org/files/icu4c/%{version}/%{name}4c-%{tarballver}-src.tgz Source0: https://github.com/unicode-org/icu/releases/download/release-%{releasever}/%{name}4c-%{tarballver}-src.tgz
Source1: http://download.icu-project.org/files/icu4c/%{version}/%{name}4c-%{tarballver}-docs.zip Source1: https://github.com/unicode-org/icu/releases/download/release-%{releasever}/%{name}4c-%{tarballver}-docs.zip
Patch0: %{name}4c-49.1-setBreakType.patch Patch0: %{name}4c-49.1-setBreakType.patch
Patch1: icu-57.1-ICU-12936.patch Patch1: icu-57.1-ICU-12936.patch
# From Fedora package # From Fedora package
@ -38,6 +40,7 @@ Patch24: CVE-2017-15422.patch
Patch25: CVE-2020-10531.patch Patch25: CVE-2020-10531.patch
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: clang
%description %description
The International Components for Unicode (ICU) libraries provide robust and The International Components for Unicode (ICU) libraries provide robust and
@ -216,17 +219,17 @@ Development files and headers for the International Components for Unicode.
%prep %prep
%setup -qn %{name} %setup -qn %{name}
%patch0 -p1 -b .setBreakType #patch0 -p1 -b .setBreakType
%patch1 -p1 #patch1 -p1
%patch10 -p1 #patch10 -p1
%patch11 -p2 -R #patch11 -p2 -R
%patch12 -p1 #patch12 -p1
%patch20 -p1 #patch20 -p1
%patch21 -p1 #patch21 -p1
%patch22 -p1 #patch22 -p1
%patch23 -p1 #patch23 -p1
%patch24 -p1 #patch24 -p1
%patch25 -p1 #patch25 -p1
mkdir -p docs mkdir -p docs
cd docs cd docs
@ -235,25 +238,31 @@ cd -
%build %build
pushd source pushd source
./configure \
--prefix=%{_prefix}
# (tpg) needed for patch 2 # (tpg) needed for patch 2
export CFLAGS='%{optflags} -fno-strict-aliasing' #export CFLAGS='%{optflags} -fno-strict-aliasing'
export CXXFLAGS='%{optflags} -fno-strict-aliasing' #export CXXFLAGS='%{optflags} -fno-strict-aliasing'
# If we want crosscompile icu we need to built ICU package # If we want crosscompile icu we need to built ICU package
# and add --with-cross-build=/path/to/icu # and add --with-cross-build=/path/to/icu
# disable bits and do unset TARGET twice, after configure # disable bits and do unset TARGET twice, after configure
# and before makeinstall # and before makeinstall
%configure2_5x \ #configure2_5x \
%if !%{with crosscompile} #if !%{with crosscompile}
--with-library-bits=64else32 \ # --with-library-bits=64else32 \
%endif #endif
--with-data-packaging=library \ # --with-data-packaging=library \
%if %{with crosscompile} #if %{with crosscompile}
--with-cross-build=/path/to/built/icu/source/ \ # --with-cross-build=/path/to/built/icu/source/ \
%endif #endif
--disable-samples # --disable-samples
%if %{with crosscompile} #if %{with crosscompile}
unset TARGET #unset TARGET
%endif #endif
%make %make
%make doc %make doc
popd popd