summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2013-09-11 20:39:28 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2013-09-11 20:39:28 +0800
commit40f1adf7a141e0be334b065863e87d4c1ca5d33b (patch)
tree668564164de1e6efa27ac8fb985ddc9abaf5c025
parent24b976fe56e495c3ea17939e7dee07a253488d6b (diff)
downloadmarcuscom-ports-40f1adf7a141e0be334b065863e87d4c1ca5d33b.tar.gz
marcuscom-ports-40f1adf7a141e0be334b065863e87d4c1ca5d33b.tar.zst
marcuscom-ports-40f1adf7a141e0be334b065863e87d4c1ca5d33b.zip
Sync with ports, fix build on recent head with libc++
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@18680 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--www/webkit-gtk2/Makefile6
-rw-r--r--www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_Atomics.h45
-rw-r--r--www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_DisallowCType.h16
-rw-r--r--www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_DumpRenderTree.cpp10
-rw-r--r--www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_ImageDiff.cpp10
5 files changed, 87 insertions, 0 deletions
diff --git a/www/webkit-gtk2/Makefile b/www/webkit-gtk2/Makefile
index 733b99f7e..ada9f56f7 100644
--- a/www/webkit-gtk2/Makefile
+++ b/www/webkit-gtk2/Makefile
@@ -68,6 +68,12 @@ CONFIGURE_ARGS+=--disable-debug
CFLAGS+= -mminimal-toc
.endif
+CCISCLANG!= ${CC} --version
+
+.if !empty(CCISCLANG:M*clang*)
+CPPFLAGS+= -Wno-c++11-extensions
+.endif
+
.include <bsd.port.pre.mk>
.if ${PERL_LEVEL} >= 501400
diff --git a/www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_Atomics.h b/www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_Atomics.h
new file mode 100644
index 000000000..99977d028
--- /dev/null
+++ b/www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_Atomics.h
@@ -0,0 +1,45 @@
+--- Source/JavaScriptCore/wtf/Atomics.h.orig 2013-09-06 13:54:07.000000000 +0200
++++ Source/JavaScriptCore/wtf/Atomics.h 2013-09-06 13:55:58.000000000 +0200
+@@ -65,18 +65,10 @@
+
+ #if OS(WINDOWS)
+ #include <windows.h>
+-#elif OS(DARWIN)
+-#include <libkern/OSAtomic.h>
+ #elif OS(QNX)
+ #include <atomic.h>
+ #elif OS(ANDROID)
+ #include <sys/atomics.h>
+-#elif COMPILER(GCC)
+-#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
+-#include <ext/atomicity.h>
+-#else
+-#include <bits/atomicity.h>
+-#endif
+ #endif
+
+ namespace WTF {
+@@ -92,12 +84,6 @@ inline int atomicIncrement(int volatile*
+ inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
+ #endif
+
+-#elif OS(DARWIN)
+-#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
+-
+-inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
+-inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
+-
+ #elif OS(QNX)
+ #define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
+
+@@ -113,8 +99,8 @@ inline int atomicDecrement(int volatile*
+ #elif COMPILER(GCC) && !CPU(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
+ #define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
+
+-inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; }
+-inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; }
++inline int atomicIncrement(int volatile* addend) { return __sync_add_and_fetch(addend, 1); }
++inline int atomicDecrement(int volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
+
+ #endif
+
diff --git a/www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_DisallowCType.h b/www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_DisallowCType.h
new file mode 100644
index 000000000..4c0f8c878
--- /dev/null
+++ b/www/webkit-gtk2/files/patch-Source_JavaScriptCore_wtf_DisallowCType.h
@@ -0,0 +1,16 @@
+--- Source/JavaScriptCore/wtf/DisallowCType.h.orig 2012-08-20 18:26:04.000000000 +0200
++++ Source/JavaScriptCore/wtf/DisallowCType.h 2013-09-11 12:41:07.000000000 +0200
+@@ -35,6 +35,13 @@
+ // ASCII-specific functions instead. This header makes sure we get a compile-time
+ // error if we use one of the <ctype.h> functions by accident.
+
++// Include inlined functions using <ctype.h> first to avoid compilation errors
++#ifdef __cplusplus
++#include <cwchar>
++#include <cwctype>
++#include <string>
++#endif
++
+ #include <ctype.h>
+
+ #undef isalnum
diff --git a/www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_DumpRenderTree.cpp b/www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_DumpRenderTree.cpp
new file mode 100644
index 000000000..8a5b916f3
--- /dev/null
+++ b/www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_DumpRenderTree.cpp
@@ -0,0 +1,10 @@
+--- Tools/DumpRenderTree/gtk/DumpRenderTree.cpp.orig 2012-08-20 18:26:18.000000000 +0200
++++ Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2013-09-11 12:28:29.000000000 +0200
+@@ -48,6 +48,7 @@
+ #include "WorkQueueItem.h"
+ #include <JavaScriptCore/JavaScript.h>
+ #include <cassert>
++#include <clocale>
+ #include <cstdlib>
+ #include <cstring>
+ #include <getopt.h>
diff --git a/www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_ImageDiff.cpp b/www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_ImageDiff.cpp
new file mode 100644
index 000000000..0d037286a
--- /dev/null
+++ b/www/webkit-gtk2/files/patch-Tools_DumpRenderTree_gtk_ImageDiff.cpp
@@ -0,0 +1,10 @@
+--- Tools/DumpRenderTree/gtk/ImageDiff.cpp.orig 2013-09-11 12:29:19.000000000 +0200
++++ Tools/DumpRenderTree/gtk/ImageDiff.cpp 2013-09-11 12:29:38.000000000 +0200
+@@ -30,6 +30,7 @@
+ #include <algorithm>
+ #include <cmath>
+ #include <cstdio>
++#include <cstdlib>
+ #include <cstring>
+ #include <gdk/gdk.h>
+