summaryrefslogtreecommitdiff
path: root/gnu/packages/webkit.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <[email protected]>2022-01-25 22:07:13 -0500
committerMaxim Cournoyer <[email protected]>2022-01-25 22:07:13 -0500
commit1a5302435ff0d2822b823f5a6fe01faa7a85c629 (patch)
treeac7810c88b560532f22d2bab2e59609cd7305c21 /gnu/packages/webkit.scm
parent3ff2ac4980dacf10087e4b42bd9fbc490591900c (diff)
parent070b8a893febd6e7d8b2b7c8c4dcebacf7845aa9 (diff)
Merge branch 'master' into staging.
With "conflicts" solved (all in favor of master except git) in: gnu/local.mk gnu/packages/databases.scm gnu/packages/glib.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/gnuzilla.scm gnu/packages/graphics.scm gnu/packages/gstreamer.scm gnu/packages/gtk.scm gnu/packages/linux.scm gnu/packages/machine-learning.scm gnu/packages/networking.scm gnu/packages/polkit.scm gnu/packages/pulseaudio.scm gnu/packages/rpc.scm gnu/packages/rust.scm gnu/packages/version-control.scm gnu/packages/w3m.scm
Diffstat (limited to 'gnu/packages/webkit.scm')
-rw-r--r--gnu/packages/webkit.scm79
1 files changed, 46 insertions, 33 deletions
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index dab8af2ab8..6a101331bd 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -2,10 +2,11 @@
;;; Copyright © 2015 Sou Bunnbu <[email protected]>
;;; Copyright © 2015 David Hashe <[email protected]>
;;; Copyright © 2015 Ricardo Wurmus <[email protected]>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <[email protected]>
+;;; Copyright © 2015–2021 Mark H Weaver <[email protected]>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <[email protected]>
;;; Copyright © 2018 Pierre Neidhardt <[email protected]>
;;; Copyright © 2019 Marius Bakke <[email protected]>
+;;; Copyright © 2021 Maxim Cournoyer <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
@@ -40,6 +42,7 @@
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
@@ -51,6 +54,7 @@
#:use-module (gnu packages image)
#:use-module (gnu packages libreoffice)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages llvm)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -82,9 +86,9 @@
`(("pkg-config" ,pkg-config)
("python" ,python-wrapper)))
(inputs
- `(("mesa" ,mesa)))
+ (list mesa))
(propagated-inputs
- `(("libxkbcommon" ,libxkbcommon)))
+ (list libxkbcommon))
(synopsis "General-purpose library for WPE")
(description "LibWPE is general-purpose library specifically developed for
the WPE-flavored port of WebKit.")
@@ -106,12 +110,9 @@ the WPE-flavored port of WebKit.")
(arguments
`(#:tests? #f)) ;no tests
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ (list pkg-config))
(inputs
- `(("glib" ,glib)
- ("libwpe" ,libwpe)
- ("mesa" ,mesa)
- ("wayland" ,wayland)))
+ (list glib libwpe mesa wayland))
(home-page "https://wpewebkit.org/")
(synopsis "Wayland WPE backend")
(description
@@ -226,20 +227,20 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(define-public webkitgtk
(package
(name "webkitgtk")
- (version "2.32.4")
+ (version "2.34.4")
(source (origin
(method url-fetch)
(uri (string-append "https://www.webkitgtk.org/releases/"
"webkitgtk-" version ".tar.xz"))
(sha256
(base32
- "1zfkfyhm4i7901pp32wcwcfxax69qgq5k44x0glwaywdg4zjvkh0"))
+ "01m4mfqxqkcx72kps46hpkir92x105ggfp43j68nk9wv34cm0pwp"))
(patches (search-patches "webkitgtk-share-store.patch"
"webkitgtk-bind-all-fonts.patch"))))
(build-system cmake-build-system)
- (outputs '("out" "doc"))
+ (outputs '("out" "doc" "debug"))
(arguments
- '(#:tests? #f ; no tests
+ `(#:tests? #f ; no tests
#:build-type "Release" ; turn off debugging symbols to save space
#:configure-flags (list
"-DPORT=GTK"
@@ -250,16 +251,7 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
"-DUSE_SYSTEMD=OFF"
(string-append ; uses lib64 by default
"-DLIB_INSTALL_DIR="
- (assoc-ref %outputs "out") "/lib")
-
- ;; XXX Adding GStreamer GL support would apparently
- ;; require adding gst-plugins-bad to the inputs,
- ;; which might entail a security risk as a result of
- ;; the plugins of dubious code quality that are
- ;; included. More investigation is needed. For
- ;; now, we explicitly disable it to prevent an error
- ;; at configuration time.
- "-DUSE_GSTREAMER_GL=OFF")
+ (assoc-ref %outputs "out") "/lib"))
#:make-flags
;; Never build with unsupported -j1: https://issues.guix.gnu.org/47964#5
(list "-j" (number->string (max 2 (parallel-job-count))))
@@ -272,8 +264,7 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(let ((store-directory (%store-directory)))
(substitute*
"Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp"
- (("@storedir@") store-directory))
- #t)))
+ (("@storedir@") store-directory)))))
(add-after 'unpack 'patch-gtk-doc-scan
(lambda* (#:key inputs #:allow-other-keys)
(for-each (lambda (file)
@@ -281,23 +272,27 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd")
(string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/docbookx.dtd"))))
- (find-files "Source" "\\.sgml$"))
- #t))
+ (find-files "Source" "\\.sgml$"))))
(add-after 'unpack 'embed-absolute-wpebackend-reference
(lambda* (#:key inputs #:allow-other-keys)
(let ((wpebackend-fdo (assoc-ref inputs "wpebackend-fdo")))
(substitute* "Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp"
(("libWPEBackend-fdo-([\\.0-9]+)\\.so" all version)
- (string-append wpebackend-fdo "/lib/" all)))
- #t)))
+ (string-append wpebackend-fdo "/lib/" all))))))
+ ,@(if (target-x86-64?)
+ '()
+ '((add-after 'unpack 'disable-sse2
+ (lambda _
+ (substitute* "Source/cmake/WebKitCompilerFlags.cmake"
+ (("WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING")
+ "FALSE"))))))
(add-after 'install 'move-doc-files
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(doc (assoc-ref outputs "doc")))
(mkdir-p (string-append doc "/share"))
(rename-file (string-append out "/share/gtk-doc")
- (string-append doc "/share/gtk-doc"))
- #t))))))
+ (string-append doc "/share/gtk-doc"))))))))
(native-inputs
`(("bison" ,bison)
("gettext" ,gettext-minimal)
@@ -311,8 +306,7 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
("docbook-xml" ,docbook-xml) ; For documentation generation
("ruby" ,ruby)))
(propagated-inputs
- `(("gtk+" ,gtk+)
- ("libsoup" ,libsoup)))
+ (list gtk+ libsoup))
(inputs
`(("at-spi2-core" ,at-spi2-core)
("bubblewrap" ,bubblewrap)
@@ -323,6 +317,7 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
("harfbuzz" ,harfbuzz)
("hyphen" ,hyphen)
("icu4c" ,icu4c)
+ ("lcms" ,lcms)
("libgcrypt" ,libgcrypt)
("libjpeg" ,libjpeg-turbo)
("libnotify" ,libnotify)
@@ -347,10 +342,28 @@ acceleration in mind, leveraging common 3D graphics APIs for best performance.")
(description
"WebKitGTK+ is a full-featured port of the WebKit rendering engine,
suitable for projects requiring any kind of web integration, from hybrid
-HTML/CSS applications to full-fledged web browsers.")
+HTML/CSS applications to full-fledged web browsers. WebKitGTK+ video playing
+capabilities can be extended through the use of GStreamer plugins (not
+propagated by default) such as @code{gst-plugins-good} and
+@code{gst-plugins-bad}.")
;; WebKit's JavaScriptCore and WebCore components are available under
;; the GNU LGPL, while the rest is available under a BSD-style license.
(license (list license:lgpl2.0
license:lgpl2.1+
license:bsd-2
license:bsd-3))))
+
+;;; Required by gnome-online-accounts; as webkitgtk 2.34 propagates libsoup 3,
+;;; which causes the build to fail.
+;;; Also required by e.g. emacs-next-pgtk, emacs-xwidgets, and some other
+;;; Gnome packages for webkit2gtk-4.0. See also the upstream tracker for
+;;; libsoup 3: https://gitlab.gnome.org/GNOME/libsoup/-/issues/218
+(define-public webkitgtk-with-libsoup2
+ (package/inherit webkitgtk
+ (name "webkitgtk-with-libsoup2")
+ (arguments (substitute-keyword-arguments (package-arguments webkitgtk)
+ ((#:configure-flags flags)
+ `(cons "-DUSE_SOUP2=ON" ,flags))))
+ (propagated-inputs
+ (alist-replace "libsoup" (list libsoup-minimal-2)
+ (package-propagated-inputs webkitgtk)))))