1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[gtk3]= Opensource browser engine using the GTK+ 3 toolkit
8 HOMEPAGE= https://www.webkitgtk.org/
12 SITES[main]= https://www.webkitgtk.org/releases/
13 https://fossies.org/linux/www/
14 DISTFILE[1]= webkitgtk-2.36.0.tar.xz:main
20 OPTIONS_AVAILABLE= GTK3
21 OPTIONS_STANDARD= none
24 BUILD_DEPENDS= gperf:primary:standard
25 BUILDRUN_DEPENDS= enchant:single:standard
26 fontconfig:primary:standard
27 freetype:primary:standard
29 libsecret:primary:standard
30 libnotify:primary:standard
31 hyphen:single:standard
34 libsoup:primary:standard
35 libgcrypt:single:standard
36 gnutls:primary:standard
37 libtasn1:primary:standard
38 geoclue:single:standard
40 gstreamer1-plugins-base:primary:standard
41 openjpeg:single:standard
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
48 DISTNAME= webkitgtk-2.36.0
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:"^$$"
56 LICENSE_SOURCE= BSD3CLAUSE:{{WRKSRC}}/Source/WebCore/css/parser/MediaQueryBlockWatcher.h
57 TERMS:{{WRKSRC}}/Source/WebCore/style/StyleScope.cpp
60 CPE_PRODUCT= webkitgtk
62 FPC_EQUIVALENT= www/webkit2-gtk3
64 CONFIGURE_ENV= XDG_CACHE_HOME={{WRKDIR}}
66 INSTALL_TARGET= install
68 PLIST_SUB= JSSOVERSION=0.1.4
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
89 [GTK3].DESCRIPTION= Build GTK+3 variant
92 echo 'add_compile_definitions("U_DEFINE_FALSE_AND_TRUE=1")' \
93 >> ${WRKSRC}/Source/WTF/wtf/CMakeLists.txt
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
105 ${REINPLACE_CMD} -e '/USE_FILE_LOCK/ s|1|0|' \
106 ${WRKSRC}/Source/WTF/wtf/PlatformUse.h \
107 ${WRKSRC}/Source/WebCore/config.h
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.
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
123 b877cca1f105235f5dd57c7ac2b2c2be3c6b691ff444f93925c7254cf156c64d 26900828 webkitgtk-2.36.0.tar.xz
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
136 MiniBrowser-%%WKAPIMAJOR%%
139 include/webkitgtk-%%WKAPI%%/JavaScriptCore/
148 include/webkitgtk-%%WKAPI%%/jsc/
160 include/webkitgtk-%%WKAPI%%/webkit2/
161 WebKitApplicationInfo.h
162 WebKitAuthenticationRequest.h
164 WebKitAutomationSession.h
165 WebKitBackForwardList.h
166 WebKitBackForwardListItem.h
167 WebKitColorChooserRequest.h
168 WebKitConsoleMessage.h
170 WebKitContextMenuActions.h
171 WebKitContextMenuItem.h
172 WebKitCookieManager.h
175 WebKitDeviceInfoPermissionRequest.h
177 WebKitEditingCommands.h
181 WebKitFaviconDatabase.h
182 WebKitFileChooserRequest.h
183 WebKitFindController.h
184 WebKitFormSubmissionRequest.h
185 WebKitForwardDeclarations.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
196 WebKitNavigationAction.h
197 WebKitNavigationPolicyDecision.h
198 WebKitNetworkProxySettings.h
200 WebKitNotificationPermissionRequest.h
202 WebKitOptionMenuItem.h
203 WebKitPermissionRequest.h
205 WebKitPointerLockPermissionRequest.h
206 WebKitPolicyDecision.h
207 WebKitPrintCustomWidget.h
208 WebKitPrintOperation.h
209 WebKitResponsePolicyDecision.h
212 WebKitSecurityManager.h
213 WebKitSecurityOrigin.h
217 WebKitURISchemeRequest.h
218 WebKitURISchemeResponse.h
221 WebKitUserContentFilterStore.h
222 WebKitUserContentManager.h
223 WebKitUserMediaPermissionRequest.h
229 WebKitWebExtensionAutocleanups.h
230 WebKitWebHitTestResult.h
233 WebKitWebProcessEnumTypes.h
237 WebKitWebViewSessionState.h
239 WebKitWebsiteDataAccessPermissionRequest.h
240 WebKitWebsiteDataManager.h
241 WebKitWebsitePolicies.h
242 WebKitWindowProperties.h
243 webkit-web-extension.h
245 include/webkitgtk-%%WKAPI%%/webkitdom/
248 WebKitDOMCDATASection.h
250 WebKitDOMCSSRuleList.h
251 WebKitDOMCSSStyleDeclaration.h
252 WebKitDOMCSSStyleSheet.h
254 WebKitDOMCharacterData.h
255 WebKitDOMClientRect.h
256 WebKitDOMClientRectList.h
259 WebKitDOMCustomUnstable.h
260 WebKitDOMDOMImplementation.h
261 WebKitDOMDOMSelection.h
262 WebKitDOMDOMTokenList.h
264 WebKitDOMDOMWindowUnstable.h
265 WebKitDOMDeprecated.h
267 WebKitDOMDocumentFragment.h
268 WebKitDOMDocumentFragmentUnstable.h
269 WebKitDOMDocumentType.h
270 WebKitDOMDocumentUnstable.h
272 WebKitDOMElementUnstable.h
274 WebKitDOMEventTarget.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
337 WebKitDOMMouseEvent.h
338 WebKitDOMNamedNodeMap.h
340 WebKitDOMNodeFilter.h
341 WebKitDOMNodeIterator.h
344 WebKitDOMProcessingInstruction.h
346 WebKitDOMRangeUnstable.h
347 WebKitDOMStyleSheet.h
348 WebKitDOMStyleSheetList.h
350 WebKitDOMTreeWalker.h
352 WebKitDOMWheelEvent.h
353 WebKitDOMXPathExpression.h
354 WebKitDOMXPathNSResolver.h
355 WebKitDOMXPathResult.h
357 webkitdomautocleanups.h
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%%
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%%/
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
430 [FILE:431:patches/patch-CMakeLists.txt]
431 --- CMakeLists.txt.orig 2022-02-23 08:58:39 UTC
433 @@ -26,6 +26,11 @@ if (ENABLE_API_TESTS)
437 +if (SUPPRESS_ASSERT)
438 + add_definitions(-DNDEBUG=1)
439 + add_definitions(-D__OPTIMIZE__)
442 # -----------------------------------------------------------------------------
443 # Add module directories
444 # -----------------------------------------------------------------------------
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);
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);
457 size_t page = pageSize();
458 uintptr_t current = reinterpret_cast<uintptr_t>(code);
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 $
464 Add support for NetBSD.
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
475 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_UESP]);
477 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSP]);
479 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
481 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
483 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_SP]);
485 +#error Unknown Architecture
488 #elif OS(FUCHSIA) || OS(LINUX)
491 @@ -305,6 +321,22 @@ static inline void*& framePointerImpl(mc
492 #error Unknown Architecture
498 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EBP]);
500 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RBP]);
502 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
504 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_FP]);
506 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_S8]);
508 +#error Unknown Architecture
511 #elif OS(FUCHSIA) || OS(LINUX)
513 // The following sequence depends on glibc's sys/ucontext.h.
514 @@ -446,6 +478,22 @@ static inline void*& instructionPointerI
516 #error Unknown Architecture
522 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EIP]);
524 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RIP]);
526 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
528 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_PC]);
530 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EPC]);
532 +#error Unknown Architecture
535 #elif OS(FUCHSIA) || OS(LINUX)
537 @@ -586,6 +634,22 @@ inline void*& argumentPointer<1>(mcontex
539 #error Unknown Architecture
545 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_EDX]);
547 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_RSI]);
549 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R1]);
551 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X1]);
553 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_A1]);
555 +#error Unknown Architecture
558 #elif OS(FUCHSIA) || OS(LINUX)
560 @@ -705,6 +769,22 @@ inline void*& llintInstructionPointer(mc
562 #error Unknown Architecture
568 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_ESI]);
570 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
572 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_R8]);
574 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_X4]);
576 + return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[_REG_T4]);
578 +#error Unknown Architecture
581 #elif OS(FUCHSIA) || OS(LINUX)
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);
596 if (posix_memalign(&ptr, alignment, size))
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 -----------------------------------------------------------------------------*/
605 #include "PMurHash.h"
607 +#define __BYTE_ORDER __LITTLE_ENDIAN
611 /* I used ugly type names in the header to avoid potential conflicts with
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 $
617 Use regular static_assert on SunOS.
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
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)
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
637 ASSERT_IS_WITHIN_LIMIT(size);
640 + p = memalign(alignment, size);
642 posix_memalign(&p, alignment, size);
647 @@ -207,7 +211,11 @@ void* tryFastAlignedMalloc(size_t alignm
649 FAIL_IF_EXCEEDS_LIMIT(size);
652 + p = memalign(alignment, size);
654 posix_memalign(&p, alignment, size);
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 $
664 Support MAP_FILE if unavailable.
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
675 void* data = mmap(0, size, pageProtection, MAP_FILE | (mapMode == MappedFileMode::Shared ? MAP_SHARED : MAP_PRIVATE), fd, 0);
677 if (data == MAP_FAILED) {
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
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)
691 : m_windowsMeasurementTimer(RunLoop::main(), this, &MemoryPressureHandler::windowsMeasurementTimerFired)
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:
699 WTF_EXPORT_PRIVATE void setShouldUsePeriodicMemoryMonitor(bool);
701 -#if OS(LINUX) || OS(FREEBSD)
702 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
703 WTF_EXPORT_PRIVATE void triggerMemoryPressureEvent(bool isCritical);
706 @@ -277,7 +277,7 @@ private:
707 Win32Handle m_lowMemoryHandle;
710 -#if OS(LINUX) || OS(FREEBSD)
711 +#if OS(LINUX) || OS(FREEBSD) || defined(__DragonFly__)
712 RunLoop::Timer<MemoryPressureHandler> m_holdOffTimer;
713 void holdOffTimerFired();
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
722 #include <sys/sysctl.h>
723 #elif OS(LINUX) || OS(AIX) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD)
724 +#include <stdio.h> // sscanf
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")
735 unix/MemoryPressureHandlerUnix.cpp
737 -elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
738 +elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly")
739 list(APPEND WTF_SOURCES
740 generic/MemoryFootprintGeneric.cpp
744 [FILE:570:patches/patch-Source_WTF_wtf_PlatformHave.h]
745 Add support for NetBSD.
747 --- Source/WTF/wtf/PlatformHave.h.orig 2022-02-23 08:58:57 UTC
748 +++ Source/WTF/wtf/PlatformHave.h
750 #define HAVE_HOSTED_CORE_ANIMATION 1
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
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 $
763 SunOS does not have pthread_getattr_np.
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__)
773 // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
774 pthread_getattr_np(thread, &sattr);
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
782 #include <wtf/MemoryPressureHandler.h>
784 +#if OS(FREEBSD) || defined(__DragonFly__)
790 #include <wtf/Logging.h>
791 #include <wtf/MainThread.h>
795 #include <wtf/linux/CurrentProcessMemoryStatus.h>
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);
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))
814 +# ifdef __DragonFly__
815 + return static_cast<size_t>(info.kp_vm_rssize - info.kp_vm_tsize) * pageSize;
817 return static_cast<size_t>(info.ki_rssize - info.ki_tsize) * pageSize;
820 #error "Missing a platform specific way of determining the memory usage"
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
828 #include <wtf/StringExtras.h>
829 #include <wtf/URLParser.h>
832 +static void *memmem(
833 + const void *big, size_t big_len,
834 + const void *little, size_t little_len)
836 + const char *bp = (const char *)big;
837 + const char *lp = (const char *)little;
840 + if (big_len < little_len || little_len == 0 || big_len == 0)
843 + while (big_len > 0) {
844 + for (l = 0; l < little_len; l++) {
845 + if (bp[l] != lp[l])
848 + if (l == little_len)
859 static inline Ref<Blob> blobFromData(ScriptExecutionContext* context, Vector<uint8_t>&& data, const String& contentType)
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
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
880 #include <ws2tcpip.h>
882 #include <netinet/in.h>
883 +# if defined __DragonFly__ || defined __FreeBSD__ || defined __sun__
884 +# include <sys/socket.h>
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}"
901 list(APPEND WebDriver_SOURCES
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 $
907 SunOS requires libsocket.
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)
915 +if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
916 + list(APPEND WebKit_LIBRARIES socket)
919 macro(ADD_WEBKIT_PREFIX_HEADER _target)
920 if (WebKit_USE_PREFIX_HEADER)
921 get_target_property(OLD_COMPILE_FLAGS ${_target} COMPILE_FLAGS)
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}")
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")
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 $
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).
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.
948 --- Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp.orig 2022-02-23 08:59:04 UTC
949 +++ Source/WebKit/Platform/IPC/unix/ConnectionUnix.cpp
952 #endif // SOCK_SEQPACKET
954 +#ifndef MSG_NOSIGNAL
955 +#define MSG_NOSIGNAL 0
960 static const size_t messageMaxSize = 4096;
961 @@ -442,8 +446,12 @@ bool Connection::sendOutgoingMessage(Uni
966 size_t messageSizeWithBodyInline = sizeof(MessageInfo) + (outputMessage.attachments().size() * sizeof(AttachmentInfo)) + outputMessage.bodySize();
967 if (messageSizeWithBodyInline > messageMaxSize && outputMessage.bodySize()) {
971 RefPtr<WebKit::SharedMemory> oolMessageBody = WebKit::SharedMemory::allocate(encoder->bufferSize());
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()
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)));
985 +#ifdef __DragonFly__
986 + String("/tmp/WK2SharedMemory.")
988 + String("/WK2SharedMemory.")
990 + + String::number(static_cast<unsigned>(WTF::randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)));
991 tempName = name.utf8();
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
1000 #import <mach/mach_error.h>
1003 -#include <sys/sysinfo.h>
1005 #include <algorithm>
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()
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();
1027 memoryFootprint = static_cast<size_t>(info.ki_rssize) * vmPageSize();
1031 double percentInUse = static_cast<double>(memoryFootprint) / static_cast<double>(availableMemory());
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})
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>")
1051 set(ENABLE_DEBUG_FISSION_DEFAULT OFF)
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})
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}")
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
1075 +if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
1076 + list(APPEND MiniBrowser_PRIVATE_LIBRARIES intl)
1079 set(MiniBrowser_DEPENDENCIES