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> |
81a96539 | 5 | ;;; Copyright © 2015, 2016 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) | |
61c21ad3 SB |
38 | #:use-module (gnu packages gperf) |
39 | #:use-module (gnu packages gstreamer) | |
40 | #:use-module (gnu packages gtk) | |
41 | #:use-module (gnu packages icu4c) | |
42 | #:use-module (gnu packages image) | |
19e5258d | 43 | #:use-module (gnu packages libreoffice) |
61c21ad3 SB |
44 | #:use-module (gnu packages perl) |
45 | #:use-module (gnu packages pkg-config) | |
46 | #:use-module (gnu packages python) | |
47 | #:use-module (gnu packages ruby) | |
a7fd7b68 | 48 | #:use-module (gnu packages tls) |
61c21ad3 SB |
49 | #:use-module (gnu packages video) |
50 | #:use-module (gnu packages xml) | |
51 | #:use-module (gnu packages xorg)) | |
52 | ||
53 | (define-public webkitgtk | |
54 | (package | |
55 | (name "webkitgtk") | |
3bd716c0 | 56 | (version "2.12.4") |
61c21ad3 SB |
57 | (source (origin |
58 | (method url-fetch) | |
3bd716c0 | 59 | (uri (string-append "https://www.webkitgtk.org/releases/" |
61c21ad3 SB |
60 | name "-" version ".tar.xz")) |
61 | (sha256 | |
62 | (base32 | |
3bd716c0 | 63 | "0xwsc2lpb4q55vdgmwljx43219l0sa6r5mqs3bmw3fwsb5vk2ka2")))) |
61c21ad3 SB |
64 | (build-system cmake-build-system) |
65 | (arguments | |
66 | '(#:tests? #f ; no tests | |
67 | #:build-type "Release" ; turn off debugging symbols to save space | |
9ca33236 DH |
68 | #:configure-flags (list |
69 | "-DPORT=GTK" | |
70 | (string-append ; uses lib64 by default | |
71 | "-DLIB_INSTALL_DIR=" | |
f6a9bf84 MW |
72 | (assoc-ref %outputs "out") "/lib")) |
73 | #:phases | |
74 | (modify-phases %standard-phases | |
75 | (add-after | |
76 | 'set-paths 'add-gst-plugins-base-include-path | |
77 | (lambda* (#:key inputs #:allow-other-keys) | |
78 | ;; XXX Work around a problem in the build system, which neglects | |
79 | ;; to add -I for gst-plugins-base when compiling | |
80 | ;; Source/WebKit2/UIProcess/WebPageProxy.cpp, apparently assuming | |
81 | ;; that it will be in the same directory as gstreamer's header | |
82 | ;; files. | |
83 | (setenv "CPATH" | |
e8e2e18b | 84 | (string-append (getenv "C_INCLUDE_PATH") |
f6a9bf84 MW |
85 | ":" |
86 | (assoc-ref inputs "gst-plugins-base") | |
87 | "/include/gstreamer-1.0"))))))) | |
61c21ad3 SB |
88 | (native-inputs |
89 | `(("bison" ,bison) | |
b94a6ca0 | 90 | ("gettext" ,gettext-minimal) |
61c21ad3 SB |
91 | ("glib:bin" ,glib "bin") ; for glib-mkenums, etc. |
92 | ("gobject-introspection" ,gobject-introspection) | |
93 | ("gperf" ,gperf) | |
94 | ("perl" ,perl) | |
95 | ("pkg-config" ,pkg-config) | |
96 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) | |
97 | ("ruby" ,ruby))) | |
98 | (propagated-inputs | |
99 | `(("gtk+" ,gtk+) | |
100 | ("libsoup" ,libsoup))) | |
101 | (inputs | |
102 | `(("at-spi2-core" ,at-spi2-core) | |
103 | ("enchant" ,enchant) | |
104 | ("geoclue" ,geoclue) | |
105 | ("gnutls" ,gnutls) | |
106 | ("gst-plugins-base" ,gst-plugins-base) | |
107 | ("gtk+-2" ,gtk+-2) | |
108 | ("harfbuzz" ,harfbuzz) | |
19e5258d | 109 | ("hyphen" ,hyphen) |
61c21ad3 SB |
110 | ("icu4c" ,icu4c) |
111 | ("libjpeg" ,libjpeg) | |
112 | ("libnotify" ,libnotify) | |
113 | ("libpng" ,libpng) | |
114 | ("libsecret" ,libsecret) | |
115 | ("libwebp" ,libwebp) | |
116 | ("libxcomposite" ,libxcomposite) | |
117 | ("libxml2" ,libxml2) | |
118 | ("libxslt" ,libxslt) | |
119 | ("libxt" ,libxt) | |
120 | ("mesa" ,mesa) | |
121 | ("sqlite" ,sqlite))) | |
122 | (home-page "http://www.webkitgtk.org/") | |
123 | (synopsis "Web content engine for GTK+") | |
124 | (description | |
125 | "WebKitGTK+ is a full-featured port of the WebKit rendering engine, | |
126 | suitable for projects requiring any kind of web integration, from hybrid | |
127 | HTML/CSS applications to full-fledged web browsers.") | |
128 | ;; WebKit's JavaScriptCore and WebCore components are available under | |
129 | ;; the GNU LGPL, while the rest is available under a BSD-style license. | |
130 | (license (list license:lgpl2.0 | |
131 | license:lgpl2.1+ | |
132 | license:bsd-2 | |
133 | license:bsd-3)))) | |
7b05ba91 | 134 | |
e7e8ea06 | 135 | ;; Latest release of the stable 2.4 series, with WebKit1 support. |
7b05ba91 | 136 | (define-public webkitgtk-2.4 |
7b05ba91 RW |
137 | (package (inherit webkitgtk) |
138 | (name "webkitgtk") | |
80627f51 | 139 | (version "2.4.11") |
7b05ba91 RW |
140 | (source (origin |
141 | (method url-fetch) | |
142 | (uri (string-append "http://www.webkitgtk.org/releases/" | |
143 | name "-" version ".tar.xz")) | |
144 | (sha256 | |
145 | (base32 | |
80627f51 | 146 | "1xsvnvyvlywwyf6m9ainpsg87jkxjmd37q6zgz9cxb7v3c2ym2jq")))) |
7b05ba91 RW |
147 | (build-system gnu-build-system) |
148 | (arguments | |
149 | '(#:tests? #f ; no tests | |
46854e99 AE |
150 | ;; FIXME: Disabling parallel building is a quick hack to avoid the |
151 | ;; failure described in | |
152 | ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html | |
153 | ;; A more structural fix is needed. | |
154 | #:parallel-build? #f | |
7b05ba91 RW |
155 | #:phases (modify-phases %standard-phases |
156 | (add-after | |
157 | 'unpack 'set-gcc | |
e7e8ea06 SB |
158 | (lambda _ (setenv "CC" "gcc") #t))))) |
159 | (native-inputs | |
7b05ba91 RW |
160 | `(("flex" ,flex) |
161 | ("which" ,which) | |
e7e8ea06 SB |
162 | ,@(package-native-inputs webkitgtk))))) |
163 | ||
164 | ;; Last GTK+2 port, required by GnuCash. | |
165 | (define-public webkitgtk/gtk+-2 | |
166 | (package (inherit webkitgtk-2.4) | |
625c9176 | 167 | (name "webkitgtk-gtk2") |
e7e8ea06 | 168 | (arguments |
46854e99 AE |
169 | `(;; FIXME: Disabling parallel building is a quick hack to avoid the |
170 | ;; failure described in | |
171 | ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html | |
172 | ;; A more structural fix is needed. | |
173 | #:parallel-build? #f | |
174 | #:configure-flags | |
e7e8ea06 SB |
175 | '("--enable-webkit2=no" |
176 | "--with-gtk=2.0") | |
177 | ,@(package-arguments webkitgtk-2.4))) | |
178 | (propagated-inputs | |
179 | `(("gtk+-2" ,gtk+-2) | |
180 | ("libsoup" ,libsoup))))) |