gnu: webkitgtk: Update to 2.28.3 [security fixes].
[jackhill/guix/guix.git] / gnu / packages / webkit.scm
CommitLineData
61c21ad3
SB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
9ca33236 3;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
7b05ba91 4;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
7059f925 5;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
0d533983 6;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
0ead0b4d 7;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
b037ea96 8;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
61c21ad3
SB
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages webkit)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
844cc6f8 29 #:use-module (guix utils)
61c21ad3 30 #:use-module (guix build-system cmake)
7b05ba91
RW
31 #:use-module (guix build-system gnu)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages base)
61c21ad3 34 #:use-module (gnu packages bison)
0ead0b4d 35 #:use-module (gnu packages docbook)
61c21ad3 36 #:use-module (gnu packages enchant)
7b05ba91 37 #:use-module (gnu packages flex)
7970127f 38 #:use-module (gnu packages freedesktop)
844cc6f8 39 #:use-module (gnu packages gcc)
61c21ad3
SB
40 #:use-module (gnu packages gettext)
41 #:use-module (gnu packages gl)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages gnome)
c3868552 44 #:use-module (gnu packages gnupg)
61c21ad3
SB
45 #:use-module (gnu packages gperf)
46 #:use-module (gnu packages gstreamer)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages icu4c)
49 #:use-module (gnu packages image)
19e5258d 50 #:use-module (gnu packages libreoffice)
689b44bc 51 #:use-module (gnu packages linux)
61c21ad3
SB
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages ruby)
cd0322a3 56 #:use-module (gnu packages sqlite)
a54bf725 57 #:use-module (gnu packages tls)
61c21ad3 58 #:use-module (gnu packages video)
689b44bc 59 #:use-module (gnu packages virtualization)
61c21ad3 60 #:use-module (gnu packages xml)
b037ea96 61 #:use-module (gnu packages xdisorg)
61c21ad3
SB
62 #:use-module (gnu packages xorg))
63
b037ea96
MB
64(define-public libwpe
65 (package
66 (name "libwpe")
63efc495 67 (version "1.6.0")
b037ea96
MB
68 (source (origin
69 (method url-fetch)
70 (uri (string-append "https://wpewebkit.org/releases/libwpe-"
71 version ".tar.xz"))
72 (sha256
73 (base32
63efc495 74 "141w35b488jjhanl3nrm0awrbcy6hb579fk8n9vbpx07m2wcd1rm"))))
b037ea96
MB
75 (build-system cmake-build-system)
76 (arguments
77 `(#:tests? #f)) ;no tests
78 (native-inputs
79 `(("pkg-config" ,pkg-config)))
80 (inputs
81 `(("mesa" ,mesa)))
82 (propagated-inputs
83 `(;; In Requires of wpe-1.0.pc.
84 ("libxkbcommon" ,libxkbcommon)))
85 (home-page "https://wpewebkit.org/")
86 (synopsis "Platform agnostic WebKit interfaces")
87 (description
88 "@code{libwpe} is a small library that defines programming interfaces
89for use by WebKit, and provides a mechanism for loading a platform-specific
90backend which implements them.")
91 (license license:bsd-2)))
92
7970127f
MB
93(define-public wpebackend-fdo
94 (package
95 (name "wpebackend-fdo")
8e9ccf7a 96 (version "1.6.1")
7970127f
MB
97 (source (origin
98 (method url-fetch)
99 (uri (string-append "https://wpewebkit.org/releases/"
100 "wpebackend-fdo-" version ".tar.xz"))
101 (sha256
102 (base32
8e9ccf7a 103 "1jdi43gciqjgvhnqxs160f3hmp1hkqhrllb0hhmldyxc4wryw3kl"))))
7970127f
MB
104 (build-system cmake-build-system)
105 (arguments
106 `(#:tests? #f)) ;no tests
107 (native-inputs
108 `(("pkg-config" ,pkg-config)))
109 (inputs
110 `(("glib" ,glib)
111 ("libwpe" ,libwpe)
112 ("mesa" ,mesa)
113 ("wayland" ,wayland)))
114 (home-page "https://wpewebkit.org/")
115 (synopsis "Wayland WPE backend")
116 (description
117 "This package provides a backend implementation for the WPE WebKit
118engine that uses Wayland for graphics output.")
119 (license license:bsd-2)))
120
61c21ad3
SB
121(define-public webkitgtk
122 (package
123 (name "webkitgtk")
152f0207 124 (version "2.28.3")
61c21ad3
SB
125 (source (origin
126 (method url-fetch)
3bd716c0 127 (uri (string-append "https://www.webkitgtk.org/releases/"
256ab7cf 128 "webkitgtk-" version ".tar.xz"))
61c21ad3
SB
129 (sha256
130 (base32
152f0207 131 "08imj2q6h975mz7714dqdrmbav0s884990gf98xf2862fb08m2gh"))
a6919866 132 (patches (search-patches "webkitgtk-share-store.patch"))))
61c21ad3 133 (build-system cmake-build-system)
0ead0b4d 134 (outputs '("out" "doc"))
61c21ad3
SB
135 (arguments
136 '(#:tests? #f ; no tests
137 #:build-type "Release" ; turn off debugging symbols to save space
9ca33236
DH
138 #:configure-flags (list
139 "-DPORT=GTK"
0ead0b4d 140 "-DENABLE_GTKDOC=ON" ; No doc by default
9ca33236
DH
141 (string-append ; uses lib64 by default
142 "-DLIB_INSTALL_DIR="
a54bf725
MW
143 (assoc-ref %outputs "out") "/lib")
144
145 ;; XXX Adding GStreamer GL support would apparently
146 ;; require adding gst-plugins-bad to the inputs,
147 ;; which might entail a security risk as a result of
148 ;; the plugins of dubious code quality that are
149 ;; included. More investigation is needed. For
150 ;; now, we explicitly disable it to prevent an error
151 ;; at configuration time.
86c9c0c1
TGR
152 "-DUSE_GSTREAMER_GL=OFF"
153
154 ;; XXX Disable WOFF2 ‘web fonts’. These were never
155 ;; supported in our previous builds. Enabling them
156 ;; requires building libwoff2 and possibly woff2dec.
0ead0b4d
PN
157 "-DUSE_WOFF2=OFF")
158 #:phases
159 (modify-phases %standard-phases
a6919866
JH
160 (add-after 'unpack 'configure-bubblewrap-store-directory
161 (lambda _
162 ;; This phase is a corollary to 'webkitgtk-share-store.patch' to
163 ;; avoid hard coding /gnu/store, for users with other prefixes.
164 (let ((store-directory (%store-directory)))
165 (substitute*
166 "Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp"
167 (("@storedir@") store-directory))
168 #t)))
0ead0b4d
PN
169 (add-after 'unpack 'patch-gtk-doc-scan
170 (lambda* (#:key inputs #:allow-other-keys)
a509b180
MB
171 (for-each (lambda (file)
172 (substitute* file
173 (("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd")
174 (string-append (assoc-ref inputs "docbook-xml")
175 "/xml/dtd/docbook/docbookx.dtd"))))
176 (find-files "Source" "\\.sgml$"))
0ead0b4d 177 #t))
1714edc3
MB
178 (add-after 'unpack 'embed-absolute-wpebackend-reference
179 (lambda* (#:key inputs #:allow-other-keys)
180 (let ((wpebackend-fdo (assoc-ref inputs "wpebackend-fdo")))
181 (substitute* "Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp"
182 (("libWPEBackend-fdo-([\\.0-9]+)\\.so" all version)
183 (string-append wpebackend-fdo "/lib/" all)))
184 #t)))
0ead0b4d
PN
185 (add-after 'install 'move-doc-files
186 (lambda* (#:key outputs #:allow-other-keys)
187 (let ((out (assoc-ref outputs "out"))
188 (doc (assoc-ref outputs "doc")))
189 (mkdir-p (string-append doc "/share"))
190 (rename-file (string-append out "/share/gtk-doc")
191 (string-append doc "/share/gtk-doc"))
192 #t))))))
61c21ad3
SB
193 (native-inputs
194 `(("bison" ,bison)
b94a6ca0 195 ("gettext" ,gettext-minimal)
61c21ad3
SB
196 ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
197 ("gobject-introspection" ,gobject-introspection)
198 ("gperf" ,gperf)
199 ("perl" ,perl)
200 ("pkg-config" ,pkg-config)
625801f5 201 ("python" ,python-wrapper)
0ead0b4d
PN
202 ("gtk-doc" ,gtk-doc) ; For documentation generation
203 ("docbook-xml" ,docbook-xml) ; For documentation generation
61c21ad3
SB
204 ("ruby" ,ruby)))
205 (propagated-inputs
206 `(("gtk+" ,gtk+)
207 ("libsoup" ,libsoup)))
208 (inputs
209 `(("at-spi2-core" ,at-spi2-core)
e7f62a41 210 ("bubblewrap" ,bubblewrap)
61c21ad3
SB
211 ("enchant" ,enchant)
212 ("geoclue" ,geoclue)
61c21ad3
SB
213 ("gst-plugins-base" ,gst-plugins-base)
214 ("gtk+-2" ,gtk+-2)
215 ("harfbuzz" ,harfbuzz)
19e5258d 216 ("hyphen" ,hyphen)
61c21ad3 217 ("icu4c" ,icu4c)
c3868552 218 ("libgcrypt" ,libgcrypt)
4bd428a7 219 ("libjpeg" ,libjpeg-turbo)
61c21ad3
SB
220 ("libnotify" ,libnotify)
221 ("libpng" ,libpng)
e7f62a41 222 ("libseccomp" ,libseccomp)
61c21ad3 223 ("libsecret" ,libsecret)
a54bf725 224 ("libtasn1" ,libtasn1)
61c21ad3 225 ("libwebp" ,libwebp)
e7f62a41 226 ("libwpe" ,libwpe)
61c21ad3
SB
227 ("libxcomposite" ,libxcomposite)
228 ("libxml2" ,libxml2)
229 ("libxslt" ,libxslt)
230 ("libxt" ,libxt)
231 ("mesa" ,mesa)
19008a22 232 ("openjpeg" ,openjpeg)
e7f62a41
MB
233 ("sqlite" ,sqlite)
234 ("wpebackend-fdo" ,wpebackend-fdo)
235 ("xdg-dbus-proxy" ,xdg-dbus-proxy)))
36b2cb02 236 (home-page "https://www.webkitgtk.org/")
61c21ad3
SB
237 (synopsis "Web content engine for GTK+")
238 (description
239 "WebKitGTK+ is a full-featured port of the WebKit rendering engine,
240suitable for projects requiring any kind of web integration, from hybrid
241HTML/CSS applications to full-fledged web browsers.")
242 ;; WebKit's JavaScriptCore and WebCore components are available under
243 ;; the GNU LGPL, while the rest is available under a BSD-style license.
244 (license (list license:lgpl2.0
245 license:lgpl2.1+
246 license:bsd-2
247 license:bsd-3))))