From d5a4e5eeaea3a7513a16355627683f99e7b04226 Mon Sep 17 00:00:00 2001 From: Caolan McNamara Date: Fri, 2 Apr 2010 14:22:04 +0000 Subject: [PATCH] rebuild for icu 4.4 --- webkit-1.1.22-icu44.patch | 141 ++++++++++++++++++++++++++++++++++++++ webkitgtk.spec | 8 ++- 2 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 webkit-1.1.22-icu44.patch diff --git a/webkit-1.1.22-icu44.patch b/webkit-1.1.22-icu44.patch new file mode 100644 index 0000000..71bbce5 --- /dev/null +++ b/webkit-1.1.22-icu44.patch @@ -0,0 +1,141 @@ +2010-03-22 Darin Adler + + Reviewed by Dan Bernstein. + + TextBreakIteratorICU.cpp is incompatible with new UBreakIterator type in ICU 4.4 + https://bugs.webkit.org/show_bug.cgi?id=36381 + + * platform/text/TextBreakIteratorICU.cpp: + (WebCore::setUpIterator): Use reinterpret_cast instead of static_cast or relying + on conversion to void*. + (WebCore::textBreakFirst): Ditto. + (WebCore::textBreakLast): Ditto. + (WebCore::textBreakNext): Ditto. + (WebCore::textBreakPrevious): Ditto. + (WebCore::textBreakPreceding): Ditto. + (WebCore::textBreakFollowing): Ditto. + (WebCore::textBreakCurrent): Ditto. + (WebCore::isTextBreak): Ditto. + (WebCore::setUpIteratorWithRules): Ditto. + + 2010-03-22 Eric Carlson + +Index: /trunk/WebCore/platform/text/TextBreakIteratorICU.cpp +=================================================================== +--- /trunk/WebCore/platform/text/TextBreakIteratorICU.cpp (revision 50977) ++++ /trunk/WebCore/platform/text/TextBreakIteratorICU.cpp (revision 56345) +@@ -25,5 +25,4 @@ + #include "PlatformString.h" + #include "TextBreakIteratorInternalICU.h" +- + #include + #include +@@ -39,5 +38,5 @@ + if (!createdIterator) { + UErrorCode openStatus = U_ZERO_ERROR; +- iterator = static_cast(ubrk_open(type, currentTextBreakLocaleID(), 0, 0, &openStatus)); ++ iterator = reinterpret_cast(ubrk_open(type, currentTextBreakLocaleID(), 0, 0, &openStatus)); + createdIterator = true; + ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus); +@@ -47,5 +46,5 @@ + + UErrorCode setTextStatus = U_ZERO_ERROR; +- ubrk_setText(iterator, string, length, &setTextStatus); ++ ubrk_setText(reinterpret_cast(iterator), string, length, &setTextStatus); + if (U_FAILURE(setTextStatus)) + return 0; +@@ -86,42 +85,42 @@ + } + +-int textBreakFirst(TextBreakIterator* bi) +-{ +- return ubrk_first(bi); +-} +- +-int textBreakLast(TextBreakIterator* bi) +-{ +- return ubrk_last(bi); +-} +- +-int textBreakNext(TextBreakIterator* bi) +-{ +- return ubrk_next(bi); +-} +- +-int textBreakPrevious(TextBreakIterator* bi) +-{ +- return ubrk_previous(bi); +-} +- +-int textBreakPreceding(TextBreakIterator* bi, int pos) +-{ +- return ubrk_preceding(bi, pos); +-} +- +-int textBreakFollowing(TextBreakIterator* bi, int pos) +-{ +- return ubrk_following(bi, pos); +-} +- +-int textBreakCurrent(TextBreakIterator* bi) +-{ +- return ubrk_current(bi); +-} +- +-bool isTextBreak(TextBreakIterator* bi, int pos) +-{ +- return ubrk_isBoundary(bi, pos); ++int textBreakFirst(TextBreakIterator* iterator) ++{ ++ return ubrk_first(reinterpret_cast(iterator)); ++} ++ ++int textBreakLast(TextBreakIterator* iterator) ++{ ++ return ubrk_last(reinterpret_cast(iterator)); ++} ++ ++int textBreakNext(TextBreakIterator* iterator) ++{ ++ return ubrk_next(reinterpret_cast(iterator)); ++} ++ ++int textBreakPrevious(TextBreakIterator* iterator) ++{ ++ return ubrk_previous(reinterpret_cast(iterator)); ++} ++ ++int textBreakPreceding(TextBreakIterator* iterator, int pos) ++{ ++ return ubrk_preceding(reinterpret_cast(iterator), pos); ++} ++ ++int textBreakFollowing(TextBreakIterator* iterator, int pos) ++{ ++ return ubrk_following(reinterpret_cast(iterator), pos); ++} ++ ++int textBreakCurrent(TextBreakIterator* iterator) ++{ ++ return ubrk_current(reinterpret_cast(iterator)); ++} ++ ++bool isTextBreak(TextBreakIterator* iterator, int position) ++{ ++ return ubrk_isBoundary(reinterpret_cast(iterator), position); + } + +@@ -137,5 +136,5 @@ + UErrorCode openStatus = U_ZERO_ERROR; + String rules(breakRules); +- iterator = static_cast(ubrk_openRules(rules.characters(), rules.length(), 0, 0, &parseStatus, &openStatus)); ++ iterator = reinterpret_cast(ubrk_openRules(rules.characters(), rules.length(), 0, 0, &parseStatus, &openStatus)); + createdIterator = true; + ASSERT_WITH_MESSAGE(U_SUCCESS(openStatus), "ICU could not open a break iterator: %s (%d)", u_errorName(openStatus), openStatus); +@@ -145,5 +144,5 @@ + + UErrorCode setTextStatus = U_ZERO_ERROR; +- ubrk_setText(iterator, string, length, &setTextStatus); ++ ubrk_setText(reinterpret_cast(iterator), string, length, &setTextStatus); + if (U_FAILURE(setTextStatus)) + return 0; diff --git a/webkitgtk.spec b/webkitgtk.spec index e4829f6..d03ec70 100644 --- a/webkitgtk.spec +++ b/webkitgtk.spec @@ -35,7 +35,7 @@ Name: webkitgtk Version: 1.1.22 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK+ Web content engine library Provides: WebKit-gtk = %{version}-%{release} @@ -58,6 +58,8 @@ Patch0: webkit-1.1.22-sparc.patch ## bug. :) #Patch1: webkit-1.1.13-no-execmem.patch Patch2: webkit-1.1.14-nspluginwrapper.patch +# https://bugs.webkit.org/show_bug.cgi?id=36381 +Patch3: webkit-1.1.22-icu44.patch BuildRequires: bison BuildRequires: chrpath @@ -120,6 +122,7 @@ LICENSE, README, and AUTHORS files. %patch0 -p1 -b .sparc # %patch1 -p1 -b .no-execmem %patch2 -p1 -b .nspluginwrapper +%patch3 -p2 -b .icu44 %build CFLAGS="%optflags -DLIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY" %configure \ @@ -199,6 +202,9 @@ rm -rf %{buildroot} %changelog +* Fri Apr 02 2010 Caolán McNamara 1.1.22-3 +- rebuild for icu 4.4 + * Tue Mar 23 2010 Tom "spot" Callaway 1.1.22-2 - apply upstream fix for sparc