gnucash-on-windows master: Add WebKitGtk package files, build instructions.

John Ralls jralls at code.gnucash.org
Thu May 28 16:13:38 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash-on-windows/commit/dd8fa694 (commit)
	from  https://github.com/Gnucash/gnucash-on-windows/commit/318ff4ac (commit)



commit dd8fa69437b76d05ef7e134f8f1f6b18c7621789
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu May 28 13:13:11 2020 -0700

    Add WebKitGtk package files, build instructions.
    
    WebKitGtk is no longer supported by MSYS2 so we must package it ourselves.

diff --git a/dependencies/README.md b/dependencies/README.md
new file mode 100644
index 0000000..f099688
--- /dev/null
+++ b/dependencies/README.md
@@ -0,0 +1,19 @@
+MSYS2 Packaging sources for dependencies that we provide via pacman instead of
+building every time with jhbuild.
+
+To build you'll need a working MSYS2 environment including:
+  base-devel
+  msys2-devel
+and one or both of
+  mingw-w64-i686-toolchain
+  mingw-w64-x86_64-toolchain
+If you're building for download you should have both toolchains installed. Note when installing toolchains that you don't need the ada, fortran, or objective-c compilers.
+
+Start an MSYS2 (not Mingw32/Mingw64!) shell and cd to the directory of the package you want to build. Edit PKGBUILD in that directory as needed for new versions and release number. Run
+   makepkg-mingw -sCLf
+
+If you want to build for only one architecture you can set MINGW_INSTALLS=mingw32 or MINGW_INSTALLS=mingw64 as appropriate.
+
+More procedure details may be found at https://www.msys2.org/wiki/Creating-Packages.
+
+If you're building packages for others to install with pacman then you'll need to sign the packages and put your public key in the repository so that others can download and install it to verify the packages you build. Instructions for setting this up are at https://www.msys2.org/wiki/Signing-packages.
diff --git a/dependencies/mingw-w64-webkitgtk/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch b/dependencies/mingw-w64-webkitgtk/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch
new file mode 100644
index 0000000..7186799
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch
@@ -0,0 +1,29 @@
+From 0505839dc1793406aa37bc95ee51ea361e9508a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?=
+ =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986 at gmail.com>
+Date: Tue, 14 Apr 2015 14:53:29 +0000
+Subject: [PATCH 20/20] [W32] Fixup dummy HeapStatistics implementation
+
+GCC warns that exitWithFailure is marked as noreturn, but it does return:
+../webkitgtk-2.4.8/Source/JavaScriptCore/heap/HeapStatistics.cpp:135:1: warning: 'noreturn' function does return
+
+Call exit(-1) to indicate that no, there is no returning from here.
+---
+ Source/JavaScriptCore/heap/HeapStatistics.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Source/JavaScriptCore/heap/HeapStatistics.cpp b/Source/JavaScriptCore/heap/HeapStatistics.cpp
+index f23def7..ba441f0 100644
+--- a/Source/JavaScriptCore/heap/HeapStatistics.cpp
++++ b/Source/JavaScriptCore/heap/HeapStatistics.cpp
+@@ -132,6 +132,7 @@ void HeapStatistics::logStatistics()
+ 
+ void HeapStatistics::exitWithFailure()
+ {
++    exit(-1);
+ }
+ 
+ void HeapStatistics::reportSuccess()
+-- 
+1.8.5.3
+
diff --git a/dependencies/mingw-w64-webkitgtk/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch b/dependencies/mingw-w64-webkitgtk/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch
new file mode 100644
index 0000000..2300a22
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch
@@ -0,0 +1,68 @@
+From f90a814ad83d7c6279eaf1fc59d3d373ba7af259 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?=
+ =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986 at gmail.com>
+Date: Tue, 14 Apr 2015 17:50:25 +0000
+Subject: [PATCH 21/21] [W32] Change printf format atribute to gnu_printf,
+ MinGW compatibility
+
+"printf" means "gnu_printf" when compiling for non-Windows and means
+"ms_printf" when compiling for Windows. The code, however, does seems to be
+assuming gnu_printf (judging by the use of %z and %l).
+
+Fix this by explicitly specifying gnu_printf format style.
+To ensure that gnu-compatible printf implementation is used, compile
+with -D__USE_MINGW_ANSI_STDIO=1, it will automagically turn all *printf()
+invocations into __mingw_*printf(), which are gnu-compatible.
+
+Only one function that won't be turned is _vsnprintf(). Ifdef its use and
+call vsnprintf() instead when __USE_MINGW_ANSI_STDIO != 0.
+---
+ Source/WTF/wtf/Assertions.cpp | 11 ++++++++++-
+ Source/WTF/wtf/Assertions.h   |  4 ++--
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
+index a370302..d846777 100644
+--- a/Source/WTF/wtf/Assertions.cpp
++++ b/Source/WTF/wtf/Assertions.cpp
+@@ -116,12 +116,21 @@ static void vprintf_stderr_common(const char* format, va_list args)
+         size_t size = 1024;
+ 
+         do {
++            int printed;
+             char* buffer = (char*)malloc(size);
+ 
+             if (buffer == NULL)
+                 break;
+ 
+-            if (_vsnprintf(buffer, size, format, args) != -1) {
++#if defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0
++            /* vsnprintf is a macro for __mingw_vsnprintf */
++            printed = vsnprintf(buffer, size, format, args);
++#else
++            /* _vsnprintf is always _vsnprintf from MS CRT */
++            printed = _vsnprintf(buffer, size, format, args);
++#endif
++
++            if (printed != -1) {
+ #if OS(WINCE)
+                 // WinCE only supports wide chars
+                 wchar_t* wideBuffer = (wchar_t*)malloc(size * sizeof(wchar_t));
+diff --git a/Source/WTF/wtf/Assertions.h b/Source/WTF/wtf/Assertions.h
+index 4d968b8..cb7c7e4 100644
+--- a/Source/WTF/wtf/Assertions.h
++++ b/Source/WTF/wtf/Assertions.h
+@@ -85,8 +85,8 @@
+ /* WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute
+    emits a warning when %@ is used in the format string.  Until <rdar://problem/5195437> is resolved we can't include
+    the attribute when being used from Objective-C code in case it decides to use %@. */
+-#if COMPILER(GCC) && !defined(__OBJC__)
+-#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(printf, formatStringArgument, extraArguments)))
++#if COMPILER(GCC) && !defined(__OBJC__) && (!OS(WINDOWS) || (defined(__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0))
++#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(gnu_printf, formatStringArgument, extraArguments)))
+ #else
+ #define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments)
+ #endif
+-- 
+1.8.5.3
+
diff --git a/dependencies/mingw-w64-webkitgtk/0022-gl-casts.patch b/dependencies/mingw-w64-webkitgtk/0022-gl-casts.patch
new file mode 100644
index 0000000..d926c0c
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0022-gl-casts.patch
@@ -0,0 +1,11 @@
+--- webkitgtk-2.4.9/Source/WebCore/platform/graphics/GLContext.cpp.orig	2015-07-12 20:33:29.627600000 +0300
++++ webkitgtk-2.4.9/Source/WebCore/platform/graphics/GLContext.cpp	2015-07-12 20:33:36.054800000 +0300
+@@ -159,7 +159,7 @@
+         return glxContext.release();
+ #endif
+ #if USE(EGL)
+-    if (OwnPtr<GLContext> eglContext = GLContextEGL::createContext(windowHandle, sharingContext))
++    if (OwnPtr<GLContext> eglContext = GLContextEGL::createContext((EGLNativeWindowType)windowHandle, sharingContext))
+         return eglContext.release();
+ #endif
+     return nullptr;
diff --git a/dependencies/mingw-w64-webkitgtk/0101-webkitgtk-2.4.3-gcc-asm.all.patch b/dependencies/mingw-w64-webkitgtk/0101-webkitgtk-2.4.3-gcc-asm.all.patch
new file mode 100644
index 0000000..66d0ca1
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0101-webkitgtk-2.4.3-gcc-asm.all.patch
@@ -0,0 +1,26 @@
+--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
++++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
+@@ -487,7 +487,12 @@ JSValue CLoop::execute(CallFrame* callFrame, Opcode entryOpcode, bool isInitiali
+         rBasePC.vp = codeBlock->instructions().begin();
+ #endif // USE(JSVALUE64)
+ 
++#if ENABLE(COMPUTED_GOTO_OPCODES)
+         goto llint_generic_return_point;
++#else
++        /* (most probably) causes null pointer dereference:
++         * NEXT_INSTRUCTION(); */
++#endif
+ 
+     } // END doReturnHelper.
+ 
+--- a/Source/WTF/wtf/Platform.h
++++ b/Source/WTF/wtf/Platform.h
+@@ -794,7 +794,7 @@
+ #endif
+ 
+ /* Configure the interpreter */
+-#if COMPILER(GCC)
++#if COMPILER(GCC) && !OS(WINDOWS)
+ #define HAVE_COMPUTED_GOTO 1
+ #endif
+ 
diff --git a/dependencies/mingw-w64-webkitgtk/0102-fix-build-with-icu-59.1.patch b/dependencies/mingw-w64-webkitgtk/0102-fix-build-with-icu-59.1.patch
new file mode 100644
index 0000000..ec87c93
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0102-fix-build-with-icu-59.1.patch
@@ -0,0 +1,396 @@
+--- webkitgtk-2.4.11/Source/WTF/wtf/gobject/GlibUtilities.cpp
++++ webkitgtk-2.4.11/Source/WTF/wtf/gobject/GlibUtilities.cpp
+@@ -22,6 +22,7 @@
+ #if OS(WINDOWS)
+ #include <windows.h>
+ #include <wtf/text/WTFString.h>
++#include <wtf/text/win/WCharStringExtras.h>
+ #else
+ #include <limits.h>
+ #include <unistd.h>
+@@ -59,7 +59,7 @@
+     if (!length || (length == MAX_PATH && GetLastError() == ERROR_INSUFFICIENT_BUFFER))
+         return CString();
+ 
+-    String path(buffer, length);
++    String path = wcharToString(buffer, length);
+     return path.utf8();
+ }
+ #endif
+--- null	1970-01-01 03:00:00.000000000 +0300
++++ webkitgtk-2.4.11/Source/WTF/wtf/text/win/WCharStringExtras.h	2017-06-15 14:56:11.000000000 +0300
+@@ -0,0 +1,70 @@
++/*
++ * Copyright (C) 2017 Konstantin Tokarev <annulen at yandex.ru>
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ *
++ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
++ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 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.
++ */
++
++#pragma once
++
++#include <wchar.h>
++#include <wtf/text/WTFString.h>
++
++namespace WTF {
++
++inline Vector<wchar_t> stringToNullTerminatedWChar(const String& string)
++{
++    Vector<wchar_t> result;
++
++    if (!string.isNull()) {
++        result.reserveInitialCapacity(string.impl()->length() + 1);
++
++        if (string.is8Bit()) {
++            const LChar* characters8 = string.impl()->characters8();
++            for (size_t i = 0; i < string.impl()->length(); ++i)
++                result.uncheckedAppend(characters8[i]);
++        } else {
++            const UChar* characters16 = string.impl()->characters16();
++            result.append(characters16, string.impl()->length());
++        }
++
++        result.append(0);
++    }
++
++    return result;
++}
++
++inline String wcharToString(const wchar_t* characters, unsigned length)
++{
++    static_assert(sizeof(wchar_t) == sizeof(UChar), "We assume wchar_t and UChar have the same size");
++    return String(reinterpret_cast<const UChar*>(characters), length);
++}
++
++inline String nullTerminatedWCharToString(const wchar_t* characters)
++{
++    return wcharToString(characters, wcslen(characters) - 1);
++}
++
++} // namespace WTF
++
++using WTF::stringToNullTerminatedWChar;
++using WTF::wcharToString;
++using WTF::nullTerminatedWCharToString;
+--- webkitgtk-2.4.11/Source/JavaScriptCore/API/JSStringRef.cpp
++++ webkitgtk-2.4.11/Source/JavaScriptCore/API/JSStringRef.cpp
+@@ -37,7 +37,7 @@
+ JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
+ {
+     initializeThreading();
+-    return OpaqueJSString::create(chars, numChars).leakRef();
++    return OpaqueJSString::create(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
+ }
+ 
+ JSStringRef JSStringCreateWithUTF8CString(const char* string)
+@@ -62,7 +62,7 @@
+ JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
+ {
+     initializeThreading();
+-    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars)).leakRef();
++    return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars)).leakRef();
+ }
+ 
+ JSStringRef JSStringRetain(JSStringRef string)
+@@ -83,7 +83,7 @@
+ 
+ const JSChar* JSStringGetCharactersPtr(JSStringRef string)
+ {
+-    return string->characters();
++    return reinterpret_cast<const JSChar*>(string->characters());
+ }
+ 
+ size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/DateConversion.cpp
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/DateConversion.cpp
+@@ -32,6 +32,7 @@
+ 
+ #if OS(WINDOWS)
+ #include <windows.h>
++#include <wtf/text/win/WCharStringExtras.h>
+ #endif
+ 
+ using namespace WTF;
+@@ -108,7 +108,8 @@
+ #if OS(WINDOWS)
+             TIME_ZONE_INFORMATION timeZoneInformation;
+             GetTimeZoneInformation(&timeZoneInformation);
+-            const WCHAR* timeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
++            const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
++            String timeZoneName = nullTerminatedWCharToString(winTimeZoneName);
+ #else
+             struct tm gtm = t;
+             char timeZoneName[70];
+--- webkitgtk-2.4.11/Source/WebKit2/Shared/API/c/WKString.cpp
++++ webkitgtk-2.4.11/Source/WebKit2/Shared/API/c/WKString.cpp
+@@ -55,7 +55,7 @@
+ size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
+ {
+     COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
+-    return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
++    return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
+ }
+ 
+ size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
+--- webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginDatabaseWin.cpp.orig	2018-04-20 13:47:17.383413300 +0300
++++ webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginDatabaseWin.cpp	2018-04-20 14:16:51.638953200 +0300
+@@ -32,6 +32,7 @@
+ #include "URL.h"
+ #include "PluginPackage.h"
+ #include <wtf/WindowsExtras.h>
++#include <wtf/text/win/WCharStringExtras.h>
+ 
+ #if OS(WINCE)
+ // WINCE doesn't support Registry Key Access Rights. The parameter should always be 0
+@@ -94,7 +95,7 @@
+         if (result != ERROR_SUCCESS || type != REG_SZ)
+             continue;
+ 
+-        paths.add(String(pathStr, pathStrSize / sizeof(WCHAR) - 1));
++        paths.add(wcharToString(pathStr, pathStrSize / sizeof(WCHAR) - 1));
+     }
+ 
+     RegCloseKey(key);
+@@ -115,7 +116,7 @@
+     for (Vector<String>::const_iterator it = m_pluginDirectories.begin(); it != end; ++it) {
+         String pattern = *it + "\\*";
+ 
+-        hFind = FindFirstFileW(pattern.charactersWithNullTermination().data(), &findFileData);
++        hFind = FindFirstFileW(stringToNullTerminatedWChar(pattern).data(), &findFileData);
+ 
+         if (hFind == INVALID_HANDLE_VALUE)
+             continue;
+@@ -124,7 +125,7 @@
+             if (findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+                 continue;
+ 
+-            String filename = String(findFileData.cFileName, wcslen(findFileData.cFileName));
++            String filename = wcharToString(findFileData.cFileName, wcslen(findFileData.cFileName));
+             if ((!filename.startsWith("np", false) || !filename.endsWith("dll", false)) &&
+                 (!equalIgnoringCase(filename, "Plugin.dll") || !it->endsWith("Shockwave 10", false)))
+                 continue;
+@@ -211,11 +212,11 @@
+             if (result != ERROR_SUCCESS)
+                 break;
+ 
+-            String extensionsPath = String(name, nameLen) + "\\Extensions";
++            String extensionsPath = wcharToString(name, nameLen) + "\\Extensions";
+             HKEY extensionsKey;
+ 
+             // Try opening the key
+-            result = RegOpenKeyEx(key, extensionsPath.charactersWithNullTermination().data(), 0, KEY_READ, &extensionsKey);
++            result = RegOpenKeyEx(key, stringToNullTerminatedWChar(extensionsPath).data(), 0, KEY_READ, &extensionsKey);
+ 
+             if (result == ERROR_SUCCESS) {
+                 // Now get the plugins directory
+@@ -226,7 +227,7 @@
+                 result = RegQueryValueEx(extensionsKey, TEXT("Plugins"), 0, &type, (LPBYTE)&pluginsDirectoryStr, &pluginsDirectorySize);
+ 
+                 if (result == ERROR_SUCCESS && type == REG_SZ)
+-                    directories.append(String(pluginsDirectoryStr, pluginsDirectorySize / sizeof(WCHAR) - 1));
++                    directories.append(wcharToString(pluginsDirectoryStr, pluginsDirectorySize / sizeof(WCHAR) - 1));
+ 
+                 RegCloseKey(extensionsKey);
+             }
+@@ -244,7 +245,7 @@
+     DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(TEXT("%SYSTEMDRIVE%\\PFiles\\Plugins"), pluginDirectoryStr, WTF_ARRAY_LENGTH(pluginDirectoryStr));
+ 
+     if (pluginDirectorySize > 0 && pluginDirectorySize <= WTF_ARRAY_LENGTH(pluginDirectoryStr))
+-        directories.append(String(pluginDirectoryStr, pluginDirectorySize - 1));
++        directories.append(wcharToString(pluginDirectoryStr, pluginDirectorySize - 1));
+ #endif
+ 
+     DWORD type;
+@@ -254,7 +255,7 @@
+     HRESULT result = getRegistryValue(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\MediaPlayer", L"Installation Directory", &type, &installationDirectoryStr, &installationDirectorySize);
+ 
+     if (result == ERROR_SUCCESS && type == REG_SZ)
+-        directories.append(String(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1));
++        directories.append(wcharToString(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1));
+ }
+ 
+ static inline void addQuickTimePluginDirectory(Vector<String>& directories)
+@@ -266,7 +267,7 @@
+     HRESULT result = getRegistryValue(HKEY_LOCAL_MACHINE, L"Software\\Apple Computer, Inc.\\QuickTime", L"InstallDir", &type, &installationDirectoryStr, &installationDirectorySize);
+ 
+     if (result == ERROR_SUCCESS && type == REG_SZ) {
+-        String pluginDir = String(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1) + "\\plugins";
++        String pluginDir = wcharToString(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1) + "\\plugins";
+         directories.append(pluginDir);
+     }
+ }
+@@ -292,10 +293,10 @@
+         if (result != ERROR_SUCCESS)
+             break;
+ 
+-        Vector<int> acrobatVersion = parseVersionString(String(name, nameLen));
++        Vector<int> acrobatVersion = parseVersionString(wcharToString(name, nameLen));
+         if (compareVersions(acrobatVersion, latestAcrobatVersion)) {
+             latestAcrobatVersion = acrobatVersion;
+-            latestAcrobatVersionString = String(name, nameLen);
++            latestAcrobatVersionString = wcharToString(name, nameLen);
+         }
+     }
+ 
+@@ -305,10 +306,10 @@
+         DWORD acrobatInstallPathSize = sizeof(acrobatInstallPathStr);
+ 
+         String acrobatPluginKeyPath = "Software\\Adobe\\Acrobat Reader\\" + latestAcrobatVersionString + "\\InstallPath";
+-        result = getRegistryValue(HKEY_LOCAL_MACHINE, acrobatPluginKeyPath.charactersWithNullTermination().data(), 0, &type, acrobatInstallPathStr, &acrobatInstallPathSize);
++        result = getRegistryValue(HKEY_LOCAL_MACHINE, stringToNullTerminatedWChar(acrobatPluginKeyPath).data(), 0, &type, acrobatInstallPathStr, &acrobatInstallPathSize);
+ 
+         if (result == ERROR_SUCCESS) {
+-            String acrobatPluginDirectory = String(acrobatInstallPathStr, acrobatInstallPathSize / sizeof(WCHAR) - 1) + "\\browser";
++            String acrobatPluginDirectory = wcharToString(acrobatInstallPathStr, acrobatInstallPathSize / sizeof(WCHAR) - 1) + "\\browser";
+             directories.append(acrobatPluginDirectory);
+         }
+     }
+@@ -337,10 +338,10 @@
+         if (result != ERROR_SUCCESS)
+             break;
+ 
+-        Vector<int> javaVersion = parseVersionString(String(name, nameLen));
++        Vector<int> javaVersion = parseVersionString(wcharToString(name, nameLen));
+         if (compareVersions(javaVersion, latestJavaVersion)) {
+             latestJavaVersion = javaVersion;
+-            latestJavaVersionString = String(name, nameLen);
++            latestJavaVersionString = wcharToString(name, nameLen);
+         }
+     }
+ 
+@@ -352,12 +353,12 @@
+         DWORD useNewPluginSize;
+ 
+         String javaPluginKeyPath = "Software\\JavaSoft\\Java Plug-in\\" + latestJavaVersionString;
+-        result = getRegistryValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination().data(), L"UseNewJavaPlugin", &type, &useNewPluginValue, &useNewPluginSize);
++        result = getRegistryValue(HKEY_LOCAL_MACHINE, stringToNullTerminatedWChar(javaPluginKeyPath).data(), L"UseNewJavaPlugin", &type, &useNewPluginValue, &useNewPluginSize);
+ 
+         if (result == ERROR_SUCCESS && useNewPluginValue == 1) {
+-            result = getRegistryValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination().data(), L"JavaHome", &type, javaInstallPathStr, &javaInstallPathSize);
++            result = getRegistryValue(HKEY_LOCAL_MACHINE, stringToNullTerminatedWChar(javaPluginKeyPath).data(), L"JavaHome", &type, javaInstallPathStr, &javaInstallPathSize);
+             if (result == ERROR_SUCCESS) {
+-                String javaPluginDirectory = String(javaInstallPathStr, javaInstallPathSize / sizeof(WCHAR) - 1) + "\\bin\\new_plugin";
++                String javaPluginDirectory = wcharToString(javaInstallPathStr, javaInstallPathSize / sizeof(WCHAR) - 1) + "\\bin\\new_plugin";
+                 directories.append(javaPluginDirectory);
+             }
+         }
+@@ -383,7 +384,7 @@
+         if (!PathRemoveFileSpec(moduleFileNameStr))
+             goto exit;
+ 
+-        pluginsDirectory = String(moduleFileNameStr) + "\\Plugins";
++        pluginsDirectory = nullTerminatedWCharToString(moduleFileNameStr) + "\\Plugins";
+     }
+ exit:
+     return pluginsDirectory;
+@@ -400,10 +401,10 @@
+     WCHAR macromediaDirectoryStr[MAX_PATH];
+ 
+     PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Flash"));
+-    directories.append(macromediaDirectoryStr);
++    directories.append(nullTerminatedWCharToString(macromediaDirectoryStr));
+ 
+     PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Shockwave 10"));
+-    directories.append(macromediaDirectoryStr);
++    directories.append(nullTerminatedWCharToString(macromediaDirectoryStr));
+ #endif
+ }
+ 
+--- webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginPackageWin.cpp.orig	2018-04-20 14:21:08.212931600 +0300
++++ webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginPackageWin.cpp	2018-04-20 14:24:24.570476500 +0300
+@@ -34,10 +34,11 @@
+ #include "PluginDebug.h"
+ #include "Timer.h"
+ #include "npruntime_impl.h"
++#include <shlwapi.h>
+ #include <string.h>
+ #include <wtf/StdLibExtras.h>
+ #include <wtf/text/CString.h>
+-#include <shlwapi.h>
++#include <wtf/text/win/WCharStringExtras.h>
+ 
+ namespace WebCore {
+ 
+@@ -47,7 +48,7 @@
+     UINT bufferLength;
+     String subInfo = "\\StringfileInfo\\040904E4\\" + info;
+     bool retval = VerQueryValueW(versionInfoData,
+-        const_cast<UChar*>(subInfo.charactersWithNullTermination().data()),
++        stringToNullTerminatedWChar(subInfo).data(),
+         &buffer, &bufferLength);
+     if (!retval || bufferLength == 0)
+         return String();
+@@ -167,13 +168,13 @@
+ bool PluginPackage::fetchInfo()
+ {
+     DWORD versionInfoSize, zeroHandle;
+-    versionInfoSize = GetFileVersionInfoSizeW(const_cast<UChar*>(m_path.charactersWithNullTermination().data()), &zeroHandle);
++    versionInfoSize = GetFileVersionInfoSizeW(stringToNullTerminatedWChar(m_path).data(), &zeroHandle);
+     if (versionInfoSize == 0)
+         return false;
+ 
+     auto versionInfoData = std::make_unique<char[]>(versionInfoSize);
+ 
+-    if (!GetFileVersionInfoW(const_cast<UChar*>(m_path.charactersWithNullTermination().data()),
++    if (!GetFileVersionInfoW(stringToNullTerminatedWChar(m_path).data(),
+             0, versionInfoSize, versionInfoData.get()))
+         return false;
+ 
+@@ -247,11 +248,11 @@
+ 
+         String path = m_path.substring(0, m_path.reverseFind('\\'));
+ 
+-        if (!::SetCurrentDirectoryW(path.charactersWithNullTermination().data()))
++        if (!::SetCurrentDirectoryW(stringToNullTerminatedWChar(path).data()))
+             return false;
+ 
+         // Load the library
+-        m_module = ::LoadLibraryExW(m_path.charactersWithNullTermination().data(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
++        m_module = ::LoadLibraryExW(stringToNullTerminatedWChar(m_path).data(), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
+ 
+         if (!::SetCurrentDirectoryW(currentPath)) {
+             if (m_module)
+--- webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginViewWin.cpp.orig	2018-04-20 14:24:40.154903800 +0300
++++ webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginViewWin.cpp	2018-04-20 14:25:32.960996600 +0300
+@@ -71,6 +71,7 @@
+ #include <runtime/JSLock.h>
+ #include <wtf/ASCIICType.h>
+ #include <wtf/text/WTFString.h>
++#include <wtf/text/win/WCharStringExtras.h>
+ #include <wtf/win/GDIObject.h>
+ 
+ #if OS(WINCE)
+@@ -873,13 +874,13 @@
+ 
+     // Get file info
+     WIN32_FILE_ATTRIBUTE_DATA attrs;
+-    if (GetFileAttributesExW(filename.charactersWithNullTermination().data(), GetFileExInfoStandard, &attrs) == 0)
++    if (GetFileAttributesExW(stringToNullTerminatedWChar(filename).data(), GetFileExInfoStandard, &attrs))
+         return NPERR_FILE_NOT_FOUND;
+ 
+     if (attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+         return NPERR_FILE_NOT_FOUND;
+ 
+-    HANDLE fileHandle = CreateFileW(filename.charactersWithNullTermination().data(), FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
++    HANDLE fileHandle = CreateFileW(stringToNullTerminatedWChar(filename).data(), FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
+     
+     if (fileHandle == INVALID_HANDLE_VALUE)
+         return NPERR_FILE_NOT_FOUND;
diff --git a/dependencies/mingw-w64-webkitgtk/0103-SingleThread.patch b/dependencies/mingw-w64-webkitgtk/0103-SingleThread.patch
new file mode 100644
index 0000000..51a96ce
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0103-SingleThread.patch
@@ -0,0 +1,13 @@
+--- webkitgtk-2.4.11/Source/WTF/wtf/ThreadingPthreads.cpp	2016-04-09 23:48:36.000000000 -0700
++++ webkitgtk-2.4.11/Source/WTF/wtf/ThreadingPthreads.cpp	2019-12-14 11:12:18.000000000 -0800
+@@ -128,5 +128,9 @@
+     wtfThreadData();
+     s_dtoaP5Mutex = new Mutex;
+     initializeDates();
++    auto webkit_procs = getenv("WEBKIT_PROCESSORS");
++    int num_processors = webkit_procs ? atoi(webkit_procs) : -1;
++    if (num_processors > 0 && num_processors < 16)
++      pthread_set_num_processors_np(num_processors);
+ }
+ 
+ static ThreadMap& threadMap()
\ No newline at end of file
diff --git a/dependencies/mingw-w64-webkitgtk/0104-Fix-for-FORTIFY_SOURCE.patch b/dependencies/mingw-w64-webkitgtk/0104-Fix-for-FORTIFY_SOURCE.patch
new file mode 100644
index 0000000..761b313
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0104-Fix-for-FORTIFY_SOURCE.patch
@@ -0,0 +1,13 @@
+--- webkitgtk-2.4.11/Source/autotools/SetupCompilerFlags.m4
++++ webkitgtk-2.4.11/Source/autotools/SetupCompilerFlags.m4
+@@ -58,6 +58,10 @@
+     CFLAGS="$CFLAGS -O0"
+ fi
+ 
++#This is probably the wrong place to put it, but need a library flag due to some change in mingw for the D_FORTIFY_SOURCE.
++# https://github.com/msys2/MINGW-packages/issues/5868
++LIBS="$LIBS -lssp"
++
+ # Some architectures need to add libatomic explicitly
+ AC_LANG_PUSH([C++])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
diff --git a/dependencies/mingw-w64-webkitgtk/0200-fix-build-with-StuctureInlines.h.patch b/dependencies/mingw-w64-webkitgtk/0200-fix-build-with-StuctureInlines.h.patch
new file mode 100644
index 0000000..75f2628
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0200-fix-build-with-StuctureInlines.h.patch
@@ -0,0 +1,70 @@
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/ArgumentsIteratorConstructor.cpp	2015-09-03 00:12:57.000000000 +0300
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/ArgumentsIteratorConstructor.cpp	2015-09-03 00:12:57.000000000 +0300
+@@ -31,6 +31,7 @@
+ #include "JSCJSValueInlines.h"
+ #include "JSCellInlines.h"
+ #include "JSGlobalObject.h"
++#include "StructureInlines.h"
+ 
+ namespace JSC {
+ 
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/JSPromiseFunctions.cpp	2015-09-03 00:12:58.000000000 +0300
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/JSPromiseFunctions.cpp	2015-09-03 00:12:58.000000000 +0300
+@@ -35,6 +35,7 @@
+ #include "JSPromiseConstructor.h"
+ #include "JSPromiseDeferred.h"
+ #include "NumberObject.h"
++#include "StructureInlines.h"
+ 
+ namespace JSC {
+ 
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/MapConstructor.cpp	2015-09-03 00:13:00.000000000 +0300
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/MapConstructor.cpp	2015-09-03 00:13:00.000000000 +0300
+@@ -32,6 +32,7 @@
+ #include "JSGlobalObject.h"
+ #include "JSMap.h"
+ #include "MapPrototype.h"
++#include "StructureInlines.h"
+ 
+ namespace JSC {
+ 
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/MapIteratorConstructor.cpp	2015-09-03 00:13:01.000000000 +0300
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/MapIteratorConstructor.cpp	2015-09-03 00:13:01.000000000 +0300
+@@ -31,6 +31,7 @@
+ #include "JSGlobalObject.h"
+ #include "JSMapIterator.h"
+ #include "MapIteratorPrototype.h"
++#include "StructureInlines.h"
+ 
+ namespace JSC {
+ 
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/SetConstructor.cpp	2015-09-03 00:13:02.000000000 +0300
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/SetConstructor.cpp	2015-09-03 00:13:02.000000000 +0300
+@@ -33,6 +33,7 @@
+ #include "JSSet.h"
+ #include "MapData.h"
+ #include "SetPrototype.h"
++#include "StructureInlines.h"
+ 
+ namespace JSC {
+ 
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/SetIteratorConstructor.cpp	2015-09-03 00:13:04.000000000 +0300
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/SetIteratorConstructor.cpp	2015-09-03 00:13:04.000000000 +0300
+@@ -31,6 +31,7 @@
+ #include "JSGlobalObject.h"
+ #include "JSSetIterator.h"
+ #include "SetIteratorPrototype.h"
++#include "StructureInlines.h"
+ 
+ namespace JSC {
+ 
+--- webkitgtk-2.4.11/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp	2015-09-03 00:13:06.000000000 +0300
++++ webkitgtk-2.4.11/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp	2015-09-03 00:13:06.000000000 +0300
+@@ -30,6 +30,7 @@
+ #include "JSCellInlines.h"
+ #include "JSGlobalObject.h"
+ #include "JSWeakMap.h"
++#include "StructureInlines.h"
+ #include "WeakMapPrototype.h"
+ 
+ namespace JSC {
diff --git a/dependencies/mingw-w64-webkitgtk/0201-fix-build-WebKitTestRunnerGNUMakefile.am.patch b/dependencies/mingw-w64-webkitgtk/0201-fix-build-WebKitTestRunnerGNUMakefile.am.patch
new file mode 100644
index 0000000..9e4e985
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0201-fix-build-WebKitTestRunnerGNUMakefile.am.patch
@@ -0,0 +1,15 @@
+--- a/Tools/WebKitTestRunner/GNUmakefile.am	
++++ a/Tools/WebKitTestRunner/GNUmakefile.am	
+@@ -155,7 +155,10 @@ code_generation_dependencies = \
+ 	Source/WebCore/bindings/scripts/InFilesParser.pm \
+ 	Source/WebCore/bindings/scripts/generate-bindings.pl
+ 
+-DerivedSources/InjectedBundle/JS%.cpp: Tools/WebKitTestRunner/InjectedBundle/Bindings/%.idl $(code_generation_dependencies)
++$(top_builddir)/DerivedSources/InjectedBundle:
++	$(AM_V_at)mkdir -p $@
++
++DerivedSources/InjectedBundle/JS%.cpp: Tools/WebKitTestRunner/InjectedBundle/Bindings/%.idl $(code_generation_dependencies) $(top_builddir)/DerivedSources/InjectedBundle
+ 	$(AM_V_GEN)$(PERL) \
+ 		-I $(srcdir)/Source/WebCore/bindings/scripts \
+ 		-I $(srcdir)/Tools/WebKitTestRunner/InjectedBundle/Bindings \
+--
\ No newline at end of file
diff --git a/dependencies/mingw-w64-webkitgtk/0202-fix-trailing-semi-on-macro.patch b/dependencies/mingw-w64-webkitgtk/0202-fix-trailing-semi-on-macro.patch
new file mode 100644
index 0000000..46f4167
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/0202-fix-trailing-semi-on-macro.patch
@@ -0,0 +1,37 @@
+--- a/Source/WebCore/dom/Document.cpp	2016-04-09 23:48:37.000000000 -0700
++++ b/Source/WebCore/dom/Document.cpp	2019-12-20 11:45:17.294655200 -0800
+@@ -3912,12 +3912,12 @@
+     unsigned i = 0;
+ 
+     UChar32 c;
+-    U16_NEXT(characters, i, length, c)
++    U16_NEXT(characters, i, length, c);
+     if (!isValidNameStart(c))
+         return false;
+ 
+     while (i < length) {
+-        U16_NEXT(characters, i, length, c)
++      U16_NEXT(characters, i, length, c);
+         if (!isValidNamePart(c))
+             return false;
+     }
+@@ -3980,7 +3980,7 @@
+     const UChar* s = qualifiedName.deprecatedCharacters();
+     for (unsigned i = 0; i < length;) {
+         UChar32 c;
+-        U16_NEXT(s, i, length, c)
++        U16_NEXT(s, i, length, c);
+         if (c == ':') {
+             if (sawColon) {
+                 ec = NAMESPACE_ERR;
+--- a/Source/WebCore/platform/graphics/SegmentedFontData.cpp	2016-04-09 23:48:37.000000000 -0700
++++ b/Source/WebCore/platform/graphics/SegmentedFontData.cpp	2019-12-19 17:01:40.264614000 -0800
+@@ -61,7 +61,7 @@
+ {
+     UChar32 c;
+     for (int i = 0; i < length; ) {
+-        U16_NEXT(characters, i, length, c)
++      U16_NEXT(characters, i, length, c);
+         if (!containsCharacter(c))
+             return false;
+     }
diff --git a/dependencies/mingw-w64-webkitgtk/PKGBUILD b/dependencies/mingw-w64-webkitgtk/PKGBUILD
new file mode 100644
index 0000000..d199efb
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/PKGBUILD
@@ -0,0 +1,175 @@
+# Maintainer: Alexey Pavlov <alexpux at gmail.com>
+
+_realname=webkitgtk
+pkgbase=mingw-w64-${_realname}
+#pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}2" "${MINGW_PACKAGE_PREFIX}-${_realname}3")
+pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}3")
+pkgver=2.4.11
+pkgrel=999.3
+pkgdesc="GTK+ Web content engine library (mingw-w64)"
+arch=('any')
+url="https://webkitgtk.org/"
+license=("custom")
+options=('!libtool' 'strip' '!debug' 'staticlibs' 'buildflags')
+makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
+             "${MINGW_PACKAGE_PREFIX}-gobject-introspection"
+             "${MINGW_PACKAGE_PREFIX}-gtk3"
+             "${MINGW_PACKAGE_PREFIX}-pkg-config"
+             "${MINGW_PACKAGE_PREFIX}-ruby"
+             "bison"
+             "flex"
+             "gperf"
+             "libtool"
+             "gtk-doc"
+             "perl"
+             "python3")
+depends=("${MINGW_PACKAGE_PREFIX}-cairo"
+         "${MINGW_PACKAGE_PREFIX}-fontconfig"
+         "${MINGW_PACKAGE_PREFIX}-freetype"
+         "${MINGW_PACKAGE_PREFIX}-glib2"
+         "${MINGW_PACKAGE_PREFIX}-harfbuzz"
+         "${MINGW_PACKAGE_PREFIX}-libsoup"
+         "${MINGW_PACKAGE_PREFIX}-icu"
+         "${MINGW_PACKAGE_PREFIX}-libjpeg"
+         "${MINGW_PACKAGE_PREFIX}-libpng"
+         "${MINGW_PACKAGE_PREFIX}-libxml2"
+         "${MINGW_PACKAGE_PREFIX}-libxslt"
+         "${MINGW_PACKAGE_PREFIX}-libwebp"
+         "${MINGW_PACKAGE_PREFIX}-pango"
+         "${MINGW_PACKAGE_PREFIX}-sqlite3"
+         "${MINGW_PACKAGE_PREFIX}-xz")
+source=(https://webkitgtk.org/releases/webkitgtk-${pkgver}.tar.xz
+        0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch
+        0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch
+        0022-gl-casts.patch
+        0101-webkitgtk-2.4.3-gcc-asm.all.patch
+        0102-fix-build-with-icu-59.1.patch
+	0103-SingleThread.patch
+	0104-Fix-for-FORTIFY_SOURCE.patch
+	0200-fix-build-with-StuctureInlines.h.patch
+	0201-fix-build-WebKitTestRunnerGNUMakefile.am.patch
+	0202-fix-trailing-semi-on-macro.patch
+        webkitgtk-2.4.9-abs.patch
+        enchant-2.x.patch)
+
+prepare() {
+  cd ${srcdir}/${_realname}-${pkgver}
+  patch -p1 -i ${srcdir}/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch
+  patch -p1 -i ${srcdir}/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch
+  patch -p1 -i ${srcdir}/0022-gl-casts.patch
+  patch -p1 -i ${srcdir}/0101-webkitgtk-2.4.3-gcc-asm.all.patch
+  patch -p1 -i ${srcdir}/0102-fix-build-with-icu-59.1.patch
+  patch -p1 -i ${srcdir}/0103-SingleThread.patch
+  patch -p1 -i ${srcdir}/0104-Fix-for-FORTIFY_SOURCE.patch
+  patch -p1 -i ${srcdir}/0200-fix-build-with-StuctureInlines.h.patch
+  patch -p1 -i ${srcdir}/0201-fix-build-WebKitTestRunnerGNUMakefile.am.patch
+  patch -p1 -i ${srcdir}/0202-fix-trailing-semi-on-macro.patch
+# borrowed from Arch Linux
+  patch -p1 -i ${srcdir}/webkitgtk-2.4.9-abs.patch
+  patch -p1 -i ${srcdir}/enchant-2.x.patch
+
+  autoreconf --verbose --install -I Source/autotools
+
+  rm -rf ${srcdir}/build-gtk{2,3}
+  mkdir -p ${srcdir}/build-gtk{2,3}
+}
+
+_build() {
+  _ver="$1"; shift
+  cd ${srcdir}/build-${_ver}
+
+  export PYTHON=/usr/bin/python2
+  export RUBY=${MINGW_PREFIX}/bin/ruby
+  export CPPFLAGS="${CPPFLAGS} -w"
+# -Wno-class-memaccess -Wno-deprecated-copy -Wno-expansion-to-defined -Wno-redundant-move"
+
+  ../${_realname}-${pkgver}/configure \
+    --prefix=${MINGW_PREFIX} \
+    --build=${MINGW_CHOST} \
+    --host=${MINGW_CHOST} \
+    --disable-debug \
+    --enable-credential-storage=no \
+    --enable-accelerated-compositing=no \
+    --enable-debug-symbols=min \
+    --disable-webkit2 \
+    --disable-glibtest \
+    --disable-static \
+    --enable-shared \
+    --enable-optimizations \
+    --disable-x11-target \
+    --enable-win32-target \
+    --enable-gles2=no \
+    --enable-egl=no \
+    --enable-glx=no \
+    --enable-gtk-doc-html=no \
+    --enable-webgl=no \
+    --enable-web-audio=no \
+    --enable-video=no \
+    --enable-geolocation=no \
+    "$@"
+
+  make -j1
+}
+
+build() {
+  local _jit_flag=
+  case ${MINGW_CHOST} in
+    i686*)
+      _jit_flag="-enable-jit"
+    ;;
+    x86_64*)
+      _jit_flag="-disable-jit"
+    ;;
+  esac
+
+  _build gtk3 --disable-gtk-doc --disable-webkit2 --with-gtk=3.0 ${_jit_flag}
+#  _build gtk2 --disable-gtk-doc --disable-webkit2 --with-gtk=2.0 ${_jit_flag}
+}
+
+#package_webkitgtk2() {
+#  pkgdesc+=" for GTK2"
+#  depends+=(${MINGW_PACKAGE_PREFIX}-gtk2)
+#  #provides=("${MINGW_PACKAGE_PREFIX}-libwebkit2=${pkgver}")
+#  cd "${srcdir}/build-gtk2"
+#  make -j DESTDIR="${pkgdir}" install
+#  find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm
+#}
+
+package_webkitgtk3() {
+  depends+=(${MINGW_PACKAGE_PREFIX}-gtk3)
+  #optdepends+=("${MINGW_PACKAGE_PREFIX}-gtk2: Netscape plugin support")
+  #provides=("${MINGW_PACKAGE_PREFIX}-webkitgtk3=${pkgver}" "${MINGW_PACKAGE_PREFIX}-libwebkit3=${pkgver}")
+  cd "${srcdir}/build-gtk3"
+  make -j1 DESTDIR="${pkgdir}" install
+  find "${pkgdir}${MINGW_PREFIX}" -name '*.def' -o -name '*.exp' | xargs -rtl1 rm
+}
+
+#package_mingw-w64-i686-webkitgtk2() {
+#  package_webkitgtk2
+#}
+
+package_mingw-w64-i686-webkitgtk3() {
+  package_webkitgtk3
+}
+
+#package_mingw-w64-x86_64-webkitgtk2() {
+#  package_webkitgtk2
+#}
+
+package_mingw-w64-x86_64-webkitgtk3() {
+  package_webkitgtk3
+}
+
+sha256sums=('588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7'
+            'e47cf0649f4bc82f96b6f3830964eeb685c56bdfabe43d83a45cfb432df1a261'
+            '6937cbfee2b689084c40785288bedd7aa1f0991c7f922203d2b89a4f67b75836'
+            '2a74b1174410121fe8a25b1a87dfeadd22aebd0337df8a31a42ec99ee1585389'
+            '82f089e1271ccd39ea3fee7c066a06eabb287d6273910c9e9bddb86ba5ad2818'
+            '3d17c925cd6b21a2aafb4d91913b0b3e1a11f532e31190161398b228c367bd31'
+            '68426ac0f19ac52f24641bcb969405a97d96f06510b6bc86854158cf200c6624'
+            'aba0f436b10527f43e348dabd9fbfe3d99a4bdec81192db8805df31c6b2327c7'
+            'ff17b9a91147df077cefc1f97dbede017252cb81a4c745c96c587b3c52ecfac7'
+            '393cfe80aa0aa22445bfd542750bff9177a21400ee6280cfe954a2aeacff0fad'
+            'a39241fe2a46f0596657c977c8477a6997e3376e467cd761ab571f744a9596cd'
+            'ec294bbb5588a1802a68e3615c6718486b22f922645c5fef686d3d103014bf70'
+            '3bdb4c57c5ff4a86706282905b0f1d4a44a25dd3d6185d94871994db6fdb9b79')
diff --git a/dependencies/mingw-w64-webkitgtk/enchant-2.x.patch b/dependencies/mingw-w64-webkitgtk/enchant-2.x.patch
new file mode 100644
index 0000000..7870295
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/enchant-2.x.patch
@@ -0,0 +1,22 @@
+--- webkitgtk-2.4.9/Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp.orig	2017-12-06 14:59:40.768262788 -0500
++++ webkitgtk-2.4.9/Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp	2017-12-06 15:03:10.000000000 -0500
+@@ -128,7 +128,7 @@
+         for (i = 0; i < numberOfSuggestions; i++)
+             guesses.append(String::fromUTF8(suggestions[i]));
+ 
+-        enchant_dict_free_suggestions(*iter, suggestions);
++        enchant_dict_free_string_list(*iter, suggestions);
+     }
+ 
+     return guesses;
+--- webkitgtk-2.4.11/Source/autotools/FindDependencies.m4.orig	2018-07-04 12:52:47.582565800 +0200
++++ webkitgtk-2.4.11/Source/autotools/FindDependencies.m4	2018-07-04 12:53:18.535026100 +0200
+@@ -154,7 +154,7 @@
+ AC_SUBST(PANGO_LIBS)
+ 
+ if test "$enable_spellcheck" = "yes"; then
+-    PKG_CHECK_MODULES(ENCHANT, enchant >= enchant_required_version, [], [enable_spellcheck="no"])
++    PKG_CHECK_MODULES(ENCHANT, enchant-2 >= enchant_required_version, [], [enable_spellcheck="no"])
+     AC_SUBST(ENCHANT_CFLAGS)
+     AC_SUBST(ENCHANT_LIBS)
+ fi
diff --git a/dependencies/mingw-w64-webkitgtk/webkitgtk-2.4.9-abs.patch b/dependencies/mingw-w64-webkitgtk/webkitgtk-2.4.9-abs.patch
new file mode 100644
index 0000000..9a1c5f9
--- /dev/null
+++ b/dependencies/mingw-w64-webkitgtk/webkitgtk-2.4.9-abs.patch
@@ -0,0 +1,26 @@
+diff -Nur webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/GtkClickCounter.cpp webkitgtk-2.4.9/Source/WebCore/platform/gtk/GtkClickCounter.cpp
+--- webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/GtkClickCounter.cpp	2015-05-20 03:03:24.000000000 -0600
++++ webkitgtk-2.4.9/Source/WebCore/platform/gtk/GtkClickCounter.cpp	2016-02-07 11:30:42.392686308 -0700
+@@ -85,8 +85,8 @@
+     guint32 eventTime = getEventTime(event);
+ 
+     if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
+-        || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
+-            && (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
++        || ((fabs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
++            && (fabs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
+             && (eventTime - m_previousClickTime < static_cast<guint>(doubleClickTime))
+             && (buttonEvent->button == m_previousClickButton)))
+         m_currentClickCount++;
+diff -Nur webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp webkitgtk-2.4.9/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
+--- webkitgtk-2.4.9.orig/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2015-05-20 03:03:24.000000000 -0600
++++ webkitgtk-2.4.9/Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp	2016-02-07 11:49:36.384691005 -0700
+@@ -659,7 +659,7 @@
+     if (!std::isfinite(time))
+         return String::fromUTF8(_("indefinite time"));
+ 
+-    int seconds = static_cast<int>(abs(time));
++    int seconds = static_cast<int>(fabs(time));
+     int days = seconds / (60 * 60 * 24);
+     int hours = seconds / (60 * 60);
+     int minutes = (seconds / 60) % 60;



Summary of changes:
 dependencies/README.md                             |  19 +
 ...p-dummy-HeapStatistics-implementation.all.patch |  29 ++
 ...printf-format-atribute-to-gnu_printf-.all.patch |  68 ++++
 .../mingw-w64-webkitgtk/0022-gl-casts.patch        |  11 +
 .../0101-webkitgtk-2.4.3-gcc-asm.all.patch         |  26 ++
 .../0102-fix-build-with-icu-59.1.patch             | 396 +++++++++++++++++++++
 .../mingw-w64-webkitgtk/0103-SingleThread.patch    |  13 +
 .../0104-Fix-for-FORTIFY_SOURCE.patch              |  13 +
 .../0200-fix-build-with-StuctureInlines.h.patch    |  70 ++++
 ...-fix-build-WebKitTestRunnerGNUMakefile.am.patch |  15 +
 .../0202-fix-trailing-semi-on-macro.patch          |  37 ++
 dependencies/mingw-w64-webkitgtk/PKGBUILD          | 175 +++++++++
 dependencies/mingw-w64-webkitgtk/enchant-2.x.patch |  22 ++
 .../mingw-w64-webkitgtk/webkitgtk-2.4.9-abs.patch  |  26 ++
 14 files changed, 920 insertions(+)
 create mode 100644 dependencies/README.md
 create mode 100644 dependencies/mingw-w64-webkitgtk/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0022-gl-casts.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0101-webkitgtk-2.4.3-gcc-asm.all.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0102-fix-build-with-icu-59.1.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0103-SingleThread.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0104-Fix-for-FORTIFY_SOURCE.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0200-fix-build-with-StuctureInlines.h.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0201-fix-build-WebKitTestRunnerGNUMakefile.am.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/0202-fix-trailing-semi-on-macro.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/PKGBUILD
 create mode 100644 dependencies/mingw-w64-webkitgtk/enchant-2.x.patch
 create mode 100644 dependencies/mingw-w64-webkitgtk/webkitgtk-2.4.9-abs.patch



More information about the gnucash-changes mailing list