blob: 607d9c8866503b045373ae83ee553989e3d3bd92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
%bcond_without build_compat
%if %{with build_compat}
%define compat_version 74.1
%define compat_tarballver %(echo %compat_version|tr '.' '_')
%define compat_dashver %(echo %compat_version|tr '.' '-')
%endif
%define tarballver %(echo %version|tr '.' '_')
%define dashver %(echo %version|tr '.' '-')
Name: icu
Version: 76.1
Release: 1
Summary: International Components for Unicode
License: Unicode-DFS-2016 AND BSD-2-Clause AND BSD-3-Clause AND Public Domain
URL: https://icu.unicode.org/
Source0: https://github.com/unicode-org/icu/releases/download/release-%{dashver}/icu4c-%{tarballver}-src.tgz
Source1: https://github.com/unicode-org/icu/releases/download/release-%{dashver}/icu4c-%{tarballver}-data.zip
Source2: icu-config.sh
%if %{with build_compat}
Source10: https://github.com/unicode-org/icu/releases/download/release-%{compat_dashver}/icu4c-%{compat_tarballver}-src.tgz
%endif
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: autoconf >= 2.72
BuildRequires: doxygen
BuildRequires: python3
Requires: lib%{name} = %{version}-%{release}
Patch1: gennorm2-man.patch
Patch2: icuinfo-man.patch
Patch3: backport-remove-TestJitterbug6175.patch
Patch4: icu-Add-sw64-architecture.patch
Patch10: icu-Add-sw64-architecture-compat.patch
%description
Tools and utilities for developing with icu.
%package -n libicu
Summary: libs package for icu
%description -n libicu
libs package for icu
%package -n libicu-devel
Summary: header files for libicu
Requires: libicu = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
%description -n libicu-devel
header files for libicu
%package_help
%{!?endian: %global endian %(%{__python3} -c "import sys;print (0 if sys.byteorder=='big' else 1)")}
# " this line just fixes syntax highlighting for vim that is confused by the above and continues literal
%prep
%setup -qn %{name}
%autopatch -p1 -M9
pushd source
rm -fr data
%{__rpmuncompress} -x %{S:1}
grep -rl 'Indochina' . | xargs sed -i "s/Indochina/Ondochine/g"
popd
%if %{with build_compat}
%{__rpmuncompress} -x %{S:10}
pushd icu
%autopatch -m10 -p1
popd
%endif
%build
pushd source
autoconf
CFLAGS='%optflags -fno-strict-aliasing'
CXXFLAGS='%optflags -fno-strict-aliasing'
# Endian: BE=0 LE=1
%if ! 0%{?endian}
CPPFLAGS='-DU_IS_BIG_ENDIAN=1'
%endif
OPTIONS='--with-data-packaging=library --disable-samples'
%if 0%{?debugtrace}
OPTIONS=$OPTIONS' --enable-debug --enable-tracing'
%endif
%configure $OPTIONS
sed -i 's|-nodefaultlibs -nostdlib||' config/mh-linux
sed -i 's| \$(docfilesdir)/installdox||' Makefile
sed -i '/^\s\+\$(INSTALL_DATA) \$(docsrchfiles) \$(DESTDIR)\$(docdir)\/\$(docsubsrchdir)\s*$/d' Makefile
test -f uconfig.h.prepend && sed -e '/^#define __UCONFIG_H__/ r uconfig.h.prepend' -i common/unicode/uconfig.h
sed -i -r 's|(PKGDATA_OPTS = )|\1-v |' data/Makefile
%make_build
%make_build doc
popd
%if %{with build_compat}
pushd icu/source
autoconf
%configure --with-data-packaging=library --disable-samples --disable-tests
sed -i 's|-nodefaultlibs -nostdlib||' config/mh-linux
sed -i 's| \$(docfilesdir)/installdox||' Makefile
sed -i '/^\s\+\$(INSTALL_DATA) \$(docsrchfiles) \$(DESTDIR)\$(docdir)\/\$(docsubsrchdir)\s*$/d' Makefile
test -f uconfig.h.prepend && sed -e '/^#define __UCONFIG_H__/ r uconfig.h.prepend' -i common/unicode/uconfig.h
sed -i -r 's|(PKGDATA_OPTS = )|\1-v |' data/Makefile
%make_build
popd
%endif
%install
rm -rf source/__docs
%make_install -C source
rm -f %{buildroot}%{_datadir}/icu/%{version}/LICENSE
make -C source install-doc docdir=__docs
chmod +x %{buildroot}%{_libdir}/*.so.*
(
cd %{buildroot}%{_bindir}
mv icu-config icu-config-%{__isa_bits}
)
install -p -m755 -D %{S:2} %{buildroot}%{_bindir}/icu-config
%if %{with build_compat}
pushd icu/source
install -p -m755 lib/*.so.* %{buildroot}%{_libdir}/
popd
%endif
%check
if grep -q @VERSION@ source/tools/*/*.8 source/tools/*/*.1 source/config/*.1; then
exit 1
fi
%make_build -C source check
pushd source
LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l
popd
%files
%license license.html LICENSE
%{_bindir}/derb
%{_bindir}/gen*
%{_bindir}/makeconv
%{_bindir}/pkgdata
%{_bindir}/uconv
%{_bindir}/icuexportdata
%{_sbindir}/*
%files -n libicu
%license license.html LICENSE
%{_libdir}/*.so.*
%files -n libicu-devel
%{_bindir}/%{name}-config*
%{_bindir}/icuinfo
%{_includedir}/unicode
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{name}
%{_datadir}/%{name}/%{version}/install-sh
%{_datadir}/%{name}/%{version}/mkinstalldirs
%{_datadir}/%{name}/%{version}/config
%files help
%doc readme.html
%doc source/__docs/%{name}/html/*
%{_mandir}/man1/*
%{_mandir}/man8/*
%changelog
* Sun Oct 27 2024 Funda Wang <fundawang@yeah.net> - 76.1-1
- update to 76.1
- build compat lib within single package, instead of relying on built package
- drop binary diff in favour of building data from scratch
- mark patch unconditioned
- loongarch patch merged upstream
* Wed Mar 27 2024 zhangpan<zhangpan103@h-partners.com> - 74.1-2
- delete libicu*.so.73*
* Wed Jan 24 2024 zhangpan<zhangpan103@h-partners.com> - 74.1-1
- update to 74.1
* Tue Sep 19 2023 zhouwenpei<zhouwenpei@h-partners.com> - 73.2-3
- Fix broken TestHebrewCalendarInTemporalLeapYear
* Mon Sep 11 2023 zhangpan<zhangpan103@h-partners.com> - 73.2-2
- delete libicu*.so.72*
* Mon Jul 24 2023 zhangpan<zhangpan103@h-partners.com> - 73.2-1
- update to 73.2
* Tue Jun 13 2023 zhangpan<zhangpan103@h-partners.com> - 72.1-6
- delete taboo words
* Thu Dec 15 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 72.1-5
- delete redundant files
* Mon Nov 21 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 72.1-4
- Optimize the patch for add loongarch64 architecture
* Mon Nov 21 2022 wuzx <wuzx1226@qq.com> - 72.1-3
- Add sw64 architecture
* Fri Nov 18 2022 huajingyun <huajingyun@loongson.cn> - 72.1-2
- add loongarch64 support
* Tue Nov 15 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 72.1-1
- update to icu4c-72.1
* Sat Jun 25 2020 hanhui <hanhui15@h-partners.com> - 69.1-3
- fix build failed
* Thu Jul 16 2020 hanhui <hanhui15@h-partners.com> - 69.1-2
- delete libicu*.so.67*
* Sun Nov 07 2021 sdlzx <hdu_sdlzx@163.com> - 69.1
- update to icu4c-69.1
* Wed Oct 21 2020 jinzhimin<jinzhimin2@huawei.com> - 67.1-2
- modify buildrequire to python3
* Thu Jul 16 2020 hanhui <hanhui15@huawei.com> - 67.1
- update to icu4c-67.1
* Fri Mar 20 2020 gulining <gulining1@huawei.com> - 62.1-5
- fix CVE-2020-10531
* Tue Mar 10 2020 songnannan <songnannan2@huawei.com> - 62.1-4
- bugfix memory leak
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 62.1-3
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:optimization the spec
* Fri Nov 1 2019 openEuler Buildteam <buildteam@openeuler.org> - 62.1-2
- Package init
|