aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-25 09:19:30 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-04-14 15:11:37 -0400
commitde97f3fad9d8942cca3131b02f323da01378e7c9 (patch)
tree2b56a03811dca67f2d5a656e119af545b33f1000
parent0a6e9b54548ea27d5a2c63356720eca6e0d2c461 (diff)
downloadguix-de97f3fad9d8942cca3131b02f323da01378e7c9.tar
guix-de97f3fad9d8942cca3131b02f323da01378e7c9.tar.gz
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.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/webkitgtk-libelogind.patch38
-rw-r--r--gnu/packages/webkit.scm62
3 files changed, 71 insertions, 30 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 1231d37234..e9c8ddf6a3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2005,6 +2005,7 @@ dist_patch_DATA = \
%D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \
%D%/packages/patches/wdl-link-libs-and-fix-jnetlib.patch \
%D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \
+ %D%/packages/patches/webkitgtk-libelogind.patch \
%D%/packages/patches/webrtc-audio-processing-big-endian.patch \
%D%/packages/patches/webrtc-for-telegram-desktop-fix-gcc12-cstdint.patch \
%D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \
diff --git a/gnu/packages/patches/webkitgtk-libelogind.patch b/gnu/packages/patches/webkitgtk-libelogind.patch
new file mode 100644
index 0000000000..fa1fbc8783
--- /dev/null
+++ b/gnu/packages/patches/webkitgtk-libelogind.patch
@@ -0,0 +1,38 @@
+From 8d46803c09edc2b6d4e35c778a3d2f90e5baad0b Mon Sep 17 00:00:00 2001
+From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
+Date: Sat, 25 Mar 2023 22:55:16 -0400
+Subject: [PATCH] Fallback to elogind when systemd is unavailable at build time
+ https://bugs.webkit.org/show_bug.cgi?id=254475
+
+Reviewed by NOBODY (OOPS!).
+
+The build system supports elogind, but it only considers the
+'libsystemd' library name for the pkg-config lookup and not
+'libelogind'. This change makes the build system fallback to search
+for libelogind when libsystemd was not found.
+
+* Source/cmake/FindJournald.cmake [!PC_SYSTEMD_FOUND]: Search for libelogind.
+---
+ Source/cmake/FindJournald.cmake | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Source/cmake/FindJournald.cmake b/Source/cmake/FindJournald.cmake
+index 18dd6b50908c..e0dc9ce1d397 100644
+--- a/Source/cmake/FindJournald.cmake
++++ b/Source/cmake/FindJournald.cmake
+@@ -55,6 +55,10 @@ find_package(PkgConfig QUIET)
+
+ # libelogind provides compatible pc and header files
+ pkg_check_modules(PC_SYSTEMD QUIET libsystemd)
++if (NOT PC_SYSTEMD_FOUND)
++ pkg_check_modules(PC_SYSTEMD QUIET libelogind)
++endif ()
++
+ set(Journald_COMPILE_OPTIONS ${PC_SYSTEMD_CFLAGS_OTHER})
+ set(Journald_VERSION ${PC_SYSTEMD_VERSION})
+
+
+base-commit: 43ea8744bc6065aad7ae5988e32d31d253905e5f
+--
+2.39.2
+
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 <me@tobias.gr>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
@@ -36,6 +36,7 @@
#: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 @@ the WPE-flavored port of WebKit.")
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 @@ engine that uses Wayland for graphics output.")
;; 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 @@ engine that uses Wayland for graphics output.")
(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 @@ engine that uses Wayland for graphics output.")
pkg-config
python-wrapper
gi-docgen
- ruby))
+ ruby
+ unifdef))
(propagated-inputs
(list gtk+ libsoup))
(inputs
@@ -233,11 +235,11 @@ engine that uses Wayland for graphics output.")
geoclue
gst-plugins-base
gst-plugins-bad-minimal
- gtk+-2
harfbuzz
hyphen
icu4c
lcms
+ libavif
libgcrypt
libgudev
libjpeg-turbo
@@ -290,7 +292,7 @@ propagated by default) such as @code{gst-plugins-good} and
(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 @@ propagated by default) such as @code{gst-plugins-good} and
(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)