Accepting request 247305 from home:jengelh:ports
- Build both B and L-type endianess variants of icudt53.dat so that icu-data really is arch-independent again - Add icu-error-reporting.diff OBS-URL: https://build.opensuse.org/request/show/247305 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/icu?expand=0&rev=51
This commit is contained in:
parent
6a252a6d98
commit
dbdfe05c09
64
icu-error-reporting.diff
Normal file
64
icu-error-reporting.diff
Normal file
@ -0,0 +1,64 @@
|
||||
Date: 2014-08-13 15:39:48.523887951 +0200
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
Error messages are totally useless without the actual error cause!
|
||||
---
|
||||
source/tools/toolutil/package.cpp | 5 +++--
|
||||
source/tools/toolutil/writesrc.c | 6 ++++--
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: icu/source/tools/toolutil/package.cpp
|
||||
===================================================================
|
||||
--- icu.orig/source/tools/toolutil/package.cpp
|
||||
+++ icu/source/tools/toolutil/package.cpp
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "package.h"
|
||||
#include "cmemory.h"
|
||||
|
||||
+#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -751,7 +752,7 @@ Package::writePackage(const char *filena
|
||||
// create the file and write its contents
|
||||
file=fopen(filename, "wb");
|
||||
if(file==NULL) {
|
||||
- fprintf(stderr, "icupkg: unable to create file \"%s\"\n", filename);
|
||||
+ fprintf(stderr, "icupkg: unable to create file \"%s\": %s\n", filename, strerror(errno));
|
||||
exit(U_FILE_ACCESS_ERROR);
|
||||
}
|
||||
|
||||
@@ -1172,7 +1173,7 @@ Package::extractItem(const char *filesPa
|
||||
makeFullFilenameAndDirs(filesPath, outName, filename, (int32_t)sizeof(filename));
|
||||
file=fopen(filename, "wb");
|
||||
if(file==NULL) {
|
||||
- fprintf(stderr, "icupkg: unable to create file \"%s\"\n", filename);
|
||||
+ fprintf(stderr, "icupkg: unable to create file \"%s\": %s\n", filename, strerror(errno));
|
||||
exit(U_FILE_ACCESS_ERROR);
|
||||
}
|
||||
fileLength=(int32_t)fwrite(pItem->data, 1, pItem->length, file);
|
||||
Index: icu/source/tools/toolutil/writesrc.c
|
||||
===================================================================
|
||||
--- icu.orig/source/tools/toolutil/writesrc.c
|
||||
+++ icu/source/tools/toolutil/writesrc.c
|
||||
@@ -16,7 +16,9 @@
|
||||
* Helper functions for writing source code for data.
|
||||
*/
|
||||
|
||||
+#include <errno.h>
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
#include <time.h>
|
||||
#include "unicode/utypes.h"
|
||||
#include "unicode/putil.h"
|
||||
@@ -64,8 +66,8 @@ usrc_createWithHeader(const char *path,
|
||||
} else {
|
||||
fprintf(
|
||||
stderr,
|
||||
- "usrc_create(%s, %s): unable to create file\n",
|
||||
- path!=NULL ? path : "", filename);
|
||||
+ "usrc_create(%s, %s): unable to create file: %s\n",
|
||||
+ path!=NULL ? path : "", filename, strerror(errno));
|
||||
}
|
||||
return f;
|
||||
}
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 13 13:55:08 UTC 2014 - jengelh@inai.de
|
||||
|
||||
- Build both B and L-type endianess variants of icudt53.dat so that
|
||||
icu-data really is arch-independent again
|
||||
- Add icu-error-reporting.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 29 19:44:47 UTC 2014 - coolo@suse.com
|
||||
|
||||
|
90
icu.spec
90
icu.spec
@ -17,6 +17,7 @@
|
||||
|
||||
|
||||
%define lname libicu53_1
|
||||
%define amajor 53
|
||||
%define aversion 53_1
|
||||
Name: icu
|
||||
Version: 53.1
|
||||
@ -35,11 +36,17 @@ Patch2: icu-remove-datetime.patch
|
||||
Patch3: icu-versioning.diff
|
||||
Patch4: icu-fix-install-mode-files.diff
|
||||
Patch5: icu-fix-tests-depending-on-date.patch
|
||||
Patch6: icu-error-reporting.diff
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: unzip
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%ifarch %armb hppa mips mips64 ppc ppc64 %sparc s390 s390x
|
||||
%define be_platform 1
|
||||
%else
|
||||
%define be_platform 0
|
||||
%endif
|
||||
|
||||
%description
|
||||
ICU is a set of C and C++ libraries that provides robust and
|
||||
@ -55,7 +62,11 @@ This subpackage contains the runtime programs for interacting with ICU.
|
||||
%package -n %lname
|
||||
Summary: International Components for Unicode
|
||||
Group: System/Libraries
|
||||
Requires: libicu%aversion-data
|
||||
%if %be_platform
|
||||
Requires: libicu%{aversion}-bedata
|
||||
%else
|
||||
Requires: libicu%{aversion}-ledata
|
||||
%endif
|
||||
Requires: timezone
|
||||
# Following O/P added in timeframe for 12.2
|
||||
Provides: libicu = %version
|
||||
@ -66,20 +77,49 @@ ICU is a set of C and C++ libraries that provides robust and
|
||||
full-featured Unicode support. This package contains the runtime
|
||||
libraries for ICU which include precompiled locale data.
|
||||
|
||||
%package -n libicu%aversion-data
|
||||
Summary: International Components for Unicode
|
||||
%package -n libicu%aversion-bedata
|
||||
Summary: Rule databases and tables for ICU
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%if %be_platform
|
||||
# Added for 13.2
|
||||
Obsoletes: libicu%aversion-data
|
||||
Provides: libicu%aversion-data
|
||||
%endif
|
||||
|
||||
%description -n libicu%aversion-data
|
||||
%description -n libicu%aversion-bedata
|
||||
ICU is a set of C and C++ libraries that provides robust and
|
||||
full-featured Unicode support. This package contains the runtime
|
||||
libraries for ICU which include precompiled locale data.
|
||||
full-featured Unicode support.
|
||||
|
||||
This subpackage contains the precompiled ICU databases that contain
|
||||
most of the locale-specific information.
|
||||
ICU makes use of a wide variety of data tables to provide many of its
|
||||
services: converter mapping tables, collation rules, transliteration
|
||||
rules, break iterator rules and dictionaries.
|
||||
|
||||
This subpackage contains these data tables, in big-endian format.
|
||||
|
||||
%package -n libicu%aversion-ledata
|
||||
Summary: Rule databases and tables for ICU
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} >= 1210
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%if !%be_platform
|
||||
# Added for 13.2
|
||||
Obsoletes: libicu%aversion-data
|
||||
Provides: libicu%aversion-data
|
||||
%endif
|
||||
|
||||
%description -n libicu%aversion-ledata
|
||||
ICU is a set of C and C++ libraries that provides robust and
|
||||
full-featured Unicode support.
|
||||
|
||||
ICU makes use of a wide variety of data tables to provide many of its
|
||||
services: converter mapping tables, collation rules, transliteration
|
||||
rules, break iterator rules and dictionaries.
|
||||
|
||||
This subpackage contains these data tables, in little-endian format.
|
||||
|
||||
%package -n libicu-devel
|
||||
Summary: International Components for Unicode (development files)
|
||||
@ -91,16 +131,16 @@ ICU is a C++ and C library that provides robust and full-featured
|
||||
Unicode support. This package contains the development files for ICU.
|
||||
|
||||
%package -n libicu-doc
|
||||
Summary: International Components for Unicode (html documentation)
|
||||
Group: Development/Libraries/C and C++
|
||||
Summary: International Components for Unicode (HTML documentation)
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description -n libicu-doc
|
||||
ICU is a C++ and C library that provides robust and full-featured
|
||||
Unicode support. This package contains the html documentation.
|
||||
Unicode support. This package contains the HTML documentation.
|
||||
|
||||
%package data
|
||||
Summary: International Components for Unicode (Sources for the Data in ICU)
|
||||
Group: System/Libraries
|
||||
Group: Development/Sources
|
||||
Requires: %lname >= %version
|
||||
|
||||
%description data
|
||||
@ -121,7 +161,7 @@ cd html
|
||||
unzip %SOURCE2
|
||||
cd ..
|
||||
|
||||
%patch -P 1 -P 2 -P 3 -P 4 -p1 -P 5 -p1
|
||||
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -P 6 -p1
|
||||
|
||||
%build
|
||||
cd source
|
||||
@ -133,6 +173,15 @@ export CFLAGS="$CXXFLAGS"
|
||||
--disable-samples \
|
||||
--with-data-packaging=archive
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
# Build the other endianess, too.
|
||||
pushd data/
|
||||
%if %be_platform
|
||||
cp in/icudt%{amajor}l.dat out/
|
||||
%else
|
||||
LD_LIBRARY_PATH="../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH" \
|
||||
../bin/icupkg -tb ./in/icudt%{amajor}l.dat ./out/icudt%{amajor}b.dat
|
||||
%endif
|
||||
popd
|
||||
|
||||
%install
|
||||
mkdir -p "%buildroot/%_docdir/%name"
|
||||
@ -143,6 +192,7 @@ find . -name CVS -type d -exec rm -Rf "{}" "+"
|
||||
cd source
|
||||
|
||||
make install DESTDIR="%buildroot"
|
||||
cp data/out/icudt*.dat "%buildroot/%_datadir/icu/%version/"
|
||||
|
||||
#
|
||||
# ICU's "pkgdata" utility is really fragile, so icu-versioning.diff
|
||||
@ -162,7 +212,9 @@ for i in *.so.[0-9]*; do
|
||||
done
|
||||
popd
|
||||
|
||||
# /usr/lib/rpm/elfdeps requires +x bit and not all had it at one point
|
||||
# /usr/lib/rpm/elfdeps requires +x bit and not all files had it at one point.
|
||||
# - OpenBSD for example is known to have patched their libtool program
|
||||
# to kill the x bit on install :(
|
||||
chmod a+rx "%buildroot/%_libdir"/lib*.so.*
|
||||
|
||||
# install uncompiled source data:
|
||||
@ -231,11 +283,17 @@ fi;
|
||||
%defattr(-, root, root)
|
||||
%_libdir/libicu*.so.*
|
||||
|
||||
%files -n libicu%aversion-data
|
||||
%files -n libicu%{aversion}-bedata
|
||||
%defattr(-,root,root)
|
||||
%dir %_datadir/icu
|
||||
%dir %_datadir/icu/%version
|
||||
%_datadir/icu/%version/icudt5*[bl].dat
|
||||
%_datadir/icu/%version/icudt%{amajor}b.dat
|
||||
|
||||
%files -n libicu%{aversion}-ledata
|
||||
%defattr(-,root,root)
|
||||
%dir %_datadir/icu
|
||||
%dir %_datadir/icu/%version
|
||||
%_datadir/icu/%version/icudt%{amajor}l.dat
|
||||
|
||||
%files -n libicu-devel
|
||||
%defattr(-, root, root)
|
||||
|
Loading…
Reference in New Issue
Block a user