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,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.137 2018/05/14 21:22:34 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.138 2018/05/16 18:55:45 jperkin Exp $ |
2 | | | 2 | |
3 | DISTNAME= webkitgtk-2.20.2 | | 3 | DISTNAME= webkitgtk-2.20.2 |
4 | PKGNAME= ${DISTNAME:S/webkitgtk/webkit-gtk/} | | 4 | PKGNAME= ${DISTNAME:S/webkitgtk/webkit-gtk/} |
5 | CATEGORIES= www | | 5 | CATEGORIES= www |
6 | MASTER_SITES= https://www.webkitgtk.org/releases/ | | 6 | MASTER_SITES= https://www.webkitgtk.org/releases/ |
7 | EXTRACT_SUFX= .tar.xz | | 7 | EXTRACT_SUFX= .tar.xz |
8 | | | 8 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= https://www.webkitgtk.org/ | | 10 | HOMEPAGE= https://www.webkitgtk.org/ |
11 | COMMENT= GTK port of the WebKit browser engine | | 11 | COMMENT= GTK port of the WebKit browser engine |
12 | LICENSE= 2-clause-bsd AND gnu-lgpl-v2 | | 12 | LICENSE= 2-clause-bsd AND gnu-lgpl-v2 |
13 | | | 13 | |
14 | # shm_open(3) and shm_unlink(3) appeared in NetBSD 7.0 | | 14 | # shm_open(3) and shm_unlink(3) appeared in NetBSD 7.0 |
| @@ -148,26 +148,29 @@ CMAKE_ARGS+= -DRUBY_EXECUTABLE=${RUBY} | | | @@ -148,26 +148,29 @@ CMAKE_ARGS+= -DRUBY_EXECUTABLE=${RUBY} |
148 | | | 148 | |
149 | PYTHON_FOR_BUILD_ONLY= yes | | 149 | PYTHON_FOR_BUILD_ONLY= yes |
150 | PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 # not yet ported as of 1.10.2 | | 150 | PYTHON_VERSIONS_INCOMPATIBLE= 34 35 36 # not yet ported as of 1.10.2 |
151 | .include "../../lang/python/application.mk" | | 151 | .include "../../lang/python/application.mk" |
152 | CMAKE_ARGS+= -DPYTHON_EXECUTABLE=${PYTHONBIN} | | 152 | CMAKE_ARGS+= -DPYTHON_EXECUTABLE=${PYTHONBIN} |
153 | | | 153 | |
154 | CXXFLAGS.SunOS+= -fpermissive | | 154 | CXXFLAGS.SunOS+= -fpermissive |
155 | | | 155 | |
156 | .include "../../mk/compiler.mk" | | 156 | .include "../../mk/compiler.mk" |
157 | .if !empty(PKGSRC_COMPILER:Mclang) | | 157 | .if !empty(PKGSRC_COMPILER:Mclang) |
158 | CXXFLAGS+= -Wno-c++11-narrowing | | 158 | CXXFLAGS+= -Wno-c++11-narrowing |
159 | .endif | | 159 | .endif |
160 | | | 160 | |
| | | 161 | # This does not disable optimisations, merely avoids #error if there are none. |
| | | 162 | CFLAGS+= -DRELEASE_WITHOUT_OPTIMIZATIONS |
| | | 163 | |
161 | .include "options.mk" | | 164 | .include "options.mk" |
162 | | | 165 | |
163 | BUILDLINK_API_DEPENDS.glib2+= glib2>=2.32.1 | | 166 | BUILDLINK_API_DEPENDS.glib2+= glib2>=2.32.1 |
164 | .include "../../devel/glib2/buildlink3.mk" | | 167 | .include "../../devel/glib2/buildlink3.mk" |
165 | .include "../../devel/zlib/buildlink3.mk" | | 168 | .include "../../devel/zlib/buildlink3.mk" |
166 | .include "../../databases/sqlite3/buildlink3.mk" | | 169 | .include "../../databases/sqlite3/buildlink3.mk" |
167 | # A correct Webkit build requires flex 2.5.33 | | 170 | # A correct Webkit build requires flex 2.5.33 |
168 | .include "../../devel/flex/buildlink3.mk" | | 171 | .include "../../devel/flex/buildlink3.mk" |
169 | .include "../../devel/gperf/buildlink3.mk" | | 172 | .include "../../devel/gperf/buildlink3.mk" |
170 | .include "../../devel/pango/buildlink3.mk" | | 173 | .include "../../devel/pango/buildlink3.mk" |
171 | .include "../../fonts/woff2/buildlink3.mk" | | 174 | .include "../../fonts/woff2/buildlink3.mk" |
172 | .include "../../graphics/cairo-gobject/buildlink3.mk" | | 175 | .include "../../graphics/cairo-gobject/buildlink3.mk" |
173 | .include "../../graphics/freetype2/buildlink3.mk" | | 176 | .include "../../graphics/freetype2/buildlink3.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,18 +1,24 @@ | | | @@ -1,18 +1,24 @@ |
1 | $NetBSD: distinfo,v 1.100 2018/05/15 15:21:04 wiz Exp $ | | 1 | $NetBSD: distinfo,v 1.101 2018/05/16 18:55:45 jperkin Exp $ |
2 | | | 2 | |
3 | SHA1 (webkitgtk-2.20.2.tar.xz) = 2cc5099b1c70f61abe4c27f949b03bbf93a01d21 | | 3 | SHA1 (webkitgtk-2.20.2.tar.xz) = 2cc5099b1c70f61abe4c27f949b03bbf93a01d21 |
4 | RMD160 (webkitgtk-2.20.2.tar.xz) = 41a17b5552a575e7419f4180e33d0e8f1c0179aa | | 4 | RMD160 (webkitgtk-2.20.2.tar.xz) = 41a17b5552a575e7419f4180e33d0e8f1c0179aa |
5 | SHA512 (webkitgtk-2.20.2.tar.xz) = 8b8078994d0fe9a759d7062e6fe528edbe8931a3a0a198b4d9b9459417ee0521d964746341bfa5813469129bfa4c52d648d7016481f9e57c4f7355931c93a847 | | 5 | SHA512 (webkitgtk-2.20.2.tar.xz) = 8b8078994d0fe9a759d7062e6fe528edbe8931a3a0a198b4d9b9459417ee0521d964746341bfa5813469129bfa4c52d648d7016481f9e57c4f7355931c93a847 |
6 | Size (webkitgtk-2.20.2.tar.xz) = 16622048 bytes | | 6 | Size (webkitgtk-2.20.2.tar.xz) = 16622048 bytes |
7 | SHA1 (patch-CMakeLists.txt) = 684aad9e5bcc25b1afc128a1b5df00f34f1208e9 | | 7 | SHA1 (patch-CMakeLists.txt) = 684aad9e5bcc25b1afc128a1b5df00f34f1208e9 |
8 | SHA1 (patch-Source_JavaScriptCore_assembler_ARMAssembler.h) = 99e46f9d9b26a8d9ba6b29c66d7ce5326c4ffeb6 | | 8 | SHA1 (patch-Source_JavaScriptCore_assembler_ARMAssembler.h) = 99e46f9d9b26a8d9ba6b29c66d7ce5326c4ffeb6 |
9 | SHA1 (patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp) = f78e6150ed8901b3fe046b2ef182f50f1c7500a4 | | 9 | SHA1 (patch-Source_JavaScriptCore_assembler_MacroAssemblerARM.cpp) = f78e6150ed8901b3fe046b2ef182f50f1c7500a4 |
10 | SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 2f20d6aa8f1ec4122bee9f2f95b736ee4496812f | | 10 | SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = 2f20d6aa8f1ec4122bee9f2f95b736ee4496812f |
11 | SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = f1eee7f9d3012edee1915234c837cff820f97092 | | 11 | SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = f1eee7f9d3012edee1915234c837cff820f97092 |
| | | 12 | SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 0b35ab065e4cccbb63199cd8a9add0d5106c6150 |
12 | SHA1 (patch-Source_WTF_wtf_ThreadSpecific.h) = 38a85e10a72fe38d286a2ce747e090a2955b8791 | | 13 | SHA1 (patch-Source_WTF_wtf_ThreadSpecific.h) = 38a85e10a72fe38d286a2ce747e090a2955b8791 |
13 | SHA1 (patch-Source_WebCore_platform_FileSystem.cpp) = adef1a42c4e210f0a3dcb82807e2d2039684a0ec | | 14 | SHA1 (patch-Source_WebCore_platform_FileSystem.cpp) = adef1a42c4e210f0a3dcb82807e2d2039684a0ec |
14 | SHA1 (patch-Source_WebCore_platform_network_soup_SoupNetworkSession.h) = f30deae48f120b97cec9a55811eb188cc4f3dfde | | 15 | SHA1 (patch-Source_WebCore_platform_network_soup_SoupNetworkSession.h) = f30deae48f120b97cec9a55811eb188cc4f3dfde |
15 | SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea | | 16 | SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea |
| | | 17 | SHA1 (patch-Source_WebKit_CMakeLists.txt) = 228cc4734de3b08a3877ac839b1ffa2fbf2d3aa8 |
| | | 18 | SHA1 (patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp) = 6a8c147b0606a55c18f4bef46a3bbf2932349c58 |
| | | 19 | SHA1 (patch-Source_WebKit_PlatformGTK.cmake) = 67f71d609c7c7459447a9be8a5a7ad8455f88a33 |
16 | SHA1 (patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp) = 9c58253868e06b3dd3cac936651ba7e6a1437fc6 | | 20 | SHA1 (patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp) = 9c58253868e06b3dd3cac936651ba7e6a1437fc6 |
| | | 21 | SHA1 (patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp) = 920376ec8697780637f376b2fff312b7e214a7f6 |
| | | 22 | SHA1 (patch-Source_bmalloc_bmalloc_VMAllocate.h) = f5235df843849f8e1dd8fceaa015bc91785d8b3b |
17 | SHA1 (patch-Source_cmake_OptionsCommon.cmake) = 03b72552414e7114bfa7ddc2d68fd97009a5ff7d | | 23 | SHA1 (patch-Source_cmake_OptionsCommon.cmake) = 03b72552414e7114bfa7ddc2d68fd97009a5ff7d |
18 | SHA1 (patch-aj) = cd9a280c3bbab82c1a7aeb62a27ee6eb96c67ec2 | | 24 | 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)