From 21c06e3507bee5f0917bb1942df0793875dbb31f Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Mon, 14 Aug 2023 18:33:15 +0800 Subject: [PATCH] =?UTF-8?q?webkitgtk:=202.40.5=20=E2=86=92=202.42.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/WebKit/WebKit/commits/webkitgtk-2.42.1/Source/cmake/OptionsGTK.cmake https://webkitgtk.org/security/WSA-2023-0009.html JPEG XL is enabled by default. Remove support for OpenGL API in the web process; Remove GLX support: https://github.com/WebKit/WebKit/commit/cfe917fec45bf72c371087ece034feee8454f1b4 https://github.com/WebKit/WebKit/commit/320560f9e53ddcd53954059bd005e0c75eb91abf Other than ENABLE_GLES2 option can be dropped, it is unclear to me what can actually be dropped so keeping everything around. I assume we keep libGL mainly for egl. But we don't really need to worry about https://bugzilla.redhat.com/show_bug.cgi?id=2240428 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050777 here, we are applying libgl-path.patch to libepoxy which should load the libGLESv2 thing in a hardcoded path. Tested yelp, newsflash and the bundled minibrowser and does not experience crash so far. Dropped pcre as mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=2212686. --- pkgs/development/libraries/webkitgtk/default.nix | 11 ++++------- .../libraries/webkitgtk/fdo-backend-path.patch | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 57168b2cc17..1db2f4ce6d8 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -27,6 +27,7 @@ , libxkbcommon , libavif , libepoxy +, libjxl , at-spi2-core , libxml2 , libsoup @@ -34,7 +35,6 @@ , libxslt , harfbuzz , libpthreadstubs -, pcre , nettle , libtasn1 , p11-kit @@ -51,7 +51,6 @@ , openjpeg , geoclue2 , sqlite -, enableGLES ? true , gst-plugins-base , gst-plugins-bad , woff2 @@ -71,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "webkitgtk"; - version = "2.40.5"; + version = "2.42.1"; name = "${finalAttrs.pname}-${finalAttrs.version}+abi=${if lib.versionAtLeast gtk3.version "4.0" then "6.0" else "4.${if lib.versions.major libsoup.version == "2" then "0" else "1"}"}"; outputs = [ "out" "dev" "devdoc" ]; @@ -82,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz"; - hash = "sha256-feBRomNmhiHZGmGl6xw3cdGnzskABD1K/vBsMmwWA38="; + hash = "sha256-b0H6yZidPuUcCMSN4dQ5ze3ey8dX40thgJh9mbFtJJk="; }; patches = lib.optionals stdenv.isLinux [ @@ -132,6 +131,7 @@ stdenv.mkDerivation (finalAttrs: { enchant2 libavif libepoxy + libjxl gnutls gst-plugins-bad gst-plugins-base @@ -153,7 +153,6 @@ stdenv.mkDerivation (finalAttrs: { nettle openjpeg p11-kit - pcre sqlite woff2 ] ++ (with xorg; [ @@ -219,8 +218,6 @@ stdenv.mkDerivation (finalAttrs: { "-DUSE_GTK4=ON" ] ++ lib.optionals (!systemdSupport) [ "-DENABLE_JOURNALD_LOG=OFF" - ] ++ lib.optionals (stdenv.isLinux && enableGLES) [ - "-DENABLE_GLES2=ON" ]; postPatch = '' diff --git a/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch b/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch index f46c0fe8a15..48e7d9cca74 100644 --- a/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch +++ b/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch @@ -3,7 +3,7 @@ @@ -84,7 +84,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process #if PLATFORM(WAYLAND) - if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) { + if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland && parameters.dmaBufRendererBufferMode.isEmpty()) { - wpe_loader_init("libWPEBackend-fdo-1.0.so.1"); + wpe_loader_init("@wpebackend_fdo@/lib/libWPEBackend-fdo-1.0.so.1"); if (AcceleratedBackingStoreWayland::checkRequirements()) {