diff options
author | Mart Raudsepp <leio@gentoo.org> | 2024-04-13 17:46:51 +0300 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2024-04-14 18:49:13 +0300 |
commit | 3de82e9649130ff329e7ba66b21360db422b2888 (patch) | |
tree | bf55a97d61157f759ef7c44f3ae55e5ff4028404 /net-libs | |
parent | dev-python/python-linux-procfs: Add python@ as a maintainer (diff) | |
download | gentoo-3de82e9649130ff329e7ba66b21360db422b2888.tar.gz gentoo-3de82e9649130ff329e7ba66b21360db422b2888.tar.bz2 gentoo-3de82e9649130ff329e7ba66b21360db422b2888.zip |
net-libs/webkit-gtk: add 2.44.1
* Drop unnecessary gtk+:3 dep for SLOT=6 gtk4 version, fix gtk:4 USE deps
(the aqua/wayland/X ones were on the gtk+:3 wrong dep instead of gtk:4)
* Pre-built documentation has moved from SLOT=4.1 to SLOT=6
* WebKitWebDriver is migrated to be shipped by SLOT=6 (upstream suggested
to ship it in gtk4 SLOT since 2.40 already)
* Include small patchset from upstream 2.44 branch
* Include additional jumbo-build fixes
* Handle undeclared configuration dependency manually for now,
https://bugs.webkit.org/show_bug.cgi?id=269147
* Drop ruby30 from USE_RUBY as ruby:3.0 is gone from tree
* Update deps:
* >=gtk-4.6.0, there's optional build dep on 4.13.4 that we can't ensure
yet as webkit-gtk-2.44 will go stable for security before gtk-4.14.x
* >=libepoxy-1.5.4
* >=wayland-1.20, >=wayland-protocols-1.24
* x11-libs/libdrm
* X11 renderer was removed (uses DMA-BUF with SHM fallback now), thus
most libX* deps with it
* Same with the WPE renderer and thus libwpe/wpebackend-fdo
* Update configuration knobs:
* USE_LIBDRM separated out of USE_GBM
* USE_OPENGL_OR_ES gone (always enabled now, which we always did too)
* USE_OPENJPEG (JPEG2000) support is removed upstream
* New USE_LIBBACKTRACE explicitly disabled to avoid automagic behaviour
* Mention gst-plugins-bad[vaapi] for hardware encoding with VAAPI as an
optfeature and touch up strings for other optfeature suggestions
* Update patchset:
* 2.42.1-arm64-non-jumbo-fix.patch is applied upstream
* 2.42.4-wasm-assert-fix.patch is applied upstream
* 2.42.5-x86-build-fix.patch was a fix specific to 2.42.x to fix a
backport gone wrong from 2.43.x, it must not be applied to 2.44,
even though it applies cleanly
* Fix libepoxy dep to require USE=egl as epoxy/egl.h is used unconditionally
Closes: https://bugs.gentoo.org/928953
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/webkit-gtk/Manifest | 1 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/2.44.1-branch-patchset.patch | 262 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/2.44.1-non-unified-build-fixes.patch | 322 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-2.44.1-r410.ebuild | 257 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-2.44.1-r600.ebuild | 269 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-2.44.1.ebuild | 255 |
6 files changed, 1366 insertions, 0 deletions
diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest index 9ba870735d4e..1c1728b2f43a 100644 --- a/net-libs/webkit-gtk/Manifest +++ b/net-libs/webkit-gtk/Manifest @@ -1,3 +1,4 @@ DIST webkitgtk-2.42.3.tar.xz 32023120 BLAKE2B 8a132039895d859189b65a5fd09e35a99b5ce2ad0cf46c44a4ec9b6c499155c8dcc9d28d4add727f59078df99d03157f203fb12feed7e75f2e28fbebe9953850 SHA512 3ccd7245c656f2919357b8c0b867f47d223cac3cdca5e5a015bb3e6097051c87c8bd38db5fafea8801ca3f0d0d493d7f2f1079ff72fc2afc9cb7a281f4ae6839 DIST webkitgtk-2.42.4.tar.xz 32059260 BLAKE2B 3a8cd0818e0d989ab778cda63dd873d7e185ec20fbfe609b9da70041fe38ac30351046516600cb8eb86089e43136487d81c922690468daa70ed2a436561c2401 SHA512 2019408b3b6b2354ea3da380abaad34d51fed6d5ce9d5a9ff9db6f911d235f8a9eb765ccf1e5608ddc49516cafee9921b4a0f9912b9ae5af56701f8fc0f45293 DIST webkitgtk-2.42.5.tar.xz 34651836 BLAKE2B 4b772d91d3e2c3fc3a48455f43016d2cc1699b18fcc78253d1527eecabbfc1f47cd3bf3c512508fd683d29de68f980511d2057e4c65979bab38083a2da5cb516 SHA512 9b992b1156a87b503deec4640ee9383227c7341910f1b33b7cba03d32194b36aa61de6ae3e8a58c23adcab74e71b78d1c8d4124f32bffc4dd58d93931fb94ef0 +DIST webkitgtk-2.44.1.tar.xz 36280696 BLAKE2B a5fff4c4fe90bcd0ea098930e51a36ea60152da47fd06e78abbc10f146437838aa19fed15cf58732b538046e1f42d8461cd5c0e0859096506932c9fae150cc16 SHA512 b1752303f9ee38ef98c1e5c0cad001d389eaedbbf07d13fed8699104e6e311cb47a9bed7089868cb92c53d2777aaff441147353da13123d5c8eee4adf8709169 diff --git a/net-libs/webkit-gtk/files/2.44.1-branch-patchset.patch b/net-libs/webkit-gtk/files/2.44.1-branch-patchset.patch new file mode 100644 index 000000000000..869c85e84a6e --- /dev/null +++ b/net-libs/webkit-gtk/files/2.44.1-branch-patchset.patch @@ -0,0 +1,262 @@ +From 53ca279739365f9a604fba0a673f0539dfd67c55 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis <pgriffis@igalia.com> +Date: Mon, 8 Apr 2024 10:21:34 -0700 +Subject: [PATCH 1/6] Cherry-pick 277203@main (bd1249cc9c4f). + https://bugs.webkit.org/show_bug.cgi?id=272309 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + Workaround restrict error in GCC 12 + https://bugs.webkit.org/show_bug.cgi?id=272309 + + Reviewed by Darin Adler. + + In GCC 12.3.0: + + In static member function ‘static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’, + inlined from ‘static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:431:21, + inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.tcc:532:22, + inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:2179:19, + inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:1936:22, + inlined from ‘std::ostream& WTF::operator<<(std::ostream&, Int128Impl)’ at /host/home/tingping/Projects/WebKit/Source/WTF/wtf/Int128.cpp:268:17: + /usr/include/c++/12/bits/char_traits.h:435:56: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict] + 435 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); + | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ + + * Source/WTF/wtf/Int128.cpp: + (WTF::operator<<): + + Canonical link: https://commits.webkit.org/277203@main + +Canonical link: https://commits.webkit.org/274313.129@webkitglib/2.44 +--- + Source/WTF/wtf/Int128.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Source/WTF/wtf/Int128.cpp b/Source/WTF/wtf/Int128.cpp +index 3962059d0cb9..c04f6d74543a 100644 +--- a/Source/WTF/wtf/Int128.cpp ++++ b/Source/WTF/wtf/Int128.cpp +@@ -265,9 +265,9 @@ std::ostream& operator<<(std::ostream& os, Int128Impl v) { + (flags & std::ios::basefield) == std::ios_base::fmtflags(); + if (print_as_decimal) { + if (Int128High64(v) < 0) { +- rep = "-"; ++ rep.append("-"); + } else if (flags & std::ios::showpos) { +- rep = "+"; ++ rep.append("+"); + } + } + +-- +2.43.0 + + +From 8ce83c4bf224122e0062248752a3ed014efc67e5 Mon Sep 17 00:00:00 2001 +From: Tim Nguyen <ntim@apple.com> +Date: Wed, 3 Apr 2024 09:22:37 -0700 +Subject: [PATCH 4/6] Cherry-pick 277007@main (1870b119a450). + https://bugs.webkit.org/show_bug.cgi?id=272044 + + CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::ValidatedFormListedElement::updateValidity + https://bugs.webkit.org/show_bug.cgi?id=272044 + rdar://117727866 + + Reviewed by Ryosuke Niwa. + + It speculatively fixes a bug that RadioButtonGroup::m_members may contain a nullptr WeakRef. + + * Source/WebCore/dom/RadioButtonGroups.cpp: + (WebCore::RadioButtonGroup::isEmpty const): + (WebCore::RadioButtonGroup::remove): + (WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons): + (WebCore::RadioButtonGroup::updateValidityForAllButtons): + + Canonical link: https://commits.webkit.org/277007@main + +Canonical link: https://commits.webkit.org/274313.132@webkitglib/2.44 +--- + Source/WebCore/dom/RadioButtonGroups.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Source/WebCore/dom/RadioButtonGroups.cpp b/Source/WebCore/dom/RadioButtonGroups.cpp +index ba07a3fbdf09..4bbae6cbb72f 100644 +--- a/Source/WebCore/dom/RadioButtonGroups.cpp ++++ b/Source/WebCore/dom/RadioButtonGroups.cpp +@@ -31,7 +31,7 @@ namespace WebCore { + class RadioButtonGroup { + WTF_MAKE_FAST_ALLOCATED; + public: +- bool isEmpty() const { return m_members.isEmpty(); } ++ bool isEmpty() const { return m_members.isEmptyIgnoringNullReferences(); } + bool isRequired() const { return m_requiredCount; } + RefPtr<HTMLInputElement> checkedButton() const { return m_checkedButton.get(); } + void add(HTMLInputElement&); +@@ -47,7 +47,7 @@ private: + bool isValid() const; + void setCheckedButton(HTMLInputElement*); + +- HashSet<WeakRef<HTMLInputElement, WeakPtrImplWithEventTargetData>> m_members; ++ WeakHashSet<HTMLInputElement, WeakPtrImplWithEventTargetData> m_members; + WeakPtr<HTMLInputElement, WeakPtrImplWithEventTargetData> m_checkedButton; + size_t m_requiredCount { 0 }; + }; +@@ -60,7 +60,7 @@ inline bool RadioButtonGroup::isValid() const + Vector<Ref<HTMLInputElement>> RadioButtonGroup::members() const + { + auto sortedMembers = WTF::map(m_members, [](auto& element) -> Ref<HTMLInputElement> { +- return element.get(); ++ return element; + }); + std::sort(sortedMembers.begin(), sortedMembers.end(), [](auto& a, auto& b) { + return is_lt(treeOrder<ComposedTree>(a, b)); +@@ -155,7 +155,7 @@ void RadioButtonGroup::remove(HTMLInputElement& button) + } + } + +- if (m_members.isEmpty()) { ++ if (m_members.isEmptyIgnoringNullReferences()) { + ASSERT(!m_requiredCount); + ASSERT(!m_checkedButton); + } else if (wasValid != isValid()) +@@ -170,7 +170,7 @@ void RadioButtonGroup::remove(HTMLInputElement& button) + void RadioButtonGroup::setNeedsStyleRecalcForAllButtons() + { + for (auto& checkedButton : m_members) { +- Ref button = checkedButton.get(); ++ Ref button = checkedButton; + ASSERT(button->isRadioButton()); + button->invalidateStyleForSubtree(); + } +@@ -179,7 +179,7 @@ void RadioButtonGroup::setNeedsStyleRecalcForAllButtons() + void RadioButtonGroup::updateValidityForAllButtons() + { + for (auto& checkedButton : m_members) { +- Ref button = checkedButton.get(); ++ Ref button = checkedButton; + ASSERT(button->isRadioButton()); + button->updateValidity(); + } +-- +2.43.0 + + +From 93bde17ed761f5de54726de83ced4959303794c6 Mon Sep 17 00:00:00 2001 +From: Abrar Rahman Protyasha <a_protyasha@apple.com> +Date: Mon, 1 Apr 2024 22:42:12 -0700 +Subject: [PATCH 5/6] Cherry-pick 276925@main (59cedf7135bc). + https://bugs.webkit.org/show_bug.cgi?id=271962 + + Linker error when logging ViewportConfiguration to TextStream in Release configuration + https://bugs.webkit.org/show_bug.cgi?id=271962 + rdar://125713559 + + Reviewed by Sihui Liu. + + WebCore::operator<<(WTF::TextStream&, WebCore::ViewConfiguration const&) + is defined behind !LOG_DISABLED, which means in Release configuration, + the linker cannot find this definition. + + This patch fixes the linker error by removing the relevant !LOG_DISABLED + checks around both the operator<< overload definition and the + description()/dump() declarations, since said methods are referenced by + the operator<< overload. + + * Source/WebCore/page/ViewportConfiguration.cpp: + (WebCore::ViewportConfiguration::setIsKnownToLayOutWiderThanViewport): + (WebCore::ViewportConfiguration::dump const): + * Source/WebCore/page/ViewportConfiguration.h: + + Canonical link: https://commits.webkit.org/276925@main + +Canonical link: https://commits.webkit.org/274313.133@webkitglib/2.44 +--- + Source/WebCore/page/ViewportConfiguration.cpp | 4 ++-- + Source/WebCore/page/ViewportConfiguration.h | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Source/WebCore/page/ViewportConfiguration.cpp b/Source/WebCore/page/ViewportConfiguration.cpp +index 51abb1154515..c58bc368cd6c 100644 +--- a/Source/WebCore/page/ViewportConfiguration.cpp ++++ b/Source/WebCore/page/ViewportConfiguration.cpp +@@ -674,8 +674,6 @@ bool ViewportConfiguration::setIsKnownToLayOutWiderThanViewport(bool value) + return true; + } + +-#if !LOG_DISABLED +- + TextStream& operator<<(TextStream& ts, const ViewportConfiguration::Parameters& parameters) + { + ts.startGroup(); +@@ -747,6 +745,8 @@ String ViewportConfiguration::description() const + return ts.release(); + } + ++#if !LOG_DISABLED ++ + void ViewportConfiguration::dump() const + { + WTFLogAlways("%s", description().utf8().data()); +diff --git a/Source/WebCore/page/ViewportConfiguration.h b/Source/WebCore/page/ViewportConfiguration.h +index acd5a92ae089..1a7c27225a4b 100644 +--- a/Source/WebCore/page/ViewportConfiguration.h ++++ b/Source/WebCore/page/ViewportConfiguration.h +@@ -148,9 +148,9 @@ public: + WEBCORE_EXPORT static Parameters imageDocumentParameters(); + WEBCORE_EXPORT static Parameters xhtmlMobileParameters(); + WEBCORE_EXPORT static Parameters testingParameters(); +- +-#if !LOG_DISABLED ++ + String description() const; ++#if !LOG_DISABLED + WEBCORE_EXPORT void dump() const; + #endif + +-- +2.43.0 + + +From aff53249f2d491d082094a2aa57008c46e55d278 Mon Sep 17 00:00:00 2001 +From: Erica Li <lerica@apple.com> +Date: Tue, 19 Mar 2024 18:27:04 -0700 +Subject: [PATCH 6/6] Cherry-pick 276379@main (d036679431a5). + https://bugs.webkit.org/show_bug.cgi?id=271028 + + ASAN_SEGV | WebCore::LocalFrame::injectUserScripts. + rdar://124432384 + https://bugs.webkit.org/show_bug.cgi?id=271028 + + Reviewed by Ryosuke Niwa. + + Frame might be detached early, null checking before injectUserScripts from image document. + + * Source/WebCore/html/ImageDocument.cpp: + (WebCore::ImageDocument::createDocumentStructure): + + Canonical link: https://commits.webkit.org/276379@main + +Canonical link: https://commits.webkit.org/274313.134@webkitglib/2.44 +--- + Source/WebCore/html/ImageDocument.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Source/WebCore/html/ImageDocument.cpp b/Source/WebCore/html/ImageDocument.cpp +index f91478f138fe..67d3ed0d09af 100644 +--- a/Source/WebCore/html/ImageDocument.cpp ++++ b/Source/WebCore/html/ImageDocument.cpp +@@ -230,7 +230,8 @@ void ImageDocument::createDocumentStructure() + rootElement->insertedByParser(); + rootElement->setInlineStyleProperty(CSSPropertyHeight, 100, CSSUnitType::CSS_PERCENTAGE); + +- frame()->injectUserScripts(UserScriptInjectionTime::DocumentStart); ++ if (RefPtr localFrame = frame()) ++ localFrame->injectUserScripts(UserScriptInjectionTime::DocumentStart); + + // We need a <head> so that the call to setTitle() later on actually has an <head> to append to <title> to. + auto head = HTMLHeadElement::create(*this); +-- +2.43.0 + diff --git a/net-libs/webkit-gtk/files/2.44.1-non-unified-build-fixes.patch b/net-libs/webkit-gtk/files/2.44.1-non-unified-build-fixes.patch new file mode 100644 index 000000000000..ee5a1c222e70 --- /dev/null +++ b/net-libs/webkit-gtk/files/2.44.1-non-unified-build-fixes.patch @@ -0,0 +1,322 @@ +From 211b73efb2a416f3b464d9d74da0aa8f93abe016 Mon Sep 17 00:00:00 2001 +From: Don Olmstead <don.olmstead@sony.com> +Date: Fri, 8 Mar 2024 17:27:09 -0800 +Subject: [PATCH] Non-unified build fixes, early March 2024 edition + https://bugs.webkit.org/show_bug.cgi?id=270719 + +Unreviewed non-unified build fix. + +* Source/JavaScriptCore/jit/JITSizeStatistics.cpp: +* Source/WebCore/Modules/model-element/ModelPlayerClient.h: +* Source/WebCore/css/CSSCrossfadeValue.h: +* Source/WebCore/css/CSSImageSetOptionValue.cpp: +* Source/WebCore/css/CSSImageSetOptionValue.h: +* Source/WebCore/css/CSSReflectValue.cpp: +* Source/WebCore/css/CSSReflectValue.h: +* Source/WebCore/css/CSSShadowValue.h: +* Source/WebCore/css/CSSValuePair.cpp: +* Source/WebCore/css/CSSValuePair.h: +* Source/WebCore/dom/SlotAssignment.h: +* Source/WebCore/dom/TrustedType.cpp: +* Source/WebCore/rendering/svg/RenderSVGPath.cpp: +* Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp: +* Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp: +* Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp: +* Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp: +* Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp: +* Source/WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.cpp: +* Source/WebKit/UIProcess/BrowsingContextGroup.cpp: +* Source/WebKit/UIProcess/FrameProcess.cpp: +* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp: + +Canonical link: https://commits.webkit.org/275863@main + +(cherry picked from commit 38c6ecad0ea32e80cb3e811c3ff759074006791f) +--- + Source/JavaScriptCore/jit/JITSizeStatistics.cpp | 1 + + Source/WebCore/Modules/model-element/ModelPlayerClient.h | 1 + + Source/WebCore/css/CSSCrossfadeValue.h | 3 ++- + Source/WebCore/css/CSSImageSetOptionValue.cpp | 1 - + Source/WebCore/css/CSSImageSetOptionValue.h | 4 ++-- + Source/WebCore/css/CSSReflectValue.cpp | 2 -- + Source/WebCore/css/CSSReflectValue.h | 4 ++-- + Source/WebCore/css/CSSShadowValue.h | 4 ++-- + Source/WebCore/css/CSSValuePair.cpp | 1 + + Source/WebCore/css/CSSValuePair.h | 1 + + Source/WebCore/dom/SlotAssignment.h | 1 + + Source/WebCore/rendering/svg/RenderSVGPath.cpp | 2 ++ + .../WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp | 2 ++ + Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp | 2 ++ + Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp | 2 ++ + .../WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp | 2 ++ + .../Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.cpp | 1 + + Source/WebKit/UIProcess/ProvisionalPageProxy.cpp | 1 + + 18 files changed, 25 insertions(+), 10 deletions(-) + +diff --git a/Source/JavaScriptCore/jit/JITSizeStatistics.cpp b/Source/JavaScriptCore/jit/JITSizeStatistics.cpp +index f1bc2780343a..b2ffd81ee34d 100644 +--- a/Source/JavaScriptCore/jit/JITSizeStatistics.cpp ++++ b/Source/JavaScriptCore/jit/JITSizeStatistics.cpp +@@ -29,6 +29,7 @@ + #if ENABLE(JIT) + + #include "CCallHelpers.h" ++#include "JITPlan.h" + #include "LinkBuffer.h" + #include <wtf/BubbleSort.h> + #include <wtf/TZoneMallocInlines.h> +diff --git a/Source/WebCore/Modules/model-element/ModelPlayerClient.h b/Source/WebCore/Modules/model-element/ModelPlayerClient.h +index 9343d5102015..b9cf2857eee2 100644 +--- a/Source/WebCore/Modules/model-element/ModelPlayerClient.h ++++ b/Source/WebCore/Modules/model-element/ModelPlayerClient.h +@@ -25,6 +25,7 @@ + + #pragma once + ++#include "LayerHostingContextIdentifier.h" + #include "PlatformLayerIdentifier.h" + #include <wtf/Forward.h> + #include <wtf/WeakPtr.h> +diff --git a/Source/WebCore/css/CSSCrossfadeValue.h b/Source/WebCore/css/CSSCrossfadeValue.h +index eafa3bb5e828..86b87be608fe 100644 +--- a/Source/WebCore/css/CSSCrossfadeValue.h ++++ b/Source/WebCore/css/CSSCrossfadeValue.h +@@ -25,11 +25,12 @@ + + #pragma once + ++#include "CSSPrimitiveValue.h" + #include "CSSValue.h" ++#include <wtf/Function.h> + + namespace WebCore { + +-class CSSPrimitiveValue; + class StyleImage; + + namespace Style { +diff --git a/Source/WebCore/css/CSSImageSetOptionValue.cpp b/Source/WebCore/css/CSSImageSetOptionValue.cpp +index 9becc5444e10..2b7812e419a2 100644 +--- a/Source/WebCore/css/CSSImageSetOptionValue.cpp ++++ b/Source/WebCore/css/CSSImageSetOptionValue.cpp +@@ -27,7 +27,6 @@ + #include "CSSImageSetOptionValue.h" + + #include "CSSImageValue.h" +-#include "CSSPrimitiveValue.h" + + namespace WebCore { + +diff --git a/Source/WebCore/css/CSSImageSetOptionValue.h b/Source/WebCore/css/CSSImageSetOptionValue.h +index 60ef16534b24..c65ddccc04b5 100644 +--- a/Source/WebCore/css/CSSImageSetOptionValue.h ++++ b/Source/WebCore/css/CSSImageSetOptionValue.h +@@ -25,13 +25,13 @@ + + #pragma once + ++#include "CSSPrimitiveValue.h" + #include "CSSValue.h" ++#include <wtf/Function.h> + #include <wtf/text/WTFString.h> + + namespace WebCore { + +-class CSSPrimitiveValue; +- + class CSSImageSetOptionValue final : public CSSValue { + public: + static Ref<CSSImageSetOptionValue> create(Ref<CSSValue>&&); +diff --git a/Source/WebCore/css/CSSReflectValue.cpp b/Source/WebCore/css/CSSReflectValue.cpp +index 371e6ed16087..6049d4af7d2d 100644 +--- a/Source/WebCore/css/CSSReflectValue.cpp ++++ b/Source/WebCore/css/CSSReflectValue.cpp +@@ -26,8 +26,6 @@ + #include "config.h" + #include "CSSReflectValue.h" + +-#include "CSSPrimitiveValue.h" +- + namespace WebCore { + + CSSReflectValue::CSSReflectValue(CSSValueID direction, Ref<CSSPrimitiveValue> offset, RefPtr<CSSValue> mask) +diff --git a/Source/WebCore/css/CSSReflectValue.h b/Source/WebCore/css/CSSReflectValue.h +index c67d2ad0dc4b..84f7b1d0e7e1 100644 +--- a/Source/WebCore/css/CSSReflectValue.h ++++ b/Source/WebCore/css/CSSReflectValue.h +@@ -25,12 +25,12 @@ + + #pragma once + ++#include "CSSPrimitiveValue.h" + #include "CSSValue.h" ++#include <wtf/Function.h> + + namespace WebCore { + +-class CSSPrimitiveValue; +- + class CSSReflectValue final : public CSSValue { + public: + static Ref<CSSReflectValue> create(CSSValueID direction, Ref<CSSPrimitiveValue> offset, RefPtr<CSSValue> mask); +diff --git a/Source/WebCore/css/CSSShadowValue.h b/Source/WebCore/css/CSSShadowValue.h +index 26857028cf36..7d6d25980f72 100644 +--- a/Source/WebCore/css/CSSShadowValue.h ++++ b/Source/WebCore/css/CSSShadowValue.h +@@ -20,13 +20,13 @@ + + #pragma once + ++#include "CSSPrimitiveValue.h" + #include "CSSValue.h" ++#include <wtf/Function.h> + #include <wtf/RefPtr.h> + + namespace WebCore { + +-class CSSPrimitiveValue; +- + // Used for text-shadow and box-shadow + class CSSShadowValue final : public CSSValue { + public: +diff --git a/Source/WebCore/css/CSSValuePair.cpp b/Source/WebCore/css/CSSValuePair.cpp +index 7c64d5a9e353..a3e169a697c7 100644 +--- a/Source/WebCore/css/CSSValuePair.cpp ++++ b/Source/WebCore/css/CSSValuePair.cpp +@@ -25,6 +25,7 @@ + + #include "config.h" + #include "CSSValuePair.h" ++ + #include <wtf/Hasher.h> + #include <wtf/text/WTFString.h> + +diff --git a/Source/WebCore/css/CSSValuePair.h b/Source/WebCore/css/CSSValuePair.h +index 0fc85298ca62..44c4d97c01ab 100644 +--- a/Source/WebCore/css/CSSValuePair.h ++++ b/Source/WebCore/css/CSSValuePair.h +@@ -26,6 +26,7 @@ + #pragma once + + #include "CSSValue.h" ++#include <wtf/Function.h> + + namespace WebCore { + +diff --git a/Source/WebCore/dom/SlotAssignment.h b/Source/WebCore/dom/SlotAssignment.h +index 9f9e1159e10a..478ca88bfca6 100644 +--- a/Source/WebCore/dom/SlotAssignment.h ++++ b/Source/WebCore/dom/SlotAssignment.h +@@ -30,6 +30,7 @@ + #include <wtf/HashSet.h> + #include <wtf/Vector.h> + #include <wtf/WeakHashMap.h> ++#include <wtf/WeakHashSet.h> + #include <wtf/WeakPtr.h> + #include <wtf/text/AtomString.h> + #include <wtf/text/AtomStringHash.h> +diff --git a/Source/WebCore/rendering/svg/RenderSVGPath.cpp b/Source/WebCore/rendering/svg/RenderSVGPath.cpp +index e9977db1c8b6..eba99e3a49d3 100644 +--- a/Source/WebCore/rendering/svg/RenderSVGPath.cpp ++++ b/Source/WebCore/rendering/svg/RenderSVGPath.cpp +@@ -30,12 +30,14 @@ + #include "RenderSVGPath.h" + + #if ENABLE(LAYER_BASED_SVG_ENGINE) ++ + #include "Gradient.h" + #include "ReferencedSVGResources.h" + #include "RenderLayer.h" + #include "RenderSVGResourceMarkerInlines.h" + #include "RenderSVGShapeInlines.h" + #include "RenderStyleInlines.h" ++#include "SVGElementTypeHelpers.h" + #include "SVGMarkerElement.h" + #include "SVGPathElement.h" + #include "SVGSubpathData.h" +diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp b/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp +index 85f79031ed4e..2b379fa4ebfe 100644 +--- a/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp ++++ b/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp +@@ -23,8 +23,10 @@ + #include "RenderSVGResourceLinearGradient.h" + + #if ENABLE(LAYER_BASED_SVG_ENGINE) ++ + #include "RenderSVGModelObjectInlines.h" + #include "RenderSVGResourceLinearGradientInlines.h" ++#include "SVGElementTypeHelpers.h" + #include <wtf/IsoMallocInlines.h> + + namespace WebCore { +diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp b/Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp +index d65a81f773eb..27abd9b6e0f7 100644 +--- a/Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp ++++ b/Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp +@@ -24,6 +24,7 @@ + #include "RenderSVGResourceMarker.h" + + #if ENABLE(LAYER_BASED_SVG_ENGINE) ++ + #include "Element.h" + #include "ElementIterator.h" + #include "FloatPoint.h" +@@ -34,6 +35,7 @@ + #include "RenderLayerInlines.h" + #include "RenderSVGModelObjectInlines.h" + #include "RenderSVGResourceMarkerInlines.h" ++#include "SVGElementTypeHelpers.h" + #include "SVGGraphicsElement.h" + #include "SVGLengthContext.h" + #include "SVGRenderStyle.h" +diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp b/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp +index 81321523d0e4..86c59ca6fab6 100644 +--- a/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp ++++ b/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp +@@ -22,6 +22,7 @@ + #include "RenderSVGResourceMasker.h" + + #if ENABLE(LAYER_BASED_SVG_ENGINE) ++ + #include "Element.h" + #include "ElementIterator.h" + #include "FloatPoint.h" +@@ -33,6 +34,7 @@ + #include "RenderSVGModelObjectInlines.h" + #include "RenderSVGResourceMaskerInlines.h" + #include "SVGContainerLayout.h" ++#include "SVGElementTypeHelpers.h" + #include "SVGGraphicsElement.h" + #include "SVGLengthContext.h" + #include "SVGRenderStyle.h" +diff --git a/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp b/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp +index 7d70fd721d73..25a9b293468e 100644 +--- a/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp ++++ b/Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp +@@ -23,9 +23,11 @@ + #include "RenderSVGResourceRadialGradient.h" + + #if ENABLE(LAYER_BASED_SVG_ENGINE) ++ + #include "RenderSVGModelObjectInlines.h" + #include "RenderSVGResourceRadialGradientInlines.h" + #include "RenderSVGShape.h" ++#include "SVGElementTypeHelpers.h" + #include <wtf/IsoMallocInlines.h> + + namespace WebCore { +diff --git a/Source/WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.cpp b/Source/WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.cpp +index a0c521a767f1..3d4c130de7fa 100644 +--- a/Source/WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.cpp ++++ b/Source/WebKit/Shared/WebGPU/WebGPURenderPassDepthStencilAttachment.cpp +@@ -31,6 +31,7 @@ + #include "WebGPUConvertFromBackingContext.h" + #include "WebGPUConvertToBackingContext.h" + #include <WebCore/WebGPURenderPassDepthStencilAttachment.h> ++#include <WebCore/WebGPUTextureView.h> + + namespace WebKit::WebGPU { + +-- +2.43.0 + diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.1-r410.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.1-r410.ebuild new file mode 100644 index 000000000000..94f180c00cbc --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.1-r410.ebuild @@ -0,0 +1,257 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_REQ_USE="xml(+)" +PYTHON_COMPAT=( python3_{10..12} ) +USE_RUBY="ruby31 ruby32 ruby33" + +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake + +MY_P="webkitgtk-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="https://www.webkitgtk.org" +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz" + +LICENSE="LGPL-2+ BSD" +SLOT="4.1/0" # soname version of libwebkit2gtk-4.1 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X" +REQUIRED_USE="|| ( aqua wayland X )" + +# Tests do not run when built from tarballs +# https://bugs.webkit.org/show_bug.cgi?id=215986 +RESTRICT="test" + +# Dependencies found at Source/cmake/OptionsGTK.cmake +# Missing WebRTC support, but ENABLE_WEB_RTC is experimental upstream +# media-libs/mesa dep is for libgbm +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE) +# TODO: gst-plugins-base[X] is only needed when build configuration ends up +# with GLX set, but that's a bit automagic too to fix +# Softblocking webkit-gtk-2.38:4 as at that time WebKitWebDriver migrated to SLOT=4.1; currently it is found in SLOT=6 +RDEPEND=" + >=x11-libs/cairo-1.16.0[X?] + >=media-libs/fontconfig-2.13.0:1.0 + >=media-libs/freetype-2.9.0:2 + >=dev-libs/libgcrypt-1.7.0:0= + dev-libs/libtasn1:= + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?] + >=media-libs/harfbuzz-1.4.2:=[icu(+)] + >=dev-libs/icu-61.2:= + media-libs/libjpeg-turbo:0= + >=media-libs/libepoxy-1.5.4[egl(+)] + >=net-libs/libsoup-3.0.8:3.0[introspection?] + >=dev-libs/libxml2-2.8.0:2 + >=media-libs/libpng-1.4:0= + dev-db/sqlite:3 + sys-libs/zlib:0 + media-libs/libwebp:= + >=app-accessibility/at-spi2-core-2.46.0:2 + + >=dev-libs/glib-2.70.0:2 + >=dev-libs/libxslt-1.1.7 + media-libs/woff2 + keyring? ( app-crypt/libsecret ) + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= ) + x11-libs/libdrm + media-libs/mesa + spell? ( >=app-text/enchant-0.22:2 ) + gstreamer? ( + >=media-libs/gstreamer-1.20:1.0 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?] + media-libs/gst-plugins-base:1.0[opengl] + >=media-plugins/gst-plugins-opus-1.20:1.0 + >=media-libs/gst-plugins-bad-1.20:1.0 + ) + + X? ( x11-libs/libX11 ) + + dev-libs/hyphen + jpegxl? ( >=media-libs/libjxl-0.7.0:= ) + avif? ( >=media-libs/libavif-0.9.0:= ) + lcms? ( media-libs/lcms:2 ) + + media-libs/libglvnd + wayland? ( + >=dev-libs/wayland-1.20 + >=dev-libs/wayland-protocols-1.24 + ) + + seccomp? ( + >=sys-apps/bubblewrap-0.3.1 + sys-libs/libseccomp + sys-apps/xdg-dbus-proxy + ) + + systemd? ( sys-apps/systemd:= ) + gamepad? ( >=dev-libs/libmanette-0.2.4 ) + !<net-libs/webkit-gtk-2.38:4 +" +DEPEND="${RDEPEND}" +# Need real bison, not yacc +BDEPEND=" + ${PYTHON_DEPS} + ${RUBY_DEPS} + >=app-accessibility/at-spi2-core-2.5.3 + dev-util/gdbus-codegen + dev-util/glib-utils + >=dev-util/gperf-3.0.1 + dev-util/unifdef + >=sys-devel/bison-2.4.3 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 ) + sys-devel/gettext + virtual/pkgconfig + + >=dev-lang/perl-5.10 + virtual/perl-Data-Dumper + virtual/perl-Carp + virtual/perl-JSON-PP + + wayland? ( dev-util/wayland-scanner ) +" + +S="${WORKDIR}/${MY_P}" + +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307 + +# We cannot use PATCHES because src_prepare() calls cmake_src_prepare and +# gnome2_src_prepare, and both apply ${PATCHES[@]} +PATCHES=() + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]] ; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + + if ! test-flag-CXX -std=c++17 ; then + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags" + fi + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then + check-reqs_pkg_setup + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + gnome2_src_prepare + + # Upstream 2.44 branch commits up to aff53249f2d491d, includes a linking and GCC 12 fix + eapply "${FILESDIR}"/${PV}-branch-patchset.patch + # Fix USE=-jumbo-build compilation on arm64 + eapply "${FILESDIR}"/2.42.3-arm64-non-jumbo-fix-925621.patch + # Fix USE=-jumbo-build on all arches + eapply "${FILESDIR}"/${PV}-non-unified-build-fixes.patch +} + +src_configure() { + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # ODR violations (bug #915230, https://bugs.webkit.org/show_bug.cgi?id=233007) + filter-lto + + # It does not compile on alpha without this in LDFLAGS + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 + use alpha && append-ldflags "-Wl,--no-relax" + + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 + use ia64 && append-ldflags "-Wl,--no-as-needed" + + # Sigbuses on SPARC with mcpu and co., bug #??? + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + # Try to use less memory, bug #469942 (see Fedora .spec for reference) + # --no-keep-memory doesn't work on ia64, bug #502492 + if ! use ia64; then + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory") + fi + + # Ruby situation is a bit complicated. See bug 513888 + local rubyimpl + local ruby_interpreter="" + local RUBY + for rubyimpl in ${USE_RUBY}; do + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}(-)]"; then + RUBY="$(type -P ${rubyimpl})" + ruby_interpreter="-DRUBY_EXECUTABLE=${RUBY}" + fi + done + # This will rarely occur. Only a couple of corner cases could lead us to + # that failure. See bug 513888 + [[ -z ${ruby_interpreter} ]] && die "No suitable ruby interpreter found" + # JavaScriptCore/Scripts/postprocess-asm invokes another Ruby script directly + # so it doesn't respect RUBY_EXECUTABLE, bug #771744. + sed -i -e "s:#!/usr/bin/env ruby:#!${RUBY}:" $(grep -rl "/usr/bin/env ruby" Source/JavaScriptCore || die) || die + + # TODO: Check Web Audio support + # should somehow let user select between them? + + local mycmakeargs=( + -DPython_EXECUTABLE="${PYTHON}" + ${ruby_interpreter} + # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy + -DPORT=GTK + # Source/cmake/WebKitFeatures.cmake + -DENABLE_API_TESTS=OFF + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) + -DENABLE_GAMEPAD=$(usex gamepad) + -DENABLE_MINIBROWSER=$(usex examples) + -DENABLE_PDFJS=$(usex pdf) + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service) + -DENABLE_SPELLCHECK=$(usex spell) + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build) + -DENABLE_VIDEO=$(usex gstreamer) + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer) + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer) + -DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147 + -DENABLE_WEBDRIVER=OFF # Disable WebDriver for webkit2gtk-4.1 and use the webkit2gtk-6.0 one + -DENABLE_WEBGL=ON + -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) + # Source/cmake/OptionsGTK.cmake + -DENABLE_DOCUMENTATION=OFF + -DENABLE_INTROSPECTION=$(usex introspection) + -DENABLE_JOURNALD_LOG=$(usex systemd) + -DENABLE_QUARTZ_TARGET=$(usex aqua) + -DENABLE_WAYLAND_TARGET=$(usex wayland) + -DENABLE_X11_TARGET=$(usex X) + -DUSE_GBM=ON + -DUSE_GTK4=OFF + -DUSE_JPEGXL=$(usex jpegxl) + -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON + -DUSE_LIBHYPHEN=ON + -DUSE_LIBSECRET=$(usex keyring) + -DUSE_SOUP2=OFF + -DUSE_WOFF2=ON + ) + + # https://bugs.gentoo.org/761238 + append-cppflags -DNDEBUG + + WK_USE_CCACHE=NO cmake_src_configure +} + +pkg_postinst() { + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue" + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta" + optfeature "VAAPI encoding support" "media-libs/gst-plugins-bad[vaapi]" + optfeature "MPEG-DASH support" "media-plugins/gst-plugins-dash" + optfeature "HTTP live streaming (HLS) support" "media-plugins/gst-plugins-hls" +} diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.1-r600.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.1-r600.ebuild new file mode 100644 index 000000000000..2085212d4260 --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.1-r600.ebuild @@ -0,0 +1,269 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_REQ_USE="xml(+)" +PYTHON_COMPAT=( python3_{10..12} ) +USE_RUBY="ruby31 ruby32 ruby33" + +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake + +MY_P="webkitgtk-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="https://www.webkitgtk.org" +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz" + +LICENSE="LGPL-2+ BSD" +SLOT="6/0" # soname version of libwebkit2gtk-6.0 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X" +REQUIRED_USE="|| ( aqua wayland X )" + +# Tests do not run when built from tarballs +# https://bugs.webkit.org/show_bug.cgi?id=215986 +RESTRICT="test" + +# Dependencies found at Source/cmake/OptionsGTK.cmake +# Missing WebRTC support, but ENABLE_WEB_RTC is experimental upstream +# media-libs/mesa dep is for libgbm +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE) +# TODO: gst-plugins-base[X] is only needed when build configuration ends up +# with GLX set, but that's a bit automagic too to fix +# Softblocking <webkit-gtk-2.38:4 and <webkit-gtk-2.44:4.1 as since 2.44 this SLOT ships the WebKitWebDriver binary; +# WebKitWebDriver is an automation tool for web developers, which lets one control the browser via WebDriver API - only one SLOT can ship it +# TODO: There is build-time conditional depend on gtk-4.13.4 for using more efficient DmaBuf buffer type instead of EglImage, and gtk-4.13.7 for a11y support - ensure it at some point with a min dep +# TODO: at-spi2-core (atspi-2.pc) is checked at build time, but not linked to in the gtk4 SLOT - is it an upstream check bug and only gtk-4.14 a11y support is used? +RDEPEND=" + >=x11-libs/cairo-1.16.0[X?] + >=media-libs/fontconfig-2.13.0:1.0 + >=media-libs/freetype-2.9.0:2 + >=dev-libs/libgcrypt-1.7.0:0= + dev-libs/libtasn1:= + >=gui-libs/gtk-4.6.0:4[aqua?,introspection?,wayland?,X?] + >=media-libs/harfbuzz-1.4.2:=[icu(+)] + >=dev-libs/icu-61.2:= + media-libs/libjpeg-turbo:0= + >=media-libs/libepoxy-1.5.4[egl(+)] + >=net-libs/libsoup-3.0.8:3.0[introspection?] + >=dev-libs/libxml2-2.8.0:2 + >=media-libs/libpng-1.4:0= + dev-db/sqlite:3 + sys-libs/zlib:0 + media-libs/libwebp:= + >=app-accessibility/at-spi2-core-2.46.0:2 + + >=dev-libs/glib-2.70.0:2 + >=dev-libs/libxslt-1.1.7 + media-libs/woff2 + keyring? ( app-crypt/libsecret ) + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= ) + x11-libs/libdrm + media-libs/mesa + spell? ( >=app-text/enchant-0.22:2 ) + gstreamer? ( + >=media-libs/gstreamer-1.20:1.0 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?] + media-libs/gst-plugins-base:1.0[opengl] + >=media-plugins/gst-plugins-opus-1.20:1.0 + >=media-libs/gst-plugins-bad-1.20:1.0 + ) + + X? ( x11-libs/libX11 ) + + dev-libs/hyphen + jpegxl? ( >=media-libs/libjxl-0.7.0:= ) + avif? ( >=media-libs/libavif-0.9.0:= ) + lcms? ( media-libs/lcms:2 ) + + media-libs/libglvnd + wayland? ( + >=dev-libs/wayland-1.20 + >=dev-libs/wayland-protocols-1.24 + ) + + seccomp? ( + >=sys-apps/bubblewrap-0.3.1 + sys-libs/libseccomp + sys-apps/xdg-dbus-proxy + ) + + systemd? ( sys-apps/systemd:= ) + gamepad? ( >=dev-libs/libmanette-0.2.4 ) + !<net-libs/webkit-gtk-2.38:4 + !<net-libs/webkit-gtk-2.44:4.1 +" +DEPEND="${RDEPEND}" +# Need real bison, not yacc +BDEPEND=" + ${PYTHON_DEPS} + ${RUBY_DEPS} + >=app-accessibility/at-spi2-core-2.5.3 + dev-util/gdbus-codegen + dev-util/glib-utils + >=dev-util/gperf-3.0.1 + dev-util/unifdef + >=sys-devel/bison-2.4.3 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 ) + sys-devel/gettext + virtual/pkgconfig + + >=dev-lang/perl-5.10 + virtual/perl-Data-Dumper + virtual/perl-Carp + virtual/perl-JSON-PP + + wayland? ( dev-util/wayland-scanner ) +" + +S="${WORKDIR}/${MY_P}" + +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307 + +# We cannot use PATCHES because src_prepare() calls cmake_src_prepare and +# gnome2_src_prepare, and both apply ${PATCHES[@]} +PATCHES=() + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]] ; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + + if ! test-flag-CXX -std=c++17 ; then + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags" + fi + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then + check-reqs_pkg_setup + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + gnome2_src_prepare + + # Upstream 2.44 branch commits up to aff53249f2d491d, includes a linking and GCC 12 fix + eapply "${FILESDIR}"/${PV}-branch-patchset.patch + # Fix USE=-jumbo-build compilation on arm64 + eapply "${FILESDIR}"/2.42.3-arm64-non-jumbo-fix-925621.patch + # Fix USE=-jumbo-build on all arches + eapply "${FILESDIR}"/${PV}-non-unified-build-fixes.patch +} + +src_configure() { + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # ODR violations (bug #915230, https://bugs.webkit.org/show_bug.cgi?id=233007) + filter-lto + + # It does not compile on alpha without this in LDFLAGS + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 + use alpha && append-ldflags "-Wl,--no-relax" + + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 + use ia64 && append-ldflags "-Wl,--no-as-needed" + + # Sigbuses on SPARC with mcpu and co., bug #??? + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + # Try to use less memory, bug #469942 (see Fedora .spec for reference) + # --no-keep-memory doesn't work on ia64, bug #502492 + if ! use ia64; then + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory") + fi + + # Ruby situation is a bit complicated. See bug 513888 + local rubyimpl + local ruby_interpreter="" + local RUBY + for rubyimpl in ${USE_RUBY}; do + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}(-)]"; then + RUBY="$(type -P ${rubyimpl})" + ruby_interpreter="-DRUBY_EXECUTABLE=${RUBY}" + fi + done + # This will rarely occur. Only a couple of corner cases could lead us to + # that failure. See bug 513888 + [[ -z ${ruby_interpreter} ]] && die "No suitable ruby interpreter found" + # JavaScriptCore/Scripts/postprocess-asm invokes another Ruby script directly + # so it doesn't respect RUBY_EXECUTABLE, bug #771744. + sed -i -e "s:#!/usr/bin/env ruby:#!${RUBY}:" $(grep -rl "/usr/bin/env ruby" Source/JavaScriptCore || die) || die + + # TODO: Check Web Audio support + # should somehow let user select between them? + + local mycmakeargs=( + -DPython_EXECUTABLE="${PYTHON}" + ${ruby_interpreter} + # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy + -DPORT=GTK + # Source/cmake/WebKitFeatures.cmake + -DENABLE_API_TESTS=OFF + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) + -DENABLE_GAMEPAD=$(usex gamepad) + -DENABLE_MINIBROWSER=$(usex examples) + -DENABLE_PDFJS=$(usex pdf) + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service) + -DENABLE_SPELLCHECK=$(usex spell) + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build) + -DENABLE_VIDEO=$(usex gstreamer) + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer) + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer) + -DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147 + -DENABLE_WEBDRIVER=ON + -DENABLE_WEBGL=ON + -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) + # Source/cmake/OptionsGTK.cmake + -DENABLE_DOCUMENTATION=OFF + -DENABLE_INTROSPECTION=$(usex introspection) + -DENABLE_JOURNALD_LOG=$(usex systemd) + -DENABLE_QUARTZ_TARGET=$(usex aqua) + -DENABLE_WAYLAND_TARGET=$(usex wayland) + -DENABLE_X11_TARGET=$(usex X) + -DUSE_GBM=ON + -DUSE_GTK4=ON # webkit2gtk-6.0 + -DUSE_JPEGXL=$(usex jpegxl) + -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON + -DUSE_LIBHYPHEN=ON + -DUSE_LIBSECRET=$(usex keyring) + -DUSE_SOUP2=OFF + -DUSE_WOFF2=ON + ) + + # https://bugs.gentoo.org/761238 + append-cppflags -DNDEBUG + + WK_USE_CCACHE=NO cmake_src_configure +} + +src_install() { + cmake_src_install + + insinto /usr/share/gtk-doc/html + # This will install API docs specific to webkit2gtk-6.0 + doins -r "${S}"/Documentation/{jsc-glib,webkitgtk,webkitgtk-web-process-extension}-6.0 +} + +pkg_postinst() { + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue" + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta" + optfeature "VAAPI encoding support" "media-libs/gst-plugins-bad[vaapi]" + optfeature "MPEG-DASH support" "media-plugins/gst-plugins-dash" + optfeature "HTTP live streaming (HLS) support" "media-plugins/gst-plugins-hls" +} diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.1.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.1.ebuild new file mode 100644 index 000000000000..8659742dfec1 --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.1.ebuild @@ -0,0 +1,255 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_REQ_USE="xml(+)" +PYTHON_COMPAT=( python3_{10..12} ) +USE_RUBY="ruby31 ruby32 ruby33" + +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake + +MY_P="webkitgtk-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="https://www.webkitgtk.org" +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz" + +LICENSE="LGPL-2+ BSD" +SLOT="4/37" # soname version of libwebkit2gtk-4.0 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X" +REQUIRED_USE="|| ( aqua wayland X )" + +# Tests do not run when built from tarballs +# https://bugs.webkit.org/show_bug.cgi?id=215986 +RESTRICT="test" + +# Dependencies found at Source/cmake/OptionsGTK.cmake +# Missing WebRTC support, but ENABLE_WEB_RTC is experimental upstream +# media-libs/mesa dep is for libgbm +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE) +# TODO: gst-plugins-base[X] is only needed when build configuration ends up +# with GLX set, but that's a bit automagic too to fix +RDEPEND=" + >=x11-libs/cairo-1.16.0[X?] + >=media-libs/fontconfig-2.13.0:1.0 + >=media-libs/freetype-2.9.0:2 + >=dev-libs/libgcrypt-1.7.0:0= + dev-libs/libtasn1:= + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?] + >=media-libs/harfbuzz-1.4.2:=[icu(+)] + >=dev-libs/icu-61.2:= + media-libs/libjpeg-turbo:0= + >=media-libs/libepoxy-1.5.4[egl(+)] + >=net-libs/libsoup-2.54:2.4[introspection?] + >=dev-libs/libxml2-2.8.0:2 + >=media-libs/libpng-1.4:0= + dev-db/sqlite:3 + sys-libs/zlib:0 + media-libs/libwebp:= + >=app-accessibility/at-spi2-core-2.46.0:2 + + >=dev-libs/glib-2.70.0:2 + >=dev-libs/libxslt-1.1.7 + media-libs/woff2 + keyring? ( app-crypt/libsecret ) + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= ) + x11-libs/libdrm + media-libs/mesa + spell? ( >=app-text/enchant-0.22:2 ) + gstreamer? ( + >=media-libs/gstreamer-1.20:1.0 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?] + media-libs/gst-plugins-base:1.0[opengl] + >=media-plugins/gst-plugins-opus-1.20:1.0 + >=media-libs/gst-plugins-bad-1.20:1.0 + ) + + X? ( x11-libs/libX11 ) + + dev-libs/hyphen + jpegxl? ( >=media-libs/libjxl-0.7.0:= ) + avif? ( >=media-libs/libavif-0.9.0:= ) + lcms? ( media-libs/lcms:2 ) + + media-libs/libglvnd + wayland? ( + >=dev-libs/wayland-1.20 + >=dev-libs/wayland-protocols-1.24 + ) + + seccomp? ( + >=sys-apps/bubblewrap-0.3.1 + sys-libs/libseccomp + sys-apps/xdg-dbus-proxy + ) + + systemd? ( sys-apps/systemd:= ) + gamepad? ( >=dev-libs/libmanette-0.2.4 ) +" +DEPEND="${RDEPEND}" +# Need real bison, not yacc +BDEPEND=" + ${PYTHON_DEPS} + ${RUBY_DEPS} + >=app-accessibility/at-spi2-core-2.5.3 + dev-util/gdbus-codegen + dev-util/glib-utils + >=dev-util/gperf-3.0.1 + dev-util/unifdef + >=sys-devel/bison-2.4.3 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 ) + sys-devel/gettext + virtual/pkgconfig + + >=dev-lang/perl-5.10 + virtual/perl-Data-Dumper + virtual/perl-Carp + virtual/perl-JSON-PP + + wayland? ( dev-util/wayland-scanner ) +" + +S="${WORKDIR}/${MY_P}" + +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307 + +# We cannot use PATCHES because src_prepare() calls cmake_src_prepare and +# gnome2_src_prepare, and both apply ${PATCHES[@]} +PATCHES=() + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]] ; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + + if ! test-flag-CXX -std=c++17 ; then + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags" + fi + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then + check-reqs_pkg_setup + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + gnome2_src_prepare + + # Upstream 2.44 branch commits up to aff53249f2d491d, includes a linking and GCC 12 fix + eapply "${FILESDIR}"/${PV}-branch-patchset.patch + # Fix USE=-jumbo-build compilation on arm64 + eapply "${FILESDIR}"/2.42.3-arm64-non-jumbo-fix-925621.patch + # Fix USE=-jumbo-build on all arches + eapply "${FILESDIR}"/${PV}-non-unified-build-fixes.patch +} + +src_configure() { + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # ODR violations (bug #915230, https://bugs.webkit.org/show_bug.cgi?id=233007) + filter-lto + + # It does not compile on alpha without this in LDFLAGS + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 + use alpha && append-ldflags "-Wl,--no-relax" + + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 + use ia64 && append-ldflags "-Wl,--no-as-needed" + + # Sigbuses on SPARC with mcpu and co., bug #??? + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + # Try to use less memory, bug #469942 (see Fedora .spec for reference) + # --no-keep-memory doesn't work on ia64, bug #502492 + if ! use ia64; then + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory") + fi + + # Ruby situation is a bit complicated. See bug 513888 + local rubyimpl + local ruby_interpreter="" + local RUBY + for rubyimpl in ${USE_RUBY}; do + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}(-)]"; then + RUBY="$(type -P ${rubyimpl})" + ruby_interpreter="-DRUBY_EXECUTABLE=${RUBY}" + fi + done + # This will rarely occur. Only a couple of corner cases could lead us to + # that failure. See bug 513888 + [[ -z ${ruby_interpreter} ]] && die "No suitable ruby interpreter found" + # JavaScriptCore/Scripts/postprocess-asm invokes another Ruby script directly + # so it doesn't respect RUBY_EXECUTABLE, bug #771744. + sed -i -e "s:#!/usr/bin/env ruby:#!${RUBY}:" $(grep -rl "/usr/bin/env ruby" Source/JavaScriptCore || die) || die + + # TODO: Check Web Audio support + # should somehow let user select between them? + + local mycmakeargs=( + -DPython_EXECUTABLE="${PYTHON}" + ${ruby_interpreter} + # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy + -DPORT=GTK + # Source/cmake/WebKitFeatures.cmake + -DENABLE_API_TESTS=OFF + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) + -DENABLE_GAMEPAD=$(usex gamepad) + -DENABLE_MINIBROWSER=$(usex examples) + -DENABLE_PDFJS=$(usex pdf) + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service) + -DENABLE_SPELLCHECK=$(usex spell) + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build) + -DENABLE_VIDEO=$(usex gstreamer) + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer) + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer) + -DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147 + -DENABLE_WEBDRIVER=OFF # Disable WebDriver for webkit2gtk-4.1 and use the webkit2gtk-6.0 one + -DENABLE_WEBGL=ON + -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) + # Source/cmake/OptionsGTK.cmake + -DENABLE_DOCUMENTATION=OFF + -DENABLE_INTROSPECTION=$(usex introspection) + -DENABLE_JOURNALD_LOG=$(usex systemd) + -DENABLE_QUARTZ_TARGET=$(usex aqua) + -DENABLE_WAYLAND_TARGET=$(usex wayland) + -DENABLE_X11_TARGET=$(usex X) + -DUSE_GBM=ON + -DUSE_GTK4=OFF + -DUSE_JPEGXL=$(usex jpegxl) + -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON + -DUSE_LIBHYPHEN=ON + -DUSE_LIBSECRET=$(usex keyring) + -DUSE_SOUP2=ON + -DUSE_WOFF2=ON + ) + + # https://bugs.gentoo.org/761238 + append-cppflags -DNDEBUG + + WK_USE_CCACHE=NO cmake_src_configure +} + +pkg_postinst() { + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue" + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta" + optfeature "VAAPI encoding support" "media-libs/gst-plugins-bad[vaapi]" + optfeature "MPEG-DASH support" "media-plugins/gst-plugins-dash" + optfeature "HTTP live streaming (HLS) support" "media-plugins/gst-plugins-hls" +} |