Index: Makefile =================================================================== RCS file: /cvsroot/pkgsrc/www/webkit-gtk/Makefile,v retrieving revision 1.145 diff -u -p -r1.145 Makefile --- Makefile 24 Oct 2018 18:31:07 -0000 1.145 +++ Makefile 25 Oct 2018 08:03:53 -0000 @@ -37,7 +37,7 @@ CMAKE_ARGS+= -DENABLE_MINIBROWSER=ON CMAKE_ARGS+= -DENABLE_GEOLOCATION=OFF CMAKE_ARGS+= -DUSE_GSTREAMER_GL=OFF CMAKE_ARGS+= -DUSE_LIBHYPHEN=OFF -#CMAKE_ARGS+= -DUSE_SYSTEM_MALLOC=ON # XXX: needs adjustements for sysinfo() stuffs in Source/WTF/wtf/RAMSize.cpp +CMAKE_ARGS+= -DUSE_SYSTEM_MALLOC=ON REPLACE_PERL+= Source/JavaScriptCore/create_hash_table REPLACE_PERL+= Source/WebCore/bindings/scripts/*.pl Index: distinfo =================================================================== RCS file: /cvsroot/pkgsrc/www/webkit-gtk/distinfo,v retrieving revision 1.107 diff -u -p -r1.107 distinfo --- distinfo 24 Oct 2018 18:31:07 -0000 1.107 +++ distinfo 25 Oct 2018 08:03:53 -0000 @@ -12,6 +12,7 @@ SHA1 (patch-Source_JavaScriptCore_jit_Ex SHA1 (patch-Source_JavaScriptCore_runtime_MachineContext.h) = 23bc86a389f8009ec829c3ee0fe3effe3f20b012 SHA1 (patch-Source_ThirdParty_gtest_include_gtest_internal_gtest-port.h) = f1eee7f9d3012edee1915234c837cff820f97092 SHA1 (patch-Source_WTF_wtf_Platform.h) = 5cf36cf7cca8a39d75a788ca988758927b421d95 +SHA1 (patch-Source_WTF_wtf_RAMSize.cpp) = 55bad6e7fff83eb9856a4098a628b773ad6540fb SHA1 (patch-Source_WTF_wtf_StackBounds.cpp) = 22a71daac8443f079ad8bcc7285cfd7319c972b3 SHA1 (patch-Source_WebCore_inspector_InspectorFrontendHost.cpp) = daf6351a1a0b5a49592a2bb6db0d54620c7b09e3 SHA1 (patch-Source_WebCore_platform_FileSystem.cpp) = adef1a42c4e210f0a3dcb82807e2d2039684a0ec Index: patches/patch-Source_WTF_wtf_RAMSize.cpp =================================================================== RCS file: patches/patch-Source_WTF_wtf_RAMSize.cpp diff -N patches/patch-Source_WTF_wtf_RAMSize.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-Source_WTF_wtf_RAMSize.cpp 25 Oct 2018 08:03:53 -0000 @@ -0,0 +1,48 @@ +$NetBSD$ + +Add support for NetBSD. + +--- Source/WTF/wtf/RAMSize.cpp.orig 2017-08-03 11:00:07.000000000 +0000 ++++ Source/WTF/wtf/RAMSize.cpp +@@ -32,7 +32,9 @@ + #if OS(WINDOWS) + #include + #elif defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC +-#if OS(UNIX) ++#if OS(NETBSD) ++#include ++#elif OS(UNIX) + #include + #endif // OS(UNIX) + #else +@@ -41,7 +43,7 @@ + + namespace WTF { + +-#if OS(WINDOWS) ++#if OS(WINDOWS) || (OS(NETBSD) && defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC) + static const size_t ramSizeGuess = 512 * MB; + #endif + +@@ -55,13 +57,19 @@ static size_t computeRAMSize() + return ramSizeGuess; + return status.ullTotalPhys; + #elif defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC +-#if OS(UNIX) ++#if OS(NETBSD) ++ size_t len, totalram; ++ len = sizeof(totalram); ++ if (sysctlbyname("hw.usermem64", &totalram, &len, NULL, 0)) ++ return ramSizeGuess; ++ return totalram; ++#elif OS(UNIX) + struct sysinfo si; + sysinfo(&si); + return si.totalram * si.mem_unit; + #else + #error "Missing a platform specific way of determining the available RAM" +-#endif // OS(UNIX) ++#endif // USE_SYSTEM_MALLOC + #else + return bmalloc::api::availableMemory(); + #endif