Ravenports generated: 03 Feb 2022 15:06
[ravenports.git] / bucket_58 / webkit2
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               webkit2
4 VERSION=                2.34.4
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.34.4.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.34.4
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.0.4
68 PLIST_SUB=              JSSOVERSION=0.0.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                         -DSUPPRESS_ASSERT:BOOL=ON
84                         -DUSE_SYSTEMD:BOOL=OFF
85                         -DUSE_GSTREAMER_GL:BOOL=OFF
86 VAR_OPSYS[sunos]=       CMAKE_ARGS=-DUSE_LD_GOLD:BOOL=OFF
87
88 [GTK3].DESCRIPTION=                     Build GTK+3 variant
89
90 post-patch:
91         echo 'add_compile_definitions("U_DEFINE_FALSE_AND_TRUE=1")' \
92                 >> ${WRKSRC}/Source/WTF/wtf/CMakeLists.txt
93
94 post-install:
95         (cd ${STAGEDIR}${PREFIX}/bin && \
96          ${LN} -s ../libexec/webkit2gtk-4.1/jsc jsc-4 && \
97          ${LN} -s ../libexec/webkit2gtk-4.1/MiniBrowser MiniBrowser-4)
98         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*.*
99         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-4.1/injected-bundle/*.so
100         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-4.1/*
101         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/WebKitWebDriver
102
103 post-patch-sunos:
104         ${REINPLACE_CMD} -e '/USE_FILE_LOCK/ s|1|0|' \
105                 ${WRKSRC}/Source/WTF/wtf/PlatformUse.h \
106                 ${WRKSRC}/Source/WebCore/config.h
107
108 [FILE:576:descriptions/desc.primary]
109 WebKitGTK+ is a full-featured port of the WebKit rendering engine, suitable
110 for projects requiring any kind of web integration, from hybrid HTML/CSS
111 applications to full-fledged web browsers. It offers WebKit's full
112 functionality and is useful in a wide range of systems from desktop
113 computers to embedded systems like phones, tablets, and televisions.
114
115 WebKitGTK+ is made by a lively community of developers and designers,
116 who hope to bring the web platform to everyone. It's the official web
117 engine of the GNOME platform and is used in browsers such as Epiphany
118 and Midori.
119
120
121 [FILE:102:distinfo]
122 975f5019199ba7699191835cf75e01a18b94e3bcd0107da7389d4ddcb1aba406     24388604 webkitgtk-2.34.4.tar.xz
123
124
125 [FILE:6389:manifests/plist.primary]
126 %%INTRO%%lib/girepository-1.0/
127  JavaScriptCore-%%WKAPI%%.typelib
128  WebKit2-%%WKAPI%%.typelib
129  WebKit2WebExtension-%%WKAPI%%.typelib
130 %%INTRO%%share/gir-1.0/
131  JavaScriptCore-%%WKAPI%%.gir
132  WebKit2-%%WKAPI%%.gir
133  WebKit2WebExtension-%%WKAPI%%.gir
134 bin/
135  MiniBrowser-%%WKAPIMAJOR%%
136  WebKitWebDriver
137  jsc-%%WKAPIMAJOR%%
138 include/webkitgtk-%%WKAPI%%/JavaScriptCore/
139  JSBase.h
140  JSContextRef.h
141  JSObjectRef.h
142  JSStringRef.h
143  JSTypedArray.h
144  JSValueRef.h
145  JavaScript.h
146  WebKitAvailability.h
147 include/webkitgtk-%%WKAPI%%/jsc/
148  JSCAutocleanups.h
149  JSCClass.h
150  JSCContext.h
151  JSCDefines.h
152  JSCException.h
153  JSCOptions.h
154  JSCValue.h
155  JSCVersion.h
156  JSCVirtualMachine.h
157  JSCWeakValue.h
158  jsc.h
159 include/webkitgtk-%%WKAPI%%/webkit2/
160  WebKitApplicationInfo.h
161  WebKitAuthenticationRequest.h
162  WebKitAutocleanups.h
163  WebKitAutomationSession.h
164  WebKitBackForwardList.h
165  WebKitBackForwardListItem.h
166  WebKitColorChooserRequest.h
167  WebKitConsoleMessage.h
168  WebKitContextMenu.h
169  WebKitContextMenuActions.h
170  WebKitContextMenuItem.h
171  WebKitCookieManager.h
172  WebKitCredential.h
173  WebKitDefines.h
174  WebKitDeviceInfoPermissionRequest.h
175  WebKitDownload.h
176  WebKitEditingCommands.h
177  WebKitEditorState.h
178  WebKitEnumTypes.h
179  WebKitError.h
180  WebKitFaviconDatabase.h
181  WebKitFileChooserRequest.h
182  WebKitFindController.h
183  WebKitFormSubmissionRequest.h
184  WebKitForwardDeclarations.h
185  WebKitFrame.h
186  WebKitGeolocationManager.h
187  WebKitGeolocationPermissionRequest.h
188  WebKitHitTestResult.h
189  WebKitInputMethodContext.h
190  WebKitInstallMissingMediaPluginsPermissionRequest.h
191  WebKitJavascriptResult.h
192  WebKitMediaKeySystemPermissionRequest.h
193  WebKitMemoryPressureSettings.h
194  WebKitMimeInfo.h
195  WebKitNavigationAction.h
196  WebKitNavigationPolicyDecision.h
197  WebKitNetworkProxySettings.h
198  WebKitNotification.h
199  WebKitNotificationPermissionRequest.h
200  WebKitOptionMenu.h
201  WebKitOptionMenuItem.h
202  WebKitPermissionRequest.h
203  WebKitPlugin.h
204  WebKitPointerLockPermissionRequest.h
205  WebKitPolicyDecision.h
206  WebKitPrintCustomWidget.h
207  WebKitPrintOperation.h
208  WebKitResponsePolicyDecision.h
209  WebKitScriptDialog.h
210  WebKitScriptWorld.h
211  WebKitSecurityManager.h
212  WebKitSecurityOrigin.h
213  WebKitSettings.h
214  WebKitURIRequest.h
215  WebKitURIResponse.h
216  WebKitURISchemeRequest.h
217  WebKitURIUtilities.h
218  WebKitUserContent.h
219  WebKitUserContentFilterStore.h
220  WebKitUserContentManager.h
221  WebKitUserMediaPermissionRequest.h
222  WebKitUserMessage.h
223  WebKitVersion.h
224  WebKitWebContext.h
225  WebKitWebEditor.h
226  WebKitWebExtension.h
227  WebKitWebExtensionAutocleanups.h
228  WebKitWebHitTestResult.h
229  WebKitWebInspector.h
230  WebKitWebPage.h
231  WebKitWebProcessEnumTypes.h
232  WebKitWebResource.h
233  WebKitWebView.h
234  WebKitWebViewBase.h
235  WebKitWebViewSessionState.h
236  WebKitWebsiteData.h
237  WebKitWebsiteDataAccessPermissionRequest.h
238  WebKitWebsiteDataManager.h
239  WebKitWebsitePolicies.h
240  WebKitWindowProperties.h
241  webkit-web-extension.h
242  webkit2.h
243 include/webkitgtk-%%WKAPI%%/webkitdom/
244  WebKitDOMAttr.h
245  WebKitDOMBlob.h
246  WebKitDOMCDATASection.h
247  WebKitDOMCSSRule.h
248  WebKitDOMCSSRuleList.h
249  WebKitDOMCSSStyleDeclaration.h
250  WebKitDOMCSSStyleSheet.h
251  WebKitDOMCSSValue.h
252  WebKitDOMCharacterData.h
253  WebKitDOMClientRect.h
254  WebKitDOMClientRectList.h
255  WebKitDOMComment.h
256  WebKitDOMCustom.h
257  WebKitDOMCustomUnstable.h
258  WebKitDOMDOMImplementation.h
259  WebKitDOMDOMSelection.h
260  WebKitDOMDOMTokenList.h
261  WebKitDOMDOMWindow.h
262  WebKitDOMDOMWindowUnstable.h
263  WebKitDOMDeprecated.h
264  WebKitDOMDocument.h
265  WebKitDOMDocumentFragment.h
266  WebKitDOMDocumentFragmentUnstable.h
267  WebKitDOMDocumentType.h
268  WebKitDOMDocumentUnstable.h
269  WebKitDOMElement.h
270  WebKitDOMElementUnstable.h
271  WebKitDOMEvent.h
272  WebKitDOMEventTarget.h
273  WebKitDOMFile.h
274  WebKitDOMFileList.h
275  WebKitDOMHTMLAnchorElement.h
276  WebKitDOMHTMLAppletElement.h
277  WebKitDOMHTMLAreaElement.h
278  WebKitDOMHTMLBRElement.h
279  WebKitDOMHTMLBaseElement.h
280  WebKitDOMHTMLBodyElement.h
281  WebKitDOMHTMLButtonElement.h
282  WebKitDOMHTMLCanvasElement.h
283  WebKitDOMHTMLCollection.h
284  WebKitDOMHTMLDListElement.h
285  WebKitDOMHTMLDirectoryElement.h
286  WebKitDOMHTMLDivElement.h
287  WebKitDOMHTMLDocument.h
288  WebKitDOMHTMLElement.h
289  WebKitDOMHTMLElementUnstable.h
290  WebKitDOMHTMLEmbedElement.h
291  WebKitDOMHTMLFieldSetElement.h
292  WebKitDOMHTMLFontElement.h
293  WebKitDOMHTMLFormElement.h
294  WebKitDOMHTMLFrameElement.h
295  WebKitDOMHTMLFrameSetElement.h
296  WebKitDOMHTMLHRElement.h
297  WebKitDOMHTMLHeadElement.h
298  WebKitDOMHTMLHeadingElement.h
299  WebKitDOMHTMLHtmlElement.h
300  WebKitDOMHTMLIFrameElement.h
301  WebKitDOMHTMLImageElement.h
302  WebKitDOMHTMLInputElement.h
303  WebKitDOMHTMLLIElement.h
304  WebKitDOMHTMLLabelElement.h
305  WebKitDOMHTMLLegendElement.h
306  WebKitDOMHTMLLinkElement.h
307  WebKitDOMHTMLMapElement.h
308  WebKitDOMHTMLMarqueeElement.h
309  WebKitDOMHTMLMenuElement.h
310  WebKitDOMHTMLMetaElement.h
311  WebKitDOMHTMLModElement.h
312  WebKitDOMHTMLOListElement.h
313  WebKitDOMHTMLObjectElement.h
314  WebKitDOMHTMLOptGroupElement.h
315  WebKitDOMHTMLOptionElement.h
316  WebKitDOMHTMLOptionsCollection.h
317  WebKitDOMHTMLParagraphElement.h
318  WebKitDOMHTMLParamElement.h
319  WebKitDOMHTMLPreElement.h
320  WebKitDOMHTMLQuoteElement.h
321  WebKitDOMHTMLScriptElement.h
322  WebKitDOMHTMLSelectElement.h
323  WebKitDOMHTMLStyleElement.h
324  WebKitDOMHTMLTableCaptionElement.h
325  WebKitDOMHTMLTableCellElement.h
326  WebKitDOMHTMLTableColElement.h
327  WebKitDOMHTMLTableElement.h
328  WebKitDOMHTMLTableRowElement.h
329  WebKitDOMHTMLTableSectionElement.h
330  WebKitDOMHTMLTextAreaElement.h
331  WebKitDOMHTMLTitleElement.h
332  WebKitDOMHTMLUListElement.h
333  WebKitDOMKeyboardEvent.h
334  WebKitDOMMediaList.h
335  WebKitDOMMouseEvent.h
336  WebKitDOMNamedNodeMap.h
337  WebKitDOMNode.h
338  WebKitDOMNodeFilter.h
339  WebKitDOMNodeIterator.h
340  WebKitDOMNodeList.h
341  WebKitDOMObject.h
342  WebKitDOMProcessingInstruction.h
343  WebKitDOMRange.h
344  WebKitDOMRangeUnstable.h
345  WebKitDOMStyleSheet.h
346  WebKitDOMStyleSheetList.h
347  WebKitDOMText.h
348  WebKitDOMTreeWalker.h
349  WebKitDOMUIEvent.h
350  WebKitDOMWheelEvent.h
351  WebKitDOMXPathExpression.h
352  WebKitDOMXPathNSResolver.h
353  WebKitDOMXPathResult.h
354  webkitdom.h
355  webkitdomautocleanups.h
356  webkitdomdefines.h
357 lib/
358  libjavascriptcoregtk-%%WKAPI%%.so
359  libjavascriptcoregtk-%%WKAPI%%.so.%%JSSOMAJOR%%
360  libjavascriptcoregtk-%%WKAPI%%.so.%%JSSOVERSION%%
361  libwebkit2gtk-%%WKAPI%%.so
362  libwebkit2gtk-%%WKAPI%%.so.%%SOMAJOR%%
363  libwebkit2gtk-%%WKAPI%%.so.%%SOVERSION%%
364 lib/pkgconfig/
365  javascriptcoregtk-%%WKAPI%%.pc
366  webkit2gtk-%%WKAPI%%.pc
367  webkit2gtk-web-extension-%%WKAPI%%.pc
368 lib/webkit2gtk-%%WKAPI%%/injected-bundle/libwebkit2gtkinjectedbundle.so
369 libexec/webkit2gtk-%%WKAPI%%/
370  MiniBrowser
371  WebKitNetworkProcess
372  WebKitWebProcess
373  jsc
374
375
376 [FILE:2566:manifests/plist.nls]
377 share/locale/ar/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
378 share/locale/as/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
379 share/locale/bg/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
380 share/locale/ca/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
381 share/locale/cs/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
382 share/locale/da/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
383 share/locale/de/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
384 share/locale/el/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
385 share/locale/en_CA/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
386 share/locale/en_GB/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
387 share/locale/eo/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
388 share/locale/es/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
389 share/locale/et/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
390 share/locale/eu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
391 share/locale/fi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
392 share/locale/fr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
393 share/locale/gl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
394 share/locale/gu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
395 share/locale/he/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
396 share/locale/hi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
397 share/locale/hu/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
398 share/locale/id/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
399 share/locale/it/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
400 share/locale/ja/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
401 share/locale/kn/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
402 share/locale/ko/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
403 share/locale/lt/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
404 share/locale/lv/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
405 share/locale/ml/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
406 share/locale/mr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
407 share/locale/nb/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
408 share/locale/nl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
409 share/locale/or/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
410 share/locale/pa/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
411 share/locale/pl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
412 share/locale/pt/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
413 share/locale/pt_BR/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
414 share/locale/ro/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
415 share/locale/ru/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
416 share/locale/sl/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
417 share/locale/sr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
418 share/locale/sr@latin/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
419 share/locale/sv/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
420 share/locale/ta/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
421 share/locale/te/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
422 share/locale/tr/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
423 share/locale/uk/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
424 share/locale/vi/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
425 share/locale/zh_CN/LC_MESSAGES/WebKit2GTK-%%WKAPI%%.mo
426
427
428 [FILE:431:patches/patch-CMakeLists.txt]
429 --- CMakeLists.txt.orig 2021-09-01 09:16:33 UTC
430 +++ CMakeLists.txt
431 @@ -26,6 +26,11 @@ if (ENABLE_API_TESTS)
432      enable_testing()
433  endif ()
434  
435 +if (SUPPRESS_ASSERT)
436 +   add_definitions(-DNDEBUG=1)
437 +   add_definitions(-D__OPTIMIZE__)
438 +endif()
439 +
440  # -----------------------------------------------------------------------------
441  # Add module directories
442  # -----------------------------------------------------------------------------
443
444
445 [FILE:534:patches/patch-Source_JavaScriptCore_assembler_ARM64Assembler.h]
446 --- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig       2021-09-01 09:16:46 UTC
447 +++ Source/JavaScriptCore/assembler/ARM64Assembler.h
448 @@ -2952,6 +2952,8 @@ public:
449          sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
450  #elif OS(FUCHSIA)
451          zx_cache_flush(code, size, ZX_CACHE_FLUSH_INSN);
452 +#elif OS(FREEBSD) || OS(NETBSD)
453 +        __clear_cache(code, reinterpret_cast<char*>(code) + size);
454  #elif OS(LINUX)
455          size_t page = pageSize();
456          uintptr_t current = reinterpret_cast<uintptr_t>(code);
457
458
459 [FILE:3892:patches/patch-Source_JavaScriptCore_runtime_MachineContext.h]
460 $NetBSD: patch-Source_JavaScriptCore_runtime_MachineContext.h,v 1.2 2021/05/13 08:20:58 leot Exp $
461
462 Add support for NetBSD.
463
464 --- Source/JavaScriptCore/runtime/MachineContext.h.orig 2021-09-01 09:16:46 UTC
465 +++ Source/JavaScriptCore/runtime/MachineContext.h
466 @@ -195,6 +195,22 @@ static inline void*& stackPointerImpl(mc
467  #error Unknown Architecture
468  #endif
469  
470 +#elif OS(NETBSD)
471 +
472 +#if CPU(X86)
473 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_UESP]);
474 +#elif CPU(X86_64)
475 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSP]);
476 +#elif CPU(ARM)
477 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
478 +#elif CPU(ARM64)
479 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
480 +#elif CPU(MIPS)
481 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
482 +#else
483 +#error Unknown Architecture
484 +#endif
485 +
486  #elif OS(FUCHSIA) || OS(LINUX)
487  
488  #if CPU(X86)
489 @@ -346,6 +362,22 @@ static inline void*& framePointerImpl(mc
490  #error Unknown Architecture
491  #endif
492  
493 +#elif OS(NETBSD)
494 +
495 +#if CPU(X86)
496 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EBP]);
497 +#elif CPU(X86_64)
498 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RBP]);
499 +#elif CPU(ARM)
500 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
501 +#elif CPU(ARM64)
502 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
503 +#elif CPU(MIPS)
504 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_S8]);
505 +#else
506 +#error Unknown Architecture
507 +#endif
508 +
509  #elif OS(FUCHSIA) || OS(LINUX)
510  
511  // The following sequence depends on glibc's sys/ucontext.h.
512 @@ -496,6 +528,22 @@ static inline void*& instructionPointerI
513  #else
514  #error Unknown Architecture
515  #endif
516
517 +#elif OS(NETBSD)
518 +
519 +#if CPU(X86)
520 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EIP]);
521 +#elif CPU(X86_64)
522 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RIP]);
523 +#elif CPU(ARM)
524 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
525 +#elif CPU(ARM64)
526 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
527 +#elif CPU(MIPS)
528 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EPC]);
529 +#else
530 +#error Unknown Architecture
531 +#endif
532  
533  #elif OS(FUCHSIA) || OS(LINUX)
534  
535 @@ -654,6 +702,22 @@ inline void*& argumentPointer<1>(mcontex
536  #else
537  #error Unknown Architecture
538  #endif
539
540 +#elif OS(NETBSD)
541 +
542 +#if CPU(X86)
543 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EDX]);
544 +#elif CPU(X86_64)
545 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSI]);
546 +#elif CPU(ARM)
547 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
548 +#elif CPU(ARM64)
549 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X1]);
550 +#elif CPU(MIPS)
551 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_A1]);
552 +#else
553 +#error Unknown Architecture
554 +#endif
555  
556  #elif OS(FUCHSIA) || OS(LINUX)
557  
558 @@ -771,6 +835,22 @@ inline void*& llintInstructionPointer(mc
559  #else
560  #error Unknown Architecture
561  #endif
562
563 +#elif OS(NETBSD)
564 +
565 +#if CPU(X86)
566 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_ESI]);
567 +#elif CPU(X86_64)
568 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
569 +#elif CPU(ARM)
570 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
571 +#elif CPU(ARM64)
572 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X4]);
573 +#elif CPU(MIPS)
574 +    return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_T4]);
575 +#else
576 +#error Unknown Architecture
577 +#endif
578  
579  #elif OS(FUCHSIA) || OS(LINUX)
580  
581
582
583 [FILE:597:patches/patch-Source_ThirdParty_ANGLE_src_common_aligned__memory.cpp]
584 --- Source/ThirdParty/ANGLE/src/common/aligned_memory.cpp.orig  2021-09-01 09:16:47 UTC
585 +++ Source/ThirdParty/ANGLE/src/common/aligned_memory.cpp
586 @@ -33,7 +33,7 @@ void *AlignedAlloc(size_t size, size_t a
587  // memalign() on Android returns pointers which can safely be used with
588  // free(), so we can use it instead.  Issue filed to document this:
589  // http://code.google.com/p/android/issues/detail?id=35391
590 -#elif defined(ANGLE_PLATFORM_ANDROID)
591 +#elif defined(ANGLE_PLATFORM_ANDROID) || defined(__sun__)
592      ptr = memalign(alignment, size);
593  #else
594      if (posix_memalign(&ptr, alignment, size))
595
596
597 [FILE:506:patches/patch-Source_ThirdParty_ANGLE_src_common_third__party_smhasher_src_PMurHash.cpp]
598 --- Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp.orig       2021-09-01 09:16:47 UTC
599 +++ Source/ThirdParty/ANGLE/src/common/third_party/smhasher/src/PMurHash.cpp
600 @@ -48,6 +48,9 @@ on big endian machines, or a byte-by-byt
601  -----------------------------------------------------------------------------*/
602  
603  #include "PMurHash.h"
604 +#ifdef __sun
605 +#define __BYTE_ORDER __LITTLE_ENDIAN
606 +#endif
607  #include <stdint.h>
608  
609  /* I used ugly type names in the header to avoid potential conflicts with
610
611
612 [FILE:561:patches/patch-Source_WTF_wtf_Assertions.h]
613 $NetBSD: patch-Source_WTF_wtf_Assertions.h,v 1.1 2021/01/12 15:21:31 jperkin Exp $
614
615 Use regular static_assert on SunOS.
616
617 --- Source/WTF/wtf/Assertions.h.orig    2021-09-01 09:16:49 UTC
618 +++ Source/WTF/wtf/Assertions.h
619 @@ -460,7 +460,7 @@ constexpr bool assertionFailureDueToUnre
620  
621  /* COMPILE_ASSERT */
622  #ifndef COMPILE_ASSERT
623 -#if COMPILER_SUPPORTS(C_STATIC_ASSERT)
624 +#if COMPILER_SUPPORTS(C_STATIC_ASSERT) && !defined(__sun)
625  /* Unlike static_assert below, this also works in plain C code. */
626  #define COMPILE_ASSERT(exp, name) _Static_assert((exp), #name)
627  #else
628
629
630 [FILE:638:patches/patch-Source_WTF_wtf_FastMalloc.cpp]
631 --- Source/WTF/wtf/FastMalloc.cpp.orig  2021-09-01 09:16:49 UTC
632 +++ Source/WTF/wtf/FastMalloc.cpp
633 @@ -197,7 +197,11 @@ void* fastAlignedMalloc(size_t alignment
634  {
635      ASSERT_IS_WITHIN_LIMIT(size);
636      void* p = nullptr;
637 +#ifdef __sun__
638 +    p = memalign(alignment, size);
639 +#else
640      posix_memalign(&p, alignment, size);
641 +#endif
642      if (UNLIKELY(!p))
643          CRASH();
644      return p;
645 @@ -207,7 +211,11 @@ void* tryFastAlignedMalloc(size_t alignm
646  {
647      FAIL_IF_EXCEEDS_LIMIT(size);
648      void* p = nullptr;
649 +#ifdef __sun__
650 +    p = memalign(alignment, size);
651 +#else
652      posix_memalign(&p, alignment, size);
653 +#endif
654      return p;
655  }
656  
657
658
659 [FILE:502:patches/patch-Source_WTF_wtf_FileSystem.cpp]
660 $NetBSD: patch-Source_WTF_wtf_FileSystem.cpp,v 1.3 2020/09/11 14:47:35 leot Exp $
661
662 Support MAP_FILE if unavailable.
663
664 --- Source/WTF/wtf/FileSystem.cpp.orig  2021-09-01 09:16:49 UTC
665 +++ Source/WTF/wtf/FileSystem.cpp
666 @@ -377,6 +377,9 @@ bool MappedFileData::mapFileHandle(Platf
667  #endif
668      }
669  
670 +#ifndef MAP_FILE
671 +#define MAP_FILE       0
672 +#endif
673      void* data = mmap(0, size, pageProtection, MAP_FILE | (mapMode == MappedFileMode::Shared ? MAP_SHARED : MAP_PRIVATE), fd, 0);
674  
675      if (data == MAP_FAILED) {
676
677
678 [FILE:534:patches/patch-Source_WTF_wtf_MemoryPressureHandler.cpp]
679 --- Source/WTF/wtf/MemoryPressureHandler.cpp.orig       2021-09-01 09:16:49 UTC
680 +++ Source/WTF/wtf/MemoryPressureHandler.cpp
681 @@ -56,7 +56,7 @@ MemoryPressureHandler& MemoryPressureHan
682  }
683  
684  MemoryPressureHandler::MemoryPressureHandler()
685 -#if OS(LINUX) || OS(FREEBSD)
686 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
687      : m_holdOffTimer(RunLoop::main(), this, &MemoryPressureHandler::holdOffTimerFired)
688  #elif OS(WINDOWS)
689      : m_windowsMeasurementTimer(RunLoop::main(), this, &MemoryPressureHandler::windowsMeasurementTimerFired)
690
691
692 [FILE:644:patches/patch-Source_WTF_wtf_MemoryPressureHandler.h]
693 --- Source/WTF/wtf/MemoryPressureHandler.h.orig 2021-09-01 09:16:49 UTC
694 +++ Source/WTF/wtf/MemoryPressureHandler.h
695 @@ -69,7 +69,7 @@ public:
696  
697      WTF_EXPORT_PRIVATE void setShouldUsePeriodicMemoryMonitor(bool);
698  
699 -#if OS(LINUX) || OS(FREEBSD)
700 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
701      WTF_EXPORT_PRIVATE void triggerMemoryPressureEvent(bool isCritical);
702  #endif
703  
704 @@ -263,7 +263,7 @@ private:
705      Win32Handle m_lowMemoryHandle;
706  #endif
707  
708 -#if OS(LINUX) || OS(FREEBSD)
709 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
710      RunLoop::Timer<MemoryPressureHandler> m_holdOffTimer;
711      void holdOffTimerFired();
712  #endif
713
714
715 [FILE:326:patches/patch-Source_WTF_wtf_NumberOfCores.cpp]
716 --- Source/WTF/wtf/NumberOfCores.cpp.orig       2021-09-01 09:16:49 UTC
717 +++ Source/WTF/wtf/NumberOfCores.cpp
718 @@ -31,6 +31,7 @@
719  #if OS(DARWIN)
720  #include <sys/sysctl.h>
721  #elif OS(LINUX) || OS(AIX) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD)
722 +#include <stdio.h> // sscanf
723  #include <unistd.h>
724  #elif OS(WINDOWS)
725  #include <windows.h>
726
727
728 [FILE:390:patches/patch-Source_WTF_wtf_PlatformGTK.cmake]
729 --- Source/WTF/wtf/PlatformGTK.cmake.orig       2021-09-01 09:16:49 UTC
730 +++ Source/WTF/wtf/PlatformGTK.cmake
731 @@ -55,7 +55,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
732  
733          unix/MemoryPressureHandlerUnix.cpp
734      )
735 -elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
736 +elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly")
737      list(APPEND WTF_SOURCES
738          generic/MemoryFootprintGeneric.cpp
739  
740
741
742 [FILE:591:patches/patch-Source_WTF_wtf_PlatformHave.h]
743 $NetBSD: patch-Source_WTF_wtf_PlatformHave.h,v 1.2 2021/05/13 08:20:58 leot Exp $
744
745 Add support for NetBSD.
746
747 --- Source/WTF/wtf/PlatformHave.h.orig  2021-09-01 09:16:49 UTC
748 +++ Source/WTF/wtf/PlatformHave.h
749 @@ -222,7 +222,7 @@
750  #define HAVE_HOSTED_CORE_ANIMATION 1
751  #endif
752  
753 -#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
754 +#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(NETBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
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 2021-09-01 09:16:49 UTC
766 +++ Source/WTF/wtf/StackBounds.cpp
767 @@ -96,6 +96,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      2021-09-01 09:16:49 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     2021-09-01 09:16:50 UTC
826 +++ Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
827 @@ -38,6 +38,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    2021-09-01 09:16:50 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  2021-09-01 09:16:50 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     2021-09-01 09:16:51 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   2021-09-01 09:16:51 UTC
910 +++ Source/WebKit/CMakeLists.txt
911 @@ -380,6 +380,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        2021-09-01 09:16:51 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     2021-09-01 09:16:51 UTC
949 +++ Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp
950 @@ -56,6 +56,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 @@ -437,8 +441,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:792:patches/patch-Source_WebKit_Platform_unix_SharedMemoryUnix.cpp]
977 --- Source/WebKit/Platform/unix/SharedMemoryUnix.cpp.orig       2021-09-01 09:16:51 UTC
978 +++ Source/WebKit/Platform/unix/SharedMemoryUnix.cpp
979 @@ -147,7 +147,13 @@ static int createSharedMemory()
980  
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:1374:patches/patch-Source_bmalloc_bmalloc_AvailableMemory.cpp]
997 Add DragonFly support
998 FreeBSD 11 doesn't have sysinfo.h like DragonFly doesn't
999
1000 --- Source/bmalloc/bmalloc/AvailableMemory.cpp.orig     2021-09-01 09:16:51 UTC
1001 +++ Source/bmalloc/bmalloc/AvailableMemory.cpp
1002 @@ -47,10 +47,15 @@
1003  #if BOS(LINUX)
1004  #include <algorithm>
1005  #include <fcntl.h>
1006 +#elif defined(__DragonFly__)
1007 +#include "VMAllocate.h"
1008 +#include <sys/sysctl.h>
1009 +#include <sys/kinfo.h>
1010 +#include <sys/types.h>
1011 +#include <sys/user.h>
1012  #elif BOS(FREEBSD)
1013  #include "VMAllocate.h"
1014  #include <sys/sysctl.h>
1015 -#include <sys/sysinfo.h>
1016  #include <sys/types.h>
1017  #include <sys/user.h>
1018  #endif
1019 @@ -169,7 +174,7 @@ static size_t computeAvailableMemory()
1020      return ((sizeAccordingToKernel + multiple - 1) / multiple) * multiple;
1021  #elif BOS(LINUX)
1022      return LinuxMemory::singleton().availableMemory;
1023 -#elif BOS(FREEBSD)
1024 +#elif 0
1025      struct sysinfo info;
1026      if (!sysinfo(&info))
1027          return info.totalram * info.mem_unit;
1028 @@ -223,7 +228,11 @@ MemoryStatus memoryStatus()
1029  
1030      size_t memoryFootprint = 0;
1031      if (!sysctl(mib, 4, &info, &infolen, nullptr, 0))
1032 +# ifdef __DragonFly__
1033 +        memoryFootprint = static_cast<size_t>(info.kp_vm_rssize) * vmPageSize();
1034 +# else
1035          memoryFootprint = static_cast<size_t>(info.ki_rssize) * vmPageSize();
1036 +# endif
1037  
1038      double percentInUse = static_cast<double>(memoryFootprint) / static_cast<double>(availableMemory());
1039  #endif
1040
1041
1042 [FILE:1075:patches/patch-Source_cmake_OptionsCommon.cmake]
1043 Using the T option of GNU ar lead to malformed .a archive on NetBSD. Disable it.
1044
1045 --- Source/cmake/OptionsCommon.cmake.orig       2021-09-01 09:16:51 UTC
1046 +++ Source/cmake/OptionsCommon.cmake
1047 @@ -14,10 +14,10 @@ if (USE_THIN_ARCHIVES)
1048      elseif ("${AR_ERROR}")
1049          message(WARNING "Error from `ar`: ${AR_ERROR}")
1050      elseif ("${AR_VERSION}" MATCHES "^GNU ar")
1051 -        set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
1052 -        set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
1053 -        set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> rT <TARGET> <LINK_FLAGS> <OBJECTS>")
1054 -        set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> rT <TARGET> <LINK_FLAGS> <OBJECTS>")
1055 +        set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
1056 +        set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
1057 +        set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
1058 +        set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
1059      endif ()
1060  endif ()
1061  
1062
1063
1064 [FILE:520:patches/patch-Source_cmake_WebKitCompilerFlags.cmake]
1065 --- Source/cmake/WebKitCompilerFlags.cmake.orig 2021-09-01 09:16:51 UTC
1066 +++ Source/cmake/WebKitCompilerFlags.cmake
1067 @@ -243,7 +243,7 @@ if (NOT MSVC)
1068      string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
1069  endif ()
1070  
1071 -if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
1072 +if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
1073      set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
1074  endif ()
1075  
1076
1077
1078 [FILE:358:patches/patch-Tools_MiniBrowser_gtk_CMakeLists.txt]
1079 --- Tools/MiniBrowser/gtk/CMakeLists.txt.orig   2021-09-01 09:16:51 UTC
1080 +++ Tools/MiniBrowser/gtk/CMakeLists.txt
1081 @@ -41,6 +41,10 @@ set(MiniBrowser_PRIVATE_LIBRARIES
1082      WebKit::WebKit
1083  )
1084  
1085 +if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
1086 +   list(APPEND MiniBrowser_PRIVATE_LIBRARIES intl)
1087 +endif()
1088 +
1089  set(MiniBrowser_DEPENDENCIES
1090      NetworkProcess
1091      WebProcess
1092