From 705d29694fd61c47a57ccec531e73d87a2960021 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 19 Nov 2012 02:25:52 -0800 Subject: Mon Nov 19 02:22:26 PST 2012 --- extra/icu/PKGBUILD | 21 +++++++++---- extra/icu/changeset_32780.diff | 67 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 extra/icu/changeset_32780.diff (limited to 'extra/icu') diff --git a/extra/icu/PKGBUILD b/extra/icu/PKGBUILD index 73bc37d3d..2aededd6b 100644 --- a/extra/icu/PKGBUILD +++ b/extra/icu/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 163969 2012-07-23 03:03:14Z allan $ +# $Id: PKGBUILD 171516 2012-11-18 10:27:49Z andyrtr $ # Maintainer: Andreas Radke # Contributor: Art Gramlich pkgname=icu -pkgver=49.1.2 +pkgver=50.1 pkgrel=2 pkgdesc="International Components for Unicode library" arch=(i686 x86_64) @@ -12,20 +12,31 @@ license=('custom:"icu"') depends=('gcc-libs>=4.7.1-5' 'sh') source=(#http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver/./_}-src.tgz http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver//./_}-src.tgz - icu.8198.revert.icu5431.patch) -md5sums=('bbc609fe5237202d7abf016141012a45' - 'ebd5470fc969c75e52baf4af94a9ee82') + icu.8198.revert.icu5431.patch changeset_32780.diff) +md5sums=('cf7bf9e56aa6c2057a8b6f464046483e' + 'ebd5470fc969c75e52baf4af94a9ee82' + '58f4b655e40dddc8e316600019b491b2') build() { cd ${srcdir}/icu/source + # fix Malayalam encoding https://bugzilla.redhat.com/show_bug.cgi?id=654200 patch -Rp3 -i ${srcdir}/icu.8198.revert.icu5431.patch + + # fix building clients without c++11 http://bugs.icu-project.org/trac/changeset/32780 + patch -Np4 -i ${srcdir}/changeset_32780.diff + ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man make } +check() { + cd "$srcdir/icu/source" + make -k check # passes all +} + package() { cd ${srcdir}/icu/source make -j1 DESTDIR=${pkgdir} install diff --git a/extra/icu/changeset_32780.diff b/extra/icu/changeset_32780.diff new file mode 100644 index 000000000..a06c3d2ab --- /dev/null +++ b/extra/icu/changeset_32780.diff @@ -0,0 +1,67 @@ +Index: /icu/trunk/source/test/intltest/strtest.cpp +=================================================================== +--- /icu/trunk/source/test/intltest/strtest.cpp (revision 32779) ++++ /icu/trunk/source/test/intltest/strtest.cpp (revision 32780) +@@ -1,5 +1,5 @@ + /******************************************************************** + * COPYRIGHT: +- * Copyright (c) 1997-2011, International Business Machines Corporation and ++ * Copyright (c) 1997-2012, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ +@@ -95,5 +95,5 @@ + StringTest::Test_U_STRING() { + U_STRING_INIT(ustringVar, "aZ0 -", 5); +- if( sizeof(ustringVar)/sizeof(*ustringVar)!=6 || ++ if( u_strlen(ustringVar)!=5 || + ustringVar[0]!=0x61 || + ustringVar[1]!=0x5a || +Index: /icu/trunk/source/common/unicode/ustring.h +=================================================================== +--- /icu/trunk/source/common/unicode/ustring.h (revision 32779) ++++ /icu/trunk/source/common/unicode/ustring.h (revision 32780) +@@ -940,5 +940,5 @@ + */ + #if defined(U_DECLARE_UTF16) +-# define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=U_DECLARE_UTF16(cs) ++# define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs) + /**@stable ICU 2.0 */ + # define U_STRING_INIT(var, cs, length) +Index: /icu/trunk/source/common/unicode/platform.h +=================================================================== +--- /icu/trunk/source/common/unicode/platform.h (revision 32779) ++++ /icu/trunk/source/common/unicode/platform.h (revision 32780) +@@ -665,7 +665,7 @@ + * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but + * does not support u"abc" string literals. +- * C++11 requires support for UTF-16 literals ++ * C++11 and C11 require support for UTF-16 literals + */ +-# if (defined(__cplusplus) && __cplusplus >= 201103L) ++# if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) + # define U_HAVE_CHAR16_T 1 + # else +Index: /icu/trunk/source/common/unicode/umachine.h +=================================================================== +--- /icu/trunk/source/common/unicode/umachine.h (revision 32779) ++++ /icu/trunk/source/common/unicode/umachine.h (revision 32780) +@@ -257,5 +257,5 @@ + /** + * \var UChar +- * Define UChar to be char16_t, if available, ++ * Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), + * or wchar_t if that is 16 bits wide; always assumed to be unsigned. + * If neither is available, then define UChar to be uint16_t. +@@ -267,8 +267,8 @@ + * @stable ICU 4.4 + */ +- +-/* Define UChar to be compatible with char16_t or wchar_t if possible. */ +-#if U_HAVE_CHAR16_T +- typedef char16_t UChar; ++#if defined(UCHAR_TYPE) ++ typedef UCHAR_TYPE UChar; ++/* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers ++ typedef char16_t UChar; */ + #elif U_SIZEOF_WCHAR_T==2 + typedef wchar_t UChar; -- cgit v1.2.3-54-g00ecf