gnu: Add libwpe.
[jackhill/guix/guix.git] / gnu / packages / webkit.scm
index 91c6c7d..e4e7c06 100644 (file)
@@ -2,9 +2,10 @@
 ;;; 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, 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
+(define-public libwpe
+  (package
+    (name "libwpe")
+    (version "1.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://wpewebkit.org/releases/libwpe-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "1221vs72zs87anrzhbm6pf8jnii7s6ms7mkzj6nlds9zqd7lklz2"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))                    ;no tests
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("mesa" ,mesa)))
+    (propagated-inputs
+     `(;; In Requires of wpe-1.0.pc.
+       ("libxkbcommon" ,libxkbcommon)))
+    (home-page "https://wpewebkit.org/")
+    (synopsis "Platform agnostic WebKit interfaces")
+    (description
+     "@code{libwpe} is a small library that defines programming interfaces
+for use by WebKit, and provides a mechanism for loading a platform-specific
+backend which implements them.")
+    (license license:bsd-2)))
+
 (define-public webkitgtk
   (package
     (name "webkitgtk")
@@ -165,20 +196,23 @@ HTML/CSS applications to full-fledged web browsers.")
 ;; newer version of GCC than our default compiler, and this causes problems
 ;; when linked with C++ libraries built using our default compiler.  For now,
 ;; we use this newer webkitgtk only for selected packages, e.g. epiphany.
-(define-public webkitgtk-2.22
+(define-public webkitgtk-2.24
   (package/inherit webkitgtk
     (name "webkitgtk")
-    (version "2.22.6")
+    (version "2.24.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://www.webkitgtk.org/releases/"
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "0ny8azipr2dmdk79qrf4hvb2p4k5b3af38szjhmhg8mh1nfdp46z"))))
+                "1n3x5g1z6rg9n1ssna7wi0z6zlprjm4wzk544v14wqi6q0lv2s46"))))
     (native-inputs
      `(("gcc" ,gcc-7)  ; webkitgtk-2.22 requires gcc-6 or newer
        ,@(package-native-inputs webkitgtk)))
+    (inputs
+     `(("openjpeg" ,openjpeg)
+       ,@(package-inputs webkitgtk)))
     (arguments
      (substitute-keyword-arguments (package-arguments webkitgtk)
        ((#:phases phases)