commit 45718f657083847314743b0f99b9fa6380ed8a42 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:53:06 2019 -0400 Package init diff --git a/armv7hl-disable-tests.patch b/armv7hl-disable-tests.patch new file mode 100644 index 0000000..2d869b1 --- /dev/null +++ b/armv7hl-disable-tests.patch @@ -0,0 +1,96 @@ +diff -ru orig.icu/source/test/cintltst/cnmdptst.c icu/source/test/cintltst/cnmdptst.c +--- orig.icu/source/test/cintltst/cnmdptst.c 2016-03-23 21:48:18.000000000 +0100 ++++ icu/source/test/cintltst/cnmdptst.c 2016-04-15 18:34:06.148251985 +0200 +@@ -186,6 +186,12 @@ + /* Test exponential pattern*/ + static void TestExponential(void) + { ++/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ ++#if 1 ++ /* Actually only 3 tests fail, but given the nested structure depending on ++ * array sizes there's no simple "disable this and that". */ ++ return; ++#endif + int32_t pat_length, val_length, lval_length; + int32_t ival, ilval, p, v, lneed; + UNumberFormat *fmt; +diff -ru orig.icu/source/test/intltest/dcfmtest.cpp icu/source/test/intltest/dcfmtest.cpp +--- orig.icu/source/test/intltest/dcfmtest.cpp 2016-03-23 21:48:38.000000000 +0100 ++++ icu/source/test/intltest/dcfmtest.cpp 2016-04-15 18:34:06.148251985 +0200 +@@ -279,6 +279,13 @@ + // + formatLineMat.reset(testLine); + if (formatLineMat.lookingAt(status)) { ++/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ ++#if 1 ++// [Formattable] file dcfmtest.txt, line 62: expected "12.35E5", got "1.235E6" ++// [StringPiece] file dcfmtest.txt, line 62: expected "12.35E5", got "1.235E6" ++ if (lineNum == 62) ++ continue; ++#endif + execFormatTest(lineNum, + formatLineMat.group(1, status), // Pattern + formatLineMat.group(2, status), // rounding mode +diff -ru orig.icu/source/test/intltest/numfmtspectest.cpp icu/source/test/intltest/numfmtspectest.cpp +--- orig.icu/source/test/intltest/numfmtspectest.cpp 2016-03-23 21:48:40.000000000 +0100 ++++ icu/source/test/intltest/numfmtspectest.cpp 2016-04-15 18:34:06.148251985 +0200 +@@ -137,11 +137,14 @@ + + void NumberFormatSpecificationTest::TestScientificNotation() { + assertPatternFr("1,23E4", 12345.0, "0.00E0", TRUE); ++/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ ++#if 0 + assertPatternFr("123,00E2", 12300.0, "000.00E0", TRUE); + assertPatternFr("123,0E2", 12300.0, "000.0#E0", TRUE); + assertPatternFr("123,0E2", 12300.1, "000.0#E0", TRUE); + assertPatternFr("123,01E2", 12301.0, "000.0#E0", TRUE); + assertPatternFr("123,01E+02", 12301.0, "000.0#E+00", TRUE); ++#endif + assertPatternFr("12,3E3", 12345.0, "##0.00E0", TRUE); + assertPatternFr("12,300E3", 12300.1, "##0.0000E0", TRUE); + assertPatternFr("12,30E3", 12300.1, "##0.000#E0", TRUE); +@@ -221,6 +224,8 @@ + assertEquals("", "USD (433.22)", result, TRUE); + } + } ++/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ ++#if 0 + const char *paddedSciPattern = "QU**00.#####E0"; + assertPatternFr("QU***43,3E-1", 4.33, paddedSciPattern, TRUE); + { +@@ -242,6 +247,7 @@ + } + // padding cannot work as intended with scientific notation. + assertPatternFr("QU**43,32E-1", 4.332, paddedSciPattern, TRUE); ++#endif + } + + void NumberFormatSpecificationTest::assertPatternFr( +diff -ru orig.icu/source/test/intltest/numfmtst.cpp icu/source/test/intltest/numfmtst.cpp +--- orig.icu/source/test/intltest/numfmtst.cpp 2016-03-23 21:48:40.000000000 +0100 ++++ icu/source/test/intltest/numfmtst.cpp 2016-04-15 18:34:06.150251997 +0200 +@@ -730,6 +730,12 @@ + void + NumberFormatTest::TestExponential(void) + { ++/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ ++#if 1 ++ /* Actually only 3 tests fail, but given the nested structure depending on ++ * array sizes there's no simple "disable this and that". */ ++ return; ++#endif + UErrorCode status = U_ZERO_ERROR; + DecimalFormatSymbols sym(Locale::getUS(), status); + if (U_FAILURE(status)) { errcheckln(status, "FAIL: Bad status returned by DecimalFormatSymbols ct - %s", u_errorName(status)); return; } +@@ -1846,8 +1852,11 @@ + (int32_t) 45678000, "5E7", status); + expect(new DecimalFormat("00E0", US, status), + (int32_t) 45678000, "46E6", status); ++/* erAck: fails on armv7hl, https://bugzilla.redhat.com/show_bug.cgi?id=1239574 */ ++#if 0 + expect(new DecimalFormat("000E0", US, status), + (int32_t) 45678000, "457E5", status); ++#endif + /* + expect(new DecimalFormat("###E0", US, status), + new Object[] { new Double(0.0000123), "12.3E-6", diff --git a/gennorm2-man.patch b/gennorm2-man.patch new file mode 100644 index 0000000..07b5b9d --- /dev/null +++ b/gennorm2-man.patch @@ -0,0 +1,128 @@ +Description: supply manual page for program that doesn't have one +Author: Jay Berkenbilt +Bug: http://bugs.icu-project.org/trac/ticket/7554 + +diff -r -u -N icu.orig/source/tools/gennorm2/gennorm2.8.in icu/source/tools/gennorm2/gennorm2.8.in +--- icu.orig/source/tools/gennorm2/gennorm2.8.in 1970-01-01 01:00:00.000000000 +0100 ++++ icu/source/tools/gennorm2/gennorm2.8.in 2013-02-25 16:43:28.297062638 +0100 +@@ -0,0 +1,71 @@ ++.\" Hey, Emacs! This is -*-nroff-*- you know... ++.\" ++.\" gennorm2.8: manual page for the gennorm2 utility ++.\" ++.\" Copyright (C) 2005-2006 International Business Machines Corporation and others ++.\" ++.TH GENNORM2 8 "15 March 2010" "ICU MANPAGE" "ICU @VERSION@ Manual" ++.SH NAME ++.B gennorm2 ++\- Builds binary data file with Unicode normalization data. ++.SH SYNOPSIS ++.B gennorm2 ++[ ++.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" ++] ++[ ++.BR "\-V\fP, \fB\-\-version" ++] ++[ ++.BR "\-c\fP, \fB\-\-copyright" ++] ++[ ++.BR "\-v\fP, \fB\-\-verbose" ++] ++[ ++.BI "\-u\fP, \fB\-\-unicode" " unicode\-version\-number" ++] ++[ ++.BI "\-s\fP, \fB\-\-sourcedir" " source\-directory" ++] ++[ ++.BI "\-o\fP, \fB\-\-output" " output\-filename" ++] ++.BI "\fB\-\-fast" ++.SH DESCRIPTION ++.B gennorm2 ++reads text files that define Unicode normalization, ++them, and builds a binary data file. ++.SH OPTIONS ++.TP ++.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" ++Print help about usage and exit. ++.TP ++.BR "\-V\fP, \fB\-\-version" ++Print the version of ++.B gennorm2 ++and exit. ++.TP ++.BR "\-c\fP, \fB\-\-copyright" ++Include a copyright notice. ++.TP ++.BR "\-v\fP, \fB\-\-verbose" ++Display extra informative messages during execution. ++.TP ++.BR "\-u\fP, \fB\-\-unicode" ++Specify Unicode version number, such as 5.2.0. ++.TP ++.BI "\-s\fP, \fB\-\-sourcedir" " source\-directory" ++Specify the input directory. ++.TP ++.BI "\-s\fP, \fB\-\-sourcedir" " source\-directory" ++Set the name of the output file. ++.TP ++.BI "\fB\-\-fast" ++optimize the .nrm file for fast normalization, ++which might increase its size (Writes fully decomposed ++regular mappings instead of delta mappings. ++You should measure the runtime speed to make sure that ++this is a good trade-off.) ++.SH COPYRIGHT ++Copyright (C) 2009-2010 International Business Machines Corporation and others +diff -r -u -N icu.orig/source/tools/gennorm2/Makefile.in icu/source/tools/gennorm2/Makefile.in +--- icu.orig/source/tools/gennorm2/Makefile.in 2013-01-11 01:23:32.000000000 +0100 ++++ icu/source/tools/gennorm2/Makefile.in 2013-02-25 16:43:28.296062632 +0100 +@@ -16,8 +16,13 @@ + + TARGET_STUB_NAME = gennorm2 + ++SECTION = 8 ++ ++MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) ++ ++ + ## Extra files to remove for 'make clean' +-CLEANFILES = *~ $(DEPS) ++CLEANFILES = *~ $(DEPS) $(MAN_FILES) + + ## Target information + TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT) +@@ -44,12 +49,16 @@ + dist: dist-local + check: all check-local + +-all-local: $(TARGET) ++all-local: $(TARGET) $(MAN_FILES) + +-install-local: all-local ++install-local: all-local install-man + $(MKINSTALLDIRS) $(DESTDIR)$(sbindir) + $(INSTALL) $(TARGET) $(DESTDIR)$(sbindir) + ++install-man: $(MAN_FILES) ++ $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION) ++ $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION) ++ + dist-local: + + clean-local: +@@ -70,6 +79,11 @@ + $(POST_BUILD_STEP) + + ++%.$(SECTION): $(srcdir)/%.$(SECTION).in ++ cd $(top_builddir) \ ++ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status ++ ++ + ifeq (,$(MAKECMDGOALS)) + -include $(DEPS) + else diff --git a/icu-config.sh b/icu-config.sh new file mode 100644 index 0000000..5779637 --- /dev/null +++ b/icu-config.sh @@ -0,0 +1,11 @@ +#!/bin/sh +OOO_ARCH=$(uname -m) +case $OOO_ARCH in + x86_64 | s390x | ppc64 | sparc64 | aarch64 | ppc64le | mips64 | mips64el | riscv64) + bits=64 + ;; + * ) + bits=32 + ;; +esac +exec icu-config-$bits "$@" diff --git a/icu.spec b/icu.spec new file mode 100644 index 0000000..1f655b1 --- /dev/null +++ b/icu.spec @@ -0,0 +1,150 @@ +Name: icu +Version: 63.2 +Release: 3 +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-63-2/icu4c-63_2-src.tgz +Source1: icu-config.sh + +BuildRequires: gcc gcc-c++ doxygen autoconf python2 icu libicu-devel +Requires: lib%{name} = %{version}-%{release} + +Patch4: gennorm2-man.patch +Patch5: icuinfo-man.patch +%ifarch armv7hl +Patch100: armv7hl-disable-tests.patch +%endif + +%description +Tools and utilities for developing with icu. + +%package -n libicu +Summary: libs package for icu + +%description -n libicu +libs package for icu +e +%package -n libicu-devel +Summary: header files for libicu +Requires: lib%{name} = %{version}-%{release} pkgconfig + +%description -n libicu-devel +header files for libicu + +%package_help + +%{!?endian: %global endian %(%{__python} -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 +%autosetup -n %{name} -p1 + +%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 %{?_smp_mflags} VERBOSE=1 +make %{?_smp_mflags} doc + + +%install +rm -rf $RPM_BUILD_ROOT source/__docs +make %{?_smp_mflags} -C source install DESTDIR=$RPM_BUILD_ROOT +make %{?_smp_mflags} -C source install-doc docdir=__docs +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 + +#Include previous icu version for temporary binary compatibility +cp -a %{_libdir}/libicu*.so* %{buildroot}%{_libdir} + + +%check +if grep -q @VERSION@ source/tools/*/*.8 source/tools/*/*.1 source/config/*.1; then + exit 1 +fi +make %{?_smp_mflags} -C source check + + +pushd source +LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l + + +%ldconfig_scriptlets libicu + + +%files +%defattr(-,root,root) +%license license.html LICENSE +%exclude %{_datadir}/%{name}/*/LICENSE +%{_bindir}/derb +%{_bindir}/gen* +%{_bindir}/makeconv +%{_bindir}/pkgdata +%{_bindir}/uconv +%{_sbindir}/* + +%files -n libicu +%defattr(-,root,root) +%license license.html LICENSE +%{_libdir}/*.so.* + +%files -n libicu-devel +%defattr(-,root,root) +%doc source/samples/ +%{_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 +%defattr(-,root,root) +%doc readme.html +%doc source/__docs/%{name}/html/* +%{_mandir}/man1/* +%{_mandir}/man8/* + + +%changelog +* Wed Sep 25 2019 openEuler Buildteam - 63.2-3 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC: provides libicu-devel(aarch64) + +* Wed Sep 25 2019 openEuler Buildteam - 63.2-2 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:add previous icu version for temporary binary compatibility + +* Sat Sep 21 2019 openEuler Buildteam - 63.2-1 +- Package init diff --git a/icu4c-63_2-src.tgz b/icu4c-63_2-src.tgz new file mode 100644 index 0000000..8cc5e17 Binary files /dev/null and b/icu4c-63_2-src.tgz differ diff --git a/icuinfo-man.patch b/icuinfo-man.patch new file mode 100644 index 0000000..987e879 --- /dev/null +++ b/icuinfo-man.patch @@ -0,0 +1,145 @@ +Description: supply manual page for program that doesn't have one +Author: Jay Berkenbilt +Bug: http://bugs.icu-project.org/trac/ticket/7665 +erAck: adapted to ICU 56.1 icu/source/tools/icuinfo/Makefile.in + +diff -Nur orig.icu/source/tools/icuinfo/icuinfo.1.in icu/source/tools/icuinfo/icuinfo.1.in +--- orig.icu/source/tools/icuinfo/icuinfo.1.in 1970-01-01 01:00:00.000000000 +0100 ++++ icu/source/tools/icuinfo/icuinfo.1.in 2015-10-27 19:19:35.184056800 +0100 +@@ -0,0 +1,76 @@ ++.\" Hey, Emacs! This is -*-nroff-*- you know... ++.\" ++.\" icuinfo.1: manual page for the icuinfo utility ++.\" ++.\" Copyright (C) 2005-2006 International Business Machines Corporation and others ++.\" ++.TH ICUINFO 1 "1 May 2010" "ICU MANPAGE" "ICU @VERSION@ Manual" ++.SH NAME ++.B icuinfo ++\- Shows some basic info about the current ICU ++.SH SYNOPSIS ++.B icuinfo ++[ ++.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" ++] ++[ ++.BR "\-V\fP, \fB\-\-version" ++] ++[ ++.BR "\-c\fP, \fB\-\-copyright" ++] ++[ ++.BI "\-i\fP, \fB\-\-icudatadir" " directory" ++] ++[ ++.BR "\-v\fP, \fB\-\-verbose" ++] ++[ ++.BI "\-L\fP, \fB\-\-list-plugins" ++] ++[ ++.BI "\-m\fP, \fB\-\-milisecond-time" ++] ++[ ++.BI "\-K\fP, \fB\-\-cleanup" ++] ++.SH DESCRIPTION ++.B icuinfo ++prints basic information about the current version of ICU. ++.SH OPTIONS ++.TP ++.BR "\-h\fP, \fB\-?\fP, \fB\-\-help" ++Print help about usage and exit. ++.TP ++.BR "\-V\fP, \fB\-\-version" ++Print the version of ++.B icuinfo ++and exit. ++.TP ++.BR "\-c\fP, \fB\-\-copyright" ++Embeds the standard ICU copyright into the ++.IR output-file . ++.TP ++.BR "\-v\fP, \fB\-\-verbose" ++Display extra informative messages during execution. ++.TP ++.BI "\-i\fP, \fB\-\-icudatadir" " directory" ++Look for any necessary ICU data files in ++.IR directory . ++For example, the file ++.B pnames.icu ++must be located when ICU's data is not built as a shared library. ++The default ICU data directory is specified by the environment variable ++.BR ICU_DATA . ++Most configurations of ICU do not require this argument. ++.TP ++.BI "\-L\fP, \fB\-\-list-plugins" ++If specified, list and diagnose issues with ICU plugins. ++.TP ++.BI "\-K\fP, \fB\-\-cleanup" ++Attempt to unload plugins before exiting. ++.TP ++.BI "\-m\fP, \fB\-\-milisecond-time" ++Print the current UTC time in milliseconds. ++.SH COPYRIGHT ++Copyright (C) 2010 International Business Machines Corporation and others +diff -Nur orig.icu/source/tools/icuinfo/Makefile.in icu/source/tools/icuinfo/Makefile.in +--- orig.icu/source/tools/icuinfo/Makefile.in 2015-10-08 05:53:56.000000000 +0200 ++++ icu/source/tools/icuinfo/Makefile.in 2015-10-27 19:23:19.115509906 +0100 +@@ -14,8 +14,15 @@ + ## Build directory information + subdir = tools/icuinfo + ++TARGET_STUB_NAME = icuinfo ++ ++SECTION = 1 ++ ++MAN_FILES = $(TARGET_STUB_NAME).$(SECTION) ++ ++ + ## Extra files to remove for 'make clean' +-CLEANFILES = *~ $(DEPS) $(PLUGIN_OBJECTS) $(PLUGINFILE) $(PLUGIN) ++CLEANFILES = *~ $(DEPS) $(PLUGIN_OBJECTS) $(PLUGINFILE) $(PLUGIN) $(MAN_FILES) + + ## Target information + TARGET = icuinfo$(EXEEXT) +@@ -35,7 +42,8 @@ + + ## List of phony targets + .PHONY : all all-local install install-local clean clean-local \ +-distclean distclean-local dist dist-local check check-local plugin-check ++distclean distclean-local dist dist-local check check-local plugin-check \ ++install-man + + ## Clear suffix list + .SUFFIXES : +@@ -48,12 +56,16 @@ + dist: dist-local + check: all check-local + +-all-local: $(TARGET) ++all-local: $(TARGET) $(MAN_FILES) + +-install-local: all-local ++install-local: all-local install-man + $(MKINSTALLDIRS) $(DESTDIR)$(bindir) + $(INSTALL) $(TARGET) $(DESTDIR)$(bindir) + ++install-man: $(MAN_FILES) ++ $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION) ++ $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION) ++ + dist-local: + + clean-local: +@@ -103,6 +115,10 @@ + @echo "Plugins are disabled (use --enable-plugins to enable)" + endif + ++%.$(SECTION): $(srcdir)/%.$(SECTION).in ++ cd $(top_builddir) \ ++ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status ++ + ifeq (,$(MAKECMDGOALS)) + -include $(DEPS) + else