This commit is contained in:
Mario Fetka
2025-06-27 12:42:27 +02:00
parent ef4a06d6b1
commit 14f518e6c8
33 changed files with 5032 additions and 1579 deletions

View File

@@ -0,0 +1,10 @@
AUX 2.44.1-non-unified-build-fixes.patch 11799 BLAKE2B 6928f61428c4bc6594a46f7427e644143b071c39cc7405b143d693f956631519860efd958dd928f55c1e6139334966fd6bb92e42594c7b7b9b11236d5b0154f2 SHA512 c3ee1b48bebe8c6e504b6d15277b67261cceffa9790a212972f2d0ffd32d68c60c96373a2fecc0af9c6400114ecc84130bb23d81d03e08473b60eaadc3df9802
AUX 2.44.4-fix-icu76.1.patch 1215 BLAKE2B 0d4aa869b52eb6579ff58421982e80f02077e064988b30887af9d7da5a1c31bb652fdc406fbfe4e0895cd4c4e0e67b2cc4e363e8d8c60aac5d5683808fd52080 SHA512 356051853ce56e040aed620a6cb68dba75c2387ed396cfea85c2fcd5e51998a31ea2e2eca5305d9aa99b66f6f8ea7e8983851c77ca654a97ec3b3ecce8bd651c
AUX 2.48.3-fix-ftbfs-riscv64.patch 1469 BLAKE2B c6e74307539730b31e3c67f8d80b54c5b8ae39fadfd6623d0bb964553510a3f6c0797183d89589ef0a29ab843adea341b3a00ced422f72352ca9aaa29dcda42b SHA512 2835d3b4093f1c0fe369494d401f75645df166eb60da97a983a2396407b71ef7485646d7e7f7c2d7cc2d15e7160e45fb62b6bcfcf0e08197c7c0ff93b52011f7
DIST webkitgtk-2.44.4.tar.xz 35858056 BLAKE2B 9e3d016bfb2b4e80d2ebeda95e75f8ec8b909b41b17a879d3e1119ed66e3bf4d590a22ed814bb1572dac8d8a8838bb37b5ab1372121b276e02ee8925f6c5b00c SHA512 037ef6a9faca68b68dc62927a475134450493129043ea6cc03595cd4a684d590f80a1e9c3ed40a9176874ba43fc9efbc5065a264dfe131ebd72e272756612db9
DIST webkitgtk-2.46.5.tar.xz 42898600 BLAKE2B 04f824f9864749c13810318c06e5da90265025062a706030bece73661cf89b8d972040c508ca5b4267d476f9dac8fcdaa82943409f6ae45ab84801d899a1ed7f SHA512 9a0eb018361d407f13b303f66babcdc9960075bf69b83cf2ee8f708e5396cfa9e0a720f77695aea216072392e0603c2dc8ad50e6d56f962d4a52e9cdadf38275
DIST webkitgtk-2.48.3.tar.xz 44171964 BLAKE2B d07afd02ca3159e2a8998167818614eb586754f6485ea5b998a10686df44a16c99c5890b6fc7ccb3c1aa4aef82f1626be39cd67a4e60dbbe9eda466fd17aa002 SHA512 0724e0d22403552409d0f621d9ed3a6404813ca63d445b9ac8f99682a544c95a3cf8108ac880cb3bcadc0ecd5a772db40e68f753c286700ffc7f2851bba12e84
EBUILD webkit-gtk-2.44.4-r1.ebuild 7887 BLAKE2B 0e91fad933488cb8897529be1460b428f5587c1e5ad917855440d65e616282bd11dd7db5155064636edb9df8e1c998ff79a7d32dc8178bd9c9a178eab0d15812 SHA512 b9e5a868b8062e9b21b1d16ad63476b241dc2e578d10467e1b1e98f7b0b2433f305b6ef5b8e3050d96d634d0a63f687e2becdbd721e4f88822e7cf535c027c41
EBUILD webkit-gtk-2.46.5-r1.ebuild 8037 BLAKE2B abea5ce78fd795ea34f9394a2e3d87860e9a32a2a44652be73112d82fcc3c0d27d4ab619c861baee5632d34207122f08011a1f5f7643c3ebc1b18b76998b88e3 SHA512 21e9d8e5f1c1313ce76b1da5b2b0375097ee375d6a4d8c9e383d9181751ee90b39d9e61bce94e71c7b3c5ce41e4c97fd8ea5616add14d09c6a68044b187f37e8
EBUILD webkit-gtk-2.48.3.ebuild 8175 BLAKE2B 51debd76cbf21da952517119e85b4e9d53f047f8d6c673f0d89201b76dec2db4e4b6a3e6b64334fc0ab1a830a5674b9c229b7dbbb09b39f5d13a69a79495eef2 SHA512 546bc6a2a119fd099867d5eacd6a7936e39035abbc0caa9c2c602795eccfb77bfaff4446a5441b4a7c4ff8a8a5657887e9f96c533179a0aef55cb7000581aaa6
MISC metadata.xml 790 BLAKE2B cc1db6c1cd6771cafe9b2690790b12a34a7ea49f3dd00c9439ad05a18099c96dd1c5a6575c884c55d09e34f6dc247ca05256a52facb35a54376e61640eececd0 SHA512 b9e123a69e0353a20661ce817ead87b61370d0a68ef175cdf1ced00afacf67204c67bb549aac2006326d8aab7d6e41a841b00d16fc4431626e7ad7782f6158db

