gnu: dealii: Update to 8.5.0.
[jackhill/guix/guix.git] / gnu / packages / webkit.scm
index 9692ab0..5ab27b4 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, 2017 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 gnupg)
   #: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)
 (define-public webkitgtk
   (package
     (name "webkitgtk")
-    (version "2.8.1")
+    (version "2.16.6")
     (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"))))
+                "08abxbhi2n1pfby9f2c20z8mpmbvbs2z7vf0p5ckq4jkz46na8zw"))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f ; no tests
                           "-DPORT=GTK"
                           (string-append ; uses lib64 by default
                            "-DLIB_INSTALL_DIR="
-                           (assoc-ref %outputs "out") "/lib"))))
+                           (assoc-ref %outputs "out") "/lib"))
+       #: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)
      `(("at-spi2-core" ,at-spi2-core)
        ("enchant" ,enchant)
        ("geoclue" ,geoclue)
-       ("gnutls" ,gnutls)
        ("gst-plugins-base" ,gst-plugins-base)
        ("gtk+-2" ,gtk+-2)
        ("harfbuzz" ,harfbuzz)
+       ("hyphen" ,hyphen)
        ("icu4c" ,icu4c)
+       ("libgcrypt" ,libgcrypt)
        ("libjpeg" ,libjpeg)
        ("libnotify" ,libnotify)
        ("libpng" ,libpng)
@@ -108,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)))))