1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
4 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
7 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages databases)
32 #:use-module (gnu packages enchant)
33 #:use-module (gnu packages flex)
34 #:use-module (gnu packages gettext)
35 #:use-module (gnu packages gl)
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gnome)
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)
43 #:use-module (gnu packages libreoffice)
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)
48 #:use-module (gnu packages tls)
49 #:use-module (gnu packages video)
50 #:use-module (gnu packages xml)
51 #:use-module (gnu packages xorg))
53 (define-public webkitgtk
59 (uri (string-append "http://www.webkitgtk.org/releases/"
60 name "-" version ".tar.xz"))
63 "097i53ip93qfy8sgpv5qjf8fmi07gwm41q83jxrxldqwif89pi4x"))))
64 (build-system cmake-build-system)
66 '(#:tests? #f ; no tests
67 #:build-type "Release" ; turn off debugging symbols to save space
68 #:configure-flags (list
70 (string-append ; uses lib64 by default
72 (assoc-ref %outputs "out") "/lib"))
74 (modify-phases %standard-phases
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
84 (string-append (getenv "C_INCLUDE_PATH")
86 (assoc-ref inputs "gst-plugins-base")
87 "/include/gstreamer-1.0")))))))
90 ("gettext" ,gnu-gettext)
91 ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
92 ("gobject-introspection" ,gobject-introspection)
95 ("pkg-config" ,pkg-config)
96 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
100 ("libsoup" ,libsoup)))
102 `(("at-spi2-core" ,at-spi2-core)
106 ("gst-plugins-base" ,gst-plugins-base)
108 ("harfbuzz" ,harfbuzz)
112 ("libnotify" ,libnotify)
114 ("libsecret" ,libsecret)
116 ("libxcomposite" ,libxcomposite)
122 (home-page "http://www.webkitgtk.org/")
123 (synopsis "Web content engine for GTK+")
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
135 ;; Latest release of the stable 2.4 series, with WebKit1 support.
136 (define-public webkitgtk-2.4
137 (package (inherit webkitgtk)
142 (uri (string-append "http://www.webkitgtk.org/releases/"
143 name "-" version ".tar.xz"))
146 "1xsvnvyvlywwyf6m9ainpsg87jkxjmd37q6zgz9cxb7v3c2ym2jq"))))
147 (build-system gnu-build-system)
149 '(#:tests? #f ; no tests
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.
155 #:phases (modify-phases %standard-phases
158 (lambda _ (setenv "CC" "gcc") #t)))))
162 ,@(package-native-inputs webkitgtk)))))
164 ;; Last GTK+2 port, required by GnuCash.
165 (define-public webkitgtk/gtk+-2
166 (package (inherit webkitgtk-2.4)
167 (name "webkitgtk-gtk2")
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.
175 '("--enable-webkit2=no"
177 ,@(package-arguments webkitgtk-2.4)))
180 ("libsoup" ,libsoup)))))