View File

@@ -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

View File

@@ -0,0 +1,31 @@
https://bugs.gentoo.org/943213
https://bugs.webkit.org/show_bug.cgi?id=282120
https://github.com/WebKit/WebKit/commit/63f7badbada070ebaadd318b2801818ecf7e7ea0
https://github.com/WebKit/WebKit/pull/35743
https://unicode-org.atlassian.net/jira/software/c/projects/ICU/issues/ICU-22954
From 63f7badbada070ebaadd318b2801818ecf7e7ea0 Mon Sep 17 00:00:00 2001
From: Don Olmstead <don.olmstead@sony.com>
Date: Sat, 26 Oct 2024 08:27:01 -0700
Subject: [PATCH] Support ICU 76.1 build
https://bugs.webkit.org/show_bug.cgi?id=282120
Reviewed by Yusuke Suzuki.
In ICU 76.1 an additional macro `U_SHOW_CPLUSPLUS_HEADER_API` was added to
control visibility of the C++ API within ICU. Set this value to `0` since WebKit
wants to only use the C API.
* Source/WTF/wtf/Platform.h:
Canonical link: https://commits.webkit.org/285727@main
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -115,6 +115,7 @@
/* ICU configuration. Some of these match ICU defaults on some platforms, but we would like them consistently set everywhere we build WebKit. */
#define U_HIDE_DEPRECATED_API 1
#define U_SHOW_CPLUSPLUS_API 0
+#define U_SHOW_CPLUSPLUS_HEADER_API 0
#ifdef __cplusplus
#define UCHAR_TYPE char16_t
#endif

View File

@@ -0,0 +1,40 @@
From: Alberto Garcia <berto@igalia.com>
Description: Use WTF_CPU_UNKNOWN when building for riscv64
WebKitGTK doesn't build on riscv64 even with the JIT disabled.
Treating the CPU as unknown is perhaps a bit severe, but it allows us
to get the build done until someone steps up to maintain this
properly.
Bug: https://bugs.webkit.org/show_bug.cgi?id=271371
Forwarded: no
Index: webkitgtk/Source/WTF/wtf/PlatformCPU.h
===================================================================
--- webkitgtk.orig/Source/WTF/wtf/PlatformCPU.h
+++ webkitgtk/Source/WTF/wtf/PlatformCPU.h
@@ -285,14 +285,6 @@
#endif /* ARM */
-/* CPU(RISCV64) - RISC-V 64-bit */
-#if defined(__riscv) \
- && defined(__riscv_xlen) \
- && (__riscv_xlen == 64)
-#define WTF_CPU_RISCV64 1
-#define WTF_CPU_KNOWN 1
-#endif
-
#if !CPU(KNOWN)
#define WTF_CPU_UNKNOWN 1
#endif
Index: webkitgtk/Source/cmake/WebKitCommon.cmake
===================================================================
--- webkitgtk.orig/Source/cmake/WebKitCommon.cmake
+++ webkitgtk/Source/cmake/WebKitCommon.cmake
@@ -125,8 +125,6 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
set(WTF_CPU_PPC64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
set(WTF_CPU_PPC64LE 1)
- elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^riscv64")
- set(WTF_CPU_RISCV64 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^loongarch64")
set(WTF_CPU_LOONGARCH64 1)
else ()

View File

@@ -0,0 +1,19 @@
<?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="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>
<bugs-to>https://bugs.webkit.org</bugs-to>
<changelog>https://www.webkitgtk.org/news.html</changelog>
<doc>https://webkitgtk.org/reference/webkitgtk/stable/</doc>
<remote-id type="github">WebKit/WebKit</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,254 @@
# Copyright 1999-2025 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"
S="${WORKDIR}/${MY_P}"
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 >=llvm-core/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 )
"
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
# Fix USE=-jumbo-build on all arches
eapply "${FILESDIR}"/2.44.1-non-unified-build-fixes.patch
# https://bugs.gentoo.org/943213
eapply "${FILESDIR}"/2.44.4-fix-icu76.1.patch
# We don't want -Werror for gobject-introspection (bug #947761)
sed -i -e "s:--warn-error::" Source/cmake/FindGI.cmake || die
}
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"
# 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)
append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory")
# 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
)
# Temporary workaround for bug 938162 (upstream bug 271371).
use riscv && mycmakeargs+=( -DENABLE_JIT=OFF )
# 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"
}

