pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/webkit-gtk webkit-gtk: Restore various patches for...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4538c4546feb
branches:  trunk
changeset: 380547:4538c4546feb
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed May 16 18:55:45 2018 +0000

description:
webkit-gtk: Restore various patches for SunOS support.

diffstat:

 www/webkit-gtk/Makefile                                                                             |   5 +-
 www/webkit-gtk/distinfo                                                                             |   8 +-
 www/webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp                                         |  14 ++
 www/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt                                           |  17 +++
 www/webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp          |  52 ++++++++++
 www/webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake                                        |  15 ++
 www/webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp |  15 ++
 www/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h                                    |  24 ++++
 8 files changed, 148 insertions(+), 2 deletions(-)

diffs (206 lines):

diff -r 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/Makefile
--- a/www/webkit-gtk/Makefile   Wed May 16 18:42:02 2018 +0000
+++ b/www/webkit-gtk/Makefile   Wed May 16 18:55:45 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.137 2018/05/14 21:22:34 wiz Exp $
+# $NetBSD: Makefile,v 1.138 2018/05/16 18:55:45 jperkin Exp $
 
 DISTNAME=      webkitgtk-2.20.2
 PKGNAME=       ${DISTNAME:S/webkitgtk/webkit-gtk/}
@@ -158,6 +158,9 @@
 CXXFLAGS+=     -Wno-c++11-narrowing
 .endif
 
+# This does not disable optimisations, merely avoids #error if there are none.
+CFLAGS+=       -DRELEASE_WITHOUT_OPTIMIZATIONS
+
 .include "options.mk"
 
 BUILDLINK_API_DEPENDS.glib2+= glib2>=2.32.1
diff -r 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/distinfo
--- a/www/webkit-gtk/distinfo   Wed May 16 18:42:02 2018 +0000
+++ b/www/webkit-gtk/distinfo   Wed May 16 18:55:45 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.100 2018/05/15 15:21:04 wiz Exp $
+$NetBSD: distinfo,v 1.101 2018/05/16 18:55:45 jperkin Exp $
 
 SHA1 (webkitgtk-2.20.2.tar.xz) = 2cc5099b1c70f61abe4c27f949b03bbf93a01d21
 RMD160 (webkitgtk-2.20.2.tar.xz) = 41a17b5552a575e7419f4180e33d0e8f1c0179aa
@@ -9,10 +9,16 @@
 SHA1 (patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp) = f78e6150ed8901b3fe046b2ef182f50f1c7500a4
 SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 2f20d6aa8f1ec4122bee9f2f95b736ee4496812f
 SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = f1eee7f9d3012edee1915234c837cff820f97092
+SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 0b35ab065e4cccbb63199cd8a9add0d5106c6150
 SHA1 (patch-Source_WTF_wtf_ThreadSpecific.h) = 38a85e10a72fe38d286a2ce747e090a2955b8791
 SHA1 (patch-Source_WebCore_platform_FileSystem.cpp) = adef1a42c4e210f0a3dcb82807e2d2039684a0ec
 SHA1 (patch-Source_WebCore_platform_network_soup_SoupNetworkSession.h) = f30deae48f120b97cec9a55811eb188cc4f3dfde
 SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea
+SHA1 (patch-Source_WebKit_CMakeLists.txt) = 228cc4734de3b08a3877ac839b1ffa2fbf2d3aa8
+SHA1 (patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp) = 6a8c147b0606a55c18f4bef46a3bbf2932349c58
+SHA1 (patch-Source_WebKit_PlatformGTK.cmake) = 67f71d609c7c7459447a9be8a5a7ad8455f88a33
 SHA1 (patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp) = 9c58253868e06b3dd3cac936651ba7e6a1437fc6
+SHA1 (patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp) = 920376ec8697780637f376b2fff312b7e214a7f6
+SHA1 (patch-Source_bmalloc_bmalloc_VMAllocate.h) = f5235df843849f8e1dd8fceaa015bc91785d8b3b
 SHA1 (patch-Source_cmake_OptionsCommon.cmake) = 03b72552414e7114bfa7ddc2d68fd97009a5ff7d
 SHA1 (patch-aj) = cd9a280c3bbab82c1a7aeb62a27ee6eb96c67ec2
