webkit: bump to version 1.2.5
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Wed, 22 Dec 2010 12:04:25 +0000 (09:04 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 22 Dec 2010 22:46:38 +0000 (23:46 +0100)
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/webkit/webkit-1.2.3-fix-build-issue-with-old-gtk.patch [deleted file]
package/webkit/webkit-1.2.3-fix-compilation-on-DirectFB.patch [deleted file]
package/webkit/webkit-1.2.3-pthread_getattr_np.patch [deleted file]
package/webkit/webkit-fix-build-issue-with-old-gtk.patch [new file with mode: 0644]
package/webkit/webkit-fix-compilation-on-DirectFB.patch [new file with mode: 0644]
package/webkit/webkit-fix-pool.patch [new file with mode: 0644]
package/webkit/webkit-pthread_getattr_np.patch [new file with mode: 0644]
package/webkit/webkit.mk

diff --git a/package/webkit/webkit-1.2.3-fix-build-issue-with-old-gtk.patch b/package/webkit/webkit-1.2.3-fix-build-issue-with-old-gtk.patch
deleted file mode 100644 (file)
index 2b20bae..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-The WebKit code conditionally calls getRootCoords() when the Gtk
-version is old (i.e < 2.17.3), but fails to declare the prototype of
-this function (which is implemented after its call site). This build
-failure has probably been missed due to the fact that not many people
-try to compile recent WebKit versions with old Gtk.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
-===================================================================
---- webkit-1.2.3.orig/WebKitTools/DumpRenderTree/gtk/EventSender.cpp   2010-07-19 20:42:27.000000000 +0200
-+++ webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp        2010-07-19 20:42:57.000000000 +0200
-@@ -86,6 +86,9 @@
- static void sendOrQueueEvent(GdkEvent event);
- static void dispatchEvent(GdkEvent event);
- static guint getStateFlags();
-+#if !GTK_CHECK_VERSION(2,17,3)
-+static void getRootCoords(GtkWidget* view, int* rootX, int* rootY);
-+#endif
- static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
- {
diff --git a/package/webkit/webkit-1.2.3-fix-compilation-on-DirectFB.patch b/package/webkit/webkit-1.2.3-fix-compilation-on-DirectFB.patch
deleted file mode 100644 (file)
index 256f8a1..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-From 91a2bf4c3a21720a27223ba293ba90f58c349959 Mon Sep 17 00:00:00 2001
-From: Lionel Landwerlin <llandwerlin@gmail.com>
-Date: Sun, 11 Apr 2010 14:38:57 +0200
-Subject: [PATCH] Fix compilation with DirectFB
-
-Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
----
- GNUmakefile.am                        |    2 ++
- WebCore/plugins/PluginView.h          |    6 +++---
- WebCore/plugins/gtk/PluginViewGtk.cpp |   17 ++++++++---------
- 3 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/GNUmakefile.am b/GNUmakefile.am
-index 3bdfe53..8626bbb 100644
---- a/GNUmakefile.am
-+++ b/GNUmakefile.am
-@@ -122,8 +122,10 @@ corekit_cppflags += \
- # For the Gtk port we want to use XP_UNIX both in X11 and Mac
- if !TARGET_WIN32
-+if !TARGET_DIRECTFB
- corekit_cppflags += -DXP_UNIX
- endif
-+endif
- # Default compiler flags
- global_cflags += \
-diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
-index 21a25f6..8116864 100644
---- a/WebCore/plugins/PluginView.h
-+++ b/WebCore/plugins/PluginView.h
-@@ -22,7 +22,7 @@
-  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  */
- #ifndef PluginView_h
-@@ -312,7 +312,7 @@ namespace WebCore {
-         bool m_haveInitialized;
-         bool m_isWaitingToStart;
--#if defined(XP_UNIX)
-+#if defined(XP_UNIX) || PLATFORM(DIRECTFB)
-         bool m_needsXEmbed;
- #endif
-@@ -340,7 +340,7 @@ public:
- private:
--#if defined(XP_UNIX) || OS(SYMBIAN)
-+#if defined(XP_UNIX) || OS(SYMBIAN) || PLATFORM(DIRECTFB)
-         void setNPWindowIfNeeded();
- #elif defined(XP_MACOSX)
-         NP_CGContext m_npCgContext;
-diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
-index 8de63e0..039a845 100644
---- a/WebCore/plugins/gtk/PluginViewGtk.cpp
-+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
-@@ -23,7 +23,7 @@
-  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  */
- #include "config.h"
-@@ -45,6 +45,7 @@
- #include "Image.h"
- #include "KeyboardEvent.h"
- #include "MouseEvent.h"
-+#include "NotImplemented.h"
- #include "Page.h"
- #include "PlatformKeyboardEvent.h"
- #include "PlatformMouseEvent.h"
-@@ -137,7 +138,7 @@ void PluginView::updatePluginWidget()
-     if (!m_isWindowed) {
-         if (m_drawable)
-             XFreePixmap(GDK_DISPLAY(), m_drawable);
--            
-+
-         m_drawable = XCreatePixmap(GDK_DISPLAY(), getRootWindow(m_parentFrame.get()),
-                                    m_windowRect.width(), m_windowRect.height(),
-                                    ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth);
-@@ -571,7 +572,7 @@ NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const c
-     //FIXME - read the file data into buffer
-     FILE* fileHandle = fopen((filename.utf8()).data(), "r");
--    
-+
-     if (fileHandle == 0)
-         return NPERR_FILE_NOT_FOUND;
-@@ -706,6 +707,7 @@ void PluginView::forceRedraw()
-         gtk_widget_queue_draw(m_parentFrame->view()->hostWindow()->platformPageClient());
- }
-+#if defined(XP_UNIX)
- static Display* getPluginDisplay()
- {
-     // The plugin toolkit might have a different X connection open.  Since we're
-@@ -713,14 +715,9 @@ static Display* getPluginDisplay()
-     // plugins, so we can return that.  We might want to add other implementations here
-     // later.
--#if defined(XP_UNIX)
-     return GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
--#else
--    return 0;
--#endif
- }
--#if defined(XP_UNIX)
- static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
- {
-     *visual = 0;
-@@ -794,9 +791,9 @@ bool PluginView::platformStart()
-     }
-     if (m_isWindowed) {
--#if defined(XP_UNIX)
-         GtkWidget* pageClient = m_parentFrame->view()->hostWindow()->platformPageClient();
-+#if defined(XP_UNIX)
-         if (m_needsXEmbed) {
-             // If our parent is not anchored the startup process will
-             // fail miserably for XEmbed plugins a bit later on when
-@@ -817,7 +814,9 @@ bool PluginView::platformStart()
- #endif
-     } else {
-         setPlatformWidget(0);
-+#if defined(XP_UNIX)
-         m_pluginDisplay = getPluginDisplay();
-+#endif
-     }
-     show();
--- 
-1.7.0.4
-
diff --git a/package/webkit/webkit-1.2.3-pthread_getattr_np.patch b/package/webkit/webkit-1.2.3-pthread_getattr_np.patch
deleted file mode 100644 (file)
index b71c878..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-Patch WebKit because pthread_getattr_np is not implemented in uClibc
-
-Define UCLIBC_USE_PROC_SELF_MAPS etc. as a workaround for uClibc. This
-code was in the qtoipa webkit but appears to have been removed from
-more recent versions of webkit.
-
-See: http://bugreports.qt.nokia.com/browse/QTBUG-6551
-Credit for fix: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=545066#545066
-
-Signed-off-by: Paul Jones <paul@pauljones.id.au>
-
-Index: webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp
-===================================================================
---- webkit-1.2.3.orig/JavaScriptCore/runtime/Collector.cpp     2010-07-22 17:16:19.000000000 +0200
-+++ webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp  2010-07-22 17:25:02.000000000 +0200
-@@ -75,6 +75,18 @@
- #endif
- #include <unistd.h>
-+#if defined(__UCLIBC__)
-+// versions of uClibc 0.9.31 and below do not have
-+// pthread_getattr_np or pthread_attr_getstack.
-+#if __UCLIBC_MAJOR__ == 0 &&                                  \
-+  (__UCLIBC_MINOR__ < 9 ||                                    \
-+   (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 31))
-+#define UCLIBC_USE_PROC_SELF_MAPS 1
-+#include <stdio_ext.h>
-+extern int *__libc_stack_end;
-+#endif
-+#endif
-+
- #if OS(SOLARIS)
- #include <thread.h>
- #else
-@@ -610,6 +622,36 @@
-     get_thread_info(find_thread(NULL), &threadInfo);
-     return threadInfo.stack_end;
- #elif OS(UNIX)
-+#ifdef UCLIBC_USE_PROC_SELF_MAPS
-+    // Read /proc/self/maps and locate the line whose address
-+    // range contains __libc_stack_end.
-+    FILE *file = fopen("/proc/self/maps", "r");
-+    if (!file)
-+      return 0;
-+    __fsetlocking(file, FSETLOCKING_BYCALLER);
-+    char *line = NULL;
-+    size_t lineLen = 0;
-+    while (!feof_unlocked(file)) {
-+      if (getdelim(&line, &lineLen, '\n', file) <= 0)
-+      break;
-+      long from;
-+      long to;
-+      if (sscanf (line, "%lx-%lx", &from, &to) != 2)
-+      continue;
-+      if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) {
-+      fclose(file);
-+      free(line);
-+#ifdef _STACK_GROWS_UP
-+      return (void *)from;
-+#else
-+      return (void *)to;
-+#endif
-+      }
-+    }
-+    fclose(file);
-+    free(line);
-+    return 0;
-+#else 
-     static void* stackBase = 0;
-     static size_t stackSize = 0;
-     static pthread_t stackThread;
-@@ -631,6 +673,7 @@
-         stackThread = thread;
-     }
-     return static_cast<char*>(stackBase) + stackSize;
-+#endif
- #elif OS(WINCE)
-     if (g_stackBase)
-         return g_stackBase;
diff --git a/package/webkit/webkit-fix-build-issue-with-old-gtk.patch b/package/webkit/webkit-fix-build-issue-with-old-gtk.patch
new file mode 100644 (file)
index 0000000..2b20bae
--- /dev/null
@@ -0,0 +1,22 @@
+The WebKit code conditionally calls getRootCoords() when the Gtk
+version is old (i.e < 2.17.3), but fails to declare the prototype of
+this function (which is implemented after its call site). This build
+failure has probably been missed due to the fact that not many people
+try to compile recent WebKit versions with old Gtk.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp
+===================================================================
+--- webkit-1.2.3.orig/WebKitTools/DumpRenderTree/gtk/EventSender.cpp   2010-07-19 20:42:27.000000000 +0200
++++ webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp        2010-07-19 20:42:57.000000000 +0200
+@@ -86,6 +86,9 @@
+ static void sendOrQueueEvent(GdkEvent event);
+ static void dispatchEvent(GdkEvent event);
+ static guint getStateFlags();
++#if !GTK_CHECK_VERSION(2,17,3)
++static void getRootCoords(GtkWidget* view, int* rootX, int* rootY);
++#endif
+ static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+ {
diff --git a/package/webkit/webkit-fix-compilation-on-DirectFB.patch b/package/webkit/webkit-fix-compilation-on-DirectFB.patch
new file mode 100644 (file)
index 0000000..256f8a1
--- /dev/null
@@ -0,0 +1,144 @@
+From 91a2bf4c3a21720a27223ba293ba90f58c349959 Mon Sep 17 00:00:00 2001
+From: Lionel Landwerlin <llandwerlin@gmail.com>
+Date: Sun, 11 Apr 2010 14:38:57 +0200
+Subject: [PATCH] Fix compilation with DirectFB
+
+Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
+---
+ GNUmakefile.am                        |    2 ++
+ WebCore/plugins/PluginView.h          |    6 +++---
+ WebCore/plugins/gtk/PluginViewGtk.cpp |   17 ++++++++---------
+ 3 files changed, 13 insertions(+), 12 deletions(-)
+
+diff --git a/GNUmakefile.am b/GNUmakefile.am
+index 3bdfe53..8626bbb 100644
+--- a/GNUmakefile.am
++++ b/GNUmakefile.am
+@@ -122,8 +122,10 @@ corekit_cppflags += \
+ # For the Gtk port we want to use XP_UNIX both in X11 and Mac
+ if !TARGET_WIN32
++if !TARGET_DIRECTFB
+ corekit_cppflags += -DXP_UNIX
+ endif
++endif
+ # Default compiler flags
+ global_cflags += \
+diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
+index 21a25f6..8116864 100644
+--- a/WebCore/plugins/PluginView.h
++++ b/WebCore/plugins/PluginView.h
+@@ -22,7 +22,7 @@
+  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ #ifndef PluginView_h
+@@ -312,7 +312,7 @@ namespace WebCore {
+         bool m_haveInitialized;
+         bool m_isWaitingToStart;
+-#if defined(XP_UNIX)
++#if defined(XP_UNIX) || PLATFORM(DIRECTFB)
+         bool m_needsXEmbed;
+ #endif
+@@ -340,7 +340,7 @@ public:
+ private:
+-#if defined(XP_UNIX) || OS(SYMBIAN)
++#if defined(XP_UNIX) || OS(SYMBIAN) || PLATFORM(DIRECTFB)
+         void setNPWindowIfNeeded();
+ #elif defined(XP_MACOSX)
+         NP_CGContext m_npCgContext;
+diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
+index 8de63e0..039a845 100644
+--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
++++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
+@@ -23,7 +23,7 @@
+  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
++ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ #include "config.h"
+@@ -45,6 +45,7 @@
+ #include "Image.h"
+ #include "KeyboardEvent.h"
+ #include "MouseEvent.h"
++#include "NotImplemented.h"
+ #include "Page.h"
+ #include "PlatformKeyboardEvent.h"
+ #include "PlatformMouseEvent.h"
+@@ -137,7 +138,7 @@ void PluginView::updatePluginWidget()
+     if (!m_isWindowed) {
+         if (m_drawable)
+             XFreePixmap(GDK_DISPLAY(), m_drawable);
+-            
++
+         m_drawable = XCreatePixmap(GDK_DISPLAY(), getRootWindow(m_parentFrame.get()),
+                                    m_windowRect.width(), m_windowRect.height(),
+                                    ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth);
+@@ -571,7 +572,7 @@ NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const c
+     //FIXME - read the file data into buffer
+     FILE* fileHandle = fopen((filename.utf8()).data(), "r");
+-    
++
+     if (fileHandle == 0)
+         return NPERR_FILE_NOT_FOUND;
+@@ -706,6 +707,7 @@ void PluginView::forceRedraw()
+         gtk_widget_queue_draw(m_parentFrame->view()->hostWindow()->platformPageClient());
+ }
++#if defined(XP_UNIX)
+ static Display* getPluginDisplay()
+ {
+     // The plugin toolkit might have a different X connection open.  Since we're
+@@ -713,14 +715,9 @@ static Display* getPluginDisplay()
+     // plugins, so we can return that.  We might want to add other implementations here
+     // later.
+-#if defined(XP_UNIX)
+     return GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
+-#else
+-    return 0;
+-#endif
+ }
+-#if defined(XP_UNIX)
+ static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
+ {
+     *visual = 0;
+@@ -794,9 +791,9 @@ bool PluginView::platformStart()
+     }
+     if (m_isWindowed) {
+-#if defined(XP_UNIX)
+         GtkWidget* pageClient = m_parentFrame->view()->hostWindow()->platformPageClient();
++#if defined(XP_UNIX)
+         if (m_needsXEmbed) {
+             // If our parent is not anchored the startup process will
+             // fail miserably for XEmbed plugins a bit later on when
+@@ -817,7 +814,9 @@ bool PluginView::platformStart()
+ #endif
+     } else {
+         setPlatformWidget(0);
++#if defined(XP_UNIX)
+         m_pluginDisplay = getPluginDisplay();
++#endif
+     }
+     show();
+-- 
+1.7.0.4
+
diff --git a/package/webkit/webkit-fix-pool.patch b/package/webkit/webkit-fix-pool.patch
new file mode 100644 (file)
index 0000000..5a66a82
--- /dev/null
@@ -0,0 +1,67 @@
+Description: Fixup pool and add sparc support
+Nixed from gentoo
+
+--- webkit-1.2.1.orig/JavaScriptCore/wtf/ListHashSet.h
++++ webkit-1.2.1/JavaScriptCore/wtf/ListHashSet.h
+@@ -127,7 +127,7 @@ namespace WTF {
+             : m_freeList(pool())
+             , m_isDoneWithInitialFreeList(false)
+         { 
+-            memset(m_pool.pool, 0, sizeof(m_pool.pool));
++            memset(m_pool, 0, sizeof(m_pool));
+         }
+         Node* allocate()
+@@ -171,7 +171,7 @@ namespace WTF {
+         }
+     private:
+-        Node* pool() { return reinterpret_cast<Node*>(m_pool.pool); }
++        Node* pool() { return reinterpret_cast<Node*>(m_pool); }
+         Node* pastPool() { return pool() + m_poolSize; }
+         bool inPool(Node* node)
+@@ -182,10 +182,7 @@ namespace WTF {
+         Node* m_freeList;
+         bool m_isDoneWithInitialFreeList;
+         static const size_t m_poolSize = 256;
+-        union {
+-            char pool[sizeof(Node) * m_poolSize];
+-            double forAlignment;
+-        } m_pool;
++        uint32_t m_pool[(sizeof(Node) * m_poolSize + sizeof(uint32_t) - 1) / sizeof(uint32_t)];
+     };
+     template<typename ValueArg> struct ListHashSetNode {
+--- webkit-1.2.1.orig/WebCore/platform/text/AtomicString.cpp
++++ webkit-1.2.1/WebCore/platform/text/AtomicString.cpp
+@@ -103,9 +103,9 @@ static inline bool equal(StringImpl* str
+     if (string->length() != length)
+         return false;
++#if CPU(ARM) || CPU(SPARC) || CPU(SH4)
+     // FIXME: perhaps we should have a more abstract macro that indicates when
+     // going 4 bytes at a time is unsafe
+-#if CPU(ARM) || CPU(SH4)
+     const UChar* stringCharacters = string->characters();
+     for (unsigned i = 0; i != length; ++i) {
+         if (*stringCharacters++ != *characters++)
+--- webkit-1.2.1.orig/WebCore/platform/text/StringHash.h
++++ webkit-1.2.1/WebCore/platform/text/StringHash.h
+@@ -54,13 +54,13 @@ namespace WebCore {
+             // FIXME: perhaps we should have a more abstract macro that indicates when
+             // going 4 bytes at a time is unsafe
+-#if CPU(ARM) || CPU(SH4)
++#if CPU(ARM) || CPU(SPARC) || CPU(SH4)
+             const UChar* aChars = a->characters();
+             const UChar* bChars = b->characters();
+-            for (unsigned i = 0; i != aLength; ++i) {
++            for (unsigned i = 0; i != aLength; ++i)
+                 if (*aChars++ != *bChars++)
+                     return false;
+-            }
++
+             return true;
+ #else
+             /* Do it 4-bytes-at-a-time on architectures where it's safe */
diff --git a/package/webkit/webkit-pthread_getattr_np.patch b/package/webkit/webkit-pthread_getattr_np.patch
new file mode 100644 (file)
index 0000000..b71c878
--- /dev/null
@@ -0,0 +1,79 @@
+Patch WebKit because pthread_getattr_np is not implemented in uClibc
+
+Define UCLIBC_USE_PROC_SELF_MAPS etc. as a workaround for uClibc. This
+code was in the qtoipa webkit but appears to have been removed from
+more recent versions of webkit.
+
+See: http://bugreports.qt.nokia.com/browse/QTBUG-6551
+Credit for fix: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=545066#545066
+
+Signed-off-by: Paul Jones <paul@pauljones.id.au>
+
+Index: webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp
+===================================================================
+--- webkit-1.2.3.orig/JavaScriptCore/runtime/Collector.cpp     2010-07-22 17:16:19.000000000 +0200
++++ webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp  2010-07-22 17:25:02.000000000 +0200
+@@ -75,6 +75,18 @@
+ #endif
+ #include <unistd.h>
++#if defined(__UCLIBC__)
++// versions of uClibc 0.9.31 and below do not have
++// pthread_getattr_np or pthread_attr_getstack.
++#if __UCLIBC_MAJOR__ == 0 &&                                  \
++  (__UCLIBC_MINOR__ < 9 ||                                    \
++   (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 31))
++#define UCLIBC_USE_PROC_SELF_MAPS 1
++#include <stdio_ext.h>
++extern int *__libc_stack_end;
++#endif
++#endif
++
+ #if OS(SOLARIS)
+ #include <thread.h>
+ #else
+@@ -610,6 +622,36 @@
+     get_thread_info(find_thread(NULL), &threadInfo);
+     return threadInfo.stack_end;
+ #elif OS(UNIX)
++#ifdef UCLIBC_USE_PROC_SELF_MAPS
++    // Read /proc/self/maps and locate the line whose address
++    // range contains __libc_stack_end.
++    FILE *file = fopen("/proc/self/maps", "r");
++    if (!file)
++      return 0;
++    __fsetlocking(file, FSETLOCKING_BYCALLER);
++    char *line = NULL;
++    size_t lineLen = 0;
++    while (!feof_unlocked(file)) {
++      if (getdelim(&line, &lineLen, '\n', file) <= 0)
++      break;
++      long from;
++      long to;
++      if (sscanf (line, "%lx-%lx", &from, &to) != 2)
++      continue;
++      if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) {
++      fclose(file);
++      free(line);
++#ifdef _STACK_GROWS_UP
++      return (void *)from;
++#else
++      return (void *)to;
++#endif
++      }
++    }
++    fclose(file);
++    free(line);
++    return 0;
++#else 
+     static void* stackBase = 0;
+     static size_t stackSize = 0;
+     static pthread_t stackThread;
+@@ -631,6 +673,7 @@
+         stackThread = thread;
+     }
+     return static_cast<char*>(stackBase) + stackSize;
++#endif
+ #elif OS(WINCE)
+     if (g_stackBase)
+         return g_stackBase;
index 3f4e8fe2439a9fc59a2d425b27ce63cf89decd18..7a5429ca2e8b7f29895fa3546b9a329874ab4126 100644 (file)
@@ -3,16 +3,12 @@
 # webkit
 #
 #############################################################
-WEBKIT_VERSION = 1.2.3
-WEBKIT_SOURCE = webkit-$(WEBKIT_VERSION).tar.gz
-WEBKIT_SITE = http://www.webkitgtk.org
 
+WEBKIT_VERSION = 1.2.5
+WEBKIT_SITE = http://www.webkitgtk.org
 WEBKIT_INSTALL_STAGING = YES
-WEBKIT_LIBTOOL_PATCH = NO
-
-WEBKIT_DEPENDENCIES = host-flex host-gperf icu libcurl libxml2 libxslt \
+WEBKIT_DEPENDENCIES = host-flex host-gperf icu libcurl libxml2 libxslt \
                        libgtk2 sqlite enchant libsoup jpeg libgail
-
 WEBKIT_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config
 
 ifeq ($(BR2_PACKAGE_XORG7),y)