Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WebKitGtk package files, build instructions.
WebKitGtk is no longer supported by MSYS2 so we must package it ourselves.
- Loading branch information
Showing
14 changed files
with
920 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
29 changes: 29 additions & 0 deletions
29
...ndencies/mingw-w64-webkitgtk/0020-W32-Fixup-dummy-HeapStatistics-implementation.all.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@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 | ||
|
68 changes: 68 additions & 0 deletions
68
...ncies/mingw-w64-webkitgtk/0021-W32-Change-printf-format-atribute-to-gnu_printf-.all.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
26 changes: 26 additions & 0 deletions
26
dependencies/mingw-w64-webkitgtk/0101-webkitgtk-2.4.3-gcc-asm.all.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
Oops, something went wrong.