gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / vnc.scm
index e715e10..b8979b2 100644 (file)
@@ -1,6 +1,9 @@
-;;; GNU Guix --- Functional package management for GNU
+;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019 Todor Kondić <tk.code@protonmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +27,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages gettext)
+  #:use-module (gnu packages gnupg)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages sdl)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg))
 
 (define-public tigervnc-client
   (package
     (name "tigervnc-client")
-    (version "1.10.1")
-    (source
-     (origin
-       (method git-fetch)
-       (uri
-        (git-reference
-         (url "https://github.com/TigerVNC/tigervnc.git")
-         (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "001n189d2f3psn7nxgl8188ml6f7jbk26cxn2835y3mnlk5lmhgr"))))
+    (version "1.11.0")
+    (source (origin
+              (method git-fetch)
+              (uri
+               (git-reference
+                (url "https://github.com/TigerVNC/tigervnc")
+                (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "1bg79ahr4mzy48ak0caxy3ckdsxmhpchypggaz6lxjjk92hgsz91"))
+              (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (arguments
      '(#:tests? #f ; Tests that do exists are not automated.
@@ -74,7 +81,8 @@
        ("libxext" ,libxext)
        ("libxtst" ,libxtst)
        ("libxrandr" ,libxrandr)
-       ("libxdamage" ,libxdamage)))
+       ("libxdamage" ,libxdamage)
+       ("pixman" ,pixman)))
     (home-page "https://tigervnc.org/")
     (synopsis "High-performance, platform-neutral
 implementation of VNC (client)")
@@ -98,17 +106,9 @@ application which is needed to connect to VNC servers.")
   (package
     (inherit xorg-server)
     (name "tigervnc-server")
-    (version "1.10.1")
+    (version (package-version tigervnc-client))
     (native-inputs
-     `(("tigervnc-src" ,(origin
-                          (method git-fetch)
-                          (uri
-                           (git-reference
-                            (url "https://github.com/TigerVNC/tigervnc.git")
-                            (commit "v1.9.0")))
-                          (sha256
-                           (base32
-                            "0b47fg3741qs3zdpl2zr0s6jz46dypp2j6gqrappbzm3ywnnmm1x"))))
+     `(("tigervnc-src" ,(package-source tigervnc-client))
        ("autoconf" ,autoconf)
        ("automake" ,automake)
        ("libtool" ,libtool)
@@ -178,9 +178,9 @@ application which is needed to connect to VNC servers.")
                                                           (list-head (string-split xorg-server-version
                                                                                    #\.)
                                                                      2)))
-                                        (fn (format "~a/unix/xserver~a.patch" tvnc-src patch-num)))
+                                        (fn (format #f "~a/unix/xserver~a.patch" tvnc-src patch-num)))
                                      (when (not (file-exists? fn))
-                                       (error (format "Patch file, ~a,
+                                       (error (format #f "Patch file, ~a,
 corresponding to the input xorg-server version, does not exist.  Installation
 will fail.  " fn)))
 
@@ -232,3 +232,43 @@ applications.  It also provides extensions for advanced authentication methods
 and TLS encryption.  This package installs the VNC server, a program that will
 enable users with VNC clients to log into a graphical session on the machine
 where the server is installed.")))
+
+(define-public libvnc
+  (package
+    (name "libvnc")
+    (version "0.9.13")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/LibVNC/libvncserver")
+             (commit (string-append "LibVNCServer-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0zz0hslw8b1p3crnfy3xnmrljik359h83dpk64s697dqdcrzy141"))))
+    (build-system cmake-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-cc-reference
+                    (lambda _
+                      (substitute* "test/includetest.sh"
+                        (("^cc -I")
+                         "gcc -I"))
+                      #t)))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("gnutls" ,gnutls)
+       ("libgcrypt" ,libgcrypt)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("lzo" ,lzo)
+       ("sdl2" ,sdl2)))
+    (home-page "https://libvnc.github.io/")
+    (synopsis "Cross-platform C libraries for implementing VNC server or
+client")
+    (description "This package provides @code{LibVNCServer} and
+@code{LibVNCClient}.  These are cross-platform C libraries that allow you to
+easily implement VNC server or client functionality in your program.")
+    (license ;; GPL for programs, FDL for documentation
+     (list license:gpl2+ license:fdl1.2+))))