From 30f0fd2176f966a7dbce9b78e089d252b14dbdba Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 25 Mar 2023 09:19:30 -0400 Subject: gnu: webkitgtk: Update to 2.40.0. The version is re-integrated with the package to allow 'guix refresh -l' to work. * gnu/packages/patches/webkitgtk-libelogind.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/webkit.scm (%webkit-version): Delete variable. (webkitgtk): Update to 2.40.0. Apply new patch. [arguments]: Add a CMAKE_CXX_FLAGS configure flag. Delete help-cmake-find-elogind phase. [native-inputs]: Add unifdef. [inputs]: Remove gtk+-2. Add libavif. (wpewebkit): Update to 2.40.0. (webkitgtk-next) [inputs]: Remove now extraneous gtk+-2 deletion. --- gnu/packages/webkit.scm | 62 +++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 30 deletions(-) (limited to 'gnu/packages/webkit.scm') diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index 0a51479985..e5eafcb142 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2019 Marius Bakke -;;; Copyright © 2021, 2022 Maxim Cournoyer +;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer ;;; Copyright © 2022, 2023 Efraim Flashner ;;; ;;; This file is part of GNU Guix. @@ -36,6 +36,7 @@ (define-module (gnu packages webkit) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bison) + #:use-module (gnu packages c) #:use-module (gnu packages compression) #:use-module (gnu packages docbook) #:use-module (gnu packages enchant) @@ -123,20 +124,19 @@ (define-public wpebackend-fdo engine that uses Wayland for graphics output.") (license license:bsd-2))) -(define %webkit-version "2.38.5") - (define-public webkitgtk (package (name "webkitgtk") ; webkit2gtk4 - (version %webkit-version) + (version "2.40.0") (source (origin (method url-fetch) (uri (string-append "https://www.webkitgtk.org/releases/" name "-" version ".tar.xz")) (sha256 - (base32 "19y1n05mp370mq4bp2bk0pm3wk49z9a10azjjdcdyx12091hrhj0")) + (base32 "14xkgamqlshxqw6fcslvw0yzj4y5mvx66b6bn64rwrl9pyhpwq54")) (patches (search-patches - "webkitgtk-adjust-bubblewrap-paths.patch")))) + "webkitgtk-adjust-bubblewrap-paths.patch" + "webkitgtk-libelogind.patch")))) (build-system cmake-build-system) (outputs '("out" "doc" "debug")) (arguments @@ -148,18 +148,26 @@ (define-public webkitgtk ;; binaries require 20 GiB of memory to link (even with ld.gold or lld) ;; and produce 4.6 GiB of debug symbols. #:build-type "Release" - #:configure-flags #~(list - "-DPORT=GTK" - ;; GTKDOC will be removed upstream soon in favor of - ;; gi-docgen; it is normally disabled because the - ;; doc is rather expensive to build. - "-DENABLE_GTKDOC=ON" - ;; The minibrowser, not built by default, is a good - ;; tool to validate the good operation of - ;; webkitgtk. - "-DENABLE_MINIBROWSER=ON" - ;; The default lib installation prefix is lib64. - (string-append "-DLIB_INSTALL_DIR=" #$output "/lib")) + #:configure-flags + #~(list "-DPORT=GTK" + ;; GTKDOC will be removed upstream soon in favor of + ;; gi-docgen; it is normally disabled because the + ;; doc is rather expensive to build. + "-DENABLE_GTKDOC=ON" + ;; The minibrowser, not built by default, is a good + ;; tool to validate the good operation of + ;; webkitgtk. + "-DENABLE_MINIBROWSER=ON" + ;; The default lib installation prefix is lib64. + (string-append "-DLIB_INSTALL_DIR=" #$output "/lib") + ;; XXX: WebKitGTK makes use of elogind's systemd-compatible + ;; headers, which are under the include/elogind prefix. The WTF + ;; component doesn't propagate the Journald header correctly + ;; detected (stubs from elogind), hence the following hack (see: + ;; https://bugs.webkit.org/show_bug.cgi?id=254495). + (string-append "-DCMAKE_CXX_FLAGS=-I" + (search-input-directory + %build-inputs "include/elogind"))) ;; The build may fail with -j1 (see: ;; https://bugs.webkit.org/show_bug.cgi?id=195251). #:make-flags #~(list "-j" (number->string (max 2 (parallel-job-count)))) @@ -186,13 +194,6 @@ (define-public webkitgtk (substitute* "Source/cmake/OptionsCommon.cmake" (("if \\(LD_SUPPORTS_DISABLE_NEW_DTAGS\\)") "if (FALSE)")))) - (add-after 'unpack 'help-cmake-find-elogind - (lambda _ - (substitute* "Source/cmake/FindJournald.cmake" - ;; Otherwise, CMake would throw an error because it relies on - ;; the pkg-config search to locate headers. - (("pkg_check_modules\\(PC_SYSTEMD QUIET libsystemd") - "pkg_check_modules(PC_SYSTEMD QUIET libelogind")))) (add-after 'unpack 'embed-absolute-wpebackend-reference (lambda* (#:key inputs #:allow-other-keys) (let ((wpebackend-fdo (assoc-ref inputs "wpebackend-fdo"))) @@ -222,7 +223,8 @@ (define-public webkitgtk pkg-config python-wrapper gi-docgen - ruby)) + ruby + unifdef)) (propagated-inputs (list gtk+ libsoup)) (inputs @@ -233,11 +235,11 @@ (define-public webkitgtk geoclue gst-plugins-base gst-plugins-bad-minimal - gtk+-2 harfbuzz hyphen icu4c lcms + libavif libgcrypt libgudev libjpeg-turbo @@ -290,7 +292,7 @@ (define-public webkitgtk-next (replace "gtk+" gtk))) (inputs (modify-inputs (package-inputs webkitgtk) - (delete "gtk+-2" "libnotify") + (delete "libnotify") (append pango-next))))) ;TODO: remove after it's the default ;;; Required by e.g. emacs-next-pgtk, emacs-xwidgets, and some other GNOME @@ -310,13 +312,13 @@ (define-public wpewebkit (package (inherit webkitgtk) (name "wpewebkit") - (version %webkit-version) + (version "2.40.0") (source (origin (inherit (package-source webkitgtk)) (uri (string-append "https://wpewebkit.org/releases/" name "-" version ".tar.xz")) (sha256 - (base32 "0q8nmk9l6bqv2bhljm9wv7mvgdl393z7v2m7a0c5avac18yzs07z")))) + (base32 "1dl663nbm011sx099x9gdhk3aj119yn5rxp77jmnhdv1l77jpv58")))) (arguments (substitute-keyword-arguments (package-arguments webkitgtk) ((#:configure-flags flags) -- cgit v1.2.3