diff options
Diffstat (limited to 'net-libs/webkit-gtk')
-rw-r--r-- | net-libs/webkit-gtk/Manifest | 3 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/2.34.3-jumbo-fix.patch | 70 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/2.34.3-non-jumbo-fix.patch | 31 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/2.34.3-opengl-without-X-fixes.patch | 46 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/2.42.3-arm64-non-jumbo-fix-925621.patch | 29 | ||||
-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/metadata.xml | 24 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-2.44.1-r410.ebuild (renamed from net-libs/webkit-gtk/webkit-gtk-2.34.4.ebuild) | 199 | ||||
-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 (renamed from net-libs/webkit-gtk/webkit-gtk-2.34.3.ebuild) | 191 |
11 files changed, 1074 insertions, 372 deletions
diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest index 08f22bd903cf..a612e3d5a00d 100644 --- a/net-libs/webkit-gtk/Manifest +++ b/net-libs/webkit-gtk/Manifest @@ -1,2 +1 @@ -DIST webkitgtk-2.34.3.tar.xz 24996976 BLAKE2B 03e9d15e956eddb516e7d1c74b2b0adc99659e6121aaa7795fe8d5348b25b909ed08dc6f85ec26a8058331ffbfd2e9e3f7f6e8effe0353270c7bd419171492a0 SHA512 f3d0ad2e051fc177e1a478908ad806e0a094ac7ab1d9e40049a67e868974278dd5fa84d911bed2eb356022fbe020d985370c69af70efa0e223221e9be607efbc -DIST webkitgtk-2.34.4.tar.xz 24388604 BLAKE2B ba483a2457b25ff33d0ffb85ec7fc681390089c69c774d91821a9f23683a473ba86696bf393ba3368058227f4f9c95c84cbd3156f13ddd8331e427ecd13b84a3 SHA512 1a511ac6cb83cb602ecd8a56b3f6d00668de7fca74fcd5c6ce09e36af38b41742edc0bf572780867376aa27dd67d3aa451155f71d04bcdd3cba02c1f4f014df7 +DIST webkitgtk-2.44.1.tar.xz 36280696 BLAKE2B a5fff4c4fe90bcd0ea098930e51a36ea60152da47fd06e78abbc10f146437838aa19fed15cf58732b538046e1f42d8461cd5c0e0859096506932c9fae150cc16 SHA512 b1752303f9ee38ef98c1e5c0cad001d389eaedbbf07d13fed8699104e6e311cb47a9bed7089868cb92c53d2777aaff441147353da13123d5c8eee4adf8709169 diff --git a/net-libs/webkit-gtk/files/2.34.3-jumbo-fix.patch b/net-libs/webkit-gtk/files/2.34.3-jumbo-fix.patch deleted file mode 100644 index 97c5c0c8e4b6..000000000000 --- a/net-libs/webkit-gtk/files/2.34.3-jumbo-fix.patch +++ /dev/null @@ -1,70 +0,0 @@ -From b60c2e4d1770660280d97cae9e82f3040ab97229 Mon Sep 17 00:00:00 2001 -From: "philn@webkit.org" - <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> -Date: Sat, 11 Sep 2021 11:34:42 +0000 -Subject: [PATCH] [GLIB] MediaSession is not enabled - https://bugs.webkit.org/show_bug.cgi?id=217991 <rdar://problem/70740119> - -leio: Extracted to include only the side-effect of fixing unity builds on -some machine configurations. -Thanks-To gen2dev ---- - Source/WebCore/platform/PlatformScreen.h | 6 ++++++ - Source/WebCore/platform/graphics/ImageFrame.h | 6 ++++++ - Source/WebCore/platform/graphics/ImageOrientation.h | 6 ++++++ - 3 files changed, 18 insertions(+) - -diff --git a/Source/WebCore/platform/PlatformScreen.h b/Source/WebCore/platform/PlatformScreen.h -index d3f12a6538b8..d47d193e8bee 100644 ---- a/Source/WebCore/platform/PlatformScreen.h -+++ b/Source/WebCore/platform/PlatformScreen.h -@@ -48,6 +48,12 @@ OBJC_CLASS UIScreen; - typedef struct CGColorSpace *CGColorSpaceRef; - #endif - -+// X11 headers define a bunch of macros with common terms, interfering with WebCore and WTF enum values. -+// As a workaround, we explicitly undef them here. -+#if defined(None) -+#undef None -+#endif -+ - namespace WebCore { - - class DestinationColorSpace; -diff --git a/Source/WebCore/platform/graphics/ImageFrame.h b/Source/WebCore/platform/graphics/ImageFrame.h -index 9843aac40eb4..92e1d4486c5f 100644 ---- a/Source/WebCore/platform/graphics/ImageFrame.h -+++ b/Source/WebCore/platform/graphics/ImageFrame.h -@@ -33,6 +33,12 @@ - #include "NativeImage.h" - #include <wtf/Seconds.h> - -+// X11 headers define a bunch of macros with common terms, interfering with WebCore and WTF enum values. -+// As a workaround, we explicitly undef them here. -+#if defined(None) -+#undef None -+#endif -+ - namespace WebCore { - - class ImageFrame { -diff --git a/Source/WebCore/platform/graphics/ImageOrientation.h b/Source/WebCore/platform/graphics/ImageOrientation.h -index d990a3dc555f..5de271e52352 100644 ---- a/Source/WebCore/platform/graphics/ImageOrientation.h -+++ b/Source/WebCore/platform/graphics/ImageOrientation.h -@@ -30,6 +30,12 @@ - #include "FloatSize.h" - #include <wtf/EnumTraits.h> - -+// X11 headers define a bunch of macros with common terms, interfering with WebCore and WTF enum values. -+// As a workaround, we explicitly undef them here. -+#if defined(None) -+#undef None -+#endif -+ - namespace WebCore { - - struct ImageOrientation { --- -2.32.0 - diff --git a/net-libs/webkit-gtk/files/2.34.3-non-jumbo-fix.patch b/net-libs/webkit-gtk/files/2.34.3-non-jumbo-fix.patch deleted file mode 100644 index 74790d9f6cef..000000000000 --- a/net-libs/webkit-gtk/files/2.34.3-non-jumbo-fix.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f8efe9f2d128a897c0b2a054bf05200cb842d9b2 Mon Sep 17 00:00:00 2001 -From: "don.olmstead@sony.com" - <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> -Date: Sun, 3 Oct 2021 23:00:17 +0000 -Subject: [PATCH] Non-unified build fixes, early October 2021 edition - https://bugs.webkit.org/show_bug.cgi?id=231143 - -Unreviewed non-unified build fixes. ---- -leio: Trimmed to what's relevant to webkitgtk-2.34 branch -gyakovlev: removed TextTrackClient.h include addition - - Source/WebCore/inspector/agents/InspectorCanvasAgent.h | 2 ++ - 1 files changed, 2 insertions(+) - -diff --git a/Source/WebCore/inspector/agents/InspectorCanvasAgent.h b/Source/WebCore/inspector/agents/InspectorCanvasAgent.h -index 7f1012aa2a24..4c7c23995276 100644 ---- a/Source/WebCore/inspector/agents/InspectorCanvasAgent.h -+++ b/Source/WebCore/inspector/agents/InspectorCanvasAgent.h -@@ -44,6 +44,8 @@ class InjectedScriptManager; - namespace WebCore { - - class CanvasRenderingContext; -+class Frame; -+ - #if ENABLE(WEBGL) - class InspectorShaderProgram; - class WebGLProgram; --- -2.32.0 - diff --git a/net-libs/webkit-gtk/files/2.34.3-opengl-without-X-fixes.patch b/net-libs/webkit-gtk/files/2.34.3-opengl-without-X-fixes.patch deleted file mode 100644 index 5608500376ff..000000000000 --- a/net-libs/webkit-gtk/files/2.34.3-opengl-without-X-fixes.patch +++ /dev/null @@ -1,46 +0,0 @@ -https://bugs.webkit.org/show_bug.cgi?id=208907 - -From c67efa2bbe2094b40b4e104bb26497c2aff5ce68 Mon Sep 17 00:00:00 2001 -From: Mart Raudsepp <leio@gentoo.org> -Date: Sat, 9 May 2020 23:11:52 +0300 -Subject: [PATCH] Clean up OpenGLShims.h conditionals in a few places to fix - some build configurations - ---- - Source/WebCore/platform/graphics/GLContext.cpp | 3 +++ - Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp | 5 ++++- - 2 files changed, 7 insertions(+), 1 deletions(-) - -diff --git a/Source/WebCore/platform/graphics/GLContext.cpp b/Source/WebCore/platform/graphics/GLContext.cpp -index b217988b990..1ba0eb8a482 100644 ---- a/Source/WebCore/platform/graphics/GLContext.cpp -+++ b/Source/WebCore/platform/graphics/GLContext.cpp -@@ -28,6 +28,9 @@ - - #if USE(GLX) - #include "GLContextGLX.h" -+#endif -+ -+#if !USE(OPENGL_ES) && !USE(LIBEPOXY) && !USE(ANGLE) - #include "OpenGLShims.h" - #endif - -diff --git a/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp b/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp -index 3515be452b2..82cce70f14b 100644 ---- a/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp -+++ b/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp -@@ -64,7 +64,10 @@ - - #if USE(GLX) - #include <GL/glx.h> --#include <WebCore/OpenGLShims.h> -+#endif -+ -+#if !USE(OPENGL_ES) && !USE(LIBEPOXY) && !USE(ANGLE) -+#include "WebCore/OpenGLShims.h" - #endif - - #if USE(GSTREAMER) --- -2.20.1 - diff --git a/net-libs/webkit-gtk/files/2.42.3-arm64-non-jumbo-fix-925621.patch b/net-libs/webkit-gtk/files/2.42.3-arm64-non-jumbo-fix-925621.patch new file mode 100644 index 000000000000..51fc45fa32c4 --- /dev/null +++ b/net-libs/webkit-gtk/files/2.42.3-arm64-non-jumbo-fix-925621.patch @@ -0,0 +1,29 @@ +From 56001e951362a5064027b1af81283e523e35559b Mon Sep 17 00:00:00 2001 +From: Dennis Camera <dennis.camera+webkit@riiengineering.ch> +Date: Mon, 4 Mar 2024 09:27:54 -0800 +Subject: [PATCH] [JSC] A64DOpcode include <mutex> + https://bugs.webkit.org/show_bug.cgi?id=270394 + +Reviewed by Michael Catanzaro. + +When UNIFIED_BUILDS are disabled, the build fails due to missing std::call_once. + +* Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h: include <mutex>. + +Canonical link: https://commits.webkit.org/275630@main +--- + Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h b/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h +index 0392bcb6e20a0..202aa4d1d81de 100644 +--- a/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h ++++ b/Source/JavaScriptCore/disassembler/ARM64/A64DOpcode.h +@@ -25,6 +25,7 @@ + + #pragma once + ++#include <mutex> + #include <stdint.h> + #include <wtf/Assertions.h> + #include <wtf/DataLog.h> 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/metadata.xml b/net-libs/webkit-gtk/metadata.xml index 6c378126f60f..a370a1712c2f 100644 --- a/net-libs/webkit-gtk/metadata.xml +++ b/net-libs/webkit-gtk/metadata.xml @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>gnome@gentoo.org</email> - <name>Gentoo GNOME Desktop</name> -</maintainer> -<use> - <flag name="avif">Enable support for AVIF images via <pkg>media-libs/libavif</pkg></flag> - <flag name="egl">Enable EGL support</flag> - <flag name="examples">Install the MiniBrowser example application</flag> - <flag name="gamepad">Enable gamepad input support via <pkg>dev-libs/libmanette</pkg></flag> - <flag name="geolocation">Enable geolocation support through <pkg>app-misc/geoclue</pkg></flag> - <flag name="jumbo-build">Combine source files to speed up build process</flag> -</use> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <use> + <flag name="examples">Install the MiniBrowser example application</flag> + <flag name="gamepad">Enable gamepad input support via <pkg>dev-libs/libmanette</pkg></flag> + <flag name="jumbo-build">Combine source files to speed up build process</flag> + </use> + <upstream> + <remote-id type="github">WebKit/WebKit</remote-id> + </upstream> </pkgmetadata> diff --git a/net-libs/webkit-gtk/webkit-gtk-2.34.4.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.1-r410.ebuild index 3d7f52870d16..94d5800a3acd 100644 --- a/net-libs/webkit-gtk/webkit-gtk-2.34.4.ebuild +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.1-r410.ebuild @@ -1,11 +1,12 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 -PYTHON_COMPAT=( python3_{8..10} ) -USE_RUBY="ruby26 ruby27 ruby30" +EAPI=8 +PYTHON_REQ_USE="xml(+)" +PYTHON_COMPAT=( python3_{10..12} ) +USE_RUBY="ruby31 ruby32 ruby33" -inherit check-reqs cmake flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs virtualx +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" @@ -13,82 +14,69 @@ 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 ~ppc ~ppc64 ~riscv ~sparc x86" +SLOT="4.1/0" # soname version of libwebkit2gtk-4.1 +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86" -IUSE="aqua avif +egl examples gamepad +geolocation gles2-only gnome-keyring +gstreamer gtk-doc +introspection +jpeg2k +jumbo-build lcms libnotify seccomp spell systemd wayland +X" +IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X" +REQUIRED_USE="|| ( aqua wayland X )" -# gstreamer with opengl/gles2 needs egl -REQUIRED_USE=" - gles2-only? ( egl ) - gstreamer? ( egl ) - wayland? ( egl ) - || ( aqua wayland X ) -" - -# Tests fail to link for inexplicable reasons -# https://bugs.webkit.org/show_bug.cgi?id=148210 +# Tests do not run when built from tarballs +# https://bugs.webkit.org/show_bug.cgi?id=215986 RESTRICT="test" -# Aqua support in gtk3 is untested # Dependencies found at Source/cmake/OptionsGTK.cmake -# Various compile-time optionals for gtk+-3.22.0 - ensure it -# Missing WebRTC support, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF) and shouldn't be used yet in 2.30 +# 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 +# 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?] + >=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:= - virtual/jpeg:0= - >=net-libs/libsoup-2.54:2.4[introspection?] + 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= + dev-db/sqlite:3 sys-libs/zlib:0 - >=dev-libs/atk-2.16.0 media-libs/libwebp:= + >=app-accessibility/at-spi2-core-2.46.0:2 - >=dev-libs/glib-2.67.1:2 + >=dev-libs/glib-2.70.0:2 >=dev-libs/libxslt-1.1.7 media-libs/woff2 - gnome-keyring? ( app-crypt/libsecret ) + keyring? ( app-crypt/libsecret ) introspection? ( >=dev-libs/gobject-introspection-1.59.1:= ) - dev-libs/libtasn1:= + x11-libs/libdrm + media-libs/mesa spell? ( >=app-text/enchant-0.22:2 ) gstreamer? ( - >=media-libs/gstreamer-1.14:1.0 - >=media-libs/gst-plugins-base-1.14:1.0[egl?,X?] - gles2-only? ( media-libs/gst-plugins-base:1.0[gles2] ) - !gles2-only? ( media-libs/gst-plugins-base:1.0[opengl] ) - >=media-plugins/gst-plugins-opus-1.14.4-r1:1.0 - >=media-libs/gst-plugins-bad-1.14:1.0 ) - - X? ( - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXrender - x11-libs/libXt ) - - libnotify? ( x11-libs/libnotify ) + >=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 - jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= ) + jpegxl? ( >=media-libs/libjxl-0.7.0:= ) avif? ( >=media-libs/libavif-0.9.0:= ) lcms? ( media-libs/lcms:2 ) - egl? ( media-libs/mesa[egl(+)] ) - gles2-only? ( media-libs/mesa[gles2] ) - !gles2-only? ( virtual/opengl ) + media-libs/libglvnd wayland? ( - dev-libs/wayland - >=dev-libs/wayland-protocols-1.12 - >=gui-libs/libwpe-1.5.0:1.0 - >=gui-libs/wpebackend-fdo-1.7.0:1.0 + >=dev-libs/wayland-1.20 + >=dev-libs/wayland-protocols-1.24 ) seccomp? ( @@ -99,16 +87,18 @@ RDEPEND=" systemd? ( sys-apps/systemd:= ) gamepad? ( >=dev-libs/libmanette-0.2.4 ) + !<net-libs/webkit-gtk-2.38:4 " DEPEND="${RDEPEND}" -# paxctl needed for bug #407085 # 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 @@ -119,22 +109,17 @@ BDEPEND=" virtual/perl-Carp virtual/perl-JSON-PP - gtk-doc? ( >=dev-util/gtk-doc-1.32 ) - geolocation? ( dev-util/gdbus-codegen ) - >=dev-util/cmake-3.10 -" -# test? ( -# dev-python/pygobject:3[python_targets_python2_7] -# x11-themes/hicolor-icon-theme -# jit? ( sys-apps/paxctl ) ) -RDEPEND="${RDEPEND} - geolocation? ( >=app-misc/geoclue-2.1.5:2.0 ) + 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 @@ -157,17 +142,24 @@ pkg_setup() { } src_prepare() { - eapply "${FILESDIR}"/2.34.3-opengl-without-X-fixes.patch - eapply "${FILESDIR}"/2.34.3-non-jumbo-fix.patch - eapply "${FILESDIR}"/2.34.3-jumbo-fix.patch # bug 830638 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" @@ -190,60 +182,64 @@ src_configure() { # 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_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})" + 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" + [[ -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} - $(cmake_use_find_package gles2-only OpenGLES2) - $(cmake_use_find_package egl EGL) - $(cmake_use_find_package !gles2-only OpenGL) - -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + # 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=$(usex test) + -DENABLE_API_TESTS=OFF -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) -DENABLE_GAMEPAD=$(usex gamepad) - -DENABLE_GEOLOCATION=$(usex geolocation) # Runtime optional (talks over dbus service) -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 - # Supported only under ANGLE and default off PRIVATE option still@2.34.1, see - # https://bugs.webkit.org/show_bug.cgi?id=225563 - # https://bugs.webkit.org/show_bug.cgi?id=224888 - -DENABLE_WEBGL2=OFF -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) # Source/cmake/OptionsGTK.cmake - -DENABLE_GLES2=$(usex gles2-only) - -DENABLE_GTKDOC=$(usex gtk-doc) + -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_AVIF=$(usex avif) + -DUSE_GBM=ON -DUSE_GTK4=OFF + -DUSE_JPEGXL=$(usex jpegxl) -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON -DUSE_LIBHYPHEN=ON - -DUSE_LIBNOTIFY=$(usex libnotify) - -DUSE_LIBSECRET=$(usex gnome-keyring) - -DUSE_OPENGL_OR_ES=ON - -DUSE_OPENJPEG=$(usex jpeg2k) - -DUSE_SOUP2=ON - -DUSE_SYSTEMD=$(usex systemd) # Whether to enable journald logging + -DUSE_LIBSECRET=$(usex keyring) + -DUSE_SOUP2=OFF -DUSE_WOFF2=ON - -DUSE_WPE_RENDERER=$(usex wayland) # WPE renderer is used to implement accelerated compositing under wayland ) # https://bugs.gentoo.org/761238 @@ -252,21 +248,10 @@ src_configure() { WK_USE_CCACHE=NO cmake_src_configure } -src_compile() { - cmake_src_compile -} - -src_test() { - # Prevents test failures on PaX systems - pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test* - - cmake_src_test -} - -src_install() { - cmake_src_install - - # Prevents crashes on PaX systems, bug #522808 - pax-mark m "${ED}/usr/libexec/webkit2gtk-4.0/jsc" "${ED}/usr/libexec/webkit2gtk-4.0/WebKitWebProcess" - pax-mark m "${ED}/usr/libexec/webkit2gtk-4.0/WebKitPluginProcess" +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..dca160b9f744 --- /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.34.3.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.1.ebuild index 940e11a2d115..69d3434a09ce 100644 --- a/net-libs/webkit-gtk/webkit-gtk-2.34.3.ebuild +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.1.ebuild @@ -1,11 +1,12 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 -PYTHON_COMPAT=( python3_{8..10} ) -USE_RUBY="ruby26 ruby27 ruby30" +EAPI=8 +PYTHON_REQ_USE="xml(+)" +PYTHON_COMPAT=( python3_{10..12} ) +USE_RUBY="ruby31 ruby32 ruby33" -inherit check-reqs cmake flag-o-matic gnome2 pax-utils python-any-r1 ruby-single toolchain-funcs virtualx +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" @@ -14,81 +15,67 @@ 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 ppc ppc64 ~riscv ~sparc x86" +KEYWORDS="amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86" -IUSE="aqua avif +egl examples gamepad +geolocation gles2-only gnome-keyring +gstreamer gtk-doc +introspection +jpeg2k +jumbo-build lcms libnotify seccomp spell systemd wayland +X" +IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X" +REQUIRED_USE="|| ( aqua wayland X )" -# gstreamer with opengl/gles2 needs egl -REQUIRED_USE=" - gles2-only? ( egl ) - gstreamer? ( egl ) - wayland? ( egl ) - || ( aqua wayland X ) -" - -# Tests fail to link for inexplicable reasons -# https://bugs.webkit.org/show_bug.cgi?id=148210 +# Tests do not run when built from tarballs +# https://bugs.webkit.org/show_bug.cgi?id=215986 RESTRICT="test" -# Aqua support in gtk3 is untested # Dependencies found at Source/cmake/OptionsGTK.cmake -# Various compile-time optionals for gtk+-3.22.0 - ensure it -# Missing WebRTC support, but ENABLE_MEDIA_STREAM/ENABLE_WEB_RTC is experimental upstream (PRIVATE OFF) and shouldn't be used yet in 2.30 +# 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 +# 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?] + >=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:= - virtual/jpeg:0= + 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= + dev-db/sqlite:3 sys-libs/zlib:0 - >=dev-libs/atk-2.16.0 media-libs/libwebp:= + >=app-accessibility/at-spi2-core-2.46.0:2 - >=dev-libs/glib-2.67.1:2 + >=dev-libs/glib-2.70.0:2 >=dev-libs/libxslt-1.1.7 media-libs/woff2 - gnome-keyring? ( app-crypt/libsecret ) + keyring? ( app-crypt/libsecret ) introspection? ( >=dev-libs/gobject-introspection-1.59.1:= ) - dev-libs/libtasn1:= + x11-libs/libdrm + media-libs/mesa spell? ( >=app-text/enchant-0.22:2 ) gstreamer? ( - >=media-libs/gstreamer-1.14:1.0 - >=media-libs/gst-plugins-base-1.14:1.0[egl?,X?] - gles2-only? ( media-libs/gst-plugins-base:1.0[gles2] ) - !gles2-only? ( media-libs/gst-plugins-base:1.0[opengl] ) - >=media-plugins/gst-plugins-opus-1.14.4-r1:1.0 - >=media-libs/gst-plugins-bad-1.14:1.0 ) - - X? ( - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXrender - x11-libs/libXt ) - - libnotify? ( x11-libs/libnotify ) + >=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 - jpeg2k? ( >=media-libs/openjpeg-2.2.0:2= ) + jpegxl? ( >=media-libs/libjxl-0.7.0:= ) avif? ( >=media-libs/libavif-0.9.0:= ) lcms? ( media-libs/lcms:2 ) - egl? ( media-libs/mesa[egl(+)] ) - gles2-only? ( media-libs/mesa[gles2] ) - !gles2-only? ( virtual/opengl ) + media-libs/libglvnd wayland? ( - dev-libs/wayland - >=dev-libs/wayland-protocols-1.12 - >=gui-libs/libwpe-1.5.0:1.0 - >=gui-libs/wpebackend-fdo-1.7.0:1.0 + >=dev-libs/wayland-1.20 + >=dev-libs/wayland-protocols-1.24 ) seccomp? ( @@ -101,14 +88,15 @@ RDEPEND=" gamepad? ( >=dev-libs/libmanette-0.2.4 ) " DEPEND="${RDEPEND}" -# paxctl needed for bug #407085 # 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 @@ -119,22 +107,17 @@ BDEPEND=" virtual/perl-Carp virtual/perl-JSON-PP - gtk-doc? ( >=dev-util/gtk-doc-1.32 ) - geolocation? ( dev-util/gdbus-codegen ) - >=dev-util/cmake-3.10 -" -# test? ( -# dev-python/pygobject:3[python_targets_python2_7] -# x11-themes/hicolor-icon-theme -# jit? ( sys-apps/paxctl ) ) -RDEPEND="${RDEPEND} - geolocation? ( >=app-misc/geoclue-2.1.5:2.0 ) + 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 @@ -157,17 +140,24 @@ pkg_setup() { } src_prepare() { - eapply "${FILESDIR}"/2.34.3-opengl-without-X-fixes.patch - eapply "${FILESDIR}"/2.34.3-non-jumbo-fix.patch - eapply "${FILESDIR}"/2.34.3-jumbo-fix.patch # bug 830638 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" @@ -190,60 +180,64 @@ src_configure() { # 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_interpreter="-DRUBY_EXECUTABLE=$(type -P ${rubyimpl})" + 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" + [[ -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} - $(cmake_use_find_package gles2-only OpenGLES2) - $(cmake_use_find_package egl EGL) - $(cmake_use_find_package !gles2-only OpenGL) - -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + # 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=$(usex test) + -DENABLE_API_TESTS=OFF -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) -DENABLE_GAMEPAD=$(usex gamepad) - -DENABLE_GEOLOCATION=$(usex geolocation) # Runtime optional (talks over dbus service) -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 - # Supported only under ANGLE and default off PRIVATE option still@2.34.1, see - # https://bugs.webkit.org/show_bug.cgi?id=225563 - # https://bugs.webkit.org/show_bug.cgi?id=224888 - -DENABLE_WEBGL2=OFF -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) # Source/cmake/OptionsGTK.cmake - -DENABLE_GLES2=$(usex gles2-only) - -DENABLE_GTKDOC=$(usex gtk-doc) + -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_AVIF=$(usex avif) + -DUSE_GBM=ON -DUSE_GTK4=OFF + -DUSE_JPEGXL=$(usex jpegxl) -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON -DUSE_LIBHYPHEN=ON - -DUSE_LIBNOTIFY=$(usex libnotify) - -DUSE_LIBSECRET=$(usex gnome-keyring) - -DUSE_OPENGL_OR_ES=ON - -DUSE_OPENJPEG=$(usex jpeg2k) + -DUSE_LIBSECRET=$(usex keyring) -DUSE_SOUP2=ON - -DUSE_SYSTEMD=$(usex systemd) # Whether to enable journald logging -DUSE_WOFF2=ON - -DUSE_WPE_RENDERER=$(usex wayland) # WPE renderer is used to implement accelerated compositing under wayland ) # https://bugs.gentoo.org/761238 @@ -252,21 +246,10 @@ src_configure() { WK_USE_CCACHE=NO cmake_src_configure } -src_compile() { - cmake_src_compile -} - -src_test() { - # Prevents test failures on PaX systems - pax-mark m $(list-paxables Programs/*[Tt]ests/*) # Programs/unittests/.libs/test* - - cmake_src_test -} - -src_install() { - cmake_src_install - - # Prevents crashes on PaX systems, bug #522808 - pax-mark m "${ED}/usr/libexec/webkit2gtk-4.0/jsc" "${ED}/usr/libexec/webkit2gtk-4.0/WebKitWebProcess" - pax-mark m "${ED}/usr/libexec/webkit2gtk-4.0/WebKitPluginProcess" +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" } |