;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015 David Hashe ;;; Copyright © 2015 Ricardo Wurmus ;;; Copyright © 2015–2021 Mark H Weaver ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2019 Marius Bakke ;;; Copyright © 2021, 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages webkit) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix build-system cmake) #:use-module (guix build-system meson) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages compression) #:use-module (gnu packages docbook) #:use-module (gnu packages enchant) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages g# This list is used to avoid multiple name/email instances of the same # contributors reported by "git log" and "git shortlog" commands. Adriano Peluso <catonano@gmail.com> Al McElrath <hello@yrns.org> <hello@atonesir.com> Alex Sassmannshausen <alex@pompo.co> <alex.sassmannshausen@gmail.com> Alexander I. Grafov <grafov@gmail.com> Alírio Eyng <alirioeyng@gmail.com> Amin Bandali <bandali@gnu.org> <mab@gnu.org> Amirouche Boubekki <amirouche@hypermove.net> Andreas Enge <andreas@enge.fr> <andreas.enge@inria.fr> Andreas Enge <andreas@enge.fr> <privat@xobs-novena> Andy Wingo <wingo@igalia.com> <wingo@pobox.com> Ben Woodcroft <donttrustben@gmail.com> Ben Woodcroft <donttrustben@gmail.com> <b.woodcroft@uq.edu.au> Ben Woodcroft <donttrustben@gmail.com> <donttrustben near gmail.com> Brett Gilio <brettg@gnu.org> <brettg@posteo.net> Christine Lemmer-Webber <cwebber@dustycloud.org> Claes Wallin (韋嘉誠) <claes.wallin@greatsinodevelopment.com> Cyprien Nicolas <cyprien@nicolas.tf> <c.nicolas+gitorious@gmail.com> Daniel Pimentel <d4n1@d4n1.org> <d4n1@member.fsf.org> Danny Milosavljevic <dannym@scratchpost.org> <dannym+a@scratchpost.org> David Hashe <david.hashe@dhashe.com> <address@hidden> David Thompson <davet@gnu.org> <dthompson2@worcester.edu> David Thompson <davet@gnu.org> <dthompson@member.fsf.org> David Thompson <davet@gnu.org> <dthompson@vistahigherlearning.com> Deck Pickard <deck.r.pickard@gmail.com> <nebu@kipple> Eric Bavier <bavier@posteo.net> <ericbavier@gmail.com> Eric Bavier <bavier@posteo.net> <bavier@member.fsf.org> Eric Dvorsak <eric@dvorsak.fr> <yenda1@gmail.com> Evgeny Pisemsky <mail@pisemsky.site> <evgeny@pisemsky.com> George Clemmer <myglc2@gmail.com> ison <ison@airmail.cc> <ison111@protonmail.com> Ivan Vilata i Balaguer <ivan@selidor.net> Jakob L. Kreuze <zerodaysfordays@sdf.org> <zerodaysfordays@sdf.lonestar.org> Jeff Mickey <j@codemac.net> <jm@igneous.io> John Darrington <jmd@gnu.org> <john@darrington.wattle.id.au> John J. Foerch <jjfoerch@earthlink.net> Joshua Grant <tadni@riseup.net> <gzg@riseup.net> Joshua Grant <tadni@riseup.net> <jgrant@parenthetical.io> Joshua Grant <tadni@riseup.net> <tadnimi@gmail.com> Joshua Grant <tadni@riseup.net> <youlysses@riseup.net> Juliana Sims <juli@incana.org> <jtsims@protonmail.com> Kei Kebreau <kkebreau@posteo.net> Leo Famulari <leo@famulari.name> <lfamular@gmail.com> Liliana Marie Prikler <liliana.prikler@gmail.com> Liliana Marie Prikler <liliana.prikler@gmail.com> Leo Prikler <leo.prikler@student.tugraz.at> Ludovic Courtès <ludo@gnu.org> <ludovic.courtes@inria.fr> Marek Benc <dusxmt@gmx.com> <merkur32@gmail.com> Marius Bakke <marius@gnu.org> <mbakke@fastmail.com> Marius Bakke <marius@gnu.org> <m.bakke@warwick.ac.uk> Marius Bakke <marius@gnu.org> <marius.bakke@usit.uio.no> Marius Bakke <marius@gnu.org> <mbakke@berlin.guixsd.org> Mathieu Lirzin <mthl@gnu.org> <mthl@openmailbox.org> Mathieu Lirzin <mthl@gnu.org> <mathieu.lirzin@openmailbox.org> Mathieu Othacehe <m.othacehe@gmail.com> Mathieu Othacehe <mathieu.othacehe@parrot.com> Mathieu Othacehe <othacehe@gnu.org> Matthew James Kraai <kraai@ftbfs.org> Nikita Karetnikov <nikita@karetnikov.org> <nikita.karetnikov@gmail.com> nikita <nikita@n0.is> nikita <nikita@n0.is> ng0 <ng0@n0.is> nikita <nikita@n0.is> Nils Gillmann <ng0@n0.is> nikita <nikita@n0.is> Nils Gillmann <gillmann@infotropique.org> nikita <nikita@n0.is> ng0 <ng0@crash.cx> nikita <nikita@n0.is> <ng0@infotropique.org> nikita <nikita@n0.is> <ng0@no-reply.infotropique.org> nikita <nikita@n0.is> <ng0@no-reply.pragmatique.xyz> nikita <nikita@n0.is> <ng0@pragmatique.xyz> nikita <nikita@n0.is> <contact.ng0@cryptolab.net> nikita <nikita@n0.is> <ng0@we.make.ritual.n0.is> nikita <nikita@n0.is> <ngillmann@runbox.com> nikita <nikita@n0.is> <niasterisk@grrlz.net> nikita <nikita@n0.is> <ng@niasterisk.space> nikita <nikita@n0.is> <ng0@libertad.pw> Pierre Neidhardt <mail@ambrevar.xyz> Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr> Pjotr Prins <pjotr.guix@thebird.nl> <pjotr.public01@thebird.nl> Pjotr Prins <pjotr.guix@thebird.nl> <pjotr.public12@thebird.nl> Pjotr Prins <pjotr.guix@thebird.nl> <pjotr.public12@email> Raimon Grau <raimonster@gmail.com> <raimon@3scale.net> Raoul Jean Pierre Bonnal <ilpuccio.febo@gmail.com> Raymond Nicholson <rain1@openmailbox.org> Rene Saavedra <rennes@openmailbox.org> Ricardo Wurmus <rekado@elephly.net> Ricardo Wurmus <rekado@elephly.net> <ricardo.wurmus@mdc-berlin.de> Sou Bunnbu (宋文武) <iyzsong@gmail.com> Sou Bunnbu (宋文武) <iyzsong@gmail.com> <iyzsong@member.fsf.org> Stefan Reichör <stefan@xsteve.at> Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> Theodoros Foradis <theodoros.for@openmailbox.org> <theodoros@foradis.org> Thomas Danckaert <thomas.danckaert@gmail.com> <post@thomasdanckaert.be> Tobias Geerinckx-Rice <me@tobias.gr> <tobias.geerinckx.rice@gmail.com> Tomas Volf <~@wolfsden.cz> <wolf@wolfsden.cz> Tomáš Čech <sleep_walker@gnu.org> <sleep_walker@suse.cz> Vincent Legoll <vincent.legoll@gmail.com> <vincent.legoll@idgrilles.fr> Zheng Junjie <873216071@qq.com> Z572 <873216071@qq.com> les "Source" "\\.sgml$") (("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd") (search-input-file (or native-inputs inputs) "xml/dtd/docbook/docbookx.dtd"))))) (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) (search-input-file inputs (string-append "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 ((doc (assoc-ref outputs "doc"))) (mkdir-p (string-append doc "/share")) (rename-file (string-append #$output "/share/gtk-doc") (string-append doc "/share/gtk-doc")))))))) (native-inputs (list bison gettext-minimal `(,glib "bin") ;for glib-mkenums, etc. gobject-introspection gperf perl pkg-config python-wrapper ;; These are required to build the documentation. gtk-doc/stable docbook-xml ruby)) (propagated-inputs (list gtk+ libsoup)) (inputs (list at-spi2-core bubblewrap elogind enchant geoclue gst-plugins-base gtk+-2 harfbuzz hyphen icu4c lcms libgcrypt libjpeg-turbo libmanette libnotify libpng libseccomp libsecret libtasn1 libwebp libwpe libxcomposite libxml2 libxslt libxt mesa openjpeg sqlite woff2 wpebackend-fdo xdg-dbus-proxy)) (home-page "https://www.webkitgtk.org/") (synopsis "Web content engine for GTK+") (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. 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 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 (modify-inputs (package-propagated-inputs webkitgtk) (replace "libsoup" libsoup-minimal-2))))) (define-public wpewebkit (package (inherit webkitgtk) (name "wpewebkit") (version %webkit-version) (source (origin (inherit (package-source webkitgtk)) (uri (string-append "https://wpewebkit.org/releases/" name "-" version ".tar.xz")) (sha256 (base32 "0nkdx6pckbkhs85z3pidnh4cbp0wfa38lf2qyn0grywvgpwajsh9")))) (arguments (substitute-keyword-arguments (package-arguments webkitgtk) ((#:configure-flags flags) #~(cons "-DPORT=WPE" (delete "-DPORT=GTK" #$flags))))) (synopsis "WebKit port optimized for embedded devices") (description "WPE WebKit allows embedders to create simple and performant systems based on Web platform technologies. It is designed with hardware acceleration in mind, leveraging common 3D graphics APIs for best performance.") (home-page "https://wpewebkit.org/") (properties '((cpe-name . "wpe_webkit")))))