gnu: webkitgtk-2.4: Update to 2.8.9, build with gtk3.
[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 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages webkit)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system cmake)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages bison)
30 #:use-module (gnu packages databases)
31 #:use-module (gnu packages enchant)
32 #:use-module (gnu packages flex)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages gl)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gnome)
37 #:use-module (gnu packages gnutls)
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 perl)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages ruby)
47 #:use-module (gnu packages video)
48 #:use-module (gnu packages xml)
49 #:use-module (gnu packages xorg))
50
51 (define-public webkitgtk
52 (package
53 (name "webkitgtk")
54 (version "2.8.1")
55 (source (origin
56 (method url-fetch)
57 (uri (string-append "http://www.webkitgtk.org/releases/"
58 name "-" version ".tar.xz"))
59 (sha256
60 (base32
61 "1zv030ryfwwp57yzlpr9bgpxcmc64izsxk2vsyd4kjhns9cl88bx"))))
62 (build-system cmake-build-system)
63 (arguments
64 '(#:tests? #f ; no tests
65 #:build-type "Release" ; turn off debugging symbols to save space
66 #:configure-flags (list
67 "-DPORT=GTK"
68 (string-append ; uses lib64 by default
69 "-DLIB_INSTALL_DIR="
70 (assoc-ref %outputs "out") "/lib"))))
71 (native-inputs
72 `(("bison" ,bison)
73 ("gettext" ,gnu-gettext)
74 ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
75 ("gobject-introspection" ,gobject-introspection)
76 ("gperf" ,gperf)
77 ("perl" ,perl)
78 ("pkg-config" ,pkg-config)
79 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
80 ("ruby" ,ruby)))
81 (propagated-inputs
82 `(("gtk+" ,gtk+)
83 ("libsoup" ,libsoup)))
84 (inputs
85 `(("at-spi2-core" ,at-spi2-core)
86 ("enchant" ,enchant)
87 ("geoclue" ,geoclue)
88 ("gnutls" ,gnutls)
89 ("gst-plugins-base" ,gst-plugins-base)
90 ("gtk+-2" ,gtk+-2)
91 ("harfbuzz" ,harfbuzz)
92 ("icu4c" ,icu4c)
93 ("libjpeg" ,libjpeg)
94 ("libnotify" ,libnotify)
95 ("libpng" ,libpng)
96 ("libsecret" ,libsecret)
97 ("libwebp" ,libwebp)
98 ("libxcomposite" ,libxcomposite)
99 ("libxml2" ,libxml2)
100 ("libxslt" ,libxslt)
101 ("libxt" ,libxt)
102 ("mesa" ,mesa)
103 ("sqlite" ,sqlite)))
104 (home-page "http://www.webkitgtk.org/")
105 (synopsis "Web content engine for GTK+")
106 (description
107 "WebKitGTK+ is a full-featured port of the WebKit rendering engine,
108 suitable for projects requiring any kind of web integration, from hybrid
109 HTML/CSS applications to full-fledged web browsers.")
110 ;; WebKit's JavaScriptCore and WebCore components are available under
111 ;; the GNU LGPL, while the rest is available under a BSD-style license.
112 (license (list license:lgpl2.0
113 license:lgpl2.1+
114 license:bsd-2
115 license:bsd-3))))
116
117 ;; Latest release of the stable 2.4 series, with WebKit1 support.
118 (define-public webkitgtk-2.4
119 (package (inherit webkitgtk)
120 (name "webkitgtk")
121 (version "2.4.9")
122 (source (origin
123 (method url-fetch)
124 (uri (string-append "http://www.webkitgtk.org/releases/"
125 name "-" version ".tar.xz"))
126 (sha256
127 (base32
128 "0r651ar3p0f8zwl7764kyimxk5hy88cwy116pv8cl5l8hbkjkpxg"))))
129 (build-system gnu-build-system)
130 (arguments
131 '(#:tests? #f ; no tests
132 #:phases (modify-phases %standard-phases
133 (add-after
134 'unpack 'set-gcc
135 (lambda _ (setenv "CC" "gcc") #t)))))
136 (native-inputs
137 `(("flex" ,flex)
138 ("which" ,which)
139 ,@(package-native-inputs webkitgtk)))))
140
141 ;; Last GTK+2 port, required by GnuCash.
142 (define-public webkitgtk/gtk+-2
143 (package (inherit webkitgtk-2.4)
144 (name "webkitgtk")
145 (arguments
146 `(#:configure-flags
147 '("--enable-webkit2=no"
148 "--with-gtk=2.0")
149 ,@(package-arguments webkitgtk-2.4)))
150 (propagated-inputs
151 `(("gtk+-2" ,gtk+-2)
152 ("libsoup" ,libsoup)))))