summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorLandry Breuil <landry@rhaalovely.net>2014-03-07 12:30:57 +0100
committerLandry Breuil <landry@rhaalovely.net>2014-03-07 12:30:57 +0100
commit14842b32b65c6ff3f93427d5762041acf17c77f4 (patch)
treeead979553fcc09bd0c3052188fa0e0c3f313fa03 /patches
Initial import of webkit 2.2.4 port
Diffstat (limited to 'patches')
-rw-r--r--patches/patch-GNUmakefile_in124
-rw-r--r--patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h18
-rw-r--r--patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp29
-rw-r--r--patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h16
-rw-r--r--patches/patch-Source_JavaScriptCore_llint_LLIntOfflineAsmConfig_h15
-rw-r--r--patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter32_64_asm37
-rw-r--r--patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_asm48
-rw-r--r--patches/patch-Source_ThirdParty_ANGLE_src_compiler_glslang_y22
-rw-r--r--patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h21
-rw-r--r--patches/patch-Source_ThirdParty_leveldb_port_port_posix_h35
-rw-r--r--patches/patch-Source_WTF_wtf_Atomics_h23
-rw-r--r--patches/patch-Source_WTF_wtf_DisallowCType_h16
-rw-r--r--patches/patch-Source_WTF_wtf_InlineASM_h12
-rw-r--r--patches/patch-Source_WTF_wtf_MathExtras_h15
-rw-r--r--patches/patch-Source_WTF_wtf_Platform_h74
-rw-r--r--patches/patch-Source_WTF_wtf_RAMSize_cpp31
-rw-r--r--patches/patch-Source_WTF_wtf_dtoa_utils_h12
-rw-r--r--patches/patch-Source_WebCore_plugins_PluginDatabase_cpp12
-rw-r--r--patches/patch-Source_WebKit2_Platform_CoreIPC_unix_ConnectionUnix_cpp15
-rw-r--r--patches/patch-Source_WebKit2_PluginProcess_unix_PluginProcessMainUnix_cpp15
-rw-r--r--patches/patch-Source_WebKit2_UIProcess_Launcher_gtk_ProcessLauncherGtk_cpp16
-rw-r--r--patches/patch-Source_WebKit2_UIProcess_Plugins_unix_PluginProcessProxyUnix_cpp38
-rw-r--r--patches/patch-Source_WebKit2_UIProcess_StatisticsRequest_cpp14
-rw-r--r--patches/patch-Source_WebKit2_WebProcess_soup_WebKitSoupRequestInputStream_h13
-rw-r--r--patches/patch-Tools_MiniBrowser_gtk_main_c13
-rw-r--r--patches/patch-configure94
26 files changed, 778 insertions, 0 deletions
diff --git a/patches/patch-GNUmakefile_in b/patches/patch-GNUmakefile_in
new file mode 100644
index 0000000..986a5a3
--- /dev/null
+++ b/patches/patch-GNUmakefile_in
@@ -0,0 +1,124 @@
+$OpenBSD: patch-GNUmakefile_in,v 1.28 2014/01/29 17:28:05 ajacoutot Exp $
+
+- chunk 1,2 : install GtkLauncher, remove silent build lines
+- chunk 5 : install gtk-doc in a versionned dir to avoid conflicts
+- chunk 6 : dont rebase doc, python process fails
+- chunk 4 : dont rerun make within make during install, gmake blows
+- chunk 3 : append extra -O0 cflags for sparc64 which otherwise result in overoptimization
+ by emitting a fdtox %r8, %r7 call, whose second operand isn't even and thus invalid.
+(on Source/JavaScriptCore/runtime/NumberPrototype.cpp)
+- chunk 7 & 8 : https://bugs.webkit.org/show_bug.cgi?id=118732
+--- GNUmakefile.in.orig Tue Jan 21 12:41:49 2014
++++ GNUmakefile.in Mon Jan 27 10:24:55 2014
+@@ -11304,11 +11304,11 @@ am__v_P_0 = false
+ am__v_P_1 = :
+ AM_V_GEN = $(am__v_GEN_@AM_V@)
+ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+-am__v_GEN_0 = @echo " GEN " $@;
++am__v_GEN_0 =
+ am__v_GEN_1 =
+ AM_V_at = $(am__v_at_@AM_V@)
+ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+-am__v_at_0 = @
++am__v_at_0 =
+ am__v_at_1 =
+ DEFAULT_INCLUDES = -I.@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/Source/autotools/depcomp
+@@ -11318,7 +11318,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+ AM_V_CC = $(am__v_CC_@AM_V@)
+ am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+-am__v_CC_0 = @echo " CC " $@;
++am__v_CC_0 =
+ am__v_CC_1 =
+ CCLD = $(CC)
+ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+@@ -11326,13 +11326,13 @@ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAG
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+-am__v_CCLD_0 = @echo " CCLD " $@;
++am__v_CCLD_0 =
+ am__v_CCLD_1 =
+ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+ AM_V_CXX = $(am__v_CXX_@AM_V@)
+ am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+-am__v_CXX_0 = @echo " CXX " $@;
++am__v_CXX_0 =
+ am__v_CXX_1 =
+ CXXLD = $(CXX)
+ CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+@@ -11340,7 +11340,7 @@ CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOL
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+ am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+-am__v_CXXLD_0 = @echo " CXXLD " $@;
++am__v_CXXLD_0 =
+ am__v_CXXLD_1 =
+ SOURCES = $(Libraries_WebExtensions_libWebExtensionTest_la_SOURCES) \
+ $(Libraries_WebExtensions_libWebProcessTest_la_SOURCES) \
+@@ -11860,7 +11860,7 @@ pkgconfigdir := $(libdir)/pkgconfig
+ libwebkitgtkincludedir := $(prefix)/include/webkitgtk-@WEBKITGTK_API_VERSION@
+
+ # Libraries and support components
+-bin_PROGRAMS := Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@$(EXEEXT)
++bin_PROGRAMS := Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@$(EXEEXT) Programs/GtkLauncher$(EXEEXT)
+ noinst_DATA := $(am__append_44) \
+ Programs/TestWebKitAPI/WebKit2Gtk/resources/webkit2gtk-tests-resources.gresource
+ noinst_HEADERS :=
+@@ -69854,7 +69854,7 @@ Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WE
+ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS) $(CPPFLAGS) $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS) $(CXXFLAGS) -c -o Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberObject.lo `test -f 'Source/JavaScriptCore/runtime/NumberObject.cpp' || echo '$(srcdir)/'`Source/JavaScriptCore/runtime/NumberObject.cpp
+
+ Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.lo: Source/JavaScriptCore/runtime/NumberPrototype.cpp
+-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS) $(CPPFLAGS) $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS) $(CXXFLAGS) -MT Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.lo -MD -MP -MF Source/JavaScriptCore/runtime/$(DEPDIR)/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.Tpo -c -o Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.lo `test -f 'Source/JavaScriptCore/runtime/NumberPrototype.cpp' || echo '$(srcdir)/'`Source/JavaScriptCore/runtime/NumberPrototype.cpp
++@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS) $(CPPFLAGS) $(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CXXFLAGS) $(CXXFLAGS) -O0 -MT Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.lo -MD -MP -MF Source/JavaScriptCore/runtime/$(DEPDIR)/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.Tpo -c -o Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.lo `test -f 'Source/JavaScriptCore/runtime/NumberPrototype.cpp' || echo '$(srcdir)/'`Source/JavaScriptCore/runtime/NumberPrototype.cpp
+ @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) Source/JavaScriptCore/runtime/$(DEPDIR)/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.Tpo Source/JavaScriptCore/runtime/$(DEPDIR)/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.Plo
+ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='Source/JavaScriptCore/runtime/NumberPrototype.cpp' object='Source/JavaScriptCore/runtime/libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la-NumberPrototype.lo' libtool=yes @AMDEPBACKSLASH@
+ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@@ -77713,14 +77713,12 @@ installdirs:
+ for dir in "$(DESTDIR)$(injectedbundledir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(audiodir)" "$(DESTDIR)$(audiodir)" "$(DESTDIR)$(resourcesdir)" "$(DESTDIR)$(webresourcesdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(libjavascriptcoregtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir)" "$(DESTDIR)$(libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir)" "$(DESTDIR)$(libwebkit2gtkincludedir)" "$(DESTDIR)$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir)" "$(DESTDIR)$(libwebkit2gtkincludedir)" "$(DESTDIR)$(libwebkitdomincludedir)" "$(DESTDIR)$(libwebkitgtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_ladir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+-install: $(BUILT_SOURCES)
+- $(MAKE) $(AM_MAKEFLAGS) install-am
++install: $(BUILT_SOURCES) install-am
+ install-exec: install-exec-am
+ install-data: install-data-am
+ uninstall: uninstall-am
+
+-install-am: all-am
+- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
++install-am: all-am install-exec-am install-data-am
+
+ installcheck: installcheck-am
+ install-strip:
+@@ -79023,7 +79021,7 @@ install-data-local:
+ @ENABLE_WEBKIT1_TRUE@ if test -n "$(DOC_MODULE_VERSION)"; then \
+ @ENABLE_WEBKIT1_TRUE@ installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
+ @ENABLE_WEBKIT1_TRUE@ else \
+-@ENABLE_WEBKIT1_TRUE@ installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
++@ENABLE_WEBKIT1_TRUE@ installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(WEBKITGTK_API_VERSION)"; \
+ @ENABLE_WEBKIT1_TRUE@ fi; \
+ @ENABLE_WEBKIT1_TRUE@ $(mkinstalldirs) $${installdir} ; \
+ @ENABLE_WEBKIT1_TRUE@ for i in $$installfiles; do \
+@@ -79224,7 +79222,8 @@ $(plugin_process_for_dep): $(plugin_process_for_dep_li
+ WebCoreLayerGtk2.a: $(webcore_layer_gtk2_deps)
+ $(AM_V_GEN)
+ $(AM_V_at)$(shell rm -f $@)
+- $(AM_V_at)$(foreach archive, $(webcore_layer_gtk2_archives), $(shell ar t $(archive) | xargs -n50 ar cruT $@))
++ $(AM_V_at)$(foreach archive, $(webcore_layer_gtk2_archives), $(shell ar t $(archive) | while read f ; do find . -name $$f ; done | xargs -n50 ar cru $@))
++ ln $@ libWebCoreLayerGtk2.a
+
+ $(GENSOURCES_WEBKIT2)/BrowserMarshal.h: stamp-mini-browser-marshal.h
+ @true
+@@ -79257,7 +79256,8 @@ DerivedSources/InjectedBundle/JS%.cpp: Tools/WebKitTes
+ WebCoreLayer.a: $(webcore_layer_deps)
+ $(AM_V_GEN)
+ $(AM_V_at)$(shell rm -f $@)
+- $(AM_V_at)$(foreach archive, $(webcore_layer_archives), $(shell ar t $(archive) | xargs -n50 ar cruT $@))
++ $(AM_V_at)$(foreach archive, $(webcore_layer_archives), $(shell ar t $(archive) | while read f ; do find . -name $$f ; done | xargs -n50 ar cru $@))
++ ln $@ libWebCoreLayer.a
+
+ Programs/TestWebKitAPI/WebKit2Gtk/resources/webkit2gtk-tests-resources.gresource: Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/Tools/TestWebKitAPI/Tests/WebKit2Gtk/resources/webkit2gtk-tests.gresource.xml)
+ $(AM_V_at)mkdir -p ${GENPROGRAMS}/TestWebKitAPI/WebKit2Gtk/resources
diff --git a/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h b/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
new file mode 100644
index 0000000..a64dc29
--- /dev/null
+++ b/patches/patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h
@@ -0,0 +1,18 @@
+$OpenBSD: patch-Source_JavaScriptCore_assembler_MacroAssemblerX86Common_h,v 1.2 2013/10/06 14:03:42 landry Exp $
+./Source/JavaScriptCore/assembler/MacroAssembler.h:909: error: call of overloaded 'shouldBlindForSpecificArch(uintptr_t&)' is ambiguous
+./Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:98: note: candidates are:
+ static bool JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch(uint32_t)
+./Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:100: note:
+ static bool JSC::MacroAssemblerX86Common::shouldBlindForSpecificArch(uint64_t)
+
+--- Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h.orig Fri Aug 23 08:26:41 2013
++++ Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h Wed Aug 28 21:16:22 2013
+@@ -102,7 +102,7 @@ class MacroAssemblerX86Common : public AbstractMacroAs
+ static bool shouldBlindForSpecificArch(uint32_t value) { return value >= 0x00ffffff; }
+ #if CPU(X86_64)
+ static bool shouldBlindForSpecificArch(uint64_t value) { return value >= 0x00ffffff; }
+-#if OS(DARWIN) // On 64-bit systems other than DARWIN uint64_t and uintptr_t are the same type so overload is prohibited.
++#if OS(DARWIN) || OS(OPENBSD) // On 64-bit systems other than DARWIN uint64_t and uintptr_t are the same type so overload is prohibited.
+ static bool shouldBlindForSpecificArch(uintptr_t value) { return value >= 0x00ffffff; }
+ #endif
+ #endif
diff --git a/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp b/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
new file mode 100644
index 0000000..6cc8704
--- /dev/null
+++ b/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp
@@ -0,0 +1,29 @@
+$OpenBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker_cpp,v 1.3 2013/04/13 09:11:02 landry Exp $
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig Mon Oct 1 15:06:17 2012
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp Fri Mar 8 00:56:48 2013
+@@ -372,8 +372,10 @@ static size_t getPlatformThreadRegisters(const Platfor
+ #elif USE(PTHREADS)
+ pthread_attr_init(&regs);
+ #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
++# ifndef __OpenBSD__
+ // e.g. on FreeBSD 5.4, neundorf@kde.org
+ pthread_attr_get_np(platformThread, &regs);
++# endif
+ #else
+ // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
+ pthread_getattr_np(platformThread, &regs);
+@@ -437,7 +439,14 @@ static inline void* otherThreadStackPointer(const Plat
+ #elif USE(PTHREADS)
+ void* stackBase = 0;
+ size_t stackSize = 0;
++# if defined(__OpenBSD__)
++ stack_t ss;
++ int rc = pthread_stackseg_np(pthread_self(), &ss);
++ stackBase = (void*)((size_t) ss.ss_sp - ss.ss_size);
++ stackSize = ss.ss_size;
++#else
+ int rc = pthread_attr_getstack(&regs, &stackBase, &stackSize);
++#endif
+ (void)rc; // FIXME: Deal with error code somehow? Seems fatal.
+ ASSERT(stackBase);
+ return static_cast<char*>(stackBase) + stackSize;
diff --git a/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h b/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
new file mode 100644
index 0000000..765bac7
--- /dev/null
+++ b/patches/patch-Source_JavaScriptCore_jit_ExecutableAllocator_h
@@ -0,0 +1,16 @@
+$OpenBSD: patch-Source_JavaScriptCore_jit_ExecutableAllocator_h,v 1.2 2013/10/06 14:03:42 landry Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=61137
+
+--- Source/JavaScriptCore/jit/ExecutableAllocator.h.orig Wed Jun 26 10:42:11 2013
++++ Source/JavaScriptCore/jit/ExecutableAllocator.h Mon Jul 15 23:03:44 2013
+@@ -104,7 +104,8 @@ class DemandExecutableAllocator;
+ #if ENABLE(EXECUTABLE_ALLOCATOR_FIXED)
+ #if CPU(ARM)
+ static const size_t fixedExecutableMemoryPoolSize = 16 * 1024 * 1024;
+-#elif CPU(X86_64)
++// We don't want an initial allocation of 1GB, it's above the default ulimit
++#elif CPU(X86_64) && !defined(__OpenBSD__)
+ static const size_t fixedExecutableMemoryPoolSize = 1024 * 1024 * 1024;
+ #else
+ static const size_t fixedExecutableMemoryPoolSize = 32 * 1024 * 1024;
diff --git a/patches/patch-Source_JavaScriptCore_llint_LLIntOfflineAsmConfig_h b/patches/patch-Source_JavaScriptCore_llint_LLIntOfflineAsmConfig_h
new file mode 100644
index 0000000..c9f6298
--- /dev/null
+++ b/patches/patch-Source_JavaScriptCore_llint_LLIntOfflineAsmConfig_h
@@ -0,0 +1,15 @@
+$OpenBSD: patch-Source_JavaScriptCore_llint_LLIntOfflineAsmConfig_h,v 1.1 2013/10/06 14:23:04 landry Exp $
+https://bug-103128-attachments.webkit.org/attachment.cgi?id=202651
+--- Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h.orig Sun Oct 6 14:46:31 2013
++++ Source/JavaScriptCore/llint/LLIntOfflineAsmConfig.h Sun Oct 6 14:47:41 2013
+@@ -153,4 +153,10 @@
+ #endif
+ #endif
+
++#if CPU(PPC)
++#define OFFLINE_ASM_FOUR_BYTE_BOOL 1
++#else
++#define OFFLINE_ASM_FOUR_BYTE_BOOL 0
++#endif
++
+ #endif // LLIntOfflineAsmConfig_h
diff --git a/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter32_64_asm b/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter32_64_asm
new file mode 100644
index 0000000..f8a4636
--- /dev/null
+++ b/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter32_64_asm
@@ -0,0 +1,37 @@
+$OpenBSD: patch-Source_JavaScriptCore_llint_LowLevelInterpreter32_64_asm,v 1.2 2013/10/06 14:03:42 landry Exp $
+https://bugs.webkit.org/show_bug.cgi?id=103128
+https://bug-103128-attachments.webkit.org/attachment.cgi?id=202076
+last chunk: https://bug-103128-attachments.webkit.org/attachment.cgi?id=202651
+--- Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm.orig Fri Sep 27 10:49:22 2013
++++ Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm Sun Oct 6 14:49:14 2013
+@@ -1259,7 +1259,7 @@ _llint_op_get_by_pname:
+ loadp JSCell::m_structure[t2], t0
+ bpneq t0, JSPropertyNameIterator::m_cachedStructure[t3], .opGetByPnameSlow
+ loadi 24[PC], t0
+- loadi [cfr, t0, 8], t0
++ loadi PayloadOffset[cfr, t0, 8], t0
+ subi 1, t0
+ biaeq t0, JSPropertyNameIterator::m_numCacheableSlots[t3], .opGetByPnameSlow
+ bilt t0, JSPropertyNameIterator::m_cachedStructureInlineCapacity[t3], .opGetByPnameInlineProperty
+@@ -1679,7 +1679,7 @@ _llint_op_next_pname:
+ loadi 20[PC], t2
+ loadi PayloadOffset[cfr, t2, 8], t2
+ loadp JSPropertyNameIterator::m_jsStrings[t2], t3
+- loadi [t3, t0, 8], t3
++ loadi PayloadOffset[t3, t0, 8], t3
+ addi 1, t0
+ storei t0, PayloadOffset[cfr, t1, 8]
+ loadi 4[PC], t1
+@@ -1743,7 +1743,11 @@ macro getDeBruijnScope(deBruijinIndexOperand, scopeChe
+
+ loadp CodeBlock[cfr], t1
+ bineq CodeBlock::m_codeType[t1], FunctionCode, .loop
+- btbz CodeBlock::m_needsActivation[t1], .loop
++ if FOUR_BYTE_BOOL
++ btiz CodeBlock::m_needsActivation[t1], .loop
++ else
++ btbz CodeBlock::m_needsActivation[t1], .loop
++ end
+
+ loadi CodeBlock::m_activationRegister[t1], t1
+
diff --git a/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_asm b/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_asm
new file mode 100644
index 0000000..e5188b0
--- /dev/null
+++ b/patches/patch-Source_JavaScriptCore_llint_LowLevelInterpreter_asm
@@ -0,0 +1,48 @@
+$OpenBSD: patch-Source_JavaScriptCore_llint_LowLevelInterpreter_asm,v 1.2 2013/10/06 14:03:42 landry Exp $
+https://bugs.webkit.org/show_bug.cgi?id=103128
+https://bug-103128-attachments.webkit.org/attachment.cgi?id=202076
+Last chunk: https://bug-103128-attachments.webkit.org/attachment.cgi?id=202651
+--- Source/JavaScriptCore/llint/LowLevelInterpreter.asm.orig Fri Sep 20 09:24:34 2013
++++ Source/JavaScriptCore/llint/LowLevelInterpreter.asm Sun Oct 6 14:48:27 2013
+@@ -109,6 +109,12 @@ else
+ const PayloadOffset = 0
+ end
+
++if JSVALUE64
++ const CellOffset = 0
++else
++ const CellOffset = PayloadOffset
++end
++
+ # Constant for reasoning about butterflies.
+ const IsArray = 1
+ const IndexingShapeMask = 30
+@@ -276,13 +282,13 @@ macro assertNotConstant(index)
+ end
+
+ macro functionForCallCodeBlockGetter(targetRegister)
+- loadp Callee[cfr], targetRegister
++ loadp Callee + CellOffset[cfr], targetRegister
+ loadp JSFunction::m_executable[targetRegister], targetRegister
+ loadp FunctionExecutable::m_codeBlockForCall[targetRegister], targetRegister
+ end
+
+ macro functionForConstructCodeBlockGetter(targetRegister)
+- loadp Callee[cfr], targetRegister
++ loadp Callee + CellOffset[cfr], targetRegister
+ loadp JSFunction::m_executable[targetRegister], targetRegister
+ loadp FunctionExecutable::m_codeBlockForConstruct[targetRegister], targetRegister
+ end
+@@ -657,7 +663,11 @@ _llint_op_jngreatereq:
+ _llint_op_loop_hint:
+ traceExecution()
+ loadp JITStackFrame::vm[sp], t1
+- loadb VM::watchdog+Watchdog::m_timerDidFire[t1], t0
++ if FOUR_BYTE_BOOL
++ loadi VM::watchdog+Watchdog::m_timerDidFire[t1], t0
++ else
++ loadb VM::watchdog+Watchdog::m_timerDidFire[t1], t0
++ end
+ btbnz t0, .handleWatchdogTimer
+ .afterWatchdogTimerCheck:
+ checkSwitchToJITForLoop()
diff --git a/patches/patch-Source_ThirdParty_ANGLE_src_compiler_glslang_y b/patches/patch-Source_ThirdParty_ANGLE_src_compiler_glslang_y
new file mode 100644
index 0000000..3a6a8da
--- /dev/null
+++ b/patches/patch-Source_ThirdParty_ANGLE_src_compiler_glslang_y
@@ -0,0 +1,22 @@
+$OpenBSD: patch-Source_ThirdParty_ANGLE_src_compiler_glslang_y,v 1.1 2014/01/29 17:28:05 ajacoutot Exp $
+
+XXX rm when bison(1) is updated
+Source/ThirdParty/ANGLE/src/compiler/glslang.y:52.1-5: invalid directive: `%code'
+
+--- Source/ThirdParty/ANGLE/src/compiler/glslang.y.orig Mon Jan 20 10:26:24 2014
++++ Source/ThirdParty/ANGLE/src/compiler/glslang.y Wed Jan 29 15:13:45 2014
+@@ -49,13 +49,11 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AN
+ %locations
+ %lex-param {YYLEX_PARAM}
+
+-%code requires {
++%union {
+ #define YYLTYPE TSourceLoc
+ #define YYLTYPE_IS_DECLARED 1
+ #define SH_MAX_TOKEN_LENGTH 256 // WebGL spec.
+-}
+
+-%union {
+ struct {
+ union {
+ TString *string;
diff --git a/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h b/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
new file mode 100644
index 0000000..0111086
--- /dev/null
+++ b/patches/patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h
@@ -0,0 +1,21 @@
+$OpenBSD: patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port_h,v 1.1 2013/10/06 14:03:43 landry Exp $
+--- Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h.orig Mon Sep 9 11:20:59 2013
++++ Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h Mon Sep 23 22:46:15 2013
+@@ -225,6 +225,8 @@
+ #define GTEST_OS_HURD 1
+ #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
+ #define GTEST_OS_FREEBSD 1
++#elif defined __OpenBSD__
++#define GTEST_OS_OPENBSD 1
+ #elif defined __MVS__
+ #define GTEST_OS_ZOS 1
+ #elif defined(__sun) && defined(__SVR4)
+@@ -234,7 +236,7 @@
+ #endif // __CYGWIN__
+
+ #if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || \
+- GTEST_OS_SOLARIS || GTEST_OS_AIX || GTEST_OS_FREEBSD || GTEST_OS_HURD
++ GTEST_OS_SOLARIS || GTEST_OS_AIX || GTEST_OS_FREEBSD || GTEST_OS_OPENBSD || GTEST_OS_HURD
+
+ // On some platforms, <regex.h> needs someone to define size_t, and
+ // won't compile otherwise. We can #include it here as we already
diff --git a/patches/patch-Source_ThirdParty_leveldb_port_port_posix_h b/patches/patch-Source_ThirdParty_leveldb_port_port_posix_h
new file mode 100644
index 0000000..84a5c67
--- /dev/null
+++ b/patches/patch-Source_ThirdParty_leveldb_port_port_posix_h
@@ -0,0 +1,35 @@
+$OpenBSD: patch-Source_ThirdParty_leveldb_port_port_posix_h,v 1.1 2013/04/13 09:11:02 landry Exp $
+http://code.google.com/p/leveldb/issues/detail?id=98
+--- Source/ThirdParty/leveldb/port/port_posix.h.orig Fri Mar 8 23:47:55 2013
++++ Source/ThirdParty/leveldb/port/port_posix.h Sat Mar 9 00:19:53 2013
+@@ -25,10 +25,11 @@
+ #include <sys/types.h>
+ #include <sys/endian.h>
+ #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
+-#elif defined(OS_OPENBSD) || defined(OS_NETBSD) ||\
++#elif defined(__OpenBSD__) || defined(OS_NETBSD) ||\
+ defined(OS_DRAGONFLYBSD)
+ #include <sys/types.h>
+ #include <sys/endian.h>
++ #define PLATFORM_IS_LITTLE_ENDIAN (BYTE_ORDER == LITTLE_ENDIAN)
+ #elif defined(OS_HPUX)
+ #define PLATFORM_IS_LITTLE_ENDIAN false
+ #elif defined(OS_ANDROID)
+@@ -54,7 +55,7 @@
+ #endif
+
+ #if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
+- defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
++ defined(OS_NETBSD) || defined(__OpenBSD__) || defined(OS_DRAGONFLYBSD) ||\
+ defined(OS_ANDROID) || defined(OS_HPUX)
+ // Use fread/fwrite/fflush on platforms without _unlocked variants
+ #define fread_unlocked fread
+@@ -63,7 +64,7 @@
+ #endif
+
+ #if defined(OS_MACOSX) || defined(OS_FREEBSD) ||\
+- defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
++ defined(__OpenBSD__) || defined(OS_DRAGONFLYBSD)
+ // Use fsync() on platforms without fdatasync()
+ #define fdatasync fsync
+ #endif
diff --git a/patches/patch-Source_WTF_wtf_Atomics_h b/patches/patch-Source_WTF_wtf_Atomics_h
new file mode 100644
index 0000000..691b528
--- /dev/null
+++ b/patches/patch-Source_WTF_wtf_Atomics_h
@@ -0,0 +1,23 @@
+$OpenBSD: patch-Source_WTF_wtf_Atomics_h,v 1.3 2013/10/20 09:07:57 landry Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=86835
+Fix build failure on sparc64 since 1.8.1, provide atomic{In,De}crement implems based on __sync_fetch_and_add builtin
+
+--- Source/WTF/wtf/Atomics.h.orig Sat Aug 3 18:10:38 2013
++++ Source/WTF/wtf/Atomics.h Sun Oct 20 11:06:14 2013
+@@ -112,6 +112,15 @@ inline int atomicDecrement(int volatile* addend) { ret
+ inline int64_t atomicIncrement(int64_t volatile* addend) { return __sync_add_and_fetch(addend, 1); }
+ inline int64_t atomicDecrement(int64_t volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
+
++#elif COMPILER(GCC) && CPU(SPARC64)
++#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
++
++inline int atomicIncrement(int volatile* addend) { return __sync_fetch_and_add(addend, 1) + 1; }
++inline int atomicDecrement(int volatile* addend) { return __sync_fetch_and_add(addend, -1) - 1; }
++
++inline int64_t atomicIncrement(int64_t volatile* addend) { return __sync_fetch_and_add(addend, 1) + 1; }
++inline int64_t atomicDecrement(int64_t volatile* addend) { return __sync_fetch_and_add(addend, -1) - 1; }
++
+ #endif
+
+ #if OS(WINDOWS)
diff --git a/patches/patch-Source_WTF_wtf_DisallowCType_h b/patches/patch-Source_WTF_wtf_DisallowCType_h
new file mode 100644
index 0000000..124e236
--- /dev/null
+++ b/patches/patch-Source_WTF_wtf_DisallowCType_h
@@ -0,0 +1,16 @@
+$OpenBSD: patch-Source_WTF_wtf_DisallowCType_h,v 1.1 2013/10/06 14:03:43 landry Exp $
+just, wtf.
+error:
+'isspace_WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h'
+was not declared in this scope
+--- Source/WTF/wtf/DisallowCType.h.orig Wed Jul 17 22:49:42 2013
++++ Source/WTF/wtf/DisallowCType.h Wed Jul 17 22:50:11 2013
+@@ -41,7 +41,7 @@
+ // or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> which uses
+ // isacii().
+ #include <wtf/Platform.h>
+-#if !PLATFORM(QT) && !(OS(DARWIN) && PLATFORM(GTK)) && !OS(QNX) && !defined(_LIBCPP_VERSION)
++#if !PLATFORM(QT) && !((OS(OPENBSD) || OS(DARWIN)) && PLATFORM(GTK)) && !OS(QNX) && !defined(_LIBCPP_VERSION)
+
+ #include <ctype.h>
+
diff --git a/patches/patch-Source_WTF_wtf_InlineASM_h b/patches/patch-Source_WTF_wtf_InlineASM_h
new file mode 100644
index 0000000..74b89b6
--- /dev/null
+++ b/patches/patch-Source_WTF_wtf_InlineASM_h
@@ -0,0 +1,12 @@
+$OpenBSD: patch-Source_WTF_wtf_InlineASM_h,v 1.1 2013/04/13 09:11:02 landry Exp $
+--- Source/WTF/wtf/InlineASM.h.orig Sat Mar 9 21:30:13 2013
++++ Source/WTF/wtf/InlineASM.h Sat Mar 9 21:30:27 2013
+@@ -42,7 +42,7 @@
+ #define THUMB_FUNC_PARAM(name)
+ #endif
+
+-#if (OS(LINUX) || OS(FREEBSD)) && CPU(X86_64)
++#if (OS(LINUX) || OS(FREEBSD) || OS(OPENBSD)) && CPU(X86_64)
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
diff --git a/patches/patch-Source_WTF_wtf_MathExtras_h b/patches/patch-Source_WTF_wtf_MathExtras_h
new file mode 100644
index 0000000..077e743
--- /dev/null
+++ b/patches/patch-Source_WTF_wtf_MathExtras_h
@@ -0,0 +1,15 @@
+$OpenBSD: patch-Source_WTF_wtf_MathExtras_h,v 1.1 2013/10/06 14:03:43 landry Exp $
+signbit & isfinite are defined in gcc's cmath for 4.6 & 4.8..
+so partly revert https://bugs.webkit.org/show_bug.cgi?id=19975, make it conditional to older gcc
+--- Source/WTF/wtf/MathExtras.h.orig Wed Jun 26 10:42:13 2013
++++ Source/WTF/wtf/MathExtras.h Thu Jul 18 09:30:59 2013
+@@ -106,7 +106,8 @@ inline bool isinf(double x) { return !finite(x) && !is
+
+ #endif
+
+-#if OS(OPENBSD)
++/* isfinite and signbit exist in gcc 4.6 or 4.8, not in 4.2 */
++#if OS(OPENBSD) && (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ <= 2)
+
+ namespace std {
+
diff --git a/patches/patch-Source_WTF_wtf_Platform_h b/patches/patch-Source_WTF_wtf_Platform_h
new file mode 100644
index 0000000..870a30f
--- /dev/null
+++ b/patches/patch-Source_WTF_wtf_Platform_h
@@ -0,0 +1,74 @@
+$OpenBSD: patch-Source_WTF_wtf_Platform_h,v 1.3 2013/11/14 16:47:00 ajacoutot Exp $
+
+Add defines for mips64*/hppa.
+Disable yarr jit on anything not having a jit
+https://bugs.webkit.org/show_bug.cgi?id=113638
+
+--- Source/WTF/wtf/Platform.h.orig Mon Nov 11 10:21:52 2013
++++ Source/WTF/wtf/Platform.h Thu Nov 14 09:38:50 2013
+@@ -83,9 +83,14 @@
+
+ /* CPU(MIPS) - MIPS 32-bit */
+ /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
+-#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
+- && defined(_ABIO32)
++#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64__))
++#if defined(_ABIO32)
+ #define WTF_CPU_MIPS 1
++#endif
++#if defined(__mips64__)
++#define WTF_CPU_MIPS64 1
++#define USE_SYSTEM_MALLOC 1
++#endif
+ #if defined(__MIPSEB__)
+ #define WTF_CPU_BIG_ENDIAN 1
+ #endif
+@@ -125,6 +130,11 @@
+ #define WTF_CPU_SH4 1
+ #endif
+
++/* CPU(HPPA) - HP-PA */
++#if defined(__hppa__)
++#define WTF_CPU_HPPA 1
++#endif
++
+ /* CPU(SPARC32) - SPARC 32-bit */
+ #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
+ #define WTF_CPU_SPARC32 1
+@@ -323,7 +333,7 @@
+
+ #endif /* ARM */
+
+-#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC)
++#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC) || CPU(MIPS64) || CPU(SPARC64)
+ #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
+ #endif
+
+@@ -689,7 +699,8 @@
+ || CPU(ALPHA) \
+ || CPU(SPARC64) \
+ || CPU(S390X) \
+- || CPU(PPC64)
++ || CPU(PPC64) \
++ || CPU(MIPS64)
+ #define WTF_USE_JSVALUE64 1
+ #else
+ #define WTF_USE_JSVALUE32_64 1
+@@ -855,7 +866,7 @@
+ #define ENABLE_REGEXP_TRACING 0
+
+ /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
+-#if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT) || ENABLE(LLINT_C_LOOP)) && !(OS(QNX) && PLATFORM(QT))
++#if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT)) && !(OS(QNX) && PLATFORM(QT))
+ #define ENABLE_YARR_JIT 1
+
+ /* Setting this flag compares JIT results with interpreter results. */
+@@ -864,7 +875,7 @@
+
+ /* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
+ enabled as well: */
+-#if ENABLE(JIT) || ENABLE(YARR_JIT)
++#if ENABLE(JIT)
+ #if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
+ #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
+ #else
diff --git a/patches/patch-Source_WTF_wtf_RAMSize_cpp b/patches/patch-Source_WTF_wtf_RAMSize_cpp
new file mode 100644
index 0000000..2d6bf11
--- /dev/null
+++ b/patches/patch-Source_WTF_wtf_RAMSize_cpp
@@ -0,0 +1,31 @@
+$OpenBSD: patch-Source_WTF_wtf_RAMSize_cpp,v 1.1 2013/04/13 09:11:02 landry Exp $
+--- Source/WTF/wtf/RAMSize.cpp.orig Thu Jul 19 12:02:14 2012
++++ Source/WTF/wtf/RAMSize.cpp Sat Mar 9 21:26:30 2013
+@@ -27,7 +27,7 @@
+ #include "RAMSize.h"
+
+ #include "StdLibExtras.h"
+-#if OS(DARWIN)
++#if OS(DARWIN) || OS(OPENBSD)
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+@@ -45,13 +45,17 @@ static const size_t ramSizeGuess = 128 * MB;
+
+ static size_t computeRAMSize()
+ {
+-#if OS(DARWIN)
++#if OS(DARWIN) || OS(OPENBSD)
+ int mib[2];
+ uint64_t ramSize;
+ size_t length;
+
+ mib[0] = CTL_HW;
++#if OS(DARWIN)
+ mib[1] = HW_MEMSIZE;
++#else
++ mib[1] = HW_PHYSMEM64;
++#endif
+ length = sizeof(int64_t);
+ int sysctlResult = sysctl(mib, 2, &ramSize, &length, 0, 0);
+ if (sysctlResult == -1)
diff --git a/patches/patch-Source_WTF_wtf_dtoa_utils_h b/patches/patch-Source_WTF_wtf_dtoa_utils_h
new file mode 100644
index 0000000..b066f4d
--- /dev/null
+++ b/patches/patch-Source_WTF_wtf_dtoa_utils_h
@@ -0,0 +1,12 @@
+$OpenBSD: patch-Source_WTF_wtf_dtoa_utils_h,v 1.2 2013/11/14 16:47:00 ajacoutot Exp $
+--- Source/WTF/wtf/dtoa/utils.h.orig Mon Nov 11 10:23:36 2013
++++ Source/WTF/wtf/dtoa/utils.h Thu Nov 14 09:40:22 2013
+@@ -49,7 +49,7 @@
+ defined(__ARMEL__) || \
+ defined(_MIPS_ARCH_MIPS32R2)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+-#elif CPU(MIPS) || CPU(PPC) || CPU(PPC64) || OS(WINCE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(SPARC) || CPU(ALPHA) || CPU(HPPA)
++#elif CPU(MIPS) || CPU(PPC) || CPU(PPC64) || OS(WINCE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(SPARC) || CPU(ALPHA) || CPU(HPPA) || CPU(MIPS64) || CPU(SPARC64)
+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
+ #elif defined(_M_IX86) || defined(__i386__)
+ #if defined(_WIN32)
diff --git a/patches/patch-Source_WebCore_plugins_PluginDatabase_cpp b/patches/patch-Source_WebCore_plugins_PluginDatabase_cpp
new file mode 100644
index 0000000..f03ce4b
--- /dev/null
+++ b/patches/patch-Source_WebCore_plugins_PluginDatabase_cpp
@@ -0,0 +1,12 @@
+$OpenBSD: patch-Source_WebCore_plugins_PluginDatabase_cpp,v 1.2 2013/04/13 09:11:02 landry Exp $
+--- Source/WebCore/plugins/PluginDatabase.cpp.orig Sun Dec 16 11:24:45 2012
++++ Source/WebCore/plugins/PluginDatabase.cpp Fri Mar 8 00:57:25 2013
+@@ -403,7 +403,7 @@ Vector<String> PluginDatabase::defaultPluginDirectorie
+ paths.append(userPluginPath);
+
+ paths.append("/usr/lib/browser/plugins");
+- paths.append("/usr/local/lib/mozilla/plugins");
++ paths.append("${LOCALBASE}/lib/mozilla/plugins");
+ paths.append("/usr/lib/firefox/plugins");
+ paths.append("/usr/lib64/browser-plugins");
+ paths.append("/usr/lib/browser-plugins");
diff --git a/patches/patch-Source_WebKit2_Platform_CoreIPC_unix_ConnectionUnix_cpp b/patches/patch-Source_WebKit2_Platform_CoreIPC_unix_ConnectionUnix_cpp
new file mode 100644
index 0000000..9762f8c
--- /dev/null
+++ b/patches/patch-Source_WebKit2_Platform_CoreIPC_unix_ConnectionUnix_cpp
@@ -0,0 +1,15 @@
+$OpenBSD: patch-Source_WebKit2_Platform_CoreIPC_unix_ConnectionUnix_cpp,v 1.1 2013/04/13 09:11:02 landry Exp $
+Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp:317: error: elements of array 'iovec iov [1]' have incomplete type
+Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp:317: error: storage size of 'iov' isn't known
+Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp:481: error: elements of array 'iovec iov [3]' have incomplete type
+Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp:481: error: storage size of 'iov' isn't known
+--- Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp.orig Fri Feb 1 11:46:15 2013
++++ Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp Fri Mar 8 00:57:25 2013
+@@ -31,6 +31,7 @@
+ #include "DataReference.h"
+ #include "SharedMemory.h"
+ #include <sys/socket.h>
++#include <sys/uio.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
diff --git a/patches/patch-Source_WebKit2_PluginProcess_unix_PluginProcessMainUnix_cpp b/patches/patch-Source_WebKit2_PluginProcess_unix_PluginProcessMainUnix_cpp
new file mode 100644
index 0000000..b1ce3fd
--- /dev/null
+++ b/patches/patch-Source_WebKit2_PluginProcess_unix_PluginProcessMainUnix_cpp
@@ -0,0 +1,15 @@
+$OpenBSD: patch-Source_WebKit2_PluginProcess_unix_PluginProcessMainUnix_cpp,v 1.1 2013/10/06 14:03:44 landry Exp $
+--- Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp.orig Mon Sep 9 10:29:14 2013
++++ Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp Mon Sep 23 22:42:22 2013
+@@ -43,7 +43,10 @@
+ #elif PLATFORM(EFL) && HAVE_ECORE_X
+ #include <Ecore_X.h>
+ #endif
+-
++/* for basename() */
++#if OS(OPENBSD)
++#include <libgen.h>
++#endif
+ using namespace WebCore;
+
+ namespace WebKit {
diff --git a/patches/patch-Source_WebKit2_UIProcess_Launcher_gtk_ProcessLauncherGtk_cpp b/patches/patch-Source_WebKit2_UIProcess_Launcher_gtk_ProcessLauncherGtk_cpp
new file mode 100644
index 0000000..c3c11c3
--- /dev/null
+++ b/patches/patch-Source_WebKit2_UIProcess_Launcher_gtk_ProcessLauncherGtk_cpp
@@ -0,0 +1,16 @@
+$OpenBSD: patch-Source_WebKit2_UIProcess_Launcher_gtk_ProcessLauncherGtk_cpp,v 1.2 2013/11/14 16:47:00 ajacoutot Exp $
+--- Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp.orig Mon Nov 11 09:34:23 2013
++++ Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp Thu Nov 14 09:38:50 2013
+@@ -45,7 +45,11 @@
+ #if OS(UNIX)
+ #include <sys/socket.h>
+ #endif
+-
++/* for WEXITSTATUS / WIFEXIT */
++#if OS(OPENBSD)
++#include <sys/wait.h>
++#include <sys/socket.h>
++#endif
+ #ifdef SOCK_SEQPACKET
+ #define SOCKET_TYPE SOCK_SEQPACKET
+ #else
diff --git a/patches/patch-Source_WebKit2_UIProcess_Plugins_unix_PluginProcessProxyUnix_cpp b/patches/patch-Source_WebKit2_UIProcess_Plugins_unix_PluginProcessProxyUnix_cpp
new file mode 100644
index 0000000..66c78cf
--- /dev/null
+++ b/patches/patch-Source_WebKit2_UIProcess_Plugins_unix_PluginProcessProxyUnix_cpp
@@ -0,0 +1,38 @@
+$OpenBSD: patch-Source_WebKit2_UIProcess_Plugins_unix_PluginProcessProxyUnix_cpp,v 1.4 2014/01/29 17:28:05 ajacoutot Exp $
+
+To remove in 2.4.x ?
+https://bugs.webkit.org/show_bug.cgi?id=126779
+https://trac.webkit.org/changeset/162513/trunk/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
+
+--- Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp.orig Mon Sep 9 10:29:14 2013
++++ Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp Mon Sep 23 22:42:22 2013
+@@ -39,6 +39,9 @@
+ #include <glib.h>
+ #include <wtf/gobject/GOwnPtr.h>
+ #endif
++#if OS(OPENBSD)
++#include <sys/wait.h>
++#endif
+
+ using namespace WebCore;
+
+@@ -74,16 +77,16 @@ bool PluginProcessProxy::scanPlugin(const String& plug
+ int status;
+ GOwnPtr<char> stdOut;
+
+- // If the disposition of SIGCLD signal is set to SIG_IGN (default)
++ // If the disposition of SIGCHLD signal is set to SIG_IGN (default)
+ // then the signal will be ignored and g_spawn_sync() will not be
+ // able to return the status.
+ // As a consequence, we make sure that the disposition is set to
+ // SIG_DFL before calling g_spawn_sync().
+ struct sigaction action;
+- sigaction(SIGCLD, 0, &action);
++ sigaction(SIGCHLD, 0, &action);
+ if (action.sa_handler == SIG_IGN) {
+ action.sa_handler = SIG_DFL;
+- sigaction(SIGCLD, &action, 0);
++ sigaction(SIGCHLD, &action, 0);
+ }
+
+ if (!g_spawn_sync(0, argv, 0, G_SPAWN_STDERR_TO_DEV_NULL, 0, 0, &stdOut.outPtr(), 0, &status, 0))
diff --git a/patches/patch-Source_WebKit2_UIProcess_StatisticsRequest_cpp b/patches/patch-Source_WebKit2_UIProcess_StatisticsRequest_cpp
new file mode 100644
index 0000000..1d41120
--- /dev/null
+++ b/patches/patch-Source_WebKit2_UIProcess_StatisticsRequest_cpp
@@ -0,0 +1,14 @@
+$OpenBSD: patch-Source_WebKit2_UIProcess_StatisticsRequest_cpp,v 1.1 2013/10/06 14:42:39 landry Exp $
+Taken from Source/WebKit2/Platform/CoreIPC/Connection.cpp
+Needed on sparc64
+--- Source/WebKit2/UIProcess/StatisticsRequest.cpp.orig Thu Oct 3 21:41:28 2013
++++ Source/WebKit2/UIProcess/StatisticsRequest.cpp Thu Oct 3 21:43:20 2013
+@@ -47,7 +47,7 @@ uint64_t StatisticsRequest::addOutstandingRequest()
+ {
+ static int64_t uniqueRequestID;
+
+- uint64_t requestID = atomicIncrement(&uniqueRequestID);
++ uint64_t requestID = atomicIncrement(reinterpret_cast<int64_t volatile*>(&uniqueRequestID));
+ m_outstandingRequests.add(requestID);
+ return requestID;
+ }
diff --git a/patches/patch-Source_WebKit2_WebProcess_soup_WebKitSoupRequestInputStream_h b/patches/patch-Source_WebKit2_WebProcess_soup_WebKitSoupRequestInputStream_h
new file mode 100644
index 0000000..045e95f
--- /dev/null
+++ b/patches/patch-Source_WebKit2_WebProcess_soup_WebKitSoupRequestInputStream_h
@@ -0,0 +1,13 @@
+$OpenBSD: patch-Source_WebKit2_WebProcess_soup_WebKitSoupRequestInputStream_h,v 1.1 2013/10/06 14:03:44 landry Exp $
+Fix build failure on amd64 ?
+--- Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.h.orig Sun Jun 2 21:34:20 2013
++++ Source/WebKit2/WebProcess/soup/WebKitSoupRequestInputStream.h Sun Jun 2 21:34:33 2013
+@@ -46,7 +46,7 @@ struct _WebKitSoupRequestInputStreamClass {
+ };
+
+ GType webkit_soup_request_input_stream_get_type();
+-GInputStream* webkitSoupRequestInputStreamNew(guint64 contentLength);
++GInputStream* webkitSoupRequestInputStreamNew(uint64_t contentLength);
+ void webkitSoupRequestInputStreamAddData(WebKitSoupRequestInputStream*, const void* data, size_t dataLength);
+ bool webkitSoupRequestInputStreamFinished(WebKitSoupRequestInputStream*);
+
diff --git a/patches/patch-Tools_MiniBrowser_gtk_main_c b/patches/patch-Tools_MiniBrowser_gtk_main_c
new file mode 100644
index 0000000..71dbaf2
--- /dev/null
+++ b/patches/patch-Tools_MiniBrowser_gtk_main_c
@@ -0,0 +1,13 @@
+$OpenBSD: patch-Tools_MiniBrowser_gtk_main_c,v 1.1 2013/10/06 14:03:44 landry Exp $
+Dont assume we're running from the src/objdir
+--- Tools/MiniBrowser/gtk/main.c.orig Wed Sep 18 09:07:57 2013
++++ Tools/MiniBrowser/gtk/main.c Mon Sep 23 22:44:52 2013
+@@ -263,8 +263,6 @@ int main(int argc, char *argv[])
+ }
+ g_option_context_free (context);
+
+- g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
+-
+ // Enable the favicon database, by specifying the default directory.
+ webkit_web_context_set_favicon_database_directory(webkit_web_context_get_default(), NULL);
+
diff --git a/patches/patch-configure b/patches/patch-configure
new file mode 100644
index 0000000..e83fde6
--- /dev/null
+++ b/patches/patch-configure
@@ -0,0 +1,94 @@
+$OpenBSD: patch-configure,v 1.21 2014/01/29 17:28:05 ajacoutot Exp $
+
+https://bugs.webkit.org/show_bug.cgi?id=117796
+
+- Chunk 1, 2 & 4 : https://bugs.webkit.org/show_bug.cgi?id=109932
+Only webkit2 requires c++11 features atm, so let's relax the check until we have webkit2
+
+- Chunk 5 : no librt on OpenBSD
+
+- Chunk 3 : GNOME Bug 627126 - gsettings schema files don't get installed on FreeBSD
+glib commit 136e705e8383ff8848e425ac01278102d7badc52
+
+- Chunk 6 : Don't force the use of -O2, the ports infrastructure
+takes care of that
+
+--- configure.orig Tue Jan 21 12:09:55 2014
++++ configure Mon Jan 27 10:18:44 2014
+@@ -4790,7 +4790,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+-#if !(defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 7)
++#if !(defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
+ #error Not a supported GCC compiler
+ #endif
+
+@@ -4848,7 +4848,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+-#if !(defined(__GNUG__) && defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 7)
++#if !(defined(__GNUG__) && defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
+ #error Not a supported G++ compiler
+ #endif
+
+@@ -17606,26 +17606,14 @@ gsettings__enum_file = $(addsuffix .enums.xml,$(gsetti
+
+ all-am: $(gsettings_SCHEMAS:.xml=.valid)
+ uninstall-am: uninstall-gsettings-schemas
+-install-data-am: install-gsettings-schemas
++install-data-am:
+
+ .SECONDARY: $(gsettings_SCHEMAS)
+
+-gsettings__base_list = \
+- sed "$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g" | \
+- sed "$$!N;$$!N;$$!N;$$!N;s/\n/ /g"
+-
+-install-gsettings-schemas: $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
++install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
+ @$(NORMAL_INSTALL)
+ test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"
+- @list='\''$(gsettings__enum_file) $(gsettings_SCHEMAS)'\''; test -n "$(gsettingsschemadir)" || list=; \
+- for p in $$list; do \
+- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+- echo "$$d$$p"; \
+- done | $(gsettings__base_list) | \
+- while read files; do \
+- echo " $(INSTALL_DATA) $$files '\''$(DESTDIR)$(gsettingsschemadir)'\''"; \
+- $(INSTALL_DATA) $$files "$(DESTDIR)$(gsettingsschemadir)" || exit $$?; \
+- done
++ $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"
+ test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
+
+ uninstall-gsettings-schemas:
+@@ -20951,7 +20939,7 @@ $as_echo "$ac_cv_search_shm_open" >&6; }
+ ac_res=$ac_cv_search_shm_open
+ if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+- SHM_LIBS="-lrt"
++ SHM_LIBS=""
+ fi
+
+
+@@ -21383,7 +21371,7 @@ fi
+ # Use C99 as the language standard for C code.
+ CFLAGS="$CFLAGS -pthread -std=c99"
+ # Use the C++11 standard. Do not warn about C++11 incompatibilities.
+-CXXFLAGS="$CXXFLAGS -pthread -std=c++11 -Wno-c++11-compat"
++#CXXFLAGS="$CXXFLAGS -pthread -std=c++11 -Wno-c++11-compat"
+
+ # Clang requires suppression of unused arguments warnings.
+ if test "$c_compiler" = "clang"; then
+@@ -21420,8 +21408,8 @@ fi
+
+ # Add the appropriate 'O' level for optimized builds.
+ if test "$enable_optimizations" = "yes"; then
+- CXXFLAGS="$CXXFLAGS -O2"
+- CFLAGS="$CFLAGS -O2"
++ CXXFLAGS="$CXXFLAGS"
++ CFLAGS="$CFLAGS"
+ else
+ CXXFLAGS="$CXXFLAGS -O0"
+ CFLAGS="$CFLAGS -O0"