summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorjperkin <jperkin>2017-04-13 16:58:14 +0000
committerjperkin <jperkin>2017-04-13 16:58:14 +0000
commitbc5ce8654a959b63653509ce6b96f12d4359713d (patch)
tree3f706f0765ec414d5f5eb7faee88f0852293cbba /www
parent754de8ad2f7e82334a4b16d67663183cd9c256b8 (diff)
downloadpkgsrc-bc5ce8654a959b63653509ce6b96f12d4359713d.tar.gz
Various patches to support SunOS.
Diffstat (limited to 'www')
-rw-r--r--www/webkit-gtk/distinfo9
-rw-r--r--www/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp28
-rw-r--r--www/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp16
-rw-r--r--www/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp15
-rw-r--r--www/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt18
-rw-r--r--www/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp52
-rw-r--r--www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake9
7 files changed, 142 insertions, 5 deletions
diff --git a/www/webkit-gtk/distinfo b/www/webkit-gtk/distinfo
index 1a239e6de62..442e98d103a 100644
--- a/www/webkit-gtk/distinfo
+++ b/www/webkit-gtk/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.93 2016/10/10 21:11:48 joerg Exp $
+$NetBSD: distinfo,v 1.94 2017/04/13 16:58:14 jperkin Exp $
SHA1 (webkitgtk-2.12.4.tar.xz) = ebfe6015d81129b6a13a9596d065c54e9c1b93f6
RMD160 (webkitgtk-2.12.4.tar.xz) = 9bccd3c05f3c6a28d36f2bb5fdb3a9a58be10539
@@ -8,11 +8,16 @@ SHA1 (patch-CMakeLists.txt) = c48c0e5d33f378b7ecf31fffef609fb2501e5cd3
SHA1 (patch-Source_JavaScriptCore_assembler_ARMAssembler.h) = 99e46f9d9b26a8d9ba6b29c66d7ce5326c4ffeb6
SHA1 (patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp) = f78e6150ed8901b3fe046b2ef182f50f1c7500a4
SHA1 (patch-Source_JavaScriptCore_dfg_DFGNode.h) = 0d82552c6cc1f4885a2bcc539963c966216c977c
+SHA1 (patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp) = dd8c03f924d9b96abc9ba5d3a315fefc096be7b0
SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = f1eee7f9d3012edee1915234c837cff820f97092
SHA1 (patch-Source_WTF_wtf_Compiler.h) = f4f7771e4b421dddf9f73c7131e671d0c34b906c
SHA1 (patch-Source_WTF_wtf_MathExtras.h) = 01195978abe07154fbc28de9efc47b3f3105fd89
+SHA1 (patch-Source_WebCore_platform_FileSystem.cpp) = adef1a42c4e210f0a3dcb82807e2d2039684a0ec
+SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea
+SHA1 (patch-Source_WebKit2_CMakeLists.txt) = 10a3fca678095ad04ce43e6d291e3907a44f67b4
+SHA1 (patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp) = 7fbaf11853209cbfea5bb370d35ac985eb30f7ef
SHA1 (patch-Source_WebKit2_UIProcess_UserContent_WebUserContentControllerProxy.cpp) = 8af6225e01c0fbae866110c3aad46eae5c55ac9e
SHA1 (patch-Source_cmake_OptionsCommon.cmake) = 09a837ee65cdc79cc22220ce713e346fe8752c50
-SHA1 (patch-Source_cmake_OptionsGTK.cmake) = bb73f6bf759ca0f4b53ccfe8433d89efdfb1b009
+SHA1 (patch-Source_cmake_OptionsGTK.cmake) = 92a0d1563eda8a30a80c4ca3e115e8320d306bf5
SHA1 (patch-ai) = b8a45f2f5c1aa5aed178527ecd6cbd93baf76f8e
SHA1 (patch-aj) = 8247194bd8d62fcc356650c946756898fbe22982
diff --git a/www/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp
new file mode 100644
index 00000000000..9165b20e0a1
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp
@@ -0,0 +1,28 @@
+$NetBSD: patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp,v 1.5 2017/04/13 16:58:14 jperkin Exp $
+
+SunOS compatibility, though newer illumos has pthread_getattr_np so we should
+really add functionality tests for it and use it where available.
+
+--- Source/JavaScriptCore/heap/MachineStackMarker.cpp.orig 2016-08-22 12:21:07.000000000 +0000
++++ Source/JavaScriptCore/heap/MachineStackMarker.cpp
+@@ -52,11 +52,7 @@
+ #include <sys/mman.h>
+ #include <unistd.h>
+
+-#if OS(SOLARIS)
+-#include <thread.h>
+-#else
+ #include <pthread.h>
+-#endif
+
+ #if HAVE(PTHREAD_NP_H)
+ #include <pthread_np.h>
+@@ -488,7 +484,7 @@ size_t MachineThreads::Thread::getRegist
+ // e.g. on FreeBSD 5.4, neundorf@kde.org
+ pthread_attr_get_np(platformThread, &regs.attribute);
+ #endif
+-#else
++#elif !OS(SOLARIS)
+ // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
+ pthread_getattr_np(platformThread, &regs.attribute);
+ #endif
diff --git a/www/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp b/www/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp
new file mode 100644
index 00000000000..f01c4572617
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-Source_WebCore_platform_FileSystem.cpp,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+Support MAP_FILE if unavailable.
+
+--- Source/WebCore/platform/FileSystem.cpp.orig 2016-08-22 12:21:08.000000000 +0000
++++ Source/WebCore/platform/FileSystem.cpp
+@@ -189,6 +189,9 @@ MappedFileData::MappedFileData(const Str
+ return;
+ }
+
++#ifndef MAP_FILE
++#define MAP_FILE 0
++#endif
+ void* data = mmap(0, size, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0);
+ close(fd);
+
diff --git a/www/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp b/www/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp
new file mode 100644
index 00000000000..23109a78ef7
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebCore_rendering_shapes_RasterShape.cpp,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+Avoid ambiguous function call.
+
+--- Source/WebCore/rendering/shapes/RasterShape.cpp.orig 2016-04-11 06:18:44.000000000 +0000
++++ Source/WebCore/rendering/shapes/RasterShape.cpp
+@@ -142,7 +142,7 @@ const RasterShapeIntervals& RasterShape:
+ return *m_intervals;
+
+ int shapeMarginInt = clampToPositiveInteger(ceil(shapeMargin()));
+- int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt(2);
++ int maxShapeMarginInt = std::max(m_marginRectSize.width(), m_marginRectSize.height()) * sqrt((double)2);
+ if (!m_marginIntervals)
+ m_marginIntervals = m_intervals->computeShapeMarginIntervals(std::min(shapeMarginInt, maxShapeMarginInt));
+
diff --git a/www/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt b/www/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt
new file mode 100644
index 00000000000..c2e1b228b11
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD: patch-Source_WebKit2_CMakeLists.txt,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+Use -lsocket on SunOS.
+
+--- Source/WebKit2/CMakeLists.txt.orig 2016-08-22 12:21:08.000000000 +0000
++++ Source/WebKit2/CMakeLists.txt
+@@ -740,6 +740,11 @@ mark_as_advanced(LIBRT_LIBRARIES)
+ if (LIBRT_LIBRARIES)
+ list(APPEND WebKit2_LIBRARIES ${LIBRT_LIBRARIES})
+ endif ()
++find_library(LIBSOCKET_LIBRARIES NAMES socket)
++mark_as_advanced(LIBSOCKET_LIBRARIES)
++if (LIBSOCKET_LIBRARIES)
++ list(APPEND WebKit2_LIBRARIES ${LIBSOCKET_LIBRARIES})
++endif ()
+
+ macro(ADD_WEBKIT2_PREFIX_HEADER _target)
+ if (WebKit2_USE_PREFIX_HEADER)
diff --git a/www/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp b/www/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp
new file mode 100644
index 00000000000..80499350a60
--- /dev/null
+++ b/www/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp
@@ -0,0 +1,52 @@
+$NetBSD: patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp,v 1.1 2017/04/13 16:58:14 jperkin Exp $
+
+SunOS does not support dirent d_type.
+
+--- Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp.orig 2016-07-20 12:15:24.000000000 +0000
++++ Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp
+@@ -44,6 +44,12 @@ namespace NetworkCache {
+
+ static DirectoryEntryType directoryEntryType(uint8_t dtype)
+ {
++#ifndef DT_DIR
++#define DT_DIR S_IFDIR
++#endif
++#ifndef DT_REG
++#define DT_REG S_IFREG
++#endif
+ switch (dtype) {
+ case DT_DIR:
+ return DirectoryEntryType::Directory;
+@@ -57,12 +63,20 @@ static DirectoryEntryType directoryEntry
+
+ void traverseDirectory(const String& path, const std::function<void (const String&, DirectoryEntryType)>& function)
+ {
++#ifdef __sun
++ struct stat s;
++#endif
+ DIR* dir = opendir(WebCore::fileSystemRepresentation(path).data());
+ if (!dir)
+ return;
+ dirent* dp;
+ while ((dp = readdir(dir))) {
++#ifdef __sun
++ stat(dp->d_name, &s);
++ if (s.st_mode != S_IFDIR && s.st_mode != S_IFREG)
++#else
+ if (dp->d_type != DT_DIR && dp->d_type != DT_REG)
++#endif
+ continue;
+ const char* name = dp->d_name;
+ if (!strcmp(name, ".") || !strcmp(name, ".."))
+@@ -70,7 +84,11 @@ void traverseDirectory(const String& pat
+ auto nameString = String::fromUTF8(name);
+ if (nameString.isNull())
+ continue;
++#ifdef __sun
++ function(nameString, directoryEntryType(s.st_mode));
++#else
+ function(nameString, directoryEntryType(dp->d_type));
++#endif
+ }
+ closedir(dir);
+ }
diff --git a/www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake b/www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake
index 2c5c47b5f09..5bcd1b4931f 100644
--- a/www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake
+++ b/www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake
@@ -1,4 +1,4 @@
-$NetBSD: patch-Source_cmake_OptionsGTK.cmake,v 1.11 2016/09/05 08:06:25 leot Exp $
+$NetBSD: patch-Source_cmake_OptionsGTK.cmake,v 1.12 2017/04/13 16:58:14 jperkin Exp $
o Do not require GCC 4.9.0 (should be build *without* IndexedDB support)
o Do not conflict with CMAKE_MODULE_PATH during the linking phase of
@@ -12,6 +12,7 @@ o Do not conflict with CMAKE_MODULE_PATH during the linking phase of
[...]
o Disable DatabaseProcess and IndexedDB support.
+o Do not use --version-script on SunOS
--- Source/cmake/OptionsGTK.cmake.orig 2016-08-24 06:45:01.000000000 +0000
+++ Source/cmake/OptionsGTK.cmake
@@ -29,11 +30,13 @@ o Disable DatabaseProcess and IndexedDB support.
# Libtool library version, not to be confused with API version.
# See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT2 50 10 13)
-@@ -117,7 +110,7 @@ else ()
+@@ -116,8 +109,8 @@ if (DEVELOPER_MODE)
+ else ()
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MINIBROWSER PUBLIC OFF)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS PRIVATE OFF)
- if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
+- if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
- set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter")
++ if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_SOURCE_DIR}/Source/cmake/gtksymbols.filter")
endif ()
endif ()