Ravenports generated: 30 Mar 2022 03:51
[ravenports.git] / bucket_58 / webkit2
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               webkit2
4 VERSION=                2.36.0
5 KEYWORDS=               www
6 VARIANTS=               gtk3
7 SDESC[gtk3]=            Opensource browser engine using the GTK+ 3 toolkit
8 HOMEPAGE=               https://www.webkitgtk.org/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://www.webkitgtk.org/releases/
13                         https://fossies.org/linux/www/
14 DISTFILE[1]=            webkitgtk-2.36.0.tar.xz:main
15 DF_INDEX=               1
16 SPKGS[gtk3]=            complete
17                         primary
18                         nls
19
20 OPTIONS_AVAILABLE=      GTK3
21 OPTIONS_STANDARD=       none
22 VOPTS[gtk3]=            GTK3=ON
23
24 BUILD_DEPENDS=          gperf:primary:standard
25 BUILDRUN_DEPENDS=       enchant:single:standard
26                         fontconfig:primary:standard
27                         freetype:primary:standard
28                         WebP:single:standard
29                         libsecret:primary:standard
30                         libnotify:primary:standard
31                         hyphen:single:standard
32                         harfbuzz:icu:standard
33                         icu:single:standard
34                         libsoup:primary:standard
35                         libgcrypt:single:standard
36                         gnutls:primary:standard
37                         libtasn1:primary:standard
38                         geoclue:single:standard
39                         woff2:single:standard
40                         gstreamer1-plugins-base:primary:standard
41                         openjpeg:single:standard
42
43 USES=                   png mesa cmake pkgconfig sqlite bison perl:build
44                         python:build ruby:build gettext-tools cpe
45 GNOME_COMPONENTS=       gtk3 gdkpixbuf introspection libxslt
46 XORG_COMPONENTS=        x11 xcomposite xdamage xext xrender xt ice
47
48 DISTNAME=               webkitgtk-2.36.0
49
50 LICENSE=                GPLv2+:primary BSD3CLAUSE:primary
51 LICENSE_TERMS=          primary:{{WRKDIR}}/TERMS
52 LICENSE_FILE=           GPLv2+:stock
53                         BSD3CLAUSE:{{WRKDIR}}/LICENSE_BSD
54 LICENSE_AWK=            BSD3CLAUSE:"^$$"
55                         TERMS:"^$$"
56 LICENSE_SOURCE=         BSD3CLAUSE:{{WRKSRC}}/Source/WebCore/css/parser/MediaQueryBlockWatcher.h
57                         TERMS:{{WRKSRC}}/Source/WebCore/style/StyleScope.cpp
58 LICENSE_SCHEME=         multi
59
60 CPE_PRODUCT=            webkitgtk
61 CPE_VENDOR=             webkitgtk
62 FPC_EQUIVALENT=         www/webkit2-gtk3
63
64 CONFIGURE_ENV=          XDG_CACHE_HOME={{WRKDIR}}
65
66 INSTALL_TARGET=         install
67 SOVERSION=              0.1.4
68 PLIST_SUB=              JSSOVERSION=0.1.4
69                         JSSOMAJOR=0
70                         WKAPI=4.1
71                         WKAPIMAJOR=4
72                         INTRO="@comment "
73
74 CXXFLAGS=               -DFIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB=32
75 CMAKE_ARGS=             -DPORT=GTK
76                         -DENABLE_GEOLOCATION:BOOL=ON
77                         -DENABLE_GLES2:BOOL=ON
78                         -DENABLE_MINIBROWSER:BOOL=ON
79                         -DENABLE_WAYLAND_TARGET:BOOL=OFF
80                         -DENABLE_BUBBLEWRAP_SANDBOX:BOOL=OFF
81                         -DENABLE_GAMEPAD:BOOL=OFF
82                         -DENABLE_INTROSPECTION:BOOL=OFF
83                         -DENABLE_JOURNALD_LOG:BOOL=OFF
84                         -DSUPPRESS_ASSERT:BOOL=ON
85                         -DUSE_SYSTEMD:BOOL=OFF
86                         -DUSE_GSTREAMER_GL:BOOL=OFF
87 VAR_OPSYS[sunos]=       CMAKE_ARGS=-DUSE_LD_GOLD:BOOL=OFF
88
89 [GTK3].DESCRIPTION=                     Build GTK+3 variant
90
91 post-patch:
92         echo 'add_compile_definitions("U_DEFINE_FALSE_AND_TRUE=1")' \
93                 >> ${WRKSRC}/Source/WTF/wtf/CMakeLists.txt
94
95 post-install:
96         (cd ${STAGEDIR}${PREFIX}/bin && \
97          ${LN} -s ../libexec/webkit2gtk-4.1/jsc jsc-4 && \
98          ${LN} -s ../libexec/webkit2gtk-4.1/MiniBrowser MiniBrowser-4)
99         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*.*
100         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-4.1/injected-bundle/*.so
101         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-4.1/*
102         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/WebKitWebDriver
103
104 post-patch-sunos:
105         ${REINPLACE_CMD} -e '/USE_FILE_LOCK/ s|1|0|' \
106                 ${WRKSRC}/Source/WTF/wtf/PlatformUse.h \
107                 ${WRKSRC}/Source/WebCore/config.h
108
109 [FILE:576:descriptions/desc.primary]
110 WebKitGTK+ is a full-featured port of the WebKit rendering engine, suitable
111 for projects requiring any kind of web integration, from hybrid HTML/CSS
112 applications to full-fledged web browsers. It offers WebKit's full
113 functionality and is useful in a wide range of systems from desktop
114 computers to embedded systems like phones, tablets, and televisions.
115
116 WebKitGTK+ is made by a lively community of developers and designers,
117 who hope to bring the web platform to everyone. It's the official web
118 engine of the GNOME platform and is used in browsers such as Epiphany
119 and Midori.
120
121
122 [FILE:102:distinfo]
123 b877cca1f105235f5dd57c7ac2b2c2be3c6b691ff444f93925c7254cf156c64d     26900828 webkitgtk-2.36.0.tar.xz
124
125
126 [FILE:6416:manifests/plist.primary]
127 %%INTRO%%lib/girepository-1.0/
128  JavaScriptCore-%%WKAPI%%.typelib
129  WebKit2-%%WKAPI%%.typelib
130  WebKit2WebExtension-%%WKAPI%%.typelib
131 %%INTRO%%share/gir-1.0/
132  JavaScriptCore-%%WKAPI%%.gir
133  WebKit2-%%WKAPI%%.gir
134  WebKit2WebExtension-%%WKAPI%%.gir
135 bin/
136  MiniBrowser-%%WKAPIMAJOR%%
137  WebKitWebDriver
138  jsc-%%WKAPIMAJOR%%
139 include/webkitgtk-%%WKAPI%%/JavaScriptCore/
140  JSBase.h
141  JSContextRef.h
142  JSObjectRef.h
143  JSStringRef.h
144  JSTypedArray.h
145  JSValueRef.h
146  JavaScript.h
147  WebKitAvailability.h
148 include/webkitgtk-%%WKAPI%%/jsc/
149  JSCAutocleanups.h
150  JSCClass.h
151  JSCContext.h
152  JSCDefines.h
153  JSCException.h
154  JSCOptions.h
155  JSCValue.h
156  JSCVersion.h
157  JSCVirtualMachine.h
158  JSCWeakValue.h
159  jsc.h
160 include/webkitgtk-%%WKAPI%%/webkit2/
161  WebKitApplicationInfo.h
162  WebKitAuthenticationRequest.h
163  WebKitAutocleanups.h
164  WebKitAutomationSession.h
165  WebKitBackForwardList.h
166  WebKitBackForwardListItem.h
167  WebKitColorChooserRequest.h
168  WebKitConsoleMessage.h
169  WebKitContextMenu.h
170  WebKitContextMenuActions.h
171  WebKitContextMenuItem.h
172  WebKitCookieManager.h
173  WebKitCredential.h
174  WebKitDefines.h
175  WebKitDeviceInfoPermissionRequest.h
176  WebKitDownload.h
177  WebKitEditingCommands.h
178  WebKitEditorState.h
179  WebKitEnumTypes.h
180  WebKitError.h
181  WebKitFaviconDatabase.h
182  WebKitFileChooserRequest.h
183  WebKitFindController.h
184  WebKitFormSubmissionRequest.h
185  WebKitForwardDeclarations.h
186  WebKitFrame.h
187  WebKitGeolocationManager.h
188  WebKitGeolocationPermissionRequest.h
189  WebKitHitTestResult.h
190  WebKitInputMethodContext.h
191  WebKitInstallMissingMediaPluginsPermissionRequest.h
192  WebKitJavascriptResult.h
193  WebKitMediaKeySystemPermissionRequest.h
194  WebKitMemoryPressureSettings.h
195  WebKitMimeInfo.h
196  WebKitNavigationAction.h
197  WebKitNavigationPolicyDecision.h
198  WebKitNetworkProxySettings.h
199  WebKitNotification.h
200  WebKitNotificationPermissionRequest.h
201  WebKitOptionMenu.h
202  WebKitOptionMenuItem.h
203  WebKitPermissionRequest.h
204  WebKitPlugin.h
205  WebKitPointerLockPermissionRequest.h
206  WebKitPolicyDecision.h
207  WebKitPrintCustomWidget.h
208  WebKitPrintOperation.h
209  WebKitResponsePolicyDecision.h
210  WebKitScriptDialog.h
211  WebKitScriptWorld.h
212  WebKitSecurityManager.h
213  WebKitSecurityOrigin.h
214  WebKitSettings.h
215  WebKitURIRequest.h
216  WebKitURIResponse.h
217  WebKitURISchemeRequest.h
218  WebKitURISchemeResponse.h
219  WebKitURIUtilities.h
220  WebKitUserContent.h
221  WebKitUserContentFilterStore.h
222  WebKitUserContentManager.h
223  WebKitUserMediaPermissionRequest.h
224  WebKitUserMessage.h
225  WebKitVersion.h
226  WebKitWebContext.h
227  WebKitWebEditor.h
228  WebKitWebExtension.h
229  WebKitWebExtensionAutocleanups.h
230  WebKitWebHitTestResult.h
231  WebKitWebInspector.h
232  WebKitWebPage.h
233  WebKitWebProcessEnumTypes.h
234  WebKitWebResource.h
235  WebKitWebView.h
236  WebKitWebViewBase.h
237  WebKitWebViewSessionState.h
238  WebKitWebsiteData.h
239  WebKitWebsiteDataAccessPermissionRequest.h
240  WebKitWebsiteDataManager.h
241  WebKitWebsitePolicies.h
242  WebKitWindowProperties.h
243  webkit-web-extension.h
244  webkit2.h
245 include/webkitgtk-%%WKAPI%%/webkitdom/
246  WebKitDOMAttr.h
247  WebKitDOMBlob.h
248  WebKitDOMCDATASection.h
249  WebKitDOMCSSRule.h
250  WebKitDOMCSSRuleList.h
251  WebKitDOMCSSStyleDeclaration.h
252  WebKitDOMCSSStyleSheet.h
253  WebKitDOMCSSValue.h
254  WebKitDOMCharacterData.h
255  WebKitDOMClientRect.h
256  WebKitDOMClientRectList.h
257  WebKitDOMComment.h
258  WebKitDOMCustom.h
259  WebKitDOMCustomUnstable.h
260  WebKitDOMDOMImplementation.h
261  WebKitDOMDOMSelection.h
262  WebKitDOMDOMTokenList.h
263  WebKitDOMDOMWindow.h
264  WebKitDOMDOMWindowUnstable.h
265  WebKitDOMDeprecated.h
266  WebKitDOMDocument.h
267  WebKitDOMDocumentFragment.h
268  WebKitDOMDocumentFragmentUnstable.h
269  WebKitDOMDocumentType.h
270  WebKitDOMDocumentUnstable.h
271  WebKitDOMElement.h
272  WebKitDOMElementUnstable.h
273  WebKitDOMEvent.h
274  WebKitDOMEventTarget.h
275  WebKitDOMFile.h
276  WebKitDOMFileList.h
277  WebKitDOMHTMLAnchorElement.h
278  WebKitDOMHTMLAppletElement.h
279  WebKitDOMHTMLAreaElement.h
280  WebKitDOMHTMLBRElement.h
281  WebKitDOMHTMLBaseElement.h
282  WebKitDOMHTMLBodyElement.h
283  WebKitDOMHTMLButtonElement.h
284  WebKitDOMHTMLCanvasElement.h
285  WebKitDOMHTMLCollection.h
286  WebKitDOMHTMLDListElement.h
287  WebKitDOMHTMLDirectoryElement.h
288  WebKitDOMHTMLDivElement.h
289  WebKitDOMHTMLDocument.h
290  WebKitDOMHTMLElement.h
291  WebKitDOMHTMLElementUnstable.h
292  WebKitDOMHTMLEmbedElement.h
293  WebKitDOMHTMLFieldSetElement.h
294  WebKitDOMHTMLFontElement.h
295  WebKitDOMHTMLFormElement.h
296  WebKitDOMHTMLFrameElement.h
297  WebKitDOMHTMLFrameSetElement.h
298  WebKitDOMHTMLHRElement.h
299  WebKitDOMHTMLHeadElement.h
300  WebKitDOMHTMLHeadingElement.h
301  WebKitDOMHTMLHtmlElement.h
302  WebKitDOMHTMLIFrameElement.h
303  WebKitDOMHTMLImageElement.h
304  WebKitDOMHTMLInputElement.h
305  WebKitDOMHTMLLIElement.h
306  WebKitDOMHTMLLabelElement.h
307  WebKitDOMHTMLLegendElement.h
308  WebKitDOMHTMLLinkElement.h
309  WebKitDOMHTMLMapElement.h
310  WebKitDOMHTMLMarqueeElement.h
311  WebKitDOMHTMLMenuElement.h
312  WebKitDOMHTMLMetaElement.h
313  WebKitDOMHTMLModElement.h
314  WebKitDOMHTMLOListElement.h
315  WebKitDOMHTMLObjectElement.h
316  WebKitDOMHTMLOptGroupElement.h
317  WebKitDOMHTMLOptionElement.h
318  WebKitDOMHTMLOptionsCollection.h
319  WebKitDOMHTMLParagraphElement.h
320  WebKitDOMHTMLParamElement.h
321  WebKitDOMHTMLPreElement.h
322  WebKitDOMHTMLQuoteElement.h
323  WebKitDOMHTMLScriptElement.h
324  WebKitDOMHTMLSelectElement.h
325  WebKitDOMHTMLStyleElement.h
326  WebKitDOMHTMLTableCaptionElement.h
327  WebKitDOMHTMLTableCellElement.h
328  WebKitDOMHTMLTableColElement.h
329  WebKitDOMHTMLTableElement.h
330  WebKitDOMHTMLTableRowElement.h
331  WebKitDOMHTMLTableSectionElement.h
332  WebKitDOMHTMLTextAreaElement.h
333  WebKitDOMHTMLTitleElement.h
334  WebKitDOMHTMLUListElement.h
335  WebKitDOMKeyboardEvent.h
336  WebKitDOMMediaList.h
337  WebKitDOMMouseEvent.h
338  WebKitDOMNamedNodeMap.h
339  WebKitDOMNode.h
340  WebKitDOMNodeFilter.h
341  WebKitDOMNodeIterator.h
342  WebKitDOMNodeList.h
343  WebKitDOMObject.h
344  WebKitDOMProcessingInstruction.h
345  WebKitDOMRange.h
346  WebKitDOMRangeUnstable.h
347  WebKitDOMStyleSheet.h
348  WebKitDOMStyleSheetList.h
349  WebKitDOMText.h
350  WebKitDOMTreeWalker.h
351  WebKitDOMUIEvent.h
352  WebKitDOMWheelEvent.h
353  WebKitDOMXPathExpression.h
354  WebKitDOMXPathNSResolver.h
355  WebKitDOMXPathResult.h
356  webkitdom.h
357  webkitdomautocleanups.h
358  webkitdomdefines.h
359 lib/
360  libjavascriptcoregtk-%%WKAPI%%.so
361  libjavascriptcoregtk-%%WKAPI%%.so.%%JSSOMAJOR%%
362  libjavascriptcoregtk-%%WKAPI%%.so.%%JSSOVERSION%%
363  libwebkit2gtk-%%WKAPI%%.so
364  libwebkit2gtk-%%WKAPI%%.so.%%SOMAJOR%%
365  libwebkit2gtk-%%WKAPI%%.so.%%SOVERSION%%
366 lib/pkgconfig/
367  javascriptcoregtk-%%WKAPI%%.pc
368  webkit2gtk-%%WKAPI%%.pc
369  webkit2gtk-web-extension-%%WKAPI%%.pc
370 lib/webkit2gtk-%%WKAPI%%/injected-bundle/libwebkit2gtkinjectedbundle.so
371 libexec/webkit2gtk-%%WKAPI%%/
372  MiniBrowser
373  WebKitNetworkProcess
374  WebKitWebProcess
375  jsc
376
377
378 [FILE:2566:manifests/plist.nls]
379 share/locale/ar/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
380 share/locale/as/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
381 share/locale/bg/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
382 share/locale/ca/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
383 share/locale/cs/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
384 share/locale/da/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
385 share/locale/de/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
386 share/locale/el/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
387 share/locale/en_CA/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
388 share/locale/en_GB/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
389 share/locale/eo/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
390 share/locale/es/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
391 share/locale/et/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
392 share/locale/eu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
393 share/locale/fi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
394 share/locale/fr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
395 share/locale/gl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
396 share/locale/gu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
397 share/locale/he/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
398 share/locale/hi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
399 share/locale/hu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
400 share/locale/id/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
401 share/locale/it/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
402 share/locale/ja/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
403 share/locale/kn/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
404 share/locale/ko/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
405 share/locale/lt/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
406 share/locale/lv/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
407 share/locale/ml/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
408 share/locale/mr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
409 share/locale/nb/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
410 share/locale/nl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
411 share/locale/or/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
412 share/locale/pa/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
413 share/locale/pl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
414 share/locale/pt/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
415 share/locale/pt_BR/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
416 share/locale/ro/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
417 share/locale/ru/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
418 share/locale/sl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
419 share/locale/sr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
420 share/locale/sr@latin/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
421 share/locale/sv/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
422 share/locale/ta/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
423 share/locale/te/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
424 share/locale/tr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
425 share/locale/uk/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
426 share/locale/vi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
427 share/locale/zh_CN/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
428
429
430 [FILE:431:patches/patch-CMakeLists.txt]
431 --- CMakeLists.txt.orig 2022-02-23 08:58:39 UTC
432 +++ CMakeLists.txt
433 @@ -26,6 +26,11 @@ if (ENABLE_API_TESTS)
434      enable_testing()
435  endif ()
436  
437 +if (SUPPRESS_ASSERT)
438 +   add_definitions(-DNDEBUG=1)
439 +   add_definitions(-D__OPTIMIZE__)
440 +endif()
441 +
442  # -----------------------------------------------------------------------------
443  # Add module directories
444  # -----------------------------------------------------------------------------
445
446
447 [FILE:534:patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h]
448 --- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig       2022-02-23 08:58:52 UTC
449 +++ Source/JavaScriptCore/assembler/ARM64Assembler.h
450 @@ -2947,6 +2947,8 @@ public:
451          sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
452  #elif OS(FUCHSIA)
453          zx_cache_flush(code, size, ZX_CACHE_FLUSH_INSN);
454 +#elif OS(FREEBSD) || OS(NETBSD)
455 +        __clear_cache(code, reinterpret_cast<char*>(code) + size);
456  #elif OS(LINUX)
457          size_t page = pageSize();
458          uintptr_t current = reinterpret_cast<uintptr_t>(code);
459
460
461 [FILE:3892:patches/patch-Source_JavaScriptCore_runtime_MachineContext.h]
462 $NetBSD: patch-Source_JavaScriptCore_runtime_MachineContext.h,v 1.2 2021/05/13 08:20:58 leot Exp $
463
464 Add support for NetBSD.
465
466 --- Source/JavaScriptCore/runtime/MachineContext.h.orig 2022-02-23 08:58:54 UTC
467 +++ Source/JavaScriptCore/runtime/MachineContext.h
468 @@ -176,6 +176,22 @@ static inline void*& stackPointerImpl(mc
469  #error Unknown Architecture
470  #endif
471  
472 +#elif OS(NETBSD)
473 +
474 +#if CPU(X86)
475 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_UESP]);
476 +#elif CPU(X86_64)
477 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSP]);
478 +#elif CPU(ARM)
479 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
480 +#elif CPU(ARM64)
481 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
482 +#elif CPU(MIPS)
483 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
484 +#else
485 +#error Unknown Architecture
486 +#endif
487 +
488  #elif OS(FUCHSIA) || OS(LINUX)
489  
490  #if CPU(X86)
491 @@ -305,6 +321,22 @@ static inline void*& framePointerImpl(mc
492  #error Unknown Architecture
493  #endif
494  
495 +#elif OS(NETBSD)
496 +
497 +#if CPU(X86)
498 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EBP]);
499 +#elif CPU(X86_64)
500 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RBP]);
501 +#elif CPU(ARM)
502 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
503 +#elif CPU(ARM64)
504 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
505 +#elif CPU(MIPS)
506 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_S8]);
507 +#else
508 +#error Unknown Architecture
509 +#endif
510 +
511  #elif OS(FUCHSIA) || OS(LINUX)
512  
513  // The following sequence depends on glibc's sys/ucontext.h.
514 @@ -446,6 +478,22 @@ static inline void*& instructionPointerI
515  #else
516  #error Unknown Architecture
517  #endif
518
519 +#elif OS(NETBSD)
520 +
521 +#if CPU(X86)
522 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EIP]);
523 +#elif CPU(X86_64)
524 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RIP]);
525 +#elif CPU(ARM)
526 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
527 +#elif CPU(ARM64)
528 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
529 +#elif CPU(MIPS)
530 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EPC]);
531 +#else
532 +#error Unknown Architecture
533 +#endif
534  
535  #elif OS(FUCHSIA) || OS(LINUX)
536  
537 @@ -586,6 +634,22 @@ inline void*& argumentPointer<1>(mcontex
538  #else
539  #error Unknown Architecture
540  #endif
541
542 +#elif OS(NETBSD)
543 +
544 +#if CPU(X86)
545 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EDX]);
546 +#elif CPU(X86_64)
547 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSI]);
548 +#elif CPU(ARM)
549 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
550 +#elif CPU(ARM64)
551 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X1]);
552 +#elif CPU(MIPS)
553 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_A1]);
554 +#else
555 +#error Unknown Architecture
556 +#endif
557  
558  #elif OS(FUCHSIA) || OS(LINUX)
559  
560 @@ -705,6 +769,22 @@ inline void*& llintInstructionPointer(mc
561  #else
562  #error Unknown Architecture
563  #endif
564
565 +#elif OS(NETBSD)
566 +
567 +#if CPU(X86)
568 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_ESI]);
569 +#elif CPU(X86_64)
570 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
571 +#elif CPU(ARM)
572 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
573 +#elif CPU(ARM64)
574 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X4]);
575 +#elif CPU(MIPS)
576 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_T4]);
577 +#else
578 +#error Unknown Architecture
579 +#endif
580  
581  #elif OS(FUCHSIA) || OS(LINUX)
582  
583
584
585 [FILE:597:patches/patch-Source_ThirdParty_ANGLE_src_common_aligned__memory.cpp]
586 --- Source/ThirdParty/ANGLE/src/common/aligned_memory.cpp.orig  2022-02-23 08:58:54 UTC
587 +++ Source/ThirdParty/ANGLE/src/common/aligned_memory.cpp
588 @@ -33,7 +33,7 @@ void *AlignedAlloc(size_t size, size_t a
589  // memalign() on Android returns pointers which can safely be used with
590  // free(), so we can use it instead.  Issue filed to document this:
591  // http://code.google.com/p/android/issues/detail?id=35391
592 -#elif defined(ANGLE_PLATFORM_ANDROID)
593 +#elif defined(ANGLE_PLATFORM_ANDROID) || defined(__sun__)
594      ptr = memalign(alignment, size);
595  #else
596      if (posix_memalign(&ptr, alignment, size))
597
598
599 [FILE:506:patches/patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp]
600 --- Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp.orig       2022-02-23 08:58:54 UTC
601 +++ Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp
602 @@ -48,6 +48,9 @@ on big endian machines, or a byte-by-byt
603  -----------------------------------------------------------------------------*/
604  
605  #include "PMurHash.h"
606 +#ifdef __sun
607 +#define __BYTE_ORDER __LITTLE_ENDIAN
608 +#endif
609  #include <stdint.h>
610  
611  /* I used ugly type names in the header to avoid potential conflicts with
612
613
614 [FILE:561:patches/patch-Source_WTF_wtf_Assertions.h]
615 $NetBSD: patch-Source_WTF_wtf_Assertions.h,v 1.1 2021/01/12 15:21:31 jperkin Exp $
616
617 Use regular static_assert on SunOS.
618
619 --- Source/WTF/wtf/Assertions.h.orig    2022-02-23 08:58:57 UTC
620 +++ Source/WTF/wtf/Assertions.h
621 @@ -462,7 +462,7 @@ constexpr bool assertionFailureDueToUnre
622  
623  /* COMPILE_ASSERT */
624  #ifndef COMPILE_ASSERT
625 -#if COMPILER_SUPPORTS(C_STATIC_ASSERT)
626 +#if COMPILER_SUPPORTS(C_STATIC_ASSERT) && !defined(__sun)
627  /* Unlike static_assert below, this also works in plain C code. */
628  #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name)
629  #else
630
631
632 [FILE:638:patches/patch-Source_WTF_wtf_FastMalloc.cpp]
633 --- Source/WTF/wtf/FastMalloc.cpp.orig  2022-02-23 08:58:57 UTC
634 +++ Source/WTF/wtf/FastMalloc.cpp
635 @@ -197,7 +197,11 @@ void* fastAlignedMalloc(size_t alignment
636  {
637      ASSERT_IS_WITHIN_LIMIT(size);
638      void* p = nullptr;
639 +#ifdef __sun__
640 +    p = memalign(alignment, size);
641 +#else
642      posix_memalign(&p, alignment, size);
643 +#endif
644      if (UNLIKELY(!p))
645          CRASH();
646      return p;
647 @@ -207,7 +211,11 @@ void* tryFastAlignedMalloc(size_t alignm
648  {
649      FAIL_IF_EXCEEDS_LIMIT(size);
650      void* p = nullptr;
651 +#ifdef __sun__
652 +    p = memalign(alignment, size);
653 +#else
654      posix_memalign(&p, alignment, size);
655 +#endif
656      return p;
657  }
658  
659
660
661 [FILE:502:patches/patch-Source_WTF_wtf_FileSystem.cpp]
662 $NetBSD: patch-Source_WTF_wtf_FileSystem.cpp,v 1.3 2020/09/11 14:47:35 leot Exp $
663
664 Support MAP_FILE if unavailable.
665
666 --- Source/WTF/wtf/FileSystem.cpp.orig  2022-02-23 08:58:57 UTC
667 +++ Source/WTF/wtf/FileSystem.cpp
668 @@ -371,6 +371,9 @@ bool MappedFileData::mapFileHandle(Platf
669  #endif
670      }
671  
672 +#ifndef MAP_FILE
673 +#define MAP_FILE       0
674 +#endif
675      void* data = mmap(0, size, pageProtection, MAP_FILE | (mapMode == MappedFileMode::Shared ? MAP_SHARED : MAP_PRIVATE), fd, 0);
676  
677      if (data == MAP_FAILED) {
678
679
680 [FILE:534:patches/patch-Source_WTF_wtf_MemoryPressureHandler.cpp]
681 --- Source/WTF/wtf/MemoryPressureHandler.cpp.orig       2022-02-23 08:58:57 UTC
682 +++ Source/WTF/wtf/MemoryPressureHandler.cpp
683 @@ -56,7 +56,7 @@ MemoryPressureHandler& MemoryPressureHan
684  }
685  
686  MemoryPressureHandler::MemoryPressureHandler()
687 -#if OS(LINUX) || OS(FREEBSD)
688 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
689      : m_holdOffTimer(RunLoop::main(), this, &MemoryPressureHandler::holdOffTimerFired)
690  #elif OS(WINDOWS)
691      : m_windowsMeasurementTimer(RunLoop::main(), this, &MemoryPressureHandler::windowsMeasurementTimerFired)
692
693
694 [FILE:644:patches/patch-Source_WTF_wtf_MemoryPressureHandler.h]
695 --- Source/WTF/wtf/MemoryPressureHandler.h.orig 2022-02-23 08:58:57 UTC
696 +++ Source/WTF/wtf/MemoryPressureHandler.h
697 @@ -81,7 +81,7 @@ public:
698  
699      WTF_EXPORT_PRIVATE void setShouldUsePeriodicMemoryMonitor(bool);
700  
701 -#if OS(LINUX) || OS(FREEBSD)
702 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
703      WTF_EXPORT_PRIVATE void triggerMemoryPressureEvent(bool isCritical);
704  #endif
705  
706 @@ -277,7 +277,7 @@ private:
707      Win32Handle m_lowMemoryHandle;
708  #endif
709  
710 -#if OS(LINUX) || OS(FREEBSD)
711 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
712      RunLoop::Timer<MemoryPressureHandler> m_holdOffTimer;
713      void holdOffTimerFired();
714  #endif
715
716
717 [FILE:326:patches/patch-Source_WTF_wtf_NumberOfCores.cpp]
718 --- Source/WTF/wtf/NumberOfCores.cpp.orig       2022-02-23 08:58:57 UTC
719 +++ Source/WTF/wtf/NumberOfCores.cpp
720 @@ -31,6 +31,7 @@
721  #if OS(DARWIN)
722  #include <sys/sysctl.h>
723  #elif OS(LINUX) || OS(AIX) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD)
724 +#include <stdio.h> // sscanf
725  #include <unistd.h>
726  #elif OS(WINDOWS)
727  #include <windows.h>
728
729
730 [FILE:390:patches/patch-Source_WTF_wtf_PlatformGTK.cmake]
731 --- Source/WTF/wtf/PlatformGTK.cmake.orig       2022-02-23 08:58:57 UTC
732 +++ Source/WTF/wtf/PlatformGTK.cmake
733 @@ -58,7 +58,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
734  
735          unix/MemoryPressureHandlerUnix.cpp
736      )
737 -elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
738 +elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly")
739      list(APPEND WTF_SOURCES
740          generic/MemoryFootprintGeneric.cpp
741  
742
743
744 [FILE:570:patches/patch-Source_WTF_wtf_PlatformHave.h]
745 Add support for NetBSD.
746
747 --- Source/WTF/wtf/PlatformHave.h.orig  2022-02-23 08:58:57 UTC
748 +++ Source/WTF/wtf/PlatformHave.h
749 @@ -229,7 +229,7 @@
750  #define HAVE_HOSTED_CORE_ANIMATION 1
751  #endif
752  
753 -#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(OPENBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS) || CPU(RISCV64)))
754 +#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(OPENBSD) || OS(NETBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS) || CPU(RISCV64)))
755  #define HAVE_MACHINE_CONTEXT 1
756  #endif
757  
758
759
760 [FILE:582:patches/patch-Source_WTF_wtf_StackBounds.cpp]
761 $NetBSD: patch-Source_WTF_wtf_StackBounds.cpp,v 1.2 2018/10/24 18:31:07 leot Exp $
762
763 SunOS does not have pthread_getattr_np.
764
765 --- Source/WTF/wtf/StackBounds.cpp.orig 2022-02-23 08:58:57 UTC
766 +++ Source/WTF/wtf/StackBounds.cpp
767 @@ -98,6 +98,7 @@ StackBounds StackBounds::newThreadStackB
768  #if HAVE(PTHREAD_NP_H) || OS(NETBSD)
769      // e.g. on FreeBSD 5.4, neundorf@kde.org
770      pthread_attr_get_np(thread, &sattr);
771 +#elif defined(__sun__)
772  #else
773      // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
774      pthread_getattr_np(thread, &sattr);
775
776
777 [FILE:1418:patches/patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix.cpp]
778 --- Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp.orig      2022-02-23 08:58:57 UTC
779 +++ Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp
780 @@ -28,7 +28,11 @@
781  #include "config.h"
782  #include <wtf/MemoryPressureHandler.h>
783  
784 +#if OS(FREEBSD) || defined(__DragonFly__)
785 +#include <stdlib.h>
786 +#else
787  #include <malloc.h>
788 +#endif
789  #include <unistd.h>
790  #include <wtf/Logging.h>
791  #include <wtf/MainThread.h>
792 @@ -37,7 +41,7 @@
793  
794  #if OS(LINUX)
795  #include <wtf/linux/CurrentProcessMemoryStatus.h>
796 -#elif OS(FREEBSD)
797 +#elif OS(FREEBSD) || defined(__DragonFly__)
798  #include <sys/sysctl.h>
799  #include <sys/types.h>
800  #include <sys/user.h>
801 @@ -112,7 +116,7 @@ static size_t processMemoryUsage()
802      ProcessMemoryStatus memoryStatus;
803      currentProcessMemoryStatus(memoryStatus);
804      return (memoryStatus.resident - memoryStatus.shared);
805 -#elif OS(FREEBSD)
806 +#elif OS(FREEBSD) || defined(__DragonFly__)
807      static size_t pageSize = sysconf(_SC_PAGE_SIZE);
808      struct kinfo_proc info;
809      size_t infolen = sizeof(info);
810 @@ -126,7 +130,11 @@ static size_t processMemoryUsage()
811      if (sysctl(mib, 4, &info, &infolen, nullptr, 0))
812          return 0;
813  
814 +# ifdef __DragonFly__
815 +    return static_cast<size_t>(info.kp_vm_rssize - info.kp_vm_tsize) * pageSize;
816 +# else
817      return static_cast<size_t>(info.ki_rssize - info.ki_tsize) * pageSize;
818 +# endif
819  #else
820  #error "Missing a platform specific way of determining the memory usage"
821  #endif
822
823
824 [FILE:848:patches/patch-Source_WebCore_Modules_fetch_FetchBodyConsumer.cpp]
825 --- Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp.orig     2022-02-23 08:58:58 UTC
826 +++ Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
827 @@ -40,6 +40,32 @@
828  #include <wtf/StringExtras.h>
829  #include <wtf/URLParser.h>
830  
831 +#ifdef __sun
832 +static void *memmem(
833 +               const void *big, size_t big_len,
834 +               const void *little, size_t little_len)
835 +{
836 +       const char *bp = (const char *)big;
837 +       const char *lp = (const char *)little;
838 +       size_t l;
839 +
840 +       if (big_len < little_len || little_len == 0 || big_len == 0)
841 +               return NULL;
842 +
843 +       while (big_len > 0) {
844 +               for (l = 0; l < little_len; l++) {
845 +                       if (bp[l] != lp[l])
846 +                               break;
847 +               }
848 +               if (l == little_len)
849 +                       return (void *)bp;
850 +               bp++;
851 +       }
852 +
853 +       return NULL;
854 +}
855 +#endif
856 +
857  namespace WebCore {
858  
859  static inline Ref<Blob> blobFromData(ScriptExecutionContext* context, Vector<uint8_t>&& data, const String& contentType)
860
861
862 [FILE:610:patches/patch-Source_WebCore_platform_graphics_cpu_arm_filters_FELightingNEON.cpp]
863 --- Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp.orig    2022-02-23 08:59:02 UTC
864 +++ Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp
865 @@ -403,7 +403,7 @@ TOSTRING(neonDrawLighting) ":" NL
866      "vmin.f32 " TMP2_D0 ", " TMP2_D0 ", " CONST_ONE_HI_D NL
867      "vmul.f32 " TMP3_Q ", " COLOR_Q ", " TMP2_D0 "[1]" NL
868      "vcvt.u32.f32 " TMP3_Q ", " TMP3_Q NL
869 -    "vmov.u32 r2, r3, " TMP3_S0 ", " TMP3_S1 NL
870 +    "vmov r2, r3, " TMP3_S0 ", " TMP3_S1 NL
871      // The color values are stored in-place.
872      "strb r2, [" PIXELS_R ", #-11]" NL
873      "strb r3, [" PIXELS_R ", #-10]" NL
874
875
876 [FILE:323:patches/patch-Source_WebCore_platform_network_DNS.h]
877 --- Source/WebCore/platform/network/DNS.h.orig  2022-02-23 08:59:02 UTC
878 +++ Source/WebCore/platform/network/DNS.h
879 @@ -34,6 +34,9 @@
880  #include <ws2tcpip.h>
881  #else
882  #include <netinet/in.h>
883 +# if defined __DragonFly__ || defined __FreeBSD__ || defined __sun__
884 +#  include <sys/socket.h>
885 +# endif
886  #endif
887  
888  namespace WebCore {
889
890
891 [FILE:336:patches/patch-Source_WebDriver_PlatformGTK.cmake]
892 --- Source/WebDriver/PlatformGTK.cmake.orig     2022-02-23 08:59:03 UTC
893 +++ Source/WebDriver/PlatformGTK.cmake
894 @@ -5,6 +5,7 @@ add_definitions(-DLIBEXECDIR="${CMAKE_IN
895  list(APPEND WebDriver_SYSTEM_INCLUDE_DIRECTORIES
896      "${GLIB_INCLUDE_DIRS}"
897      "${LIBSOUP_INCLUDE_DIRS}"
898 +    "${ICU_INCLUDE_DIRS}"
899  )
900  
901  list(APPEND WebDriver_SOURCES
902
903
904 [FILE:507:patches/patch-Source_WebKit_CMakeLists.txt]
905 $NetBSD: patch-Source_WebKit_CMakeLists.txt,v 1.1 2018/05/16 18:55:45 jperkin Exp $
906
907 SunOS requires libsocket.
908
909 --- Source/WebKit/CMakeLists.txt.orig   2022-02-23 08:59:03 UTC
910 +++ Source/WebKit/CMakeLists.txt
911 @@ -407,6 +407,10 @@ if (UNIX)
912      endif ()
913  endif ()
914  
915 +if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
916 +    list(APPEND WebKit_LIBRARIES socket)
917 +endif ()
918 +
919  macro(ADD_WEBKIT_PREFIX_HEADER _target)
920      if (WebKit_USE_PREFIX_HEADER)
921          get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
922
923
924 [FILE:551:patches/patch-Source_WebKit_PlatformGTK.cmake]
925 --- Source/WebKit/PlatformGTK.cmake.orig        2022-03-16 13:48:02 UTC
926 +++ Source/WebKit/PlatformGTK.cmake
927 @@ -34,7 +34,7 @@ add_definitions(-DLOCALEDIR="${CMAKE_INS
928  add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
929  add_definitions(-DLIBDIR="${LIB_INSTALL_DIR}")
930  
931 -if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
932 +if (NOT DEVELOPER_MODE AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|SunOS")
933      WEBKIT_ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/webkitglib-symbols.map")
934  endif ()
935  
936
937
938 [FILE:1241:patches/patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp]
939 $NetBSD: patch-Source_WebKit_Platform_IPC_unix_ConnectionUnix.cpp,v 1.3 2021/01/12 15:21:31 jperkin Exp $
940
941 On NetBSD we see "Error sending IPC message: Message too long" due to
942 the use of sendmsg with a large message body (EMSGSIZE).
943
944 WebKit already uses shared memory to communicate the message body when
945 the message is too large, so force it to always use this method to avoid
946 encountering EMSGSIZE.
947
948 --- Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp.orig     2022-02-23 08:59:04 UTC
949 +++ Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp
950 @@ -61,6 +61,10 @@
951  #endif
952  #endif // SOCK_SEQPACKET
953  
954 +#ifndef MSG_NOSIGNAL
955 +#define MSG_NOSIGNAL   0
956 +#endif
957 +
958  namespace IPC {
959  
960  static const size_t messageMaxSize = 4096;
961 @@ -442,8 +446,12 @@ bool Connection::sendOutgoingMessage(Uni
962          return false;
963      }
964  
965 +#if 0
966      size_t messageSizeWithBodyInline = sizeof(MessageInfo) + (outputMessage.attachments().size() * sizeof(AttachmentInfo)) + outputMessage.bodySize();
967      if (messageSizeWithBodyInline > messageMaxSize && outputMessage.bodySize()) {
968 +#else
969 +    {
970 +#endif
971          RefPtr<WebKit::SharedMemory> oolMessageBody = WebKit::SharedMemory::allocate(encoder->bufferSize());
972          if (!oolMessageBody)
973              return false;
974
975
976 [FILE:797:patches/patch-Source_WebKit_Platform_unix_SharedMemoryUnix.cpp]
977 --- Source/WebKit/Platform/unix/SharedMemoryUnix.cpp.orig       2022-02-23 08:59:04 UTC
978 +++ Source/WebKit/Platform/unix/SharedMemoryUnix.cpp
979 @@ -153,7 +153,13 @@ static int createSharedMemory()
980  #else
981      CString tempName;
982      for (int tries = 0; fileDescriptor == -1 && tries < 10; ++tries) {
983 -        String name = String("/WK2SharedMemory.") + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
984 +        String name =
985 +#ifdef __DragonFly__
986 +                      String("/tmp/WK2SharedMemory.")
987 +#else
988 +                      String("/WK2SharedMemory.")
989 +#endif
990 +                      + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
991          tempName = name.utf8();
992  
993          do {
994
995
996 [FILE:1363:patches/patch-Source_bmalloc_bmalloc_AvailableMemory.cpp]
997 --- Source/bmalloc/bmalloc/AvailableMemory.cpp.orig     2022-02-23 08:59:06 UTC
998 +++ Source/bmalloc/bmalloc/AvailableMemory.cpp
999 @@ -44,7 +44,6 @@
1000  #import <mach/mach_error.h>
1001  #import <math.h>
1002  #elif BOS(UNIX)
1003 -#include <sys/sysinfo.h>
1004  #if BOS(LINUX)
1005  #include <algorithm>
1006  #include <fcntl.h>
1007 @@ -159,6 +158,12 @@ static size_t computeAvailableMemory()
1008      // Round up the memory size to a multiple of 128MB because max_mem may not be exactly 512MB
1009      // (for example) and we have code that depends on those boundaries.
1010      return ((sizeAccordingToKernel + multiple - 1) / multiple) * multiple;
1011 +#elif defined(__DragonFly__)
1012 +    long pages = sysconf(_SC_PHYS_PAGES);
1013 +    long pageSize = sysconf(_SC_PAGE_SIZE);
1014 +    if (pages == -1 || pageSize == -1)
1015 +        return availableMemoryGuess;
1016 +    return pages * pageSize;
1017  #elif BOS(FREEBSD) || BOS(LINUX)
1018      struct sysinfo info;
1019      if (!sysinfo(&info))
1020 @@ -210,7 +215,11 @@ MemoryStatus memoryStatus()
1021  
1022      size_t memoryFootprint = 0;
1023      if (!sysctl(mib, 4, &info, &infolen, nullptr, 0))
1024 +# ifdef __DragonFly__
1025 +        memoryFootprint = static_cast<size_t>(info.kp_vm_rssize) * vmPageSize();
1026 +# else
1027          memoryFootprint = static_cast<size_t>(info.ki_rssize) * vmPageSize();
1028 +# endif
1029  #endif
1030  
1031      double percentInUse = static_cast<double>(memoryFootprint) / static_cast<double>(availableMemory());
1032
1033
1034 [FILE:971:patches/patch-Source_cmake_OptionsCommon.cmake]
1035 --- Source/cmake/OptionsCommon.cmake.orig       2022-02-23 08:59:06 UTC
1036 +++ Source/cmake/OptionsCommon.cmake
1037 @@ -128,10 +128,10 @@ endif ()
1038  option(USE_THIN_ARCHIVES "Produce all static libraries as thin archives" ${USE_THIN_ARCHIVES_DEFAULT})
1039  
1040  if (USE_THIN_ARCHIVES)
1041 -    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
1042 -    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
1043 -    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> rT <TARGET> <LINK_FLAGS> <OBJECTS>")
1044 -    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> rT <TARGET> <LINK_FLAGS> <OBJECTS>")
1045 +    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
1046 +    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
1047 +    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
1048 +    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
1049  endif ()
1050  
1051  set(ENABLE_DEBUG_FISSION_DEFAULT OFF)
1052
1053
1054 [FILE:520:patches/patch-Source_cmake_WebKitCompilerFlags.cmake]
1055 --- Source/cmake/WebKitCompilerFlags.cmake.orig 2022-03-16 13:48:02 UTC
1056 +++ Source/cmake/WebKitCompilerFlags.cmake
1057 @@ -260,7 +260,7 @@ if (NOT MSVC)
1058      string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
1059  endif ()
1060  
1061 -if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
1062 +if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
1063      set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
1064  endif ()
1065  
1066
1067
1068 [FILE:358:patches/patch-Tools_MiniBrowser_gtk_CMakeLists.txt]
1069 --- Tools/MiniBrowser/gtk/CMakeLists.txt.orig   2022-02-23 08:59:06 UTC
1070 +++ Tools/MiniBrowser/gtk/CMakeLists.txt
1071 @@ -41,6 +41,10 @@ set(MiniBrowser_PRIVATE_LIBRARIES
1072      WebKit::WebKit
1073  )
1074  
1075 +if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
1076 +   list(APPEND MiniBrowser_PRIVATE_LIBRARIES intl)
1077 +endif()
1078 +
1079  set(MiniBrowser_DEPENDENCIES
1080      NetworkProcess
1081      WebProcess
1082