summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2012-02-27 18:09:25 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2012-02-27 18:09:25 +0000
commitd20a01979e2e22a4c38aeba1610efaf97aa955f9 (patch)
treeef05c32677a70fe362255a28648dad0eefcc3dd8 /dev-libs/icu
parentMarking Text-Glob-0.90.0 ppc for bug 400241 (diff)
downloadgentoo-2-d20a01979e2e22a4c38aeba1610efaf97aa955f9.tar.gz
gentoo-2-d20a01979e2e22a4c38aeba1610efaf97aa955f9.tar.bz2
gentoo-2-d20a01979e2e22a4c38aeba1610efaf97aa955f9.zip
Ooops rebase the patch for 4.8.1.1.
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/icu')
-rw-r--r--dev-libs/icu/ChangeLog6
-rw-r--r--dev-libs/icu/files/icu-4.8.1.1-fix_ltr.patch61
-rw-r--r--dev-libs/icu/icu-4.8.1.1-r1.ebuild4
3 files changed, 68 insertions, 3 deletions
diff --git a/dev-libs/icu/ChangeLog b/dev-libs/icu/ChangeLog
index aad1cdc2eaac..593f2f49ef21 100644
--- a/dev-libs/icu/ChangeLog
+++ b/dev-libs/icu/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/icu
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/icu/ChangeLog,v 1.169 2012/02/27 16:19:35 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/icu/ChangeLog,v 1.170 2012/02/27 18:09:25 scarabeus Exp $
+
+ 27 Feb 2012; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/icu-4.8.1.1-fix_ltr.patch, icu-4.8.1.1-r1.ebuild:
+ Ooops rebase the patch for 4.8.1.1.
*icu-4.8.1.1-r1 (27 Feb 2012)
*icu-4.8.1-r3 (27 Feb 2012)
diff --git a/dev-libs/icu/files/icu-4.8.1.1-fix_ltr.patch b/dev-libs/icu/files/icu-4.8.1.1-fix_ltr.patch
new file mode 100644
index 000000000000..9ec2df111e9f
--- /dev/null
+++ b/dev-libs/icu/files/icu-4.8.1.1-fix_ltr.patch
@@ -0,0 +1,61 @@
+diff -urN icu.old/source/layout/LESwaps.h icu/source/layout/LESwaps.h
+--- icu.old/source/layout/LESwaps.h 2012-02-27 19:04:13.090199788 +0100
++++ icu/source/layout/LESwaps.h 2012-02-27 19:07:02.046202727 +0100
+@@ -45,8 +45,8 @@
+ public:
+
+ /**
+- * Reads a big-endian 16-bit word and returns a native-endian value.
+- * No-op on a big-endian platform, byte-swaps on a little-endian platform.
++ * This method does the byte swap required on little endian platforms
++ * to correctly access a (16-bit) word.
+ *
+ * @param value - the word to be byte swapped
+ *
+@@ -56,21 +56,12 @@
+ */
+ static le_uint16 swapWord(le_uint16 value)
+ {
+-#if (defined(U_IS_BIG_ENDIAN) && U_IS_BIG_ENDIAN) || \
+- (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)) || \
+- defined(__BIG_ENDIAN__)
+- // Fastpath when we know that the platform is big-endian.
+- return value;
+-#else
+- // Reads a big-endian value on any platform.
+- const le_uint8 *p = reinterpret_cast<const le_uint8 *>(&value);
+- return (le_uint16)((p[0] << 8) | p[1]);
+-#endif
++ return (le_uint16)((value << 8) | (value >> 8));
+ };
+
+ /**
+- * Reads a big-endian 32-bit word and returns a native-endian value.
+- * No-op on a big-endian platform, byte-swaps on a little-endian platform.
++ * This method does the byte swapping required on little endian platforms
++ * to correctly access a (32-bit) long.
+ *
+ * @param value - the long to be byte swapped
+ *
+@@ -80,16 +71,11 @@
+ */
+ static le_uint32 swapLong(le_uint32 value)
+ {
+-#if (defined(U_IS_BIG_ENDIAN) && U_IS_BIG_ENDIAN) || \
+- (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)) || \
+- defined(__BIG_ENDIAN__)
+- // Fastpath when we know that the platform is big-endian.
+- return value;
+-#else
+- // Reads a big-endian value on any platform.
+- const le_uint8 *p = reinterpret_cast<const le_uint8 *>(&value);
+- return (le_uint32)((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
+-#endif
++ return (le_uint32)(
++ (value << 24) |
++ ((value << 8) & 0xff0000) |
++ ((value >> 8) & 0xff00) |
++ (value >> 24));
+ };
+
+ private:
diff --git a/dev-libs/icu/icu-4.8.1.1-r1.ebuild b/dev-libs/icu/icu-4.8.1.1-r1.ebuild
index ad9552b455bb..7b07aff6cab6 100644
--- a/dev-libs/icu/icu-4.8.1.1-r1.ebuild
+++ b/dev-libs/icu/icu-4.8.1.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/icu/icu-4.8.1.1-r1.ebuild,v 1.1 2012/02/27 16:19:35 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/icu/icu-4.8.1.1-r1.ebuild,v 1.2 2012/02/27 18:09:25 scarabeus Exp $
EAPI="4"
@@ -57,7 +57,7 @@ src_prepare() {
epatch \
"${FILESDIR}/icu-4.8.1-fix_binformat_fonts.patch" \
"${FILESDIR}/icu-4.8.1-fix_nan.patch" \
- "${FILESDIR}/icu-4.8.1-fix_ltr.patch"
+ "${FILESDIR}/icu-4.8.1.1-fix_ltr.patch"
}
src_configure() {