forked from jralls/gtk-osx-build
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
607 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
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
48 changes: 48 additions & 0 deletions
48
patches/gobject-introspection-625195-Fix-non-libtool-linker-flags-on-Darwin.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,48 @@ | ||
From 296a5e0f79b37a3e37b75e935350519b42a5da43 Mon Sep 17 00:00:00 2001 | ||
From: Philip Chimento <philip.chimento@gmail.com> | ||
Date: Sun, 18 Jan 2015 13:32:54 -0800 | ||
Subject: [PATCH] Fix non-libtool linker flags on Darwin | ||
|
||
Darwin's linker doesn't like "-rpath=path"; instead pass "-rpath path". | ||
Additionally, there is no equivalent for "--no-as-needed" (it seems to do | ||
the right thing by default?) | ||
|
||
https://bugzilla.gnome.org/show_bug.cgi?id=625195 | ||
--- | ||
giscanner/ccompiler.py | 8 +++++++- | ||
1 file changed, 7 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py | ||
index 1c66aac..d42aa93 100644 | ||
--- a/giscanner/ccompiler.py | ||
+++ b/giscanner/ccompiler.py | ||
@@ -68,12 +68,15 @@ class CCompiler(object): | ||
ns_version + '.lib') | ||
else: | ||
args.append(str.lower(ns) + '.lib') | ||
+ elif sys.platform == 'darwin': | ||
+ args.append('-Wl,-rpath') | ||
+ args.append('-Wl,.') | ||
else: | ||
args.append('-Wl,-rpath=.') | ||
|
||
# Ensure libraries are always linked as we are going to use ldd to work | ||
# out their names later | ||
- if not libtool and pkgconfig_msvc_flags == '': | ||
+ if not libtool and pkgconfig_msvc_flags == '' and not sys.platform == 'darwin': | ||
args.append('-Wl,--no-as-needed') | ||
|
||
for library in libraries: | ||
@@ -95,6 +98,9 @@ class CCompiler(object): | ||
if libtool: | ||
args.append('-rpath') | ||
args.append(library_path) | ||
+ elif sys.platform == 'darwin': | ||
+ args.append('-Wl,-rpath') | ||
+ args.append('-Wl,' + library_path) | ||
else: | ||
args.append('-Wl,-rpath=' + library_path) | ||
|
||
-- | ||
1.9.3 (Apple Git-50) | ||
|
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
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,13 @@ | ||
--- a/Source/JavaScriptCore/shell/CMakeLists.txt 2014-12-31 13:24:53.000000000 -0700 | ||
+++ b/Source/JavaScriptCore/shell/CMakeLists.txt 2014-12-31 13:24:56.000000000 -0700 | ||
@@ -8,6 +8,10 @@ | ||
WTF | ||
) | ||
|
||
+if (WTF_OS_MAC_OS_X) | ||
+ list(APPEND JSC_LIBRARIES edit) | ||
+endif () | ||
+ | ||
if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC") | ||
add_definitions(-DSTATICALLY_LINKED_WITH_JavaScriptCore) | ||
endif () |
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,64 @@ | ||
--- a/Source/WebCore/PlatformGTK.cmake | ||
+++ a/Source/WebCore/PlatformGTK.cmake | ||
@@ -22,6 +22,8 @@ | ||
"${WEBCORE_DIR}/platform/network/soup" | ||
"${WEBCORE_DIR}/platform/text/gtk" | ||
"${WEBCORE_DIR}/platform/text/icu" | ||
+ "${CMAKE_SOURCE_DIR}/Source/ThirdParty/ANGLE/include/GLSLANG" | ||
+ "${CMAKE_SOURCE_DIR}/Source/ThirdParty/ANGLE/include/KHR" | ||
) | ||
|
||
list(APPEND WebCore_SOURCES | ||
@@ -213,6 +215,8 @@ | ||
platform/graphics/gtk/ImageBufferGtk.cpp | ||
platform/graphics/gtk/ImageGtk.cpp | ||
|
||
+ platform/graphics/texmap/GraphicsLayerTextureMapper.cpp | ||
+ | ||
platform/gtk/ContextMenuGtk.cpp | ||
platform/gtk/ContextMenuItemGtk.cpp | ||
platform/gtk/CursorGtk.cpp | ||
@@ -374,7 +378,6 @@ | ||
"${WEBCORE_DIR}/platform/graphics/texmap" | ||
) | ||
list(APPEND WebCore_SOURCES | ||
- platform/graphics/texmap/GraphicsLayerTextureMapper.cpp | ||
platform/graphics/texmap/TextureMapperGL.cpp | ||
platform/graphics/texmap/TextureMapperShaderProgram.cpp | ||
) | ||
--- a/Source/cmake/OptionsGTK.cmake | ||
+++ a/Source/cmake/OptionsGTK.cmake | ||
@@ -55,6 +55,7 @@ if (NOT GEOCLUE2_FOUND) | ||
endif () | ||
|
||
if (ENABLE_X11_TARGET) | ||
+ find_package(X11) | ||
# We don't use find_package for GLX because it is part of -lGL, unlike EGL. | ||
check_include_files("GL/glx.h" GLX_FOUND) | ||
endif () | ||
@@ -78,6 +79,9 @@ if (OPENGL_FOUND AND (GLX_FOUND OR EGL_FOUND)) | ||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS OFF) | ||
endif () | ||
else () | ||
+ if (ENABLE_WEBGL) | ||
+ message(FATAL_ERROR "OpenGL is needed for WebGL support") | ||
+ endif () | ||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL OFF) | ||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS OFF) | ||
endif () | ||
@@ -294,13 +298,14 @@ if (ENABLE_SPELLCHECK) | ||
find_package(Enchant REQUIRED) | ||
endif () | ||
|
||
+add_definitions(-DWTF_USE_TEXTURE_MAPPER=1) | ||
+ | ||
if (OPENGL_FOUND AND (GLX_FOUND OR EGL_FOUND)) | ||
set(ENABLE_TEXTURE_MAPPER 1) | ||
set(WTF_USE_3D_GRAPHICS 1) | ||
|
||
add_definitions(-DWTF_USE_OPENGL=1) | ||
add_definitions(-DWTF_USE_3D_GRAPHICS=1) | ||
- add_definitions(-DWTF_USE_TEXTURE_MAPPER=1) | ||
add_definitions(-DWTF_USE_TEXTURE_MAPPER_GL=1) | ||
add_definitions(-DENABLE_3D_RENDERING=1) | ||
|
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,58 @@ | ||
--- a/Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp 2015-01-01 00:58:29.000000000 -0700 | ||
+++ b/Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp 2015-01-01 01:36:54.000000000 -0700 | ||
@@ -40,6 +40,10 @@ | ||
#include <wtf/gobject/GRefPtr.h> | ||
#include <wtf/gobject/GUniquePtr.h> | ||
|
||
+#if OS(DARWIN) | ||
+#include <sys/sysctl.h> | ||
+#endif | ||
+ | ||
using namespace WebCore; | ||
|
||
namespace WebKit { | ||
@@ -59,7 +63,14 @@ | ||
static uint64_t getMemorySize() | ||
{ | ||
static uint64_t kDefaultMemorySize = 512; | ||
-#if !OS(WINDOWS) | ||
+#if OS(DARWIN) | ||
+ int64_t memSize; | ||
+ size_t len = sizeof(memSize); | ||
+ int success = sysctlbyname("hw.memsize", &memSize, &len, NULL, 0); | ||
+ if (success == -1) | ||
+ return kDefaultMemorySize; | ||
+ return memSize / 1024; | ||
+#elif !OS(WINDOWS) | ||
long pageSize = sysconf(_SC_PAGESIZE); | ||
if (pageSize == -1) | ||
return kDefaultMemorySize; | ||
--- a/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp 2015-01-01 02:26:40.000000000 -0700 | ||
+++ b/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp 2015-01-01 02:27:30.000000000 -0700 | ||
@@ -31,6 +31,10 @@ | ||
#include "SeccompFiltersWebProcessEfl.h" | ||
#endif | ||
|
||
+#if OS(DARWIN) | ||
+#include <sys/sysctl.h> | ||
+#endif | ||
+ | ||
#include "CertificateInfo.h" | ||
#include "WebCookieManager.h" | ||
#include "WebProcessCreationParameters.h" | ||
@@ -65,7 +69,14 @@ | ||
static uint64_t getMemorySize() | ||
{ | ||
static uint64_t kDefaultMemorySize = 512; | ||
-#if !OS(WINDOWS) | ||
+#if OS(DARWIN) | ||
+ int64_t memSize; | ||
+ size_t len = sizeof(memSize); | ||
+ int success = sysctlbyname("hw.memsize", &memSize, &len, NULL, 0); | ||
+ if (success == -1) | ||
+ return kDefaultMemorySize; | ||
+ return memSize / 1024LL; | ||
+#elif !OS(WINDOWS) | ||
long pageSize = sysconf(_SC_PAGESIZE); | ||
if (pageSize == -1) | ||
return kDefaultMemorySize; |
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,13 @@ | ||
--- a/Source/cmake/OptionsGTK.cmake 2015-01-01 02:35:46.000000000 -0700 | ||
+++ b/Source/cmake/OptionsGTK.cmake 2015-01-01 02:36:04.000000000 -0700 | ||
@@ -94,7 +94,9 @@ | ||
else () | ||
set(ENABLE_TOOLS OFF) | ||
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS OFF) | ||
- set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter") | ||
+ if (CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
+ set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter") | ||
+ endif () | ||
endif () | ||
|
||
if (CMAKE_SYSTEM_NAME MATCHES "Linux") |
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,13 @@ | ||
--- a/Source/WebKit2/PlatformGTK.cmake 2015-01-01 02:49:53.000000000 -0700 | ||
+++ b/Source/WebKit2/PlatformGTK.cmake 2015-01-01 02:49:56.000000000 -0700 | ||
@@ -472,7 +472,9 @@ | ||
WebCorePlatformGTK | ||
${GTK_UNIX_PRINT_LIBRARIES} | ||
) | ||
-ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES) | ||
+if (CMAKE_SYSTEM_NAME MATCHES "Linux") | ||
+ ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKit2_LIBRARIES) | ||
+endif () | ||
|
||
set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list) | ||
add_custom_command( |
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,10 @@ | ||
--- a/Source/WebKit2/PlatformGTK.cmake 2014-12-31 16:43:32.000000000 -0700 | ||
+++ b/Source/WebKit2/PlatformGTK.cmake 2014-12-31 16:44:33.000000000 -0700 | ||
@@ -720,6 +720,7 @@ | ||
add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT2_DIR}/WebProcess/gtk/WebGtkInjectedBundleMain.cpp") | ||
add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings) | ||
add_webkit2_prefix_header(webkit2gtkinjectedbundle) | ||
+target_link_libraries(webkit2gtkinjectedbundle WebKit2) | ||
|
||
add_custom_command( | ||
OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir |
Oops, something went wrong.