View File

@@ -0,0 +1,256 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{10..13} )
USE_RUBY="ruby31 ruby32 ruby33 ruby34"
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"
S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2+ BSD"
SLOT="4/37" # soname version of libwebkit2gtk-4.0
KEYWORDS="amd64 ~arm arm64 ppc ppc64 ~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 can be found in 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
#
# * Cairo is only needed on big-endian systems, where Skia is not officially
# supported (the build system will choose a backend for you). We could probably
# hard-code a list of BE arches here, to avoid the extra dependency? But I am
# holding out hope that this might actually get fixed before we need to do that.
#
# * dev-util/sysprof-capture is disabled because it was a new dependency in 2.46
# and we don't need any more new problems.
#
RDEPEND="
app-accessibility/at-spi2-core:2
dev-db/sqlite:3
dev-libs/glib:2
dev-libs/hyphen
dev-libs/icu:=
dev-libs/libgcrypt:0=
dev-libs/libtasn1:=
dev-libs/libxml2:2=
dev-libs/libxslt
media-libs/fontconfig:1.0
media-libs/freetype:2
media-libs/harfbuzz:=[icu(+)]
media-libs/libjpeg-turbo:0=
media-libs/libepoxy[egl(+)]
media-libs/libglvnd
media-libs/libpng:0=
media-libs/libwebp:=
media-libs/mesa
media-libs/woff2
net-libs/libsoup:2.4[introspection?]
sys-libs/zlib:0
x11-libs/cairo[X?]
x11-libs/gtk+:3[aqua?,introspection?,wayland?,X?]
x11-libs/libdrm
avif? ( media-libs/libavif:= )
gamepad? ( dev-libs/libmanette )
gstreamer? (
media-libs/gstreamer:1.0
media-libs/gst-plugins-base:1.0[egl,opengl,X?]
media-plugins/gst-plugins-opus:1.0
media-libs/gst-plugins-bad:1.0
)
introspection? ( dev-libs/gobject-introspection:= )
jpegxl? ( media-libs/libjxl:= )
keyring? ( app-crypt/libsecret )
lcms? ( media-libs/lcms:2 )
seccomp? (
sys-apps/bubblewrap
sys-libs/libseccomp
sys-apps/xdg-dbus-proxy
)
spell? ( app-text/enchant:2 )
systemd? ( sys-apps/systemd:= )
X? ( x11-libs/libX11 )
wayland? (
dev-libs/wayland
dev-libs/wayland-protocols
)
"
DEPEND="${RDEPEND}"
# Need real bison, not yacc
BDEPEND="
${PYTHON_DEPS}
${RUBY_DEPS}
app-accessibility/at-spi2-core
dev-lang/perl
dev-util/gdbus-codegen
dev-util/glib-utils
dev-util/gperf
dev-util/unifdef
sys-devel/bison
sys-devel/gettext
virtual/perl-Data-Dumper
virtual/perl-Carp
virtual/perl-JSON-PP
virtual/pkgconfig
wayland? ( dev-util/wayland-scanner )
"
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
# https://bugs.gentoo.org/943213
eapply "${FILESDIR}"/2.44.4-fix-icu76.1.patch
# We don't want -Werror for gobject-introspection (bug #947761)
sed -i -e "s:--warn-error::" Source/cmake/FindGI.cmake || die
}
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"
# 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)
append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory")
# 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_GEOLOCATION=ON # Runtime optional (talks over dbus service)
-DENABLE_MINIBROWSER=$(usex examples)
-DENABLE_PDFJS=$(usex pdf)
-DENABLE_SPELLCHECK=$(usex spell)
-DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
-DENABLE_VIDEO=$(usex gstreamer)
-DENABLE_WEB_AUDIO=$(usex gstreamer)
-DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147
-DENABLE_WEBDRIVER=OFF
-DENABLE_WEBGL=ON
-DUSE_AVIF=$(usex avif)
-DUSE_GSTREAMER_WEBRTC=$(usex gstreamer)
-DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer)
# 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_SYSPROF_CAPTURE=OFF
-DUSE_WOFF2=ON
)
# Temporary workaround for bug 938162 (upstream bug 271371).
# The idea to disable WebAssembly and the FTL JIT instead
# of using ENABLE_JIT=OFF was stolen from OpenBSD.
use riscv && mycmakeargs+=( -DENABLE_WEBASSEMBLY=OFF -DENABLE_FTL_JIT=OFF )
# 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"
}

