gnu: r-fields: Update to 11.4.
[jackhill/guix/guix.git] / gnu / packages / spice.scm
index c9d091c..4aff8db 100644 (file)
@@ -2,7 +2,7 @@
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +43,7 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (guix download)
   #:use-module (guix packages)
   #:use-module ((guix licenses) #:prefix license:)
@@ -101,16 +102,26 @@ system to use the host GPU to accelerate 3D rendering.")
 (define-public spice-protocol
   (package
     (name "spice-protocol")
-    (version "0.14.1")
+    (version "0.14.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
                 "https://www.spice-space.org/download/releases/"
-                "spice-protocol-" version ".tar.bz2"))
+                "spice-protocol-" version ".tar.xz"))
               (sha256
                (base32
-                "0ahk5hlanwhbc64r80xmchdav3ls156cvh9l68a0l22bhdhxmrkr"))))
-    (build-system gnu-build-system)
+                "1sgi9ksb781qs47pdbw0bmnyg8dgayn5xrzj6vzdy043nv466flg"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'install-documentation
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (string-append out "/share/doc/"
+                                        ,name "-" ,version)))
+               (install-file "COPYING" doc)
+               #t))))))
     (synopsis "Protocol headers for the SPICE protocol")
     (description "SPICE (the Simple Protocol for Independent Computing
 Environments) is a remote-display system built for virtual environments
@@ -149,7 +160,7 @@ which allows users to view a desktop computing environment.")
         ("gobject-introspection" ,gobject-introspection)
         ("json-glib" ,json-glib)
         ("libepoxy" ,libepoxy)
-        ("libjpeg" ,libjpeg)
+        ("libjpeg" ,libjpeg-turbo)
         ("libxcb" ,libxcb)
         ("lz4" ,lz4)
         ("mesa" ,mesa)
@@ -178,6 +189,16 @@ which allows users to view a desktop computing environment.")
                (substitute* "tests/Makefile"
                  (("test-session\\$\\(EXEEXT\\) ") ""))
                #t))
+           (add-after 'install 'patch-la-files
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (libjpeg (assoc-ref inputs "libjpeg")))
+                 ;; Add an absolute reference for libjpeg in the .la files
+                 ;; so it does not have to be propagated.
+                 (substitute* (find-files (string-append out "/lib") "\\.la$")
+                   (("-ljpeg")
+                    (string-append "-L" libjpeg "/lib -ljpeg")))
+                 #t)))
            (add-after
             'install 'wrap-spicy
             (lambda* (#:key inputs outputs #:allow-other-keys)