Commit | Line | Data |
---|---|---|
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> |
56804398 | 5 | ;;; Copyright © 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org> |
61c21ad3 SB |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | (define-module (gnu packages webkit) | |
23 | #:use-module ((guix licenses) #:prefix license:) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
26 | #:use-module (guix build-system cmake) | |
7b05ba91 RW |
27 | #:use-module (guix build-system gnu) |
28 | #:use-module (gnu packages) | |
29 | #:use-module (gnu packages base) | |
61c21ad3 SB |
30 | #:use-module (gnu packages bison) |
31 | #:use-module (gnu packages databases) | |
32 | #:use-module (gnu packages enchant) | |
7b05ba91 | 33 | #:use-module (gnu packages flex) |
61c21ad3 SB |
34 | #:use-module (gnu packages gettext) |
35 | #:use-module (gnu packages gl) | |
36 | #:use-module (gnu packages glib) | |
37 | #:use-module (gnu packages gnome) | |
c3868552 | 38 | #:use-module (gnu packages gnupg) |
61c21ad3 SB |
39 | #:use-module (gnu packages gperf) |
40 | #:use-module (gnu packages gstreamer) | |
41 | #:use-module (gnu packages gtk) | |
42 | #:use-module (gnu packages icu4c) | |
43 | #:use-module (gnu packages image) | |
19e5258d | 44 | #:use-module (gnu packages libreoffice) |
61c21ad3 SB |
45 | #:use-module (gnu packages perl) |
46 | #:use-module (gnu packages pkg-config) | |
47 | #:use-module (gnu packages python) | |
48 | #:use-module (gnu packages ruby) | |
a54bf725 | 49 | #:use-module (gnu packages tls) |
61c21ad3 SB |
50 | #:use-module (gnu packages video) |
51 | #:use-module (gnu packages xml) | |
52 | #:use-module (gnu packages xorg)) | |
53 | ||
54 | (define-public webkitgtk | |
55 | (package | |
56 | (name "webkitgtk") | |
6b113dad | 57 | (version "2.18.6") |
61c21ad3 SB |
58 | (source (origin |
59 | (method url-fetch) | |
3bd716c0 | 60 | (uri (string-append "https://www.webkitgtk.org/releases/" |
61c21ad3 SB |
61 | name "-" version ".tar.xz")) |
62 | (sha256 | |
63 | (base32 | |
6b113dad | 64 | "0g5cpdijjv5hlrbi4i4dh97yrh5apnyvm90wpr9f84hgyk12r4ck")))) |
61c21ad3 SB |
65 | (build-system cmake-build-system) |
66 | (arguments | |
67 | '(#:tests? #f ; no tests | |
68 | #:build-type "Release" ; turn off debugging symbols to save space | |
9ca33236 DH |
69 | #:configure-flags (list |
70 | "-DPORT=GTK" | |
71 | (string-append ; uses lib64 by default | |
72 | "-DLIB_INSTALL_DIR=" | |
a54bf725 MW |
73 | (assoc-ref %outputs "out") "/lib") |
74 | ||
75 | ;; XXX Adding GStreamer GL support would apparently | |
76 | ;; require adding gst-plugins-bad to the inputs, | |
77 | ;; which might entail a security risk as a result of | |
78 | ;; the plugins of dubious code quality that are | |
79 | ;; included. More investigation is needed. For | |
80 | ;; now, we explicitly disable it to prevent an error | |
81 | ;; at configuration time. | |
82 | "-DUSE_GSTREAMER_GL=OFF") | |
f6a9bf84 MW |
83 | #:phases |
84 | (modify-phases %standard-phases | |
85 | (add-after | |
86 | 'set-paths 'add-gst-plugins-base-include-path | |
87 | (lambda* (#:key inputs #:allow-other-keys) | |
88 | ;; XXX Work around a problem in the build system, which neglects | |
89 | ;; to add -I for gst-plugins-base when compiling | |
90 | ;; Source/WebKit2/UIProcess/WebPageProxy.cpp, apparently assuming | |
91 | ;; that it will be in the same directory as gstreamer's header | |
92 | ;; files. | |
93 | (setenv "CPATH" | |
e8e2e18b | 94 | (string-append (getenv "C_INCLUDE_PATH") |
f6a9bf84 MW |
95 | ":" |
96 | (assoc-ref inputs "gst-plugins-base") | |
97 | "/include/gstreamer-1.0"))))))) | |
61c21ad3 SB |
98 | (native-inputs |
99 | `(("bison" ,bison) | |
b94a6ca0 | 100 | ("gettext" ,gettext-minimal) |
61c21ad3 SB |
101 | ("glib:bin" ,glib "bin") ; for glib-mkenums, etc. |
102 | ("gobject-introspection" ,gobject-introspection) | |
103 | ("gperf" ,gperf) | |
104 | ("perl" ,perl) | |
105 | ("pkg-config" ,pkg-config) | |
106 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) | |
107 | ("ruby" ,ruby))) | |
108 | (propagated-inputs | |
109 | `(("gtk+" ,gtk+) | |
110 | ("libsoup" ,libsoup))) | |
111 | (inputs | |
112 | `(("at-spi2-core" ,at-spi2-core) | |
113 | ("enchant" ,enchant) | |
114 | ("geoclue" ,geoclue) | |
61c21ad3 SB |
115 | ("gst-plugins-base" ,gst-plugins-base) |
116 | ("gtk+-2" ,gtk+-2) | |
117 | ("harfbuzz" ,harfbuzz) | |
19e5258d | 118 | ("hyphen" ,hyphen) |
61c21ad3 | 119 | ("icu4c" ,icu4c) |
c3868552 | 120 | ("libgcrypt" ,libgcrypt) |
61c21ad3 SB |
121 | ("libjpeg" ,libjpeg) |
122 | ("libnotify" ,libnotify) | |
123 | ("libpng" ,libpng) | |
124 | ("libsecret" ,libsecret) | |
a54bf725 | 125 | ("libtasn1" ,libtasn1) |
61c21ad3 SB |
126 | ("libwebp" ,libwebp) |
127 | ("libxcomposite" ,libxcomposite) | |
128 | ("libxml2" ,libxml2) | |
129 | ("libxslt" ,libxslt) | |
130 | ("libxt" ,libxt) | |
131 | ("mesa" ,mesa) | |
132 | ("sqlite" ,sqlite))) | |
133 | (home-page "http://www.webkitgtk.org/") | |
134 | (synopsis "Web content engine for GTK+") | |
135 | (description | |
136 | "WebKitGTK+ is a full-featured port of the WebKit rendering engine, | |
137 | suitable for projects requiring any kind of web integration, from hybrid | |
138 | HTML/CSS applications to full-fledged web browsers.") | |
139 | ;; WebKit's JavaScriptCore and WebCore components are available under | |
140 | ;; the GNU LGPL, while the rest is available under a BSD-style license. | |
141 | (license (list license:lgpl2.0 | |
142 | license:lgpl2.1+ | |
143 | license:bsd-2 | |
144 | license:bsd-3)))) | |
7b05ba91 | 145 | |
e7e8ea06 | 146 | ;; Latest release of the stable 2.4 series, with WebKit1 support. |
7b05ba91 | 147 | (define-public webkitgtk-2.4 |
7b05ba91 RW |
148 | (package (inherit webkitgtk) |
149 | (name "webkitgtk") | |
80627f51 | 150 | (version "2.4.11") |
7b05ba91 RW |
151 | (source (origin |
152 | (method url-fetch) | |
153 | (uri (string-append "http://www.webkitgtk.org/releases/" | |
154 | name "-" version ".tar.xz")) | |
155 | (sha256 | |
156 | (base32 | |
80627f51 | 157 | "1xsvnvyvlywwyf6m9ainpsg87jkxjmd37q6zgz9cxb7v3c2ym2jq")))) |
7b05ba91 RW |
158 | (build-system gnu-build-system) |
159 | (arguments | |
160 | '(#:tests? #f ; no tests | |
46854e99 AE |
161 | ;; FIXME: Disabling parallel building is a quick hack to avoid the |
162 | ;; failure described in | |
163 | ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html | |
164 | ;; A more structural fix is needed. | |
165 | #:parallel-build? #f | |
7b05ba91 RW |
166 | #:phases (modify-phases %standard-phases |
167 | (add-after | |
168 | 'unpack 'set-gcc | |
e7e8ea06 SB |
169 | (lambda _ (setenv "CC" "gcc") #t))))) |
170 | (native-inputs | |
7b05ba91 RW |
171 | `(("flex" ,flex) |
172 | ("which" ,which) | |
e7e8ea06 SB |
173 | ,@(package-native-inputs webkitgtk))))) |
174 | ||
175 | ;; Last GTK+2 port, required by GnuCash. | |
176 | (define-public webkitgtk/gtk+-2 | |
177 | (package (inherit webkitgtk-2.4) | |
625c9176 | 178 | (name "webkitgtk-gtk2") |
e7e8ea06 | 179 | (arguments |
46854e99 AE |
180 | `(;; FIXME: Disabling parallel building is a quick hack to avoid the |
181 | ;; failure described in | |
182 | ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html | |
183 | ;; A more structural fix is needed. | |
184 | #:parallel-build? #f | |
185 | #:configure-flags | |
e7e8ea06 SB |
186 | '("--enable-webkit2=no" |
187 | "--with-gtk=2.0") | |
188 | ,@(package-arguments webkitgtk-2.4))) | |
189 | (propagated-inputs | |
190 | `(("gtk+-2" ,gtk+-2) | |
191 | ("libsoup" ,libsoup))))) |