Wed Mar 27 10:50:30 2019 UTC ()
webkit-gtk: Naive implementation of computeRAMSize for SunOS.


(jperkin)
diff -r1.118 -r1.119 pkgsrc/www/webkit-gtk/distinfo
diff -r1.2 -r1.3 pkgsrc/www/webkit-gtk/patches/patch-Source_WTF_wtf_RAMSize.cpp

cvs diff -r1.118 -r1.119 pkgsrc/www/webkit-gtk/distinfo (expand / switch to unified diff)

--- pkgsrc/www/webkit-gtk/distinfo 2019/03/13 20:49:40 1.118
+++ pkgsrc/www/webkit-gtk/distinfo 2019/03/27 10:50:30 1.119
@@ -1,32 +1,32 @@ @@ -1,32 +1,32 @@
1$NetBSD: distinfo,v 1.118 2019/03/13 20:49:40 leot Exp $ 1$NetBSD: distinfo,v 1.119 2019/03/27 10:50:30 jperkin Exp $
2 2
3SHA1 (webkitgtk-2.24.0.tar.xz) = 737fc7a6f5b5b5e2844c8488e60196d61802a952 3SHA1 (webkitgtk-2.24.0.tar.xz) = 737fc7a6f5b5b5e2844c8488e60196d61802a952
4RMD160 (webkitgtk-2.24.0.tar.xz) = 6527bf43374911dd82943757ae2ba622d1792722 4RMD160 (webkitgtk-2.24.0.tar.xz) = 6527bf43374911dd82943757ae2ba622d1792722
5SHA512 (webkitgtk-2.24.0.tar.xz) = 7a1444b22fb59ecdd638344acf3525f1ef9204215a568e185f2ac7f4e43cf89c7be307be31d51ec46231bbf5e9470e48d56395873d7368aca8022ff5c4100dab 5SHA512 (webkitgtk-2.24.0.tar.xz) = 7a1444b22fb59ecdd638344acf3525f1ef9204215a568e185f2ac7f4e43cf89c7be307be31d51ec46231bbf5e9470e48d56395873d7368aca8022ff5c4100dab
6Size (webkitgtk-2.24.0.tar.xz) = 17894000 bytes 6Size (webkitgtk-2.24.0.tar.xz) = 17894000 bytes
7SHA1 (patch-CMakeLists.txt) = 571c65d258b6e12503971145777a8d442578145f 7SHA1 (patch-CMakeLists.txt) = 571c65d258b6e12503971145777a8d442578145f
8SHA1 (patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh) = 5bb44be142b474d517b2b1459f0edc7d2453aa61 8SHA1 (patch-Source_JavaScriptCore_Scripts_check-xcfilelists.sh) = 5bb44be142b474d517b2b1459f0edc7d2453aa61
9SHA1 (patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh) = 308a7c8f687253b4fc75de0c66016dd18666e697 9SHA1 (patch-Source_JavaScriptCore_Scripts_generate-unified-sources.sh) = 308a7c8f687253b4fc75de0c66016dd18666e697
10SHA1 (patch-Source_JavaScriptCore_assembler_ARM64Assembler.h) = f80d9811f108a72efe16f0e39b97f503d7738840 10SHA1 (patch-Source_JavaScriptCore_assembler_ARM64Assembler.h) = f80d9811f108a72efe16f0e39b97f503d7738840
11SHA1 (patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h) = 985c19ffb6a16df031bd284f7e79041adb8cd311 11SHA1 (patch-Source_JavaScriptCore_assembler_ARMv7Assembler.h) = 985c19ffb6a16df031bd284f7e79041adb8cd311
12SHA1 (patch-Source_JavaScriptCore_heap_MarkedSpace.cpp) = e6a23d5ef22bddd0a9606fb0e472960e4cf5673e 12SHA1 (patch-Source_JavaScriptCore_heap_MarkedSpace.cpp) = e6a23d5ef22bddd0a9606fb0e472960e4cf5673e
13SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = d600887955128cecece21ba401f6f53ba5cfbeb6 13SHA1 (patch-Source_JavaScriptCore_jit_ExecutableAllocator.cpp) = d600887955128cecece21ba401f6f53ba5cfbeb6
14SHA1 (patch-Source_JavaScriptCore_offlineasm_arm64.rb) = 8c05dafa317667bbf55504d05eeb8ae06fba4e93 14SHA1 (patch-Source_JavaScriptCore_offlineasm_arm64.rb) = 8c05dafa317667bbf55504d05eeb8ae06fba4e93
15SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 23bc86a389f8009ec829c3ee0fe3effe3f20b012 15SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 23bc86a389f8009ec829c3ee0fe3effe3f20b012
16SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = a5454eb891ad1f9d8285c28af2e9efb4ff439e6b 16SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = a5454eb891ad1f9d8285c28af2e9efb4ff439e6b
17SHA1 (patch-Source_WTF_wtf_FileSystem.cpp) = 9d6204ce6663f3b32d195e307540c5cc5e7a7988 17SHA1 (patch-Source_WTF_wtf_FileSystem.cpp) = 9d6204ce6663f3b32d195e307540c5cc5e7a7988
18SHA1 (patch-Source_WTF_wtf_Platform.h) = 584720f4e248ff7e51166c267d08954786c28ab7 18SHA1 (patch-Source_WTF_wtf_Platform.h) = 584720f4e248ff7e51166c267d08954786c28ab7
19SHA1 (patch-Source_WTF_wtf_RAMSize.cpp) = 21e442fc0025f7eb0a90f491d4bdfd35e26baadb 19SHA1 (patch-Source_WTF_wtf_RAMSize.cpp) = b440e7041f72e76ab840977fc4d48d6dd32ed2ed
20SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 22a71daac8443f079ad8bcc7285cfd7319c972b3 20SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 22a71daac8443f079ad8bcc7285cfd7319c972b3
21SHA1 (patch-Source_WebCore_Scripts_check-xcfilelists.sh) = 2a7ff15a2ec01a77481f85a6ca613bb7a3c18355 21SHA1 (patch-Source_WebCore_Scripts_check-xcfilelists.sh) = 2a7ff15a2ec01a77481f85a6ca613bb7a3c18355
22SHA1 (patch-Source_WebCore_Scripts_generate-unified-sources.sh) = 740eb33931b6f9cb8008748323235f23466328dc 22SHA1 (patch-Source_WebCore_Scripts_generate-unified-sources.sh) = 740eb33931b6f9cb8008748323235f23466328dc
23SHA1 (patch-Source_WebCore_inspector_InspectorFrontendHost.cpp) = daf6351a1a0b5a49592a2bb6db0d54620c7b09e3 23SHA1 (patch-Source_WebCore_inspector_InspectorFrontendHost.cpp) = daf6351a1a0b5a49592a2bb6db0d54620c7b09e3
24SHA1 (patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp) = 16b36d2d91fd7f43156b9ee09bcafd19602ebbd9 24SHA1 (patch-Source_WebCore_platform_graphics_filters_FEMorphology.cpp) = 16b36d2d91fd7f43156b9ee09bcafd19602ebbd9
25SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea 25SHA1 (patch-Source_WebCore_rendering_shapes_RasterShape.cpp) = 551e47698dee50d097b11e3218f13bb3447edfea
26SHA1 (patch-Source_WebKit_CMakeLists.txt) = 228cc4734de3b08a3877ac839b1ffa2fbf2d3aa8 26SHA1 (patch-Source_WebKit_CMakeLists.txt) = 228cc4734de3b08a3877ac839b1ffa2fbf2d3aa8
27SHA1 (patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp) = 8c19692e78b1cfb021b95435508a10bc6542b173 27SHA1 (patch-Source_WebKit_NetworkProcess_cache_NetworkCacheFileSystem.cpp) = 8c19692e78b1cfb021b95435508a10bc6542b173
28SHA1 (patch-Source_WebKit_PlatformGTK.cmake) = 61d2b4942b83d3f3c1b642d122f109ba90bbff9d 28SHA1 (patch-Source_WebKit_PlatformGTK.cmake) = 61d2b4942b83d3f3c1b642d122f109ba90bbff9d
29SHA1 (patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp) = 9c58253868e06b3dd3cac936651ba7e6a1437fc6 29SHA1 (patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp) = 9c58253868e06b3dd3cac936651ba7e6a1437fc6
30SHA1 (patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp) = 920376ec8697780637f376b2fff312b7e214a7f6 30SHA1 (patch-Source_WebKit_Platform_classifier_ResourceLoadStatisticsClassifier.cpp) = 920376ec8697780637f376b2fff312b7e214a7f6
31SHA1 (patch-Source_WebKit_Scripts_check-xcfilelists.sh) = 7804dfff27dc1c26c74aae4aa7856d9bc6b895c0 31SHA1 (patch-Source_WebKit_Scripts_check-xcfilelists.sh) = 7804dfff27dc1c26c74aae4aa7856d9bc6b895c0
32SHA1 (patch-Source_WebKit_Scripts_generate-unified-sources.sh) = def930cf3f706ac657b2f8835c8c0278ade8f663 32SHA1 (patch-Source_WebKit_Scripts_generate-unified-sources.sh) = def930cf3f706ac657b2f8835c8c0278ade8f663