diff -r 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp       Wed May 16 18:55:45 2018 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-Source_WTF_wtf_StackBounds.cpp,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+SunOS does not have pthread_getattr_np.
+
+--- Source/WTF/wtf/StackBounds.cpp.orig        2018-02-19 07:45:30.000000000 +0000
++++ Source/WTF/wtf/StackBounds.cpp
+@@ -131,6 +131,7 @@ StackBounds StackBounds::newThreadStackB
+ #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
+     // e.g. on FreeBSD 5.4, neundorf%kde.org@localhost
+     pthread_attr_get_np(thread, &sattr);
++#elif defined(__sun)
+ #else
+     // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
+     pthread_getattr_np(thread, &sattr);
diff -r 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt Wed May 16 18:55:45 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-Source_WebKit_CMakeLists.txt,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+SunOS requires libsocket.
+
+--- Source/WebKit/CMakeLists.txt.orig  2018-03-05 08:47:55.000000000 +0000
++++ Source/WebKit/CMakeLists.txt
+@@ -808,6 +808,10 @@ if (UNIX)
+     endif ()
+ endif ()
+ 
++if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
++    list(APPEND WebKit_LIBRARIES socket)
++endif ()
++
+ macro(ADD_WEBKIT_PREFIX_HEADER _target)
+     if (WebKit_USE_PREFIX_HEADER)
+         get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
diff -r 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp        Wed May 16 18:55:45 2018 +0000
@@ -0,0 +1,52 @@
+$NetBSD: patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+SunOS does not support DT_{DIR,REG}
+
+--- Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp.orig 2018-02-19 07:45:32.000000000 +0000
++++ Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp
+@@ -50,6 +50,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;
+@@ -63,12 +69,20 @@ static DirectoryEntryType directoryEntry
+ 
+ void traverseDirectory(const String& path, const Function<void (const String&, DirectoryEntryType)>& function)
+ {
++#ifdef __sun
++    struct stat s;
++#endif
+     DIR* dir = opendir(WebCore::FileSystem::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, ".."))
+@@ -76,7 +90,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 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake      Wed May 16 18:55:45 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebKit_PlatformGTK.cmake,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+SunOS ld does not support --version-script.
+
+--- Source/WebKit/PlatformGTK.cmake.orig       2018-04-10 07:33:13.000000000 +0000
++++ Source/WebKit/PlatformGTK.cmake
+@@ -24,7 +24,7 @@ add_definitions(-DLOCALEDIR="${CMAKE_INS
+ add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
+ add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
+ 
+-if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
++if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
+     WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map")
+ endif ()
+ 
diff -r 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp       Wed May 16 18:55:45 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+Avoid ambiguous function call.
+
+--- Source/WebKit/Platform/classifier/ResourceLoadStatisticsClassifier.cpp.orig        2018-02-20 07:38:30.000000000 +0000
++++ Source/WebKit/Platform/classifier/ResourceLoadStatisticsClassifier.cpp
+@@ -29,6 +29,8 @@
+ #include "Logging.h"
+ #include <WebCore/ResourceLoadStatistics.h>
+ 
++using std::sqrt;
++
+ namespace WebKit {
+ using namespace WebCore;
+ 
diff -r 514cccf1eae7 -r 4538c4546feb www/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h  Wed May 16 18:55:45 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-Source_bmalloc_bmalloc_VMAllocate.h,v 1.1 2018/05/16 18:55:45 jperkin Exp $
+
+Use posix_madvise on SunOS.
+
+--- Source/bmalloc/bmalloc/VMAllocate.h.orig   2018-02-19 07:45:33.000000000 +0000
++++ Source/bmalloc/bmalloc/VMAllocate.h
+@@ -198,6 +198,8 @@ inline void vmDeallocatePhysicalPages(vo
+     vmValidatePhysical(p, vmSize);
+ #if BOS(DARWIN)
+     SYSCALL(madvise(p, vmSize, MADV_FREE_REUSABLE));
++#elif defined(__sun)
++    SYSCALL(posix_madvise(p, vmSize, MADV_DONTNEED));
+ #else
+     SYSCALL(madvise(p, vmSize, MADV_DONTNEED));
+ #if BOS(LINUX)
+@@ -211,6 +213,8 @@ inline void vmAllocatePhysicalPages(void
+     vmValidatePhysical(p, vmSize);
+ #if BOS(DARWIN)
+     SYSCALL(madvise(p, vmSize, MADV_FREE_REUSE));
++#elif defined(__sun)
++    SYSCALL(posix_madvise(p, vmSize, MADV_NORMAL));
+ #else
+     SYSCALL(madvise(p, vmSize, MADV_NORMAL));
+ #if BOS(LINUX)



Home | Main Index | Thread Index | Old Index