summaryrefslogtreecommitdiff
path: root/net-libs/webkit-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/webkit-gtk')
-rw-r--r--net-libs/webkit-gtk/Manifest11
-rw-r--r--net-libs/webkit-gtk/files/2.46.1-riscv-buildfix.patch43
-rw-r--r--net-libs/webkit-gtk/webkit-gtk-2.44.4-r410.ebuild2
-rw-r--r--net-libs/webkit-gtk/webkit-gtk-2.44.4-r600.ebuild2
-rw-r--r--net-libs/webkit-gtk/webkit-gtk-2.44.4.ebuild2
-rw-r--r--net-libs/webkit-gtk/webkit-gtk-2.46.1-r410.ebuild255
-rw-r--r--net-libs/webkit-gtk/webkit-gtk-2.46.1-r600.ebuild274
-rw-r--r--net-libs/webkit-gtk/webkit-gtk-2.46.1.ebuild255
8 files changed, 838 insertions, 6 deletions
diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest
index 4d671dbadad4..31d193237366 100644
--- a/net-libs/webkit-gtk/Manifest
+++ b/net-libs/webkit-gtk/Manifest
@@ -3,12 +3,17 @@ AUX 2.44.1-branch-patchset.patch 11288 BLAKE2B 0966d524063bc6137464eca431d161ac3
AUX 2.44.1-non-unified-build-fixes.patch 11799 BLAKE2B 6928f61428c4bc6594a46f7427e644143b071c39cc7405b143d693f956631519860efd958dd928f55c1e6139334966fd6bb92e42594c7b7b9b11236d5b0154f2 SHA512 c3ee1b48bebe8c6e504b6d15277b67261cceffa9790a212972f2d0ffd32d68c60c96373a2fecc0af9c6400114ecc84130bb23d81d03e08473b60eaadc3df9802
AUX 2.44.1-riscv.patch 2977 BLAKE2B 37a6e22cea8f621e1857141a77b886d82afca1bec70d56b5ecce4b5f89eefc1c0c311f11521840872314a1372ef4666b71000ed14eec787a26c4dc694a1168b3 SHA512 ee5ecbc98c0a40d41477975adc9d4d093cecb9dfe26901f6a5eed510bcefb505885fd7dc99cccc20a79661df900a70a985d2cf740f51481037a8888961488cda
AUX 2.44.2-excessive-cpu-usage.patch 2972 BLAKE2B 2d01af909030900b4c2de7e441b4c667cdd739d3856ee21a2ec1f49ea74430159b1e66b7dd2cefbf6be6c4684a6ea70b39b7064d751076e2d409cff40e7a7521 SHA512 6a0b65e7c70d5d7ad1c80ca4441a3442dcfb399f55dd1c3c1771f710e20da45bb92490967e9efe8943b89b0c298812a65112100bdb0fcacefc24cb695b1bb61c
+AUX 2.46.1-riscv-buildfix.patch 2144 BLAKE2B 27515b7497cb0ca0f04da4352fda97eb254643e1d2486603bb82aff32c96da2f0a08d0cb50b3ab124c83d249816310add54ca6b589372fd1756723ed6db6b4d8 SHA512 4020e64a11fc3df014deb568dcd6f8b07c9ebef53bd8b0dfaae94411b7bedbf14aeeb6d5eea893a4b45da41e29720b69f2d17c81f887ec3c23e6c84cca4d6a4f
DIST webkitgtk-2.44.1.tar.xz 36280696 BLAKE2B a5fff4c4fe90bcd0ea098930e51a36ea60152da47fd06e78abbc10f146437838aa19fed15cf58732b538046e1f42d8461cd5c0e0859096506932c9fae150cc16 SHA512 b1752303f9ee38ef98c1e5c0cad001d389eaedbbf07d13fed8699104e6e311cb47a9bed7089868cb92c53d2777aaff441147353da13123d5c8eee4adf8709169
DIST webkitgtk-2.44.4.tar.xz 35858056 BLAKE2B 9e3d016bfb2b4e80d2ebeda95e75f8ec8b909b41b17a879d3e1119ed66e3bf4d590a22ed814bb1572dac8d8a8838bb37b5ab1372121b276e02ee8925f6c5b00c SHA512 037ef6a9faca68b68dc62927a475134450493129043ea6cc03595cd4a684d590f80a1e9c3ed40a9176874ba43fc9efbc5065a264dfe131ebd72e272756612db9
+DIST webkitgtk-2.46.1.tar.xz 42776840 BLAKE2B 784b4cc4d59da31000612955413608f7a39481c66711139a7c8bc4cf854a62801865a6b3455d6a05918297b2ff3c9ba38ea9046f338ea6060768192af6d67bcd SHA512 e1ac92305b1d1b034eea9be6aa22cfa260249562fa0af41f0ed5c76a36916bba432073e033f228978d84d0377f245642ff31cdec324565e83aa8c82d8ea0c1f5
EBUILD webkit-gtk-2.44.1-r410.ebuild 7961 BLAKE2B 442435051d98fbe4171bbddf7b65535d97ad33bb2b76ece855d2ca1a02fb423efb112a239c2c2ced7174c950e78d2347237be2dbf72392694b4fbdb618e98de6 SHA512 025bc8d14cc3459ba2a0fbcc1e3de32eae18394b3a43b0c1acea8ff68e601217364dea8eac862aff441ccf397f7f73c77750f09bf074b7887b5ab34692be8a23
EBUILD webkit-gtk-2.44.1-r600.ebuild 8731 BLAKE2B cfe0215bd43e15124abf32ba0779441b3e48bd395479da706064cad2f0fd8ffd1eec6122d83ed6032d024997c3487f4175c0c16769696d14f45a05d1ec2f4d56 SHA512 ccfdd83983bf4ef3673a4e81459515f43e619e512694487fbdd345c6aaafb9c12fc4b28f98de4f50b262f8e984d07abda0e63511bff73f66ab51d3ad795aeb82
EBUILD webkit-gtk-2.44.1.ebuild 7809 BLAKE2B f8eebb5a781e511fa7119c56f80e885c3af9af5ad58bcad6e3f53f903ea2777849f35167d1b2fece8f91ea2a7cba4795d1b978de7048aed8d59ebad053c64f39 SHA512 3dda8a65331b87ae3d7699757908623792b20d161e94391277cd82a81516c71dea7222d6d88b13a48464dfb8634278062d558901ec43e339b2ec53f40b03193d
-EBUILD webkit-gtk-2.44.4-r410.ebuild 7830 BLAKE2B 4ccabf713425920b67a636d69b0d9205ae47183b5899ed80b68bc78858b471a96c9c43c946e2973c9af35fc21a5f8411ef2888c03d2e3373e49f84c40b29e3e2 SHA512 d873e4f8490263809c5cb016006970503a5302d73f0819b39e652771d36b35698fd18efffd02296a0b23e9de2c6328139a6c03f861db13e8c9fbbccfdcd7bf72
-EBUILD webkit-gtk-2.44.4-r600.ebuild 8571 BLAKE2B 17018a5c0443dd8842abd801084da7e48c38c405b2a8bd9beffc8eda6814d9feda74788612705b2fc916663eb4f805deafd793c18639c31413806ccd4c50fcd9 SHA512 686d1462c87efa57f0785869df6cb4a9e36f3c09247c862401f6ab99b143c810aa98306974a6378488036d1139c5937a9803de8602f4a91d6837d72f8872c50f
-EBUILD webkit-gtk-2.44.4.ebuild 7678 BLAKE2B 830737a265e1167fed60b7be3f1dd14883f8c178b120566077e38cdb6f432b22f92cfba84db9e7ddaf8f6e6450f3b888a892560f8dbdfb640bf8ddc4a9936fab SHA512 1a64877cb9bd54ff0bb25f0020608eb5d9b62704f6874e1533753ec8a9834a5cbcb50996bde0c7bd0b18621e09f9dad775951862d84eb089a04863e9cc1fece6
+EBUILD webkit-gtk-2.44.4-r410.ebuild 7829 BLAKE2B c53726dabb79b327be04b7468d3de56f89533820ccabb5aaa1a7380bbe4eb984832c8a20dc4a9a07e8d7e522345ec6339d9f8ab05e900a0579c88911c9c1fbb5 SHA512 7798a5b06216aa056d8096aed2ffbf140c6d0dcb774a49f62fc5a0eac2f5ed710c006772b53d4ba2fccb04c08b841f97d95da3667a1560d5d9c141f8a88ec5a0
+EBUILD webkit-gtk-2.44.4-r600.ebuild 8570 BLAKE2B 490a86855a0f0f27c0ae43858f46f2e48a93a901ac4ef91b10eac426c5287514ede3cc29bde7d8f9d0aea17c53cf90e3d52219ce2463338caea5f8abce679ba8 SHA512 94a59ed3537b79d3750f742b1d42bd09704a31e122e5b3b48790311275195b0636c7ea90d9eb85dd58a898600ae90a1b7494ceb3d8a190e8b922242017642071
+EBUILD webkit-gtk-2.44.4.ebuild 7677 BLAKE2B 42d8395c7c59e2478905f794dcdd791e965bd42ed19eca8c47545359c888d49839766adf969a90edc8fa0b214e2cafd868dc40123684cfd234223d110309ae82 SHA512 fd0d908d4edbdd47b24a1f0fa8696a69f098a581af7f4d261edd398c0cd59c098ca31d9163b47873f2cae336865dea5089adc71c169f9fe43c952f87fc26304e
+EBUILD webkit-gtk-2.46.1-r410.ebuild 7919 BLAKE2B 53aaa0526bd07e9375d4bbdff0d986b5d398ca5e9db65fde2908d224c3a8a9d113cde940a8649fadb2ef1fcd43c7261abe3a34e0aa1aa0446f30e36d32fbbe09 SHA512 5c37d5230e9358734a69543ff73b4d1cfb6d110571a1711961dc0da752cb850a0f115bda56a1aede4fe503116f6e6c83cc09f29838f03611952b3f66262a41a2
+EBUILD webkit-gtk-2.46.1-r600.ebuild 8663 BLAKE2B 25c7a4b9fdeb6f8ddf1b905452932a5ad6a022bcfa9510d5e0d797ce79103cab8d97f5c4f64c8dd32bed216d2d79df3d26004f8e3a25d41681873dc092fbebc0 SHA512 d838fbcab29aadb0076681e239c6d8c151f6e082645aa8c43e7650a3a183785a5389ddf62db7e6130058e17cf13c3efc42ee761ca891406be9672d39af125c65
+EBUILD webkit-gtk-2.46.1.ebuild 7917 BLAKE2B fef623f3c402249c4d804e7ca4f47409c3b0ef3ace962d06f2550e9168b210f4af32089fdc4cc0ad8e0d7156a42dab092379d2ef426564ebe206395184d0f1f7 SHA512 8145b12ae9842e5da093443b7f6332a6367c8a377e61faa76a20b11b6705e1da0f4cad84d513cf29265ab22d0f10736bfbeabbf6ddb4d4d32ab7891ea2ddeaba
MISC metadata.xml 615 BLAKE2B 5527ca0439e337193601d221df1b5f9b85c6f4ea0b0867fe8ac0548307672de45fe956fe61c0044b778644c8079271eba565854ab041ce45738dd98a9b3db39e SHA512 4681816de7821ede7c252e62a4cb29ee5c6e88f1799972a7325b40ed1998f9462835ca38c42dc65eeac4c0bcb0d672593af857fcf442cced865bdfdefe063eb1
diff --git a/net-libs/webkit-gtk/files/2.46.1-riscv-buildfix.patch b/net-libs/webkit-gtk/files/2.46.1-riscv-buildfix.patch
new file mode 100644
index 000000000000..7c9110280020
--- /dev/null
+++ b/net-libs/webkit-gtk/files/2.46.1-riscv-buildfix.patch
@@ -0,0 +1,43 @@
+From 2f69282c9271c76e8783412766a50477288e5888 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Thu, 3 Oct 2024 12:34:03 +0200
+Subject: [PATCH] JavaScriptCore/jit/GPRInfo.h: fix typo in RISCV64Registers
+
+RICSV64Registers -> RISCV64Registers
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ Source/JavaScriptCore/jit/GPRInfo.h | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Source/JavaScriptCore/jit/GPRInfo.h b/Source/JavaScriptCore/jit/GPRInfo.h
+index fa7bf0aac48de..df5871957b3f5 100644
+--- a/Source/JavaScriptCore/jit/GPRInfo.h
++++ b/Source/JavaScriptCore/jit/GPRInfo.h
+@@ -779,16 +779,16 @@ class GPRInfo {
+ static constexpr GPRReg wasmBaseMemoryPointer = regCS3;
+ static constexpr GPRReg wasmBoundsCheckingSizeRegister = regCS4;
+
+- static constexpr GPRReg regWS0 = RICSV64Registers::x6;
+- static constexpr GPRReg regWS1 = RICSV64Registers::x7;
+- static constexpr GPRReg regWA0 = RICSV64Registers::x10;
+- static constexpr GPRReg regWA1 = RICSV64Registers::x11;
+- static constexpr GPRReg regWA2 = RICSV64Registers::x12;
+- static constexpr GPRReg regWA3 = RICSV64Registers::x13;
+- static constexpr GPRReg regWA4 = RICSV64Registers::x14;
+- static constexpr GPRReg regWA5 = RICSV64Registers::x15;
+- static constexpr GPRReg regWA6 = RICSV64Registers::x16;
+- static constexpr GPRReg regWA7 = RICSV64Registers::x17;
++ static constexpr GPRReg regWS0 = RISCV64Registers::x6;
++ static constexpr GPRReg regWS1 = RISCV64Registers::x7;
++ static constexpr GPRReg regWA0 = RISCV64Registers::x10;
++ static constexpr GPRReg regWA1 = RISCV64Registers::x11;
++ static constexpr GPRReg regWA2 = RISCV64Registers::x12;
++ static constexpr GPRReg regWA3 = RISCV64Registers::x13;
++ static constexpr GPRReg regWA4 = RISCV64Registers::x14;
++ static constexpr GPRReg regWA5 = RISCV64Registers::x15;
++ static constexpr GPRReg regWA6 = RISCV64Registers::x16;
++ static constexpr GPRReg regWA7 = RISCV64Registers::x17;
+
+ static constexpr GPRReg patchpointScratchRegister = RISCV64Registers::x30; // Should match dataTempRegister
+
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.4-r410.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.4-r410.ebuild
index 3ffac20cf573..7430151ef077 100644
--- a/net-libs/webkit-gtk/webkit-gtk-2.44.4-r410.ebuild
+++ b/net-libs/webkit-gtk/webkit-gtk-2.44.4-r410.ebuild
@@ -17,7 +17,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2+ BSD"
SLOT="4.1/0" # soname version of libwebkit2gtk-4.1
-KEYWORDS="amd64 arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
+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 )"
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.4-r600.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.4-r600.ebuild
index 9d3cb02e7fb6..253092a76ba6 100644
--- a/net-libs/webkit-gtk/webkit-gtk-2.44.4-r600.ebuild
+++ b/net-libs/webkit-gtk/webkit-gtk-2.44.4-r600.ebuild
@@ -17,7 +17,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2+ BSD"
SLOT="6/0" # soname version of libwebkit2gtk-6.0
-KEYWORDS="amd64 arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86"
+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 )"
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.4.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.4.ebuild
index a830d60eec0e..6481f9002b02 100644
--- a/net-libs/webkit-gtk/webkit-gtk-2.44.4.ebuild
+++ b/net-libs/webkit-gtk/webkit-gtk-2.44.4.ebuild
@@ -17,7 +17,7 @@ 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"
+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 )"
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.46.1-r410.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.46.1-r410.ebuild
new file mode 100644
index 000000000000..d7ad93f005eb
--- /dev/null
+++ b/net-libs/webkit-gtk/webkit-gtk-2.46.1-r410.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_REQ_USE="xml(+)"
+PYTHON_COMPAT=( python3_{10..13} )
+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.1/0" # soname version of libwebkit2gtk-4.1
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X"
+REQUIRED_USE="|| ( aqua wayland X )"
+
+# Tests do not run when built from tarballs
+# https://bugs.webkit.org/show_bug.cgi?id=215986
+RESTRICT="test"
+
+# Dependencies 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:3.0[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
+
+ if ! tc-is-clang ; then
+ ewarn "Upstream recommends that Clang be used to compile WebkitGTK:"
+ ewarn " https://webkitgtk.org/2024/10/04/webkitgtk-2.46.html"
+ 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
+
+ eapply "${FILESDIR}/2.46.1-riscv-buildfix.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"
+
+ # 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=OFF
+ -DUSE_SYSPROF_CAPTURE=OFF
+ -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"
+}
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.46.1-r600.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.46.1-r600.ebuild
new file mode 100644
index 000000000000..8c4f3556c6b3
--- /dev/null
+++ b/net-libs/webkit-gtk/webkit-gtk-2.46.1-r600.ebuild
@@ -0,0 +1,274 @@
+# 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..13} )
+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="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 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
+#
+# * 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.
+#
+# * 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?
+#
+# * 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="
+ !<net-libs/webkit-gtk-2.38:4
+ !<net-libs/webkit-gtk-2.44:4.1
+ 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
+ >=gui-libs/gtk-4.14.0:4[aqua?,introspection?,wayland?,X?]
+ 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:3.0[introspection?]
+ sys-libs/zlib:0
+ x11-libs/cairo[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
+
+ if ! tc-is-clang ; then
+ ewarn "Upstream recommends that Clang be used to compile WebkitGTK:"
+ ewarn " https://webkitgtk.org/2024/10/04/webkitgtk-2.46.html"
+ 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
+
+ eapply "${FILESDIR}/2.46.1-riscv-buildfix.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"
+
+ # 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=ON
+ -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=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_SYSPROF_CAPTURE=OFF
+ -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
+}
+
+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.46.1.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.46.1.ebuild
new file mode 100644
index 000000000000..ae809ea078f4
--- /dev/null
+++ b/net-libs/webkit-gtk/webkit-gtk-2.46.1.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_REQ_USE="xml(+)"
+PYTHON_COMPAT=( python3_{10..13} )
+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 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
+
+ if ! tc-is-clang ; then
+ ewarn "Upstream recommends that Clang be used to compile WebkitGTK:"
+ ewarn " https://webkitgtk.org/2024/10/04/webkitgtk-2.46.html"
+ 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
+
+ eapply "${FILESDIR}/2.46.1-riscv-buildfix.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"
+
+ # 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).
+ 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"
+}