gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / webkit.scm
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, 2017 Mark H Weaver <mhw@netris.org>
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)
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))
52
53 (define-public webkitgtk
54 (package
55 (name "webkitgtk")
56 (version "2.14.5")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "https://www.webkitgtk.org/releases/"
60 name "-" version ".tar.xz"))
61 (sha256
62 (base32
63 "17rnjs7yl198bkghzcc2cgh30sb5i03irb6wag3xchwv7b1z3a1w"))))
64 (build-system cmake-build-system)
65 (arguments
66 '(#:tests? #f ; no tests
67 #:build-type "Release" ; turn off debugging symbols to save space
68 #:configure-flags (list
69 "-DPORT=GTK"
70 (string-append ; uses lib64 by default
71 "-DLIB_INSTALL_DIR="
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"
84 (string-append (getenv "C_INCLUDE_PATH")
85 ":"
86 (assoc-ref inputs "gst-plugins-base")
87 "/include/gstreamer-1.0")))))))
88 (native-inputs
89 `(("bison" ,bison)
90 ("gettext" ,gettext-minimal)
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)
109 ("hyphen" ,hyphen)
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))))
134
135 ;; Latest release of the stable 2.4 series, with WebKit1 support.
136 (define-public webkitgtk-2.4
137 (package (inherit webkitgtk)
138 (name "webkitgtk")
139 (version "2.4.11")
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
146 "1xsvnvyvlywwyf6m9ainpsg87jkxjmd37q6zgz9cxb7v3c2ym2jq"))))
147 (build-system gnu-build-system)
148 (arguments
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.
154 #:parallel-build? #f
155 #:phases (modify-phases %standard-phases
156 (add-after
157 'unpack 'set-gcc
158 (lambda _ (setenv "CC" "gcc") #t)))))
159 (native-inputs
160 `(("flex" ,flex)
161 ("which" ,which)
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)
167 (name "webkitgtk-gtk2")
168 (arguments
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
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)))))