cvs diff -r1.2 -r1.3 pkgsrc/www/webkit-gtk/patches/Attic/patch-Source_WTF_wtf_RAMSize.cpp (expand / switch to unified diff)

--- pkgsrc/www/webkit-gtk/patches/Attic/patch-Source_WTF_wtf_RAMSize.cpp 2019/03/13 20:49:40 1.2
+++ pkgsrc/www/webkit-gtk/patches/Attic/patch-Source_WTF_wtf_RAMSize.cpp 2019/03/27 10:50:30 1.3
@@ -1,41 +1,46 @@ @@ -1,41 +1,46 @@
1$NetBSD: patch-Source_WTF_wtf_RAMSize.cpp,v 1.2 2019/03/13 20:49:40 leot Exp $ 1$NetBSD: patch-Source_WTF_wtf_RAMSize.cpp,v 1.3 2019/03/27 10:50:30 jperkin Exp $
2 2
3Add support for NetBSD. 3Add support for NetBSD and SunOS.
4 4
5--- Source/WTF/wtf/RAMSize.cpp.orig 2019-02-12 11:21:17.000000000 +0000 5--- Source/WTF/wtf/RAMSize.cpp.orig 2019-02-12 11:21:17.000000000 +0000
6+++ Source/WTF/wtf/RAMSize.cpp 6+++ Source/WTF/wtf/RAMSize.cpp
7@@ -35,13 +35,16 @@ 7@@ -35,13 +35,19 @@
8 #if OS(LINUX) 8 #if OS(LINUX)
9 #include <sys/sysinfo.h> 9 #include <sys/sysinfo.h>
10 #endif // OS(LINUX) 10 #endif // OS(LINUX)
 11+#if OS(SOLARIS)
 12+#include <unistd.h>
 13+#endif
