Merge branch 'master' into core-updates
[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>
a96d179b 5;;; Copyright © 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
86c9c0c1 6;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
0ead0b4d 7;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
61c21ad3
SB
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages webkit)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
844cc6f8 28 #:use-module (guix utils)
61c21ad3 29 #:use-module (guix build-system cmake)
7b05ba91
RW
30 #:use-module (guix build-system gnu)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
61c21ad3 33 #:use-module (gnu packages bison)
0ead0b4d 34 #:use-module (gnu packages docbook)
61c21ad3 35 #:use-module (gnu packages enchant)
7b05ba91 36 #:use-module (gnu packages flex)
844cc6f8 37 #:use-module (gnu packages gcc)
61c21ad3
SB
38 #:use-module (gnu packages gettext)
39 #:use-module (gnu packages gl)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
c3868552 42 #:use-module (gnu packages gnupg)
61c21ad3
SB
43 #:use-module (gnu packages gperf)
44 #:use-module (gnu packages gstreamer)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages icu4c)
47 #:use-module (gnu packages image)
19e5258d 48 #:use-module (gnu packages libreoffice)
61c21ad3
SB
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages ruby)
cd0322a3 53 #:use-module (gnu packages sqlite)
a54bf725 54 #:use-module (gnu packages tls)
61c21ad3
SB
55 #:use-module (gnu packages video)
56 #:use-module (gnu packages xml)
57 #:use-module (gnu packages xorg))
58
59(define-public webkitgtk
60 (package
61 (name "webkitgtk")
0481289c 62 (version "2.24.4")
61c21ad3
SB
63 (source (origin
64 (method url-fetch)
3bd716c0 65 (uri (string-append "https://www.webkitgtk.org/releases/"
61c21ad3
SB
66 name "-" version ".tar.xz"))
67 (sha256
68 (base32
0481289c 69 "1n3x5g1z6rg9n1ssna7wi0z6zlprjm4wzk544v14wqi6q0lv2s46"))))
61c21ad3 70 (build-system cmake-build-system)
0ead0b4d 71 (outputs '("out" "doc"))
61c21ad3
SB
72 (arguments
73 '(#:tests? #f ; no tests
74 #:build-type "Release" ; turn off debugging symbols to save space
9ca33236
DH
75 #:configure-flags (list
76 "-DPORT=GTK"
0ead0b4d 77 "-DENABLE_GTKDOC=ON" ; No doc by default
9ca33236
DH
78 (string-append ; uses lib64 by default
79 "-DLIB_INSTALL_DIR="
a54bf725
MW
80 (assoc-ref %outputs "out") "/lib")
81
82 ;; XXX Adding GStreamer GL support would apparently
83 ;; require adding gst-plugins-bad to the inputs,
84 ;; which might entail a security risk as a result of
85 ;; the plugins of dubious code quality that are
86 ;; included. More investigation is needed. For
87 ;; now, we explicitly disable it to prevent an error
88 ;; at configuration time.
86c9c0c1
TGR
89 "-DUSE_GSTREAMER_GL=OFF"
90
91 ;; XXX Disable WOFF2 ‘web fonts’. These were never
92 ;; supported in our previous builds. Enabling them
93 ;; requires building libwoff2 and possibly woff2dec.
0ead0b4d
PN
94 "-DUSE_WOFF2=OFF")
95 #:phases
96 (modify-phases %standard-phases
97 (add-after 'unpack 'patch-gtk-doc-scan
98 (lambda* (#:key inputs #:allow-other-keys)
a509b180
MB
99 (for-each (lambda (file)
100 (substitute* file
101 (("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd")
102 (string-append (assoc-ref inputs "docbook-xml")
103 "/xml/dtd/docbook/docbookx.dtd"))))
104 (find-files "Source" "\\.sgml$"))
0ead0b4d
PN
105 #t))
106 (add-after 'install 'move-doc-files
107 (lambda* (#:key outputs #:allow-other-keys)
108 (let ((out (assoc-ref outputs "out"))
109 (doc (assoc-ref outputs "doc")))
110 (mkdir-p (string-append doc "/share"))
111 (rename-file (string-append out "/share/gtk-doc")
112 (string-append doc "/share/gtk-doc"))
113 #t))))))
61c21ad3
SB
114 (native-inputs
115 `(("bison" ,bison)
b94a6ca0 116 ("gettext" ,gettext-minimal)
61c21ad3
SB
117 ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
118 ("gobject-introspection" ,gobject-introspection)
119 ("gperf" ,gperf)
120 ("perl" ,perl)
121 ("pkg-config" ,pkg-config)
625801f5 122 ("python" ,python-wrapper)
0ead0b4d
PN
123 ("gtk-doc" ,gtk-doc) ; For documentation generation
124 ("docbook-xml" ,docbook-xml) ; For documentation generation
61c21ad3
SB
125 ("ruby" ,ruby)))
126 (propagated-inputs
127 `(("gtk+" ,gtk+)
128 ("libsoup" ,libsoup)))
129 (inputs
130 `(("at-spi2-core" ,at-spi2-core)
131 ("enchant" ,enchant)
132 ("geoclue" ,geoclue)
61c21ad3
SB
133 ("gst-plugins-base" ,gst-plugins-base)
134 ("gtk+-2" ,gtk+-2)
135 ("harfbuzz" ,harfbuzz)
19e5258d 136 ("hyphen" ,hyphen)
61c21ad3 137 ("icu4c" ,icu4c)
c3868552 138 ("libgcrypt" ,libgcrypt)
61c21ad3
SB
139 ("libjpeg" ,libjpeg)
140 ("libnotify" ,libnotify)
141 ("libpng" ,libpng)
142 ("libsecret" ,libsecret)
a54bf725 143 ("libtasn1" ,libtasn1)
61c21ad3
SB
144 ("libwebp" ,libwebp)
145 ("libxcomposite" ,libxcomposite)
146 ("libxml2" ,libxml2)
147 ("libxslt" ,libxslt)
148 ("libxt" ,libxt)
149 ("mesa" ,mesa)
19008a22 150 ("openjpeg" ,openjpeg)
61c21ad3 151 ("sqlite" ,sqlite)))
36b2cb02 152 (home-page "https://www.webkitgtk.org/")
61c21ad3
SB
153 (synopsis "Web content engine for GTK+")
154 (description
155 "WebKitGTK+ is a full-featured port of the WebKit rendering engine,
156suitable for projects requiring any kind of web integration, from hybrid
157HTML/CSS applications to full-fledged web browsers.")
158 ;; WebKit's JavaScriptCore and WebCore components are available under
159 ;; the GNU LGPL, while the rest is available under a BSD-style license.
160 (license (list license:lgpl2.0
161 license:lgpl2.1+
162 license:bsd-2
163 license:bsd-3))))