Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / webkit.scm
index 41b9b9a..fde5ff2 100644 (file)
@@ -1,6 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages enchant)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
-  #:use-module (gnu packages gnutls)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages libreoffice)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages ruby)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 (define-public webkitgtk
   (package
     (name "webkitgtk")
-    (version "2.8.1")
+    (version "2.14.1")
     (source (origin
               (method url-fetch)
-              (uri (string-append "http://www.webkitgtk.org/releases/"
+              (uri (string-append "https://www.webkitgtk.org/releases/"
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "1zv030ryfwwp57yzlpr9bgpxcmc64izsxk2vsyd4kjhns9cl88bx"))))
+                "1dffnz20psgc604azhbzn9a6cdhafar9dw74w3bbwrfy531pcb9f"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f ; no tests
                           (string-append ; uses lib64 by default
                            "-DLIB_INSTALL_DIR="
                            (assoc-ref %outputs "out") "/lib"))
-       #:make-flags '("lib=lib"))) ; uses lib64 by default
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'set-paths 'add-gst-plugins-base-include-path
+          (lambda* (#:key inputs #:allow-other-keys)
+            ;; XXX Work around a problem in the build system, which neglects
+            ;; to add -I for gst-plugins-base when compiling
+            ;; Source/WebKit2/UIProcess/WebPageProxy.cpp, apparently assuming
+            ;; that it will be in the same directory as gstreamer's header
+            ;; files.
+            (setenv "CPATH"
+                    (string-append (getenv "C_INCLUDE_PATH")
+                                   ":"
+                                   (assoc-ref inputs "gst-plugins-base")
+                                   "/include/gstreamer-1.0")))))))
     (native-inputs
      `(("bison" ,bison)
-       ("gettext" ,gnu-gettext)
+       ("gettext" ,gettext-minimal)
        ("glib:bin" ,glib "bin") ; for glib-mkenums, etc.
        ("gobject-introspection" ,gobject-introspection)
        ("gperf" ,gperf)
        ("gst-plugins-base" ,gst-plugins-base)
        ("gtk+-2" ,gtk+-2)
        ("harfbuzz" ,harfbuzz)
+       ("hyphen" ,hyphen)
        ("icu4c" ,icu4c)
        ("libjpeg" ,libjpeg)
        ("libnotify" ,libnotify)
@@ -109,3 +131,50 @@ HTML/CSS applications to full-fledged web browsers.")
                    license:lgpl2.1+
                    license:bsd-2
                    license:bsd-3))))
+
+;; Latest release of the stable 2.4 series, with WebKit1 support.
+(define-public webkitgtk-2.4
+  (package (inherit webkitgtk)
+    (name "webkitgtk")
+    (version "2.4.11")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://www.webkitgtk.org/releases/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "1xsvnvyvlywwyf6m9ainpsg87jkxjmd37q6zgz9cxb7v3c2ym2jq"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; no tests
+       ;; FIXME: Disabling parallel building is a quick hack to avoid the
+       ;; failure described in
+       ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
+       ;; A more structural fix is needed.
+       #:parallel-build? #f
+       #:phases (modify-phases %standard-phases
+                  (add-after
+                   'unpack 'set-gcc
+                   (lambda _ (setenv "CC" "gcc") #t)))))
+    (native-inputs
+     `(("flex" ,flex)
+       ("which" ,which)
+       ,@(package-native-inputs webkitgtk)))))
+
+;; Last GTK+2 port, required by GnuCash.
+(define-public webkitgtk/gtk+-2
+  (package (inherit webkitgtk-2.4)
+    (name "webkitgtk-gtk2")
+    (arguments
+     `(;; FIXME: Disabling parallel building is a quick hack to avoid the
+       ;; failure described in
+       ;; https://lists.gnu.org/archive/html/guix-devel/2016-01/msg00837.html
+       ;; A more structural fix is needed.
+       #:parallel-build? #f
+       #:configure-flags
+       '("--enable-webkit2=no"
+         "--with-gtk=2.0")
+       ,@(package-arguments webkitgtk-2.4)))
+    (propagated-inputs
+     `(("gtk+-2" ,gtk+-2)
+       ("libsoup" ,libsoup)))))