# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= webkit2 VERSION= 2.38.0 KEYWORDS= www VARIANTS= api40 api41 api50 SDESC[api50]= Opensource browser engine using GTK4 (API 5.0) SDESC[api40]= Opensource browser engine using GTK+3 (API 4.0) SDESC[api41]= Opensource browser engine using GTK+3 (API 4.1) HOMEPAGE= https://www.webkitgtk.org/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://www.webkitgtk.org/releases/ https://fossies.org/linux/www/ DISTFILE[1]= webkitgtk-2.38.0.tar.xz:main DF_INDEX= 1 SPKGS[api50]= complete primary nls SPKGS[api40]= complete primary nls SPKGS[api41]= complete primary nls OPTIONS_AVAILABLE= API40 API41 API50 OPTIONS_STANDARD= none VOPTS[api50]= API40=OFF API41=OFF API50=ON VOPTS[api40]= API40=ON API41=OFF API50=OFF VOPTS[api41]= API40=OFF API41=ON API50=OFF BUILD_DEPENDS= gperf:primary:standard BUILDRUN_DEPENDS= enchant:single:standard fontconfig:primary:standard freetype:primary:standard WebP:single:standard libsecret:primary:standard libnotify:primary:standard hyphen:single:standard harfbuzz:icu:standard icu:single:standard libgcrypt:single:standard gnutls:primary:standard libtasn1:primary:standard geoclue:single:standard woff2:single:standard gstreamer1-plugins-base:primary:standard openjpeg:single:standard USES= png mesa cmake pkgconfig sqlite bison perl:build python:build ruby:build gettext-tools cpe GNOME_COMPONENTS= gdkpixbuf introspection libxslt XORG_COMPONENTS= x11 xcomposite xdamage xext xrender xt ice DISTNAME= webkitgtk-2.38.0 LICENSE= GPLv2+:primary BSD3CLAUSE:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv2+:stock BSD3CLAUSE:{{WRKDIR}}/LICENSE_BSD LICENSE_AWK= BSD3CLAUSE:"^$$" TERMS:"^$$" LICENSE_SOURCE= BSD3CLAUSE:{{WRKSRC}}/Source/WebCore/css/parser/MediaQueryBlockWatcher.h TERMS:{{WRKSRC}}/Source/WebCore/style/StyleScope.cpp LICENSE_SCHEME= multi CPE_PRODUCT= webkitgtk CPE_VENDOR= webkitgtk FPC_EQUIVALENT= www/webkit2-gtk3 CONFIGURE_ENV= XDG_CACHE_HOME={{WRKDIR}} INSTALL_TARGET= install INSTALL_REQ_TOOLCHAIN= yes PLIST_SUB= INTRO="@comment " CXXFLAGS= -DFIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB=32 CMAKE_ARGS= -DPORT=GTK -DENABLE_GEOLOCATION:BOOL=ON -DENABLE_GLES2:BOOL=ON -DENABLE_MINIBROWSER:BOOL=ON -DENABLE_WAYLAND_TARGET:BOOL=OFF -DENABLE_BUBBLEWRAP_SANDBOX:BOOL=OFF -DENABLE_GAMEPAD:BOOL=OFF -DENABLE_INTROSPECTION:BOOL=OFF -DENABLE_JOURNALD_LOG:BOOL=OFF -DSUPPRESS_ASSERT:BOOL=ON -DUSE_SYSTEMD:BOOL=OFF -DUSE_GSTREAMER_GL:BOOL=OFF VAR_OPSYS[sunos]= CMAKE_ARGS=-DUSE_LD_GOLD:BOOL=OFF [API50].DESCRIPTION= Build WebKit2 API 5.0 variant [API50].BUILDRUN_DEPENDS_ON= libsoup:primary:standard [API50].CMAKE_ARGS_ON= -DUSE_GTK4=ON [API50].GNOME_COMPONENTS_ON= gtk4 [API50].PLIST_SUB_ON= JSSOVERSION=0.0.0 JSSOMAJOR=0 SOVERSION=0.0.0 SOMAJOR=0 WKAPI=5.0 WKAPIMAJOR=5 [API40].DESCRIPTION= Build WebKit2 API 4.0 variant [API40].BUILDRUN_DEPENDS_ON= libsoup-2.4:primary:standard [API40].CMAKE_ARGS_ON= -DUSE_SOUP2=ON [API40].GNOME_COMPONENTS_ON= gtk3 [API40].PLIST_SUB_ON= JSSOVERSION=18.21.3 JSSOMAJOR=18 SOVERSION=37.57.3 SOMAJOR=37 WKAPI=4.0 WKAPIMAJOR=4 [API41].DESCRIPTION= Build WebKit2 API 4.1 variant [API41].BUILDRUN_DEPENDS_ON= libsoup:primary:standard [API41].GNOME_COMPONENTS_ON= gtk3 [API41].PLIST_SUB_ON= JSSOVERSION=0.2.3 JSSOMAJOR=0 SOVERSION=0.2.3 SOMAJOR=0 WKAPI=4.1 WKAPIMAJOR=4 post-patch: echo 'add_compile_definitions("U_DEFINE_FALSE_AND_TRUE=1")' \ >> ${WRKSRC}/Source/WTF/wtf/CMakeLists.txt post-install-API40-ON: (cd ${STAGEDIR}${PREFIX}/bin && \ ${LN} -s ../libexec/webkit2gtk-4.0/jsc jsc-4 && \ ${LN} -s ../libexec/webkit2gtk-4.0/MiniBrowser MiniBrowser-4) ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-4.0/injected-bundle/*.so ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-4.0/* post-install-API50-ON: (cd ${STAGEDIR}${PREFIX}/bin && \ ${LN} -s ../libexec/webkit2gtk-5.0/jsc jsc-5 && \ ${LN} -s ../libexec/webkit2gtk-5.0/MiniBrowser MiniBrowser-5) ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-5.0/injected-bundle/*.so ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-5.0/* post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*.* ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/WebKitWebDriver post-install-API41-ON: (cd ${STAGEDIR}${PREFIX}/bin && \ ${LN} -s ../libexec/webkit2gtk-4.1/jsc jsc-4 && \ ${LN} -s ../libexec/webkit2gtk-4.1/MiniBrowser MiniBrowser-4) ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-4.1/injected-bundle/*.so ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-4.1/* post-patch-sunos: ${REINPLACE_CMD} -e '/USE_FILE_LOCK/ s|1|0|' \ ${WRKSRC}/Source/WTF/wtf/PlatformUse.h \ ${WRKSRC}/Source/WebCore/config.h [FILE:574:descriptions/desc.primary] WebKitGTK+ is a full-featured port of the WebKit rendering engine, suitable for projects requiring any kind of web integration, from hybrid HTML/CSS applications to full-fledged web browsers. It offers WebKit's full functionality and is useful in a wide range of systems from desktop computers to embedded systems like phones, tablets, and televisions. WebKitGTK+ is made by a lively community of developers and designers, who hope to bring the web platform to everyone. It's the official web engine of the GNOME platform and is used in browsers such as Epiphany and Surf. [FILE:102:distinfo] f9ce6375a3b6e1329b0b609f46921e2627dc7ad6224b37b967ab2ea643bc0fbd 32997240 webkitgtk-2.38.0.tar.xz [FILE:6416:manifests/plist.primary] %%INTRO%%lib/girepository-1.0/ JavaScriptCore-%%WKAPI%%.typelib WebKit2-%%WKAPI%%.typelib WebKit2WebExtension-%%WKAPI%%.typelib %%INTRO%%share/gir-1.0/ JavaScriptCore-%%WKAPI%%.gir WebKit2-%%WKAPI%%.gir WebKit2WebExtension-%%WKAPI%%.gir bin/ MiniBrowser-%%WKAPIMAJOR%% WebKitWebDriver jsc-%%WKAPIMAJOR%% include/webkitgtk-%%WKAPI%%/JavaScriptCore/ JSBase.h JSContextRef.h JSObjectRef.h JSStringRef.h JSTypedArray.h JSValueRef.h JavaScript.h WebKitAvailability.h include/webkitgtk-%%WKAPI%%/jsc/ JSCAutocleanups.h JSCClass.h JSCContext.h JSCDefines.h JSCException.h JSCOptions.h JSCValue.h JSCVersion.h JSCVirtualMachine.h JSCWeakValue.h jsc.h include/webkitgtk-%%WKAPI%%/webkit2/ WebKitApplicationInfo.h WebKitAuthenticationRequest.h WebKitAutocleanups.h WebKitAutomationSession.h WebKitBackForwardList.h WebKitBackForwardListItem.h WebKitColorChooserRequest.h WebKitConsoleMessage.h WebKitContextMenu.h WebKitContextMenuActions.h WebKitContextMenuItem.h WebKitCookieManager.h WebKitCredential.h WebKitDefines.h WebKitDeviceInfoPermissionRequest.h WebKitDownload.h WebKitEditingCommands.h WebKitEditorState.h WebKitEnumTypes.h WebKitError.h WebKitFaviconDatabase.h WebKitFileChooserRequest.h WebKitFindController.h WebKitFormSubmissionRequest.h WebKitForwardDeclarations.h WebKitFrame.h WebKitGeolocationManager.h WebKitGeolocationPermissionRequest.h WebKitHitTestResult.h WebKitInputMethodContext.h WebKitInstallMissingMediaPluginsPermissionRequest.h WebKitJavascriptResult.h WebKitMediaKeySystemPermissionRequest.h WebKitMemoryPressureSettings.h WebKitMimeInfo.h WebKitNavigationAction.h WebKitNavigationPolicyDecision.h WebKitNetworkProxySettings.h WebKitNotification.h WebKitNotificationPermissionRequest.h WebKitOptionMenu.h WebKitOptionMenuItem.h WebKitPermissionRequest.h WebKitPlugin.h WebKitPointerLockPermissionRequest.h WebKitPolicyDecision.h WebKitPrintCustomWidget.h WebKitPrintOperation.h WebKitResponsePolicyDecision.h WebKitScriptDialog.h WebKitScriptWorld.h WebKitSecurityManager.h WebKitSecurityOrigin.h WebKitSettings.h WebKitURIRequest.h WebKitURIResponse.h WebKitURISchemeRequest.h WebKitURISchemeResponse.h WebKitURIUtilities.h WebKitUserContent.h WebKitUserContentFilterStore.h WebKitUserContentManager.h WebKitUserMediaPermissionRequest.h WebKitUserMessage.h WebKitVersion.h WebKitWebContext.h WebKitWebEditor.h WebKitWebExtension.h WebKitWebExtensionAutocleanups.h WebKitWebHitTestResult.h WebKitWebInspector.h WebKitWebPage.h WebKitWebProcessEnumTypes.h WebKitWebResource.h WebKitWebView.h WebKitWebViewBase.h WebKitWebViewSessionState.h WebKitWebsiteData.h WebKitWebsiteDataAccessPermissionRequest.h WebKitWebsiteDataManager.h WebKitWebsitePolicies.h WebKitWindowProperties.h webkit-web-extension.h webkit2.h include/webkitgtk-%%WKAPI%%/webkitdom/ WebKitDOMAttr.h WebKitDOMBlob.h WebKitDOMCDATASection.h WebKitDOMCSSRule.h WebKitDOMCSSRuleList.h WebKitDOMCSSStyleDeclaration.h WebKitDOMCSSStyleSheet.h WebKitDOMCSSValue.h WebKitDOMCharacterData.h WebKitDOMClientRect.h WebKitDOMClientRectList.h WebKitDOMComment.h WebKitDOMCustom.h WebKitDOMCustomUnstable.h WebKitDOMDOMImplementation.h WebKitDOMDOMSelection.h WebKitDOMDOMTokenList.h WebKitDOMDOMWindow.h WebKitDOMDOMWindowUnstable.h WebKitDOMDeprecated.h WebKitDOMDocument.h WebKitDOMDocumentFragment.h WebKitDOMDocumentFragmentUnstable.h WebKitDOMDocumentType.h WebKitDOMDocumentUnstable.h WebKitDOMElement.h WebKitDOMElementUnstable.h WebKitDOMEvent.h WebKitDOMEventTarget.h WebKitDOMFile.h WebKitDOMFileList.h WebKitDOMHTMLAnchorElement.h WebKitDOMHTMLAppletElement.h WebKitDOMHTMLAreaElement.h WebKitDOMHTMLBRElement.h WebKitDOMHTMLBaseElement.h WebKitDOMHTMLBodyElement.h WebKitDOMHTMLButtonElement.h WebKitDOMHTMLCanvasElement.h WebKitDOMHTMLCollection.h WebKitDOMHTMLDListElement.h WebKitDOMHTMLDirectoryElement.h WebKitDOMHTMLDivElement.h WebKitDOMHTMLDocument.h WebKitDOMHTMLElement.h WebKitDOMHTMLElementUnstable.h WebKitDOMHTMLEmbedElement.h WebKitDOMHTMLFieldSetElement.h WebKitDOMHTMLFontElement.h WebKitDOMHTMLFormElement.h WebKitDOMHTMLFrameElement.h WebKitDOMHTMLFrameSetElement.h WebKitDOMHTMLHRElement.h WebKitDOMHTMLHeadElement.h WebKitDOMHTMLHeadingElement.h WebKitDOMHTMLHtmlElement.h WebKitDOMHTMLIFrameElement.h WebKitDOMHTMLImageElement.h WebKitDOMHTMLInputElement.h WebKitDOMHTMLLIElement.h WebKitDOMHTMLLabelElement.h WebKitDOMHTMLLegendElement.h WebKitDOMHTMLLinkElement.h WebKitDOMHTMLMapElement.h WebKitDOMHTMLMarqueeElement.h WebKitDOMHTMLMenuElement.h WebKitDOMHTMLMetaElement.h WebKitDOMHTMLModElement.h WebKitDOMHTMLOListElement.h WebKitDOMHTMLObjectElement.h WebKitDOMHTMLOptGroupElement.h WebKitDOMHTMLOptionElement.h WebKitDOMHTMLOptionsCollection.h WebKitDOMHTMLParagraphElement.h WebKitDOMHTMLParamElement.h WebKitDOMHTMLPreElement.h WebKitDOMHTMLQuoteElement.h WebKitDOMHTMLScriptElement.h WebKitDOMHTMLSelectElement.h WebKitDOMHTMLStyleElement.h WebKitDOMHTMLTableCaptionElement.h WebKitDOMHTMLTableCellElement.h WebKitDOMHTMLTableColElement.h WebKitDOMHTMLTableElement.h WebKitDOMHTMLTableRowElement.h WebKitDOMHTMLTableSectionElement.h WebKitDOMHTMLTextAreaElement.h WebKitDOMHTMLTitleElement.h WebKitDOMHTMLUListElement.h WebKitDOMKeyboardEvent.h WebKitDOMMediaList.h WebKitDOMMouseEvent.h WebKitDOMNamedNodeMap.h WebKitDOMNode.h WebKitDOMNodeFilter.h WebKitDOMNodeIterator.h WebKitDOMNodeList.h WebKitDOMObject.h WebKitDOMProcessingInstruction.h WebKitDOMRange.h WebKitDOMRangeUnstable.h WebKitDOMStyleSheet.h WebKitDOMStyleSheetList.h WebKitDOMText.h WebKitDOMTreeWalker.h WebKitDOMUIEvent.h WebKitDOMWheelEvent.h WebKitDOMXPathExpression.h WebKitDOMXPathNSResolver.h WebKitDOMXPathResult.h webkitdom.h webkitdomautocleanups.h webkitdomdefines.h lib/ libjavascriptcoregtk-%%WKAPI%%.so libjavascriptcoregtk-%%WKAPI%%.so.%%JSSOMAJOR%% libjavascriptcoregtk-%%WKAPI%%.so.%%JSSOVERSION%% libwebkit2gtk-%%WKAPI%%.so libwebkit2gtk-%%WKAPI%%.so.%%SOMAJOR%% libwebkit2gtk-%%WKAPI%%.so.%%SOVERSION%% lib/pkgconfig/ javascriptcoregtk-%%WKAPI%%.pc webkit2gtk-%%WKAPI%%.pc webkit2gtk-web-extension-%%WKAPI%%.pc lib/webkit2gtk-%%WKAPI%%/injected-bundle/libwebkit2gtkinjectedbundle.so libexec/webkit2gtk-%%WKAPI%%/ MiniBrowser WebKitNetworkProcess WebKitWebProcess jsc [FILE:2618:manifests/plist.nls] share/locale/ar/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/as/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/bg/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/ca/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/cs/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/da/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/de/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/el/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/en_CA/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/en_GB/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/eo/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/es/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/et/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/eu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/fi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/fr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/gl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/gu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/he/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/hi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/hr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/hu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/id/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/it/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/ja/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/kn/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/ko/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/lt/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/lv/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/ml/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/mr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/nb/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/nl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/or/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/pa/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/pl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/pt/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/pt_BR/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/ro/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/ru/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/sl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/sr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/sr@latin/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/sv/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/ta/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/te/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/tr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/uk/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/vi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo share/locale/zh_CN/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo [FILE:431:patches/patch-CMakeLists.txt] --- CMakeLists.txt.orig 2022-08-31 07:59:34 UTC +++ CMakeLists.txt @@ -31,6 +31,11 @@ if (ENABLE_API_TESTS) enable_testing() endif () +if (SUPPRESS_ASSERT) + add_definitions(-DNDEBUG=1) + add_definitions(-D__OPTIMIZE__) +endif() + # ----------------------------------------------------------------------------- # Add module directories # ----------------------------------------------------------------------------- [FILE:534:patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h] --- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig 2022-08-31 07:59:51 UTC +++ Source/JavaScriptCore/assembler/ARM64Assembler.h @@ -2920,6 +2920,8 @@ public: sys_cache_control(kCacheFunctionPrepareForExecution, code, size); #elif OS(FUCHSIA) zx_cache_flush(code, size, ZX_CACHE_FLUSH_INSN); +#elif OS(FREEBSD) || OS(NETBSD) + __clear_cache(code, reinterpret_cast(code) + size); #elif OS(LINUX) size_t page = pageSize(); uintptr_t current = reinterpret_cast(code); [FILE:4034:patches/patch-Source_JavaScriptCore_runtime_MachineContext.h] $NetBSD: patch-Source_JavaScriptCore_runtime_MachineContext.h,v 1.2 2021/05/13 08:20:58 leot Exp $ Add support for NetBSD. --- Source/JavaScriptCore/runtime/MachineContext.h.orig 2022-08-31 07:59:51 UTC +++ Source/JavaScriptCore/runtime/MachineContext.h @@ -193,6 +193,22 @@ static inline void*& stackPointerImpl(mc #error Unknown Architecture #endif +#elif OS(NETBSD) + +#if CPU(X86) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_UESP]); +#elif CPU(X86_64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_RSP]); +#elif CPU(ARM) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_SP]); +#elif CPU(ARM64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_SP]); +#elif CPU(MIPS) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_SP]); +#else +#error Unknown Architecture +#endif + #elif OS(FUCHSIA) || OS(LINUX) #if CPU(X86) @@ -338,6 +354,22 @@ static inline void*& framePointerImpl(mc #error Unknown Architecture #endif +#elif OS(NETBSD) + +#if CPU(X86) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_EBP]); +#elif CPU(X86_64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_RBP]); +#elif CPU(ARM) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_FP]); +#elif CPU(ARM64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_FP]); +#elif CPU(MIPS) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_S8]); +#else +#error Unknown Architecture +#endif + #elif OS(FUCHSIA) || OS(LINUX) // The following sequence depends on glibc's sys/ucontext.h. @@ -495,6 +527,22 @@ static inline void*& instructionPointerI #else #error Unknown Architecture #endif + +#elif OS(NETBSD) + +#if CPU(X86) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_EIP]); +#elif CPU(X86_64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_RIP]); +#elif CPU(ARM) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_PC]); +#elif CPU(ARM64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_PC]); +#elif CPU(MIPS) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_EPC]); +#else +#error Unknown Architecture +#endif #elif OS(FUCHSIA) || OS(LINUX) @@ -651,6 +699,22 @@ inline void*& argumentPointer<1>(mcontex #else #error Unknown Architecture #endif + +#elif OS(NETBSD) + +#if CPU(X86) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_EDX]); +#elif CPU(X86_64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_RSI]); +#elif CPU(ARM) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_R1]); +#elif CPU(ARM64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_X1]); +#elif CPU(MIPS) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_A1]); +#else +#error Unknown Architecture +#endif #elif OS(FUCHSIA) || OS(LINUX) @@ -774,6 +838,22 @@ inline void*& llintInstructionPointer(mc #elif OS(NETBSD) #if CPU(X86) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_ESI]); +#elif CPU(X86_64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_R8]); +#elif CPU(ARM) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_R8]); +#elif CPU(ARM64) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_X4]); +#elif CPU(MIPS) + return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_T4]); +#else +#error Unknown Architecture +#endif + +#elif OS(NETBSD) + +#if CPU(X86) return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_ESI]); #elif CPU(X86_64) return reinterpret_cast((uintptr_t&) machineContext.__gregs[_REG_R8]); [FILE:597:patches/patch-Source_ThirdParty_ANGLE_src_common_aligned__memory.cpp] --- Source/ThirdParty/ANGLE/src/common/aligned_memory.cpp.orig 2022-08-31 07:59:51 UTC +++ Source/ThirdParty/ANGLE/src/common/aligned_memory.cpp @@ -33,7 +33,7 @@ void *AlignedAlloc(size_t size, size_t a // memalign() on Android returns pointers which can safely be used with // free(), so we can use it instead. Issue filed to document this: // http://code.google.com/p/android/issues/detail?id=35391 -#elif defined(ANGLE_PLATFORM_ANDROID) +#elif defined(ANGLE_PLATFORM_ANDROID) || defined(__sun__) ptr = memalign(alignment, size); #else if (posix_memalign(&ptr, alignment, size)) [FILE:506:patches/patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp] --- Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp.orig 2022-08-31 07:59:51 UTC +++ Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp @@ -48,6 +48,9 @@ on big endian machines, or a byte-by-byt -----------------------------------------------------------------------------*/ #include "PMurHash.h" +#ifdef __sun +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif #include /* I used ugly type names in the header to avoid potential conflicts with [FILE:561:patches/patch-Source_WTF_wtf_Assertions.h] $NetBSD: patch-Source_WTF_wtf_Assertions.h,v 1.1 2021/01/12 15:21:31 jperkin Exp $ Use regular static_assert on SunOS. --- Source/WTF/wtf/Assertions.h.orig 2022-08-31 07:59:55 UTC +++ Source/WTF/wtf/Assertions.h @@ -473,7 +473,7 @@ constexpr bool assertionFailureDueToUnre /* COMPILE_ASSERT */ #ifndef COMPILE_ASSERT -#if COMPILER_SUPPORTS(C_STATIC_ASSERT) +#if COMPILER_SUPPORTS(C_STATIC_ASSERT) && !defined(__sun) /* Unlike static_assert below, this also works in plain C code. */ #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name) #else [FILE:638:patches/patch-Source_WTF_wtf_FastMalloc.cpp] --- Source/WTF/wtf/FastMalloc.cpp.orig 2022-09-14 11:58:10 UTC +++ Source/WTF/wtf/FastMalloc.cpp @@ -201,7 +201,11 @@ void* fastAlignedMalloc(size_t alignment { ASSERT_IS_WITHIN_LIMIT(size); void* p = nullptr; +#ifdef __sun__ + p = memalign(alignment, size); +#else posix_memalign(&p, alignment, size); +#endif if (UNLIKELY(!p)) CRASH(); return p; @@ -211,7 +215,11 @@ void* tryFastAlignedMalloc(size_t alignm { FAIL_IF_EXCEEDS_LIMIT(size); void* p = nullptr; +#ifdef __sun__ + p = memalign(alignment, size); +#else posix_memalign(&p, alignment, size); +#endif return p; } [FILE:502:patches/patch-Source_WTF_wtf_FileSystem.cpp] $NetBSD: patch-Source_WTF_wtf_FileSystem.cpp,v 1.3 2020/09/11 14:47:35 leot Exp $ Support MAP_FILE if unavailable. --- Source/WTF/wtf/FileSystem.cpp.orig 2022-09-08 11:51:52 UTC +++ Source/WTF/wtf/FileSystem.cpp @@ -369,6 +369,9 @@ bool MappedFileData::mapFileHandle(Platf #endif } +#ifndef MAP_FILE +#define MAP_FILE 0 +#endif void* data = mmap(0, size, pageProtection, MAP_FILE | (mapMode == MappedFileMode::Shared ? MAP_SHARED : MAP_PRIVATE), fd, 0); if (data == MAP_FAILED) { [FILE:534:patches/patch-Source_WTF_wtf_MemoryPressureHandler.cpp] --- Source/WTF/wtf/MemoryPressureHandler.cpp.orig 2022-09-16 06:02:57 UTC +++ Source/WTF/wtf/MemoryPressureHandler.cpp @@ -56,7 +56,7 @@ MemoryPressureHandler& MemoryPressureHan } MemoryPressureHandler::MemoryPressureHandler() -#if OS(LINUX) || OS(FREEBSD) +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__) : m_holdOffTimer(RunLoop::main(), this, &MemoryPressureHandler::holdOffTimerFired) #elif OS(WINDOWS) : m_windowsMeasurementTimer(RunLoop::main(), this, &MemoryPressureHandler::windowsMeasurementTimerFired) [FILE:644:patches/patch-Source_WTF_wtf_MemoryPressureHandler.h] --- Source/WTF/wtf/MemoryPressureHandler.h.orig 2022-08-31 07:59:55 UTC +++ Source/WTF/wtf/MemoryPressureHandler.h @@ -81,7 +81,7 @@ public: WTF_EXPORT_PRIVATE void setShouldUsePeriodicMemoryMonitor(bool); -#if OS(LINUX) || OS(FREEBSD) +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__) WTF_EXPORT_PRIVATE void triggerMemoryPressureEvent(bool isCritical); #endif @@ -277,7 +277,7 @@ private: Win32Handle m_lowMemoryHandle; #endif -#if OS(LINUX) || OS(FREEBSD) +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__) RunLoop::Timer m_holdOffTimer; void holdOffTimerFired(); #endif [FILE:326:patches/patch-Source_WTF_wtf_NumberOfCores.cpp] --- Source/WTF/wtf/NumberOfCores.cpp.orig 2022-08-31 07:59:55 UTC +++ Source/WTF/wtf/NumberOfCores.cpp @@ -31,6 +31,7 @@ #if OS(DARWIN) #include #elif OS(LINUX) || OS(AIX) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD) +#include // sscanf #include #elif OS(WINDOWS) #include [FILE:390:patches/patch-Source_WTF_wtf_PlatformGTK.cmake] --- Source/WTF/wtf/PlatformGTK.cmake.orig 2022-09-14 11:58:10 UTC +++ Source/WTF/wtf/PlatformGTK.cmake @@ -61,7 +61,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux") unix/MemoryPressureHandlerUnix.cpp ) -elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") +elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly") list(APPEND WTF_SOURCES generic/MemoryFootprintGeneric.cpp [FILE:582:patches/patch-Source_WTF_wtf_StackBounds.cpp] $NetBSD: patch-Source_WTF_wtf_StackBounds.cpp,v 1.2 2018/10/24 18:31:07 leot Exp $ SunOS does not have pthread_getattr_np. --- Source/WTF/wtf/StackBounds.cpp.orig 2022-08-31 07:59:55 UTC +++ Source/WTF/wtf/StackBounds.cpp @@ -98,6 +98,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); [FILE:1418:patches/patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp] --- Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp.orig 2022-08-31 07:59:55 UTC +++ Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp @@ -28,7 +28,11 @@ #include "config.h" #include +#if OS(FREEBSD) || defined(__DragonFly__) +#include +#else #include +#endif #include #include #include @@ -37,7 +41,7 @@ #if OS(LINUX) #include -#elif OS(FREEBSD) +#elif OS(FREEBSD) || defined(__DragonFly__) #include #include #include @@ -112,7 +116,7 @@ static size_t processMemoryUsage() ProcessMemoryStatus memoryStatus; currentProcessMemoryStatus(memoryStatus); return (memoryStatus.resident - memoryStatus.shared); -#elif OS(FREEBSD) +#elif OS(FREEBSD) || defined(__DragonFly__) static size_t pageSize = sysconf(_SC_PAGE_SIZE); struct kinfo_proc info; size_t infolen = sizeof(info); @@ -126,7 +130,11 @@ static size_t processMemoryUsage() if (sysctl(mib, 4, &info, &infolen, nullptr, 0)) return 0; +# ifdef __DragonFly__ + return static_cast(info.kp_vm_rssize - info.kp_vm_tsize) * pageSize; +# else return static_cast(info.ki_rssize - info.ki_tsize) * pageSize; +# endif #else #error "Missing a platform specific way of determining the memory usage" #endif [FILE:848:patches/patch-Source_WebCore_Modules_fetch_FetchBodyConsumer.cpp] --- Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp.orig 2022-09-14 11:58:10 UTC +++ Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp @@ -40,6 +40,32 @@ #include #include +#ifdef __sun +static void *memmem( + const void *big, size_t big_len, + const void *little, size_t little_len) +{ + const char *bp = (const char *)big; + const char *lp = (const char *)little; + size_t l; + + if (big_len < little_len || little_len == 0 || big_len == 0) + return NULL; + + while (big_len > 0) { + for (l = 0; l < little_len; l++) { + if (bp[l] != lp[l]) + break; + } + if (l == little_len) + return (void *)bp; + bp++; + } + + return NULL; +} +#endif + namespace WebCore { static inline Ref blobFromData(ScriptExecutionContext* context, Vector&& data, const String& contentType) [FILE:610:patches/patch-Source_WebCore_platform_graphics_cpu_arm_filters_FELightingNEON.cpp] --- Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp.orig 2022-08-31 07:59:56 UTC +++ Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp @@ -403,7 +403,7 @@ TOSTRING(neonDrawLighting) ":" NL "vmin.f32 " TMP2_D0 ", " TMP2_D0 ", " CONST_ONE_HI_D NL "vmul.f32 " TMP3_Q ", " COLOR_Q ", " TMP2_D0 "[1]" NL "vcvt.u32.f32 " TMP3_Q ", " TMP3_Q NL - "vmov.u32 r2, r3, " TMP3_S0 ", " TMP3_S1 NL + "vmov r2, r3, " TMP3_S0 ", " TMP3_S1 NL // The color values are stored in-place. "strb r2, [" PIXELS_R ", #-11]" NL "strb r3, [" PIXELS_R ", #-10]" NL [FILE:323:patches/patch-Source_WebCore_platform_network_DNS.h] --- Source/WebCore/platform/network/DNS.h.orig 2022-08-31 07:59:56 UTC +++ Source/WebCore/platform/network/DNS.h @@ -34,6 +34,9 @@ #include #else #include +# if defined __DragonFly__ || defined __FreeBSD__ || defined __sun__ +# include +# endif #endif namespace WebCore { [FILE:336:patches/patch-Source_WebDriver_PlatformGTK.cmake] --- Source/WebDriver/PlatformGTK.cmake.orig 2022-08-31 07:59:56 UTC +++ Source/WebDriver/PlatformGTK.cmake @@ -5,6 +5,7 @@ add_definitions(-DLIBEXECDIR="${CMAKE_IN list(APPEND WebDriver_SYSTEM_INCLUDE_DIRECTORIES "${GLIB_INCLUDE_DIRS}" "${LIBSOUP_INCLUDE_DIRS}" + "${ICU_INCLUDE_DIRS}" ) list(APPEND WebDriver_SOURCES [FILE:507:patches/patch-Source_WebKit_CMakeLists.txt] $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 2022-08-31 07:59:56 UTC +++ Source/WebKit/CMakeLists.txt @@ -404,6 +404,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) [FILE:551:patches/patch-Source_WebKit_PlatformGTK.cmake] --- Source/WebKit/PlatformGTK.cmake.orig 2022-09-14 11:58:10 UTC +++ Source/WebKit/PlatformGTK.cmake @@ -42,7 +42,7 @@ add_definitions(-DLOCALEDIR="${CMAKE_INS add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}") add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}") -if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") +if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|SunOS") WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map") endif () [FILE:1241:patches/patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp] $NetBSD: patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp,v 1.3 2021/01/12 15:21:31 jperkin Exp $ On NetBSD we see "Error sending IPC message: Message too long" due to the use of sendmsg with a large message body (EMSGSIZE). WebKit already uses shared memory to communicate the message body when the message is too large, so force it to always use this method to avoid encountering EMSGSIZE. --- Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp.orig 2022-08-31 07:59:56 UTC +++ Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp @@ -61,6 +61,10 @@ #endif #endif // SOCK_SEQPACKET +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif + namespace IPC { static const size_t messageMaxSize = 4096; @@ -442,8 +446,12 @@ bool Connection::sendOutgoingMessage(Uni return false; } +#if 0 size_t messageSizeWithBodyInline = sizeof(MessageInfo) + (outputMessage.attachments().size() * sizeof(AttachmentInfo)) + outputMessage.bodySize(); if (messageSizeWithBodyInline > messageMaxSize && outputMessage.bodySize()) { +#else + { +#endif RefPtr oolMessageBody = WebKit::SharedMemory::allocate(encoder->bufferSize()); if (!oolMessageBody) return false; [FILE:714:patches/patch-Source_WebKit_Platform_unix_SharedMemoryUnix.cpp] --- Source/WebKit/Platform/unix/SharedMemoryUnix.cpp.orig 2022-09-14 11:58:10 UTC +++ Source/WebKit/Platform/unix/SharedMemoryUnix.cpp @@ -148,7 +148,13 @@ static int createSharedMemory() #else CString tempName; for (int tries = 0; fileDescriptor == -1 && tries < 10; ++tries) { - auto name = makeString("/WK2SharedMemory.", static_cast(WTF::randomNumber() * (std::numeric_limits::max() + 1.0))); + auto name = +#ifdef __DragonFly__ + makeString("/tmp/WK2SharedMemory.", +#else + makeString("/WK2SharedMemory.", +#endif + static_cast(WTF::randomNumber() * (std::numeric_limits::max() + 1.0))); tempName = name.utf8(); do { [FILE:1432:patches/patch-Source_bmalloc_bmalloc_AvailableMemory.cpp] --- Source/bmalloc/bmalloc/AvailableMemory.cpp.orig 2022-08-31 07:59:57 UTC +++ Source/bmalloc/bmalloc/AvailableMemory.cpp @@ -44,7 +44,7 @@ #import #import #elif BOS(UNIX) -#if BOS(FREEBSD) || BOS(LINUX) +#if BOS(LINUX) #include #endif #if BOS(LINUX) @@ -161,7 +161,13 @@ static size_t computeAvailableMemory() // Round up the memory size to a multiple of 128MB because max_mem may not be exactly 512MB // (for example) and we have code that depends on those boundaries. return ((sizeAccordingToKernel + multiple - 1) / multiple) * multiple; -#elif BOS(FREEBSD) || BOS(LINUX) +#elif BOS(FREEBSD) + long pages = sysconf(_SC_PHYS_PAGES); + long pageSize = sysconf(_SC_PAGE_SIZE); + if (pages == -1 || pageSize == -1) + return availableMemoryGuess; + return pages * pageSize; +#elif BOS(LINUX) struct sysinfo info; if (!sysinfo(&info)) return info.totalram * info.mem_unit; @@ -212,7 +218,11 @@ MemoryStatus memoryStatus() size_t memoryFootprint = 0; if (!sysctl(mib, 4, &info, &infolen, nullptr, 0)) +# ifdef __DragonFly__ + memoryFootprint = static_cast(info.kp_vm_rssize) * vmPageSize(); +# else memoryFootprint = static_cast(info.ki_rssize) * vmPageSize(); +# endif #endif double percentInUse = static_cast(memoryFootprint) / static_cast(availableMemory()); [FILE:971:patches/patch-Source_cmake_OptionsCommon.cmake] --- Source/cmake/OptionsCommon.cmake.orig 2022-08-31 07:59:57 UTC +++ Source/cmake/OptionsCommon.cmake @@ -128,10 +128,10 @@ endif () option(USE_THIN_ARCHIVES "Produce all static libraries as thin archives" ${USE_THIN_ARCHIVES_DEFAULT}) if (USE_THIN_ARCHIVES) - set(CMAKE_CXX_ARCHIVE_CREATE " crT ") - set(CMAKE_C_ARCHIVE_CREATE " crT ") - set(CMAKE_CXX_ARCHIVE_APPEND " rT ") - set(CMAKE_C_ARCHIVE_APPEND " rT ") + set(CMAKE_CXX_ARCHIVE_CREATE " cr ") + set(CMAKE_C_ARCHIVE_CREATE " cr ") + set(CMAKE_CXX_ARCHIVE_APPEND " r ") + set(CMAKE_C_ARCHIVE_APPEND " r ") endif () set(ENABLE_DEBUG_FISSION_DEFAULT OFF) [FILE:520:patches/patch-Source_cmake_WebKitCompilerFlags.cmake] --- Source/cmake/WebKitCompilerFlags.cmake.orig 2022-08-31 07:59:57 UTC +++ Source/cmake/WebKitCompilerFlags.cmake @@ -252,7 +252,7 @@ if (NOT MSVC) string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS}) endif () -if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS) +if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS") set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") endif () [FILE:358:patches/patch-Tools_MiniBrowser_gtk_CMakeLists.txt] --- Tools/MiniBrowser/gtk/CMakeLists.txt.orig 2022-08-31 07:59:57 UTC +++ Tools/MiniBrowser/gtk/CMakeLists.txt @@ -41,6 +41,10 @@ set(MiniBrowser_PRIVATE_LIBRARIES WebKit::WebKit ) +if (CMAKE_SYSTEM_NAME MATCHES "SunOS") + list(APPEND MiniBrowser_PRIVATE_LIBRARIES intl) +endif() + set(MiniBrowser_DEPENDENCIES NetworkProcess WebProcess