pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/webkit-gtk Various patches to support SunOS.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7129b47a3324
branches:  trunk
changeset: 361022:7129b47a3324
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Apr 13 16:58:14 2017 +0000

description:
Various patches to support SunOS.

diffstat:

 www/webkit-gtk/distinfo                                                                     |   9 +-
 www/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp              |  28 +++++
 www/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp                         |  16 +++
 www/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp                |  15 ++
 www/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt                                  |  18 +++
 www/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp |  52 ++++++++++
 www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake                                  |   9 +-
 7 files changed, 142 insertions(+), 5 deletions(-)

diffs (209 lines):

diff -r 0409a685f6ca -r 7129b47a3324 www/webkit-gtk/distinfo
--- a/www/webkit-gtk/distinfo   Thu Apr 13 15:12:03 2017 +0000
+++ b/www/webkit-gtk/distinfo   Thu Apr 13 16:58:14 2017 +0000
@@ -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-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 -r 0409a685f6ca -r 7129b47a3324 www/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_JavaScriptCore_heap_MachineStackMarker.cpp    Thu Apr 13 16:58:14 2017 +0000
@@ -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@localhost
+     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 -r 0409a685f6ca -r 7129b47a3324 www/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebCore_platform_FileSystem.cpp       Thu Apr 13 16:58:14 2017 +0000
@@ -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 -r 0409a685f6ca -r 7129b47a3324 www/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebCore_rendering_shapes_RasterShape.cpp      Thu Apr 13 16:58:14 2017 +0000
@@ -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 -r 0409a685f6ca -r 7129b47a3324 www/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebKit2_CMakeLists.txt        Thu Apr 13 16:58:14 2017 +0000
@@ -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 -r 0409a685f6ca -r 7129b47a3324 www/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebKit2_NetworkProcess_cache_NetworkCacheFileSystem.cpp       Thu Apr 13 16:58:14 2017 +0000
@@ -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 -r 0409a685f6ca -r 7129b47a3324 www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake
--- a/www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake        Thu Apr 13 15:12:03 2017 +0000
+++ b/www/webkit-gtk/patches/patch-Source_cmake_OptionsGTK.cmake        Thu Apr 13 16:58:14 2017 +0000
@@ -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 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 @@
  # 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 ()



Home | Main Index | Thread Index | Old Index