11+#if OS(NETBSD) 14+#if OS(NETBSD)
12+#include <sys/sysctl.h> 15+#include <sys/sysctl.h>
13+#endif // OS(NETBSD) 16+#endif // OS(NETBSD)
14 #else 17 #else
15 #include <bmalloc/bmalloc.h> 18 #include <bmalloc/bmalloc.h>
16 #endif 19 #endif
17  20
18 namespace WTF { 21 namespace WTF {
19  22
20-#if OS(WINDOWS) 23-#if OS(WINDOWS)
21+#if OS(WINDOWS) || (OS(NETBSD) && defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) 24+#if OS(WINDOWS) || (OS(NETBSD) && defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC)
22 static const size_t ramSizeGuess = 512 * MB; 25 static const size_t ramSizeGuess = 512 * MB;
23 #endif 26 #endif
24  27
25@@ -59,9 +62,18 @@ static size_t computeRAMSize() 28@@ -59,9 +65,20 @@ static size_t computeRAMSize()
26 struct sysinfo si; 29 struct sysinfo si;
27 sysinfo(&si); 30 sysinfo(&si);
28 return si.totalram * si.mem_unit; 31 return si.totalram * si.mem_unit;
 32+#elif OS(SOLARIS)
 33+ return (sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE));
29+#elif OS(NETBSD) 34+#elif OS(NETBSD)
30+ int mib[2]; 35+ int mib[2];
31+ size_t len, totalram; 36+ size_t len, totalram;
32+ mib[0] = CTL_HW; 37+ mib[0] = CTL_HW;
33+ mib[1] = HW_USERMEM64; 38+ mib[1] = HW_USERMEM64;
34+ len = sizeof(totalram); 39+ len = sizeof(totalram);
35+ if (sysctl(mib, 2, &totalram, &len, NULL, 0)) 40+ if (sysctl(mib, 2, &totalram, &len, NULL, 0))
36+ return ramSizeGuess; 41+ return ramSizeGuess;
37+ return totalram; 42+ return totalram;
38 #else 43 #else
39 #error "Missing a platform specific way of determining the available RAM" 44 #error "Missing a platform specific way of determining the available RAM"
40-#endif // OS(LINUX) 45-#endif // OS(LINUX)
41+#endif // USE_SYSTEM_MALLOC 46+#endif // USE_SYSTEM_MALLOC