View File

@@ -0,0 +1,263 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{10..13} )
USE_RUBY="ruby31 ruby32 ruby33 ruby34"
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"
S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2+ BSD"
SLOT="4/37" # soname version of libwebkit2gtk-4.0
KEYWORDS="~amd64 ~arm ~arm64 ~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 can be found in 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
#
# * Cairo is only needed on big-endian systems, where Skia is not officially
# supported (the build system will choose a backend for you). We could probably
# hard-code a list of BE arches here, to avoid the extra dependency? But I am
# holding out hope that this might actually get fixed before we need to do that.
#
# * dev-util/sysprof-capture is disabled because it was a new dependency in 2.46
# and we don't need any more new problems.
#
RDEPEND="
app-accessibility/at-spi2-core:2
dev-db/sqlite:3
dev-libs/glib:2
dev-libs/hyphen
dev-libs/icu:=
dev-libs/libgcrypt:0=
dev-libs/libtasn1:=
dev-libs/libxml2:2
dev-libs/libxslt
media-libs/fontconfig:1.0
media-libs/freetype:2
media-libs/harfbuzz:=[icu(+)]
media-libs/libjpeg-turbo:0=
media-libs/libepoxy[egl(+)]
media-libs/libglvnd
media-libs/libpng:0=
media-libs/libwebp:=
media-libs/mesa
media-libs/woff2
net-libs/libsoup:2.4[introspection?]
sys-libs/zlib:0
x11-libs/cairo[X?]
x11-libs/gtk+:3[aqua?,introspection?,wayland?,X?]
x11-libs/libdrm
avif? ( media-libs/libavif:= )
gamepad? ( dev-libs/libmanette )
gstreamer? (
media-libs/gstreamer:1.0
media-libs/gst-plugins-base:1.0[egl,opengl,X?]
media-plugins/gst-plugins-opus:1.0
media-libs/gst-plugins-bad:1.0
)
introspection? ( dev-libs/gobject-introspection:= )
jpegxl? ( media-libs/libjxl:= )
keyring? ( app-crypt/libsecret )
lcms? ( media-libs/lcms:2 )
seccomp? (
sys-apps/bubblewrap
sys-libs/libseccomp
sys-apps/xdg-dbus-proxy
)
spell? ( app-text/enchant:2 )
systemd? ( sys-apps/systemd:= )
X? ( x11-libs/libX11 )
wayland? (
dev-libs/wayland
dev-libs/wayland-protocols
)
"
DEPEND="${RDEPEND}"
# Need real bison, not yacc
BDEPEND="
${PYTHON_DEPS}
${RUBY_DEPS}
app-accessibility/at-spi2-core
dev-lang/perl
dev-util/gdbus-codegen
dev-util/glib-utils
dev-util/gperf
dev-util/unifdef
sys-devel/bison
sys-devel/gettext
virtual/perl-Data-Dumper
virtual/perl-Carp
virtual/perl-JSON-PP
virtual/pkgconfig
wayland? ( dev-util/wayland-scanner )
"
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
# https://bugs.gentoo.org/938162, see also mycmakeargs
eapply "${FILESDIR}"/2.48.3-fix-ftbfs-riscv64.patch
# We don't want -Werror for gobject-introspection (bug #947761)
sed -i -e "s:--warn-error::" Source/cmake/FindGI.cmake || die
}
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"
# 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)
append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory")
# 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_DRAG_SUPPORT=OFF
-DENABLE_GAMEPAD=$(usex gamepad)
-DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service)
-DENABLE_MINIBROWSER=$(usex examples)
-DENABLE_PDFJS=$(usex pdf)
-DENABLE_SPEECH_SYNTHESIS=OFF
-DENABLE_SPELLCHECK=$(usex spell)
-DENABLE_TOUCH_EVENTS=OFF
-DENABLE_UNIFIED_BUILDS=$(usex jumbo-build)
-DENABLE_VIDEO=$(usex gstreamer)
-DENABLE_WEB_AUDIO=$(usex gstreamer)
-DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147
-DENABLE_WEBDRIVER=OFF
-DENABLE_WEBGL=ON
-DUSE_AVIF=$(usex avif)
-DUSE_GSTREAMER_WEBRTC=$(usex gstreamer)
-DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer)
# 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_SYSPROF_CAPTURE=OFF
-DUSE_WOFF2=ON
)
# Temporary workaround for bug 938162 (upstream bug 271371)
# in concert with our Debian patch. The idea to enable C_LOOP
# is also stolen from Debian's build.
use riscv && mycmakeargs+=(
-DENABLE_WEBASSEMBLY=OFF
-DENABLE_JIT=OFF
-DENABLE_C_LOOP=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"
}