Wed May 16 18:55:45 2018 UTC ()
webkit-gtk: Restore various patches for SunOS support.
(jperkin)
diff -r1.137 -r1.138 pkgsrc/www/webkit-gtk/Makefile
diff -r1.100 -r1.101 pkgsrc/www/webkit-gtk/distinfo
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_WTF_wtf_StackBounds.cpp
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_WebKit_CMakeLists.txt
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_WebKit_PlatformGTK.cmake
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp
diff -r0 -r1.1 pkgsrc/www/webkit-gtk/patches/patch-Source_bmalloc_bmalloc_VMAllocate.h
--- pkgsrc/www/webkit-gtk/Makefile 2018/05/14 21:22:34 1.137
+++ pkgsrc/www/webkit-gtk/Makefile 2018/05/16 18:55:45 1.138
@@ -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/}
@@ -157,6 +157,9 @@
.if !empty(PKGSRC_COMPILER:Mclang)
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"
--- pkgsrc/www/webkit-gtk/distinfo 2018/05/15 15:21:04 1.100
+++ pkgsrc/www/webkit-gtk/distinfo 2018/05/16 18:55:45 1.101
@@ -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
$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
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);
$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)
$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);
}
$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 ()
$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;
$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)