From ee55ba505ddb82bb28a7e1c6ea17104bc3eeaabe Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 25 Feb 2023 19:40:03 +0800 Subject: [PATCH] =?UTF-8?q?webkitgtk:=202.38.5=20=E2=86=92=202.39.90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://webkitgtk.org/2022/11/11/webkitgtk2.39.1-released.html https://webkitgtk.org/2022/11/28/webkitgtk2.39.2-released.html https://webkitgtk.org/2022/12/14/webkitgtk2.39.3-released.html https://webkitgtk.org/2023/01/16/webkitgtk2.39.4-released.html https://webkitgtk.org/2023/01/19/webkitgtk2.39.5-released.html https://webkitgtk.org/2023/01/30/webkitgtk2.39.6-released.html https://webkitgtk.org/2023/01/31/webkitgtk2.39.7-released.html https://webkitgtk.org/2023/02/20/webkitgtk2.39.90-released.html Changelog-Reviewed-By: Jan Tojnar --- .../libraries/webkitgtk/default.nix | 28 +++++++++++++++---- .../webkitgtk/fdo-backend-path.patch | 6 ++-- .../webkitgtk/libglvnd-headers.patch | 12 -------- 3 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 pkgs/development/libraries/webkitgtk/libglvnd-headers.patch diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index 73073a6b7117..4ab35fc9d4ba 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -2,6 +2,7 @@ , stdenv , runCommand , fetchurl +, fetchpatch , perl , python3 , ruby @@ -25,6 +26,7 @@ , enchant2 , xorg , libxkbcommon +, libavif , libepoxy , at-spi2-core , libxml2 @@ -60,6 +62,7 @@ , xdg-dbus-proxy , substituteAll , glib +, unifdef , addOpenGLRunpath , enableGeoLocation ? true , withLibsecret ? true @@ -69,8 +72,8 @@ stdenv.mkDerivation (finalAttrs: { pname = "webkitgtk"; - version = "2.38.5"; - name = "${finalAttrs.pname}-${finalAttrs.version}+abi=${if lib.versionAtLeast gtk3.version "4.0" then "5.0" else "4.${if lib.versions.major libsoup.version == "2" then "0" else "1"}"}"; + version = "2.39.90"; + 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" ]; @@ -80,7 +83,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz"; - hash = "sha256-QMIMQwIidN9Yk/IrEFT6iUw+6gVzibsIruCMWwuwwac="; + hash = "sha256-gnWGbDUppxXCPK442/Lt0xDYGIVGpHxaL3CdGT96X8A="; }; patches = lib.optionals stdenv.isLinux [ @@ -90,14 +93,27 @@ stdenv.mkDerivation (finalAttrs: { inherit (addOpenGLRunpath) driverLink; }) - ./libglvnd-headers.patch - # Hardcode path to WPE backend # https://github.com/NixOS/nixpkgs/issues/110468 (substituteAll { src = ./fdo-backend-path.patch; wpebackend_fdo = libwpe-fdo; }) + + # Various build fixes for 2.39.90, should be part of final release + # https://github.com/NixOS/nixpkgs/pull/218143#issuecomment-1445126808 + (fetchpatch { + url = "https://github.com/WebKit/WebKit/commit/5f8dc9d4cc01a31e53670acdcf7a9c4ea4626f58.patch"; + hash = "sha256-dTok1QK93Fp8RFED4wgbVdLErUnmIB4Xsm/VPutmQuw="; + }) + (fetchpatch { + url = "https://github.com/WebKit/WebKit/commit/f51987a0f316621a0ab324696c9a576bbaf1e686.patch"; + hash = "sha256-TZVrrH4+JS2I/ist7MdMLsuk9X/Nyx62AcODvzGkdx8="; + }) + (fetchpatch { + url = "https://github.com/WebKit/WebKit/commit/fe4fdc28cd214d36425d861791d05d1afaee60f5.patch"; + hash = "sha256-p1LNyvc6kGRhptov6AKVl2Rc+rrRnzHEtpF/AhqbA+E="; + }) ]; preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' @@ -122,6 +138,7 @@ stdenv.mkDerivation (finalAttrs: { ruby gi-docgen glib # for gdbus-codegen + unifdef ] ++ lib.optionals stdenv.isLinux [ wayland # for wayland-scanner ]; @@ -129,6 +146,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ at-spi2-core enchant2 + libavif libepoxy gnutls gst-plugins-bad diff --git a/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch b/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch index 9ddef67f1c1d..f46c0fe8a15c 100644 --- a/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch +++ b/pkgs/development/libraries/webkitgtk/fdo-backend-path.patch @@ -1,11 +1,11 @@ --- a/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp +++ b/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp -@@ -89,7 +89,7 @@ +@@ -84,7 +84,7 @@ void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process + #if PLATFORM(WAYLAND) if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) { - #if USE(WPE_RENDERER) - wpe_loader_init("libWPEBackend-fdo-1.0.so.1"); + wpe_loader_init("@wpebackend_fdo@/lib/libWPEBackend-fdo-1.0.so.1"); if (AcceleratedBackingStoreWayland::checkRequirements()) { - parameters.hostClientFileDescriptor = IPC::Attachment(UnixFileDescriptor(wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt)); + parameters.hostClientFileDescriptor = UnixFileDescriptor { wpe_renderer_host_create_client(), UnixFileDescriptor::Adopt }; parameters.implementationLibraryName = FileSystem::fileSystemRepresentation(String::fromLatin1(wpe_loader_get_loaded_implementation_library_name())); diff --git a/pkgs/development/libraries/webkitgtk/libglvnd-headers.patch b/pkgs/development/libraries/webkitgtk/libglvnd-headers.patch deleted file mode 100644 index 8d7f2477b55a..000000000000 --- a/pkgs/development/libraries/webkitgtk/libglvnd-headers.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp b/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp -index 8d848ce4..46d42c11 100644 ---- a/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp -+++ b/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp -@@ -31,6 +31,7 @@ - #include "WebKitWaylandServerProtocol.h" - #include - #include -+#include - #include - #include - #include