diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-21 12:30:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-21 12:30:10 +0100 |
commit | 4968fd889f69d50cfcab1ffa12e56bdf476d9939 (patch) | |
tree | b7b79ef2705cb29f73763bce76d98b1a8ceb667d /net-libs | |
parent | d3ae3ea75073c53ed5f3a4418e76383436bb0f58 (diff) |
gentoo auto-resync : 21:07:2024 - 12:30:10
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/Manifest.gz | bin | 30997 -> 30994 bytes | |||
-rw-r--r-- | net-libs/webkit-gtk/Manifest | 5 | ||||
-rw-r--r-- | net-libs/webkit-gtk/files/2.44.2-excessive-cpu-usage.patch | 53 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-2.44.2-r410.ebuild | 257 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-2.44.2-r600.ebuild | 269 | ||||
-rw-r--r-- | net-libs/webkit-gtk/webkit-gtk-2.44.2.ebuild | 255 |
6 files changed, 839 insertions, 0 deletions
diff --git a/net-libs/Manifest.gz b/net-libs/Manifest.gz Binary files differindex f38008685b87..3c39b6d3d8d0 100644 --- a/net-libs/Manifest.gz +++ b/net-libs/Manifest.gz diff --git a/net-libs/webkit-gtk/Manifest b/net-libs/webkit-gtk/Manifest index ab38cb452a39..eab7bf6ac8f3 100644 --- a/net-libs/webkit-gtk/Manifest +++ b/net-libs/webkit-gtk/Manifest @@ -2,8 +2,13 @@ AUX 2.42.3-arm64-non-jumbo-fix-925621.patch 1025 BLAKE2B 6a9641b4c05b62c143b2be5 AUX 2.44.1-branch-patchset.patch 11288 BLAKE2B 0966d524063bc6137464eca431d161ac3b8ec0687f5cb2fa318d95734ceebd6bf9a4bef8db39b135f02a5e64ab453a9e74b3484db1411cf8ad85292d9d4cf034 SHA512 7f2420e49e085fecd630a62866ba2df0470e89f5bf92251436e9aca55200a158b96e866bf15bef283abf4b81d484d9747368fcd3ed2c58d0650aee1df9d9cd52 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 DIST webkitgtk-2.44.1.tar.xz 36280696 BLAKE2B a5fff4c4fe90bcd0ea098930e51a36ea60152da47fd06e78abbc10f146437838aa19fed15cf58732b538046e1f42d8461cd5c0e0859096506932c9fae150cc16 SHA512 b1752303f9ee38ef98c1e5c0cad001d389eaedbbf07d13fed8699104e6e311cb47a9bed7089868cb92c53d2777aaff441147353da13123d5c8eee4adf8709169 +DIST webkitgtk-2.44.2.tar.xz 36289060 BLAKE2B f92ba55adf7bfea165d9950ffbea6f848466be7c6a96b50e0c1c080964415b3e1b44f65c22fa8f64e907e6e7785bd86082452ce15c62ff52811ebc7b8d6b1071 SHA512 b7eb85c1695b7240285fd467443829c94b0c015fba9953a6e370d2195a3e3afab951bab279c922e7499ba7ca150949f3c1126b6100b30b08bef3338f84f08ac5 EBUILD webkit-gtk-2.44.1-r410.ebuild 8153 BLAKE2B 06c69a117128b5489925c4ee7d373d4152679155a30b83472e3c382be96fda4ec19322f3b73ce7a9524f5be61db71b6fe126876817777be22ba9844de84d2854 SHA512 1af3eabd3e18786bc027eb72168b03ccacec24daddfc9eeaf886d97bbf6ab29d7a5039e191d5ebf9fe156cc069ca9c57b09f58f3955f5b8905ffe2f1188ddb58 EBUILD webkit-gtk-2.44.1-r600.ebuild 8923 BLAKE2B 060e3e00a95a062cea4710d2d1e47cf77dae266aa978dd1883cfb37f07f835048494b18b936c3aa262fa8f4e5aa519559704bb657e0d6ceeb1afcd0b060c3b99 SHA512 35edaf1c7839d3f5f522ebc5e02c6d2f6f1fd57a6a963c120a62ecac8cefc21da5e027501acad4342aaa2d7b43f475ff39a92372ddbfa20c2899ce711cc93578 EBUILD webkit-gtk-2.44.1.ebuild 8001 BLAKE2B 1ecfff526fca6a304d9334a095f031a59d619645b5dcd6fdc8b2f9024af99e82e0a0fbd790b702894780fad3612971dad37257cd10dcd2ceb1ef75fb010723fc SHA512 9a08a2ff8248c40751d7ff5b6bee72d214ed86cbf7c6c00cac87b24d184dba07d618f329efd31026a2291ae9cb29393eb0f078f875b54dd381e2d061c5ff6df1 +EBUILD webkit-gtk-2.44.2-r410.ebuild 8125 BLAKE2B 1d2a1d4e29b1c433fadee219742305bf3fe2f03dca0df4c58dac3ec7272080db41da1dc44ab8fc5e67ac3dbe0a18e379ffb0b91f9f4946f1a8822fa1edefd44c SHA512 07b96ad0f5101a12ee959b91cd0150eba2c7fe1ab883802db44c2003a001e4e4fc34c7b4db7a09666c428490f53be2ad1397cedff0a74d35b4f68c0d5cb97674 +EBUILD webkit-gtk-2.44.2-r600.ebuild 8818 BLAKE2B 87dfee81987caabeb99c4a78f2d0238f05e3c8b32dd573b3213608a47b5e491d917147e905a89ec8e1915db60d4c4ac3ab2a9e02e94592587552c31ef1ccdb6a SHA512 1582a6c8ceedbfed31f39efb843e383683e149c7c8f6ddcf848663623d23bf0cb94c11701d65d63786d6b12336915091378d2b71b69388604af050ea8d433a31 +EBUILD webkit-gtk-2.44.2.ebuild 7973 BLAKE2B 662e808d05ec4a4f49678acdaa68be406d6c272058ee8c9a0dacc0ab8f1573b942b6f92e1c2356bb823c34179e98e64bd7c3df3a1bb127f8b8127d8b768fd133 SHA512 d5f9b2aea3e53c495286ca7200429fc95b844a8df4c63c75561529028575afb60f2ed50c5ea6f9bdccdb97f07ac4a18cc035d8237faaeb43e35f906d0668b4e8 MISC metadata.xml 615 BLAKE2B 5527ca0439e337193601d221df1b5f9b85c6f4ea0b0867fe8ac0548307672de45fe956fe61c0044b778644c8079271eba565854ab041ce45738dd98a9b3db39e SHA512 4681816de7821ede7c252e62a4cb29ee5c6e88f1799972a7325b40ed1998f9462835ca38c42dc65eeac4c0bcb0d672593af857fcf442cced865bdfdefe063eb1 diff --git a/net-libs/webkit-gtk/files/2.44.2-excessive-cpu-usage.patch b/net-libs/webkit-gtk/files/2.44.2-excessive-cpu-usage.patch new file mode 100644 index 000000000000..215e92e532c9 --- /dev/null +++ b/net-libs/webkit-gtk/files/2.44.2-excessive-cpu-usage.patch @@ -0,0 +1,53 @@ +From c6f625d1c91df9986d79a928b01399dce4beb1cc Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro <mcatanzaro@redhat.com> +Date: Sat, 18 May 2024 08:25:37 -0500 +Subject: [PATCH] Revert "Cherry-pick 276798@main (f91aeb92bd8e). + https://bugs.webkit.org/show_bug.cgi?id=260455" + +Unreviewed. This reverts commit 30ad9a720e6b12a6c958fcef0d7dd3f52da485bd. + +See: https://bugs.webkit.org/show_bug.cgi?id=274261 +Canonical link: https://commits.webkit.org/274313.257@webkitglib/2.44 +--- + ...e-muted-scroll-and-seek-crash-expected.txt | 4 -- + ...ia-source-muted-scroll-and-seek-crash.html | 65 ------------------- + .../gstreamer/MediaPlayerPrivateGStreamer.cpp | 14 +--- + 3 files changed, 3 insertions(+), 80 deletions(-) + delete mode 100644 LayoutTests/media/media-source/media-source-muted-scroll-and-seek-crash-expected.txt + delete mode 100644 LayoutTests/media/media-source/media-source-muted-scroll-and-seek-crash.html + +diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +index 7b28083fae71..a5fb5d679153 100644 +--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp ++++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +@@ -328,8 +328,8 @@ void MediaPlayerPrivateGStreamer::load(const String& urlString) + m_fillTimer.stop(); + + ASSERT(m_pipeline); +- setPlaybinURL(url); + setVisibleInViewport(player->isVisibleInViewport()); ++ setPlaybinURL(url); + + GST_DEBUG_OBJECT(pipeline(), "preload: %s", convertEnumerationToString(m_preload).utf8().data()); + if (m_preload == MediaPlayer::Preload::None && !isMediaSource()) { +@@ -4027,18 +4027,10 @@ void MediaPlayerPrivateGStreamer::setVisibleInViewport(bool isVisible) + if (!isVisible) { + GstState currentState; + gst_element_get_state(m_pipeline.get(), ¤tState, nullptr, 0); +- // WebKitMediaSrc cannot properly handle PAUSED -> READY -> PAUSED currently, so we have to avoid transitioning +- // back to READY when the player becomes visible. +- GstState minimumState = isMediaSource() ? GST_STATE_PAUSED : GST_STATE_READY; +- if (currentState >= minimumState) ++ if (currentState > GST_STATE_NULL) + m_invisiblePlayerState = currentState; + m_isVisibleInViewport = false; +- // Avoid setting the pipeline to PAUSED unless the playbin URL has already been set, +- // otherwise it will fail, and may leave the pipeline stuck on READY with PAUSE pending. +- if (!m_url.isValid()) +- return; +- [[maybe_unused]] auto setStateResult = gst_element_set_state(m_pipeline.get(), GST_STATE_PAUSED); +- ASSERT(setStateResult != GST_STATE_CHANGE_FAILURE); ++ gst_element_set_state(m_pipeline.get(), GST_STATE_PAUSED); + } else { + m_isVisibleInViewport = true; + if (m_invisiblePlayerState != GST_STATE_VOID_PENDING) diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.2-r410.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.2-r410.ebuild new file mode 100644 index 000000000000..ef91968ef052 --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.2-r410.ebuild @@ -0,0 +1,257 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_REQ_USE="xml(+)" +PYTHON_COMPAT=( python3_{10..12} ) +USE_RUBY="ruby31 ruby32 ruby33" + +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake + +MY_P="webkitgtk-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="https://www.webkitgtk.org" +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz" + +LICENSE="LGPL-2+ BSD" +SLOT="4.1/0" # soname version of libwebkit2gtk-4.1 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X" +REQUIRED_USE="|| ( aqua wayland X )" + +# Tests do not run when built from tarballs +# https://bugs.webkit.org/show_bug.cgi?id=215986 +RESTRICT="test" + +# Dependencies found at Source/cmake/OptionsGTK.cmake +# Missing WebRTC support, but ENABLE_WEB_RTC is experimental upstream +# media-libs/mesa dep is for libgbm +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE) +# TODO: gst-plugins-base[X] is only needed when build configuration ends up +# with GLX set, but that's a bit automagic too to fix +# Softblocking webkit-gtk-2.38:4 as at that time WebKitWebDriver migrated to SLOT=4.1; currently it is found in SLOT=6 +RDEPEND=" + >=x11-libs/cairo-1.16.0[X?] + >=media-libs/fontconfig-2.13.0:1.0 + >=media-libs/freetype-2.9.0:2 + >=dev-libs/libgcrypt-1.7.0:0= + dev-libs/libtasn1:= + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?] + >=media-libs/harfbuzz-1.4.2:=[icu(+)] + >=dev-libs/icu-61.2:= + media-libs/libjpeg-turbo:0= + >=media-libs/libepoxy-1.5.4[egl(+)] + >=net-libs/libsoup-3.0.8:3.0[introspection?] + >=dev-libs/libxml2-2.8.0:2 + >=media-libs/libpng-1.4:0= + dev-db/sqlite:3 + sys-libs/zlib:0 + media-libs/libwebp:= + >=app-accessibility/at-spi2-core-2.46.0:2 + + >=dev-libs/glib-2.70.0:2 + >=dev-libs/libxslt-1.1.7 + media-libs/woff2 + keyring? ( app-crypt/libsecret ) + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= ) + x11-libs/libdrm + media-libs/mesa + spell? ( >=app-text/enchant-0.22:2 ) + gstreamer? ( + >=media-libs/gstreamer-1.20:1.0 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?] + media-libs/gst-plugins-base:1.0[opengl] + >=media-plugins/gst-plugins-opus-1.20:1.0 + >=media-libs/gst-plugins-bad-1.20:1.0 + ) + + X? ( x11-libs/libX11 ) + + dev-libs/hyphen + jpegxl? ( >=media-libs/libjxl-0.7.0:= ) + avif? ( >=media-libs/libavif-0.9.0:= ) + lcms? ( media-libs/lcms:2 ) + + media-libs/libglvnd + wayland? ( + >=dev-libs/wayland-1.20 + >=dev-libs/wayland-protocols-1.24 + ) + + seccomp? ( + >=sys-apps/bubblewrap-0.3.1 + sys-libs/libseccomp + sys-apps/xdg-dbus-proxy + ) + + systemd? ( sys-apps/systemd:= ) + gamepad? ( >=dev-libs/libmanette-0.2.4 ) + !<net-libs/webkit-gtk-2.38:4 +" +DEPEND="${RDEPEND}" +# Need real bison, not yacc +BDEPEND=" + ${PYTHON_DEPS} + ${RUBY_DEPS} + >=app-accessibility/at-spi2-core-2.5.3 + dev-util/gdbus-codegen + dev-util/glib-utils + >=dev-util/gperf-3.0.1 + dev-util/unifdef + >=sys-devel/bison-2.4.3 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 ) + sys-devel/gettext + virtual/pkgconfig + + >=dev-lang/perl-5.10 + virtual/perl-Data-Dumper + virtual/perl-Carp + virtual/perl-JSON-PP + + wayland? ( dev-util/wayland-scanner ) +" + +S="${WORKDIR}/${MY_P}" + +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307 + +# We cannot use PATCHES because src_prepare() calls cmake_src_prepare and +# gnome2_src_prepare, and both apply ${PATCHES[@]} +PATCHES=() + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]] ; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + + if ! test-flag-CXX -std=c++17 ; then + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags" + fi + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then + check-reqs_pkg_setup + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + gnome2_src_prepare + + # 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}"/2.44.1-non-unified-build-fixes.patch + # https://bugs.webkit.org/show_bug.cgi?id=274261 + eapply "${FILESDIR}"/${PV}-excessive-cpu-usage.patch +} + +src_configure() { + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # ODR violations (bug #915230, https://bugs.webkit.org/show_bug.cgi?id=233007) + filter-lto + + # It does not compile on alpha without this in LDFLAGS + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 + use alpha && append-ldflags "-Wl,--no-relax" + + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 + use ia64 && append-ldflags "-Wl,--no-as-needed" + + # Sigbuses on SPARC with mcpu and co., bug #??? + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + # Try to use less memory, bug #469942 (see Fedora .spec for reference) + # --no-keep-memory doesn't work on ia64, bug #502492 + if ! use ia64; then + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory") + fi + + # Ruby situation is a bit complicated. See bug 513888 + local rubyimpl + local ruby_interpreter="" + local RUBY + for rubyimpl in ${USE_RUBY}; do + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}(-)]"; then + RUBY="$(type -P ${rubyimpl})" + ruby_interpreter="-DRUBY_EXECUTABLE=${RUBY}" + fi + done + # This will rarely occur. Only a couple of corner cases could lead us to + # that failure. See bug 513888 + [[ -z ${ruby_interpreter} ]] && die "No suitable ruby interpreter found" + # JavaScriptCore/Scripts/postprocess-asm invokes another Ruby script directly + # so it doesn't respect RUBY_EXECUTABLE, bug #771744. + sed -i -e "s:#!/usr/bin/env ruby:#!${RUBY}:" $(grep -rl "/usr/bin/env ruby" Source/JavaScriptCore || die) || die + + # TODO: Check Web Audio support + # should somehow let user select between them? + + local mycmakeargs=( + -DPython_EXECUTABLE="${PYTHON}" + ${ruby_interpreter} + # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy + -DPORT=GTK + # Source/cmake/WebKitFeatures.cmake + -DENABLE_API_TESTS=OFF + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) + -DENABLE_GAMEPAD=$(usex gamepad) + -DENABLE_MINIBROWSER=$(usex examples) + -DENABLE_PDFJS=$(usex pdf) + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service) + -DENABLE_SPELLCHECK=$(usex spell) + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build) + -DENABLE_VIDEO=$(usex gstreamer) + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer) + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer) + -DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147 + -DENABLE_WEBDRIVER=OFF # Disable WebDriver for webkit2gtk-4.1 and use the webkit2gtk-6.0 one + -DENABLE_WEBGL=ON + -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) + # Source/cmake/OptionsGTK.cmake + -DENABLE_DOCUMENTATION=OFF + -DENABLE_INTROSPECTION=$(usex introspection) + -DENABLE_JOURNALD_LOG=$(usex systemd) + -DENABLE_QUARTZ_TARGET=$(usex aqua) + -DENABLE_WAYLAND_TARGET=$(usex wayland) + -DENABLE_X11_TARGET=$(usex X) + -DUSE_GBM=ON + -DUSE_GTK4=OFF + -DUSE_JPEGXL=$(usex jpegxl) + -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON + -DUSE_LIBHYPHEN=ON + -DUSE_LIBSECRET=$(usex keyring) + -DUSE_SOUP2=OFF + -DUSE_WOFF2=ON + ) + + # https://bugs.gentoo.org/761238 + append-cppflags -DNDEBUG + + WK_USE_CCACHE=NO cmake_src_configure +} + +pkg_postinst() { + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue" + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta" + optfeature "VAAPI encoding support" "media-libs/gst-plugins-bad[vaapi]" + optfeature "MPEG-DASH support" "media-plugins/gst-plugins-dash" + optfeature "HTTP live streaming (HLS) support" "media-plugins/gst-plugins-hls" +} diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.2-r600.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.2-r600.ebuild new file mode 100644 index 000000000000..309e406ec616 --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.2-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 + + # 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}"/2.44.1-non-unified-build-fixes.patch + # https://bugs.webkit.org/show_bug.cgi?id=274261 + eapply "${FILESDIR}"/${PV}-excessive-cpu-usage.patch +} + +src_configure() { + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # ODR violations (bug #915230, https://bugs.webkit.org/show_bug.cgi?id=233007) + filter-lto + + # It does not compile on alpha without this in LDFLAGS + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 + use alpha && append-ldflags "-Wl,--no-relax" + + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 + use ia64 && append-ldflags "-Wl,--no-as-needed" + + # Sigbuses on SPARC with mcpu and co., bug #??? + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + # Try to use less memory, bug #469942 (see Fedora .spec for reference) + # --no-keep-memory doesn't work on ia64, bug #502492 + if ! use ia64; then + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory") + fi + + # Ruby situation is a bit complicated. See bug 513888 + local rubyimpl + local ruby_interpreter="" + local RUBY + for rubyimpl in ${USE_RUBY}; do + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}(-)]"; then + RUBY="$(type -P ${rubyimpl})" + ruby_interpreter="-DRUBY_EXECUTABLE=${RUBY}" + fi + done + # This will rarely occur. Only a couple of corner cases could lead us to + # that failure. See bug 513888 + [[ -z ${ruby_interpreter} ]] && die "No suitable ruby interpreter found" + # JavaScriptCore/Scripts/postprocess-asm invokes another Ruby script directly + # so it doesn't respect RUBY_EXECUTABLE, bug #771744. + sed -i -e "s:#!/usr/bin/env ruby:#!${RUBY}:" $(grep -rl "/usr/bin/env ruby" Source/JavaScriptCore || die) || die + + # TODO: Check Web Audio support + # should somehow let user select between them? + + local mycmakeargs=( + -DPython_EXECUTABLE="${PYTHON}" + ${ruby_interpreter} + # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy + -DPORT=GTK + # Source/cmake/WebKitFeatures.cmake + -DENABLE_API_TESTS=OFF + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) + -DENABLE_GAMEPAD=$(usex gamepad) + -DENABLE_MINIBROWSER=$(usex examples) + -DENABLE_PDFJS=$(usex pdf) + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service) + -DENABLE_SPELLCHECK=$(usex spell) + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build) + -DENABLE_VIDEO=$(usex gstreamer) + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer) + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer) + -DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147 + -DENABLE_WEBDRIVER=ON + -DENABLE_WEBGL=ON + -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) + # Source/cmake/OptionsGTK.cmake + -DENABLE_DOCUMENTATION=OFF + -DENABLE_INTROSPECTION=$(usex introspection) + -DENABLE_JOURNALD_LOG=$(usex systemd) + -DENABLE_QUARTZ_TARGET=$(usex aqua) + -DENABLE_WAYLAND_TARGET=$(usex wayland) + -DENABLE_X11_TARGET=$(usex X) + -DUSE_GBM=ON + -DUSE_GTK4=ON # webkit2gtk-6.0 + -DUSE_JPEGXL=$(usex jpegxl) + -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON + -DUSE_LIBHYPHEN=ON + -DUSE_LIBSECRET=$(usex keyring) + -DUSE_SOUP2=OFF + -DUSE_WOFF2=ON + ) + + # https://bugs.gentoo.org/761238 + append-cppflags -DNDEBUG + + WK_USE_CCACHE=NO cmake_src_configure +} + +src_install() { + cmake_src_install + + insinto /usr/share/gtk-doc/html + # This will install API docs specific to webkit2gtk-6.0 + doins -r "${S}"/Documentation/{jsc-glib,webkitgtk,webkitgtk-web-process-extension}-6.0 +} + +pkg_postinst() { + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue" + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta" + optfeature "VAAPI encoding support" "media-libs/gst-plugins-bad[vaapi]" + optfeature "MPEG-DASH support" "media-plugins/gst-plugins-dash" + optfeature "HTTP live streaming (HLS) support" "media-plugins/gst-plugins-hls" +} diff --git a/net-libs/webkit-gtk/webkit-gtk-2.44.2.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.44.2.ebuild new file mode 100644 index 000000000000..a2297929dbcd --- /dev/null +++ b/net-libs/webkit-gtk/webkit-gtk-2.44.2.ebuild @@ -0,0 +1,255 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_REQ_USE="xml(+)" +PYTHON_COMPAT=( python3_{10..12} ) +USE_RUBY="ruby31 ruby32 ruby33" + +inherit check-reqs flag-o-matic gnome2 optfeature python-any-r1 ruby-single toolchain-funcs cmake + +MY_P="webkitgtk-${PV}" +DESCRIPTION="Open source web browser engine" +HOMEPAGE="https://www.webkitgtk.org" +SRC_URI="https://www.webkitgtk.org/releases/${MY_P}.tar.xz" + +LICENSE="LGPL-2+ BSD" +SLOT="4/37" # soname version of libwebkit2gtk-4.0 +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE="aqua avif examples gamepad keyring +gstreamer +introspection pdf jpegxl +jumbo-build lcms seccomp spell systemd wayland X" +REQUIRED_USE="|| ( aqua wayland X )" + +# Tests do not run when built from tarballs +# https://bugs.webkit.org/show_bug.cgi?id=215986 +RESTRICT="test" + +# Dependencies found at Source/cmake/OptionsGTK.cmake +# Missing WebRTC support, but ENABLE_WEB_RTC is experimental upstream +# media-libs/mesa dep is for libgbm +# >=gst-plugins-opus-1.14.4-r1 for opusparse (required by MSE) +# TODO: gst-plugins-base[X] is only needed when build configuration ends up +# with GLX set, but that's a bit automagic too to fix +RDEPEND=" + >=x11-libs/cairo-1.16.0[X?] + >=media-libs/fontconfig-2.13.0:1.0 + >=media-libs/freetype-2.9.0:2 + >=dev-libs/libgcrypt-1.7.0:0= + dev-libs/libtasn1:= + >=x11-libs/gtk+-3.22.0:3[aqua?,introspection?,wayland?,X?] + >=media-libs/harfbuzz-1.4.2:=[icu(+)] + >=dev-libs/icu-61.2:= + media-libs/libjpeg-turbo:0= + >=media-libs/libepoxy-1.5.4[egl(+)] + >=net-libs/libsoup-2.54:2.4[introspection?] + >=dev-libs/libxml2-2.8.0:2 + >=media-libs/libpng-1.4:0= + dev-db/sqlite:3 + sys-libs/zlib:0 + media-libs/libwebp:= + >=app-accessibility/at-spi2-core-2.46.0:2 + + >=dev-libs/glib-2.70.0:2 + >=dev-libs/libxslt-1.1.7 + media-libs/woff2 + keyring? ( app-crypt/libsecret ) + introspection? ( >=dev-libs/gobject-introspection-1.59.1:= ) + x11-libs/libdrm + media-libs/mesa + spell? ( >=app-text/enchant-0.22:2 ) + gstreamer? ( + >=media-libs/gstreamer-1.20:1.0 + >=media-libs/gst-plugins-base-1.20:1.0[egl,X?] + media-libs/gst-plugins-base:1.0[opengl] + >=media-plugins/gst-plugins-opus-1.20:1.0 + >=media-libs/gst-plugins-bad-1.20:1.0 + ) + + X? ( x11-libs/libX11 ) + + dev-libs/hyphen + jpegxl? ( >=media-libs/libjxl-0.7.0:= ) + avif? ( >=media-libs/libavif-0.9.0:= ) + lcms? ( media-libs/lcms:2 ) + + media-libs/libglvnd + wayland? ( + >=dev-libs/wayland-1.20 + >=dev-libs/wayland-protocols-1.24 + ) + + seccomp? ( + >=sys-apps/bubblewrap-0.3.1 + sys-libs/libseccomp + sys-apps/xdg-dbus-proxy + ) + + systemd? ( sys-apps/systemd:= ) + gamepad? ( >=dev-libs/libmanette-0.2.4 ) +" +DEPEND="${RDEPEND}" +# Need real bison, not yacc +BDEPEND=" + ${PYTHON_DEPS} + ${RUBY_DEPS} + >=app-accessibility/at-spi2-core-2.5.3 + dev-util/gdbus-codegen + dev-util/glib-utils + >=dev-util/gperf-3.0.1 + dev-util/unifdef + >=sys-devel/bison-2.4.3 + || ( >=sys-devel/gcc-7.3 >=sys-devel/clang-5 ) + sys-devel/gettext + virtual/pkgconfig + + >=dev-lang/perl-5.10 + virtual/perl-Data-Dumper + virtual/perl-Carp + virtual/perl-JSON-PP + + wayland? ( dev-util/wayland-scanner ) +" + +S="${WORKDIR}/${MY_P}" + +CHECKREQS_DISK_BUILD="18G" # and even this might not be enough, bug #417307 + +# We cannot use PATCHES because src_prepare() calls cmake_src_prepare and +# gnome2_src_prepare, and both apply ${PATCHES[@]} +PATCHES=() + +pkg_pretend() { + if [[ ${MERGE_TYPE} != "binary" ]] ; then + if is-flagq "-g*" && ! is-flagq "-g*0" ; then + einfo "Checking for sufficient disk space to build ${PN} with debugging CFLAGS" + check-reqs_pkg_pretend + fi + + if ! test-flag-CXX -std=c++17 ; then + die "You need at least GCC 7.3.x or Clang >= 5 for C++17-specific compiler flags" + fi + fi +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != "binary" ]] && is-flagq "-g*" && ! is-flagq "-g*0" ; then + check-reqs_pkg_setup + fi + + python-any-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + gnome2_src_prepare + + # 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}"/2.44.1-non-unified-build-fixes.patch + # https://bugs.webkit.org/show_bug.cgi?id=274261 + eapply "${FILESDIR}"/${PV}-excessive-cpu-usage.patch +} + +src_configure() { + # Respect CC, otherwise fails on prefix #395875 + tc-export CC + + # ODR violations (bug #915230, https://bugs.webkit.org/show_bug.cgi?id=233007) + filter-lto + + # It does not compile on alpha without this in LDFLAGS + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648761 + use alpha && append-ldflags "-Wl,--no-relax" + + # ld segfaults on ia64 with LDFLAGS --as-needed, bug #555504 + use ia64 && append-ldflags "-Wl,--no-as-needed" + + # Sigbuses on SPARC with mcpu and co., bug #??? + use sparc && filter-flags "-mvis" + + # https://bugs.webkit.org/show_bug.cgi?id=42070 , #301634 + use ppc64 && append-flags "-mminimal-toc" + + # Try to use less memory, bug #469942 (see Fedora .spec for reference) + # --no-keep-memory doesn't work on ia64, bug #502492 + if ! use ia64; then + append-ldflags $(test-flags-CCLD "-Wl,--no-keep-memory") + fi + + # Ruby situation is a bit complicated. See bug 513888 + local rubyimpl + local ruby_interpreter="" + local RUBY + for rubyimpl in ${USE_RUBY}; do + if has_version -b "virtual/rubygems[ruby_targets_${rubyimpl}(-)]"; then + RUBY="$(type -P ${rubyimpl})" + ruby_interpreter="-DRUBY_EXECUTABLE=${RUBY}" + fi + done + # This will rarely occur. Only a couple of corner cases could lead us to + # that failure. See bug 513888 + [[ -z ${ruby_interpreter} ]] && die "No suitable ruby interpreter found" + # JavaScriptCore/Scripts/postprocess-asm invokes another Ruby script directly + # so it doesn't respect RUBY_EXECUTABLE, bug #771744. + sed -i -e "s:#!/usr/bin/env ruby:#!${RUBY}:" $(grep -rl "/usr/bin/env ruby" Source/JavaScriptCore || die) || die + + # TODO: Check Web Audio support + # should somehow let user select between them? + + local mycmakeargs=( + -DPython_EXECUTABLE="${PYTHON}" + ${ruby_interpreter} + # If bubblewrap[suid] then portage makes it go-r and cmake find_program fails with that + -DBWRAP_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/bwrap + -DDBUS_PROXY_EXECUTABLE:FILEPATH="${EPREFIX}"/usr/bin/xdg-dbus-proxy + -DPORT=GTK + # Source/cmake/WebKitFeatures.cmake + -DENABLE_API_TESTS=OFF + -DENABLE_BUBBLEWRAP_SANDBOX=$(usex seccomp) + -DENABLE_GAMEPAD=$(usex gamepad) + -DENABLE_MINIBROWSER=$(usex examples) + -DENABLE_PDFJS=$(usex pdf) + -DENABLE_GEOLOCATION=ON # Runtime optional (talks over dbus service) + -DENABLE_SPELLCHECK=$(usex spell) + -DENABLE_UNIFIED_BUILDS=$(usex jumbo-build) + -DENABLE_VIDEO=$(usex gstreamer) + -DUSE_GSTREAMER_WEBRTC=$(usex gstreamer) + -DUSE_GSTREAMER_TRANSCODER=$(usex gstreamer) + -DENABLE_WEB_CODECS=$(usex gstreamer) # https://bugs.webkit.org/show_bug.cgi?id=269147 + -DENABLE_WEBDRIVER=OFF # Disable WebDriver for webkit2gtk-4.1 and use the webkit2gtk-6.0 one + -DENABLE_WEBGL=ON + -DENABLE_WEB_AUDIO=$(usex gstreamer) + -DUSE_AVIF=$(usex avif) + # Source/cmake/OptionsGTK.cmake + -DENABLE_DOCUMENTATION=OFF + -DENABLE_INTROSPECTION=$(usex introspection) + -DENABLE_JOURNALD_LOG=$(usex systemd) + -DENABLE_QUARTZ_TARGET=$(usex aqua) + -DENABLE_WAYLAND_TARGET=$(usex wayland) + -DENABLE_X11_TARGET=$(usex X) + -DUSE_GBM=ON + -DUSE_GTK4=OFF + -DUSE_JPEGXL=$(usex jpegxl) + -DUSE_LCMS=$(usex lcms) + -DUSE_LIBBACKTRACE=OFF + -DUSE_LIBDRM=ON + -DUSE_LIBHYPHEN=ON + -DUSE_LIBSECRET=$(usex keyring) + -DUSE_SOUP2=ON + -DUSE_WOFF2=ON + ) + + # https://bugs.gentoo.org/761238 + append-cppflags -DNDEBUG + + WK_USE_CCACHE=NO cmake_src_configure +} + +pkg_postinst() { + optfeature "geolocation service (used at runtime if available)" "app-misc/geoclue" + optfeature "Common Multimedia codecs" "media-plugins/gst-plugins-meta" + optfeature "VAAPI encoding support" "media-libs/gst-plugins-bad[vaapi]" + optfeature "MPEG-DASH support" "media-plugins/gst-plugins-dash" + optfeature "HTTP live streaming (HLS) support" "media-plugins/gst-plugins-hls" +} |