Subject: [bug#29517] [PATCH] gnu: gl: Add virtualgl. (v2)

From: Rutger Helling <[email-masked]>
Date: Fri, 08 Dec 2017 11:38:07 +0100

Hi Ludo, 

thanks for the review! Here are updated patches based on your feedback. 

On 2017-12-08 10:21, [email-masked] wrote:

> Hi,
> 
> Rutger Helling <[email-masked]> skribis:
> 
>> From d2b7f7243a8831542538bad5bab14fba0693a4fc Mon Sep 17 00:00:00 2001
>> From: Rutger Helling <[email-masked]>
>> Date: Thu, 7 Dec 2017 09:11:08 +0100
>> Subject: [PATCH] gnu: gl: Add virtualgl.
>> 
>> * gnu/packages/gl.scm (virtualgl): New variable.
> 
> LGTM, with a few minor issues:
> 
>> +    (home-page "https://www.virtualgl.org")
>> +    (synopsis "Redirects 3D commands from an OpenGL application onto a 3D
>> +graphics card")
>> +    (description "VirtualGL is a free software program that redirects the 3D
> 
> s/free software//
> 
> (Everything's free software in Guix.  :-))
> 
>> +rendering commands from Unix and Linux OpenGL applications to 3D accelerator
> 
> s/Unix and Linux//g
> 
>> +hardware in a dedicated server and displays the rendered output interactively to
>> +a thin client located elsewhere on the network.")
>> +    (license license:lgpl2.1)))
> 
> Source code headers read this:
> 
> * This library is free software and may be redistributed and/or modified under
> * the terms of the wxWindows Library License, Version 3.1 or (at your option)
> * any later version.  The full license is in the LICENSE.txt file included
> * with this distribution.
> *
> * This library is distributed in the hope that it will be useful,
> * but WITHOUT ANY WARRANTY; without even the implied warranty of
> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> * wxWindows Library License for more details.
> 
> We don't have that license in (guix licenses) yet.  Could you add it and
> send updated patches?
> 
> Thanks,
> Ludo'.

From c593bd89f7f991cc8d9a19e1d06f0439f16d7805 Mon Sep 17 00:00:00 2001
From: Rutger Helling <[email-masked]>
Date: Fri, 8 Dec 2017 11:31:57 +0100
Subject: [PATCH] guix: licenses: Add wxWindows 3.1 license.

* guix/licenses.scm: Add wxWindows 3.1 license.
---
 guix/licenses.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/guix/licenses.scm b/guix/licenses.scm
index b07d80076..8fa121fd4 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2017 Petter <[email-masked]>
 ;;; Copyright © 2017 Marius Bakke <[email-masked]>
 ;;; Copyright © 2017 Arun Isaac <[email-masked]>
+;;; Copyright © 2017 Rutger Helling <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,6 +92,7 @@
             zlib
             fsf-free
             wtfpl2
+            wxwindows3.1
             fsdg-compatible))
 
 (define-record-type <license>
@@ -581,6 +583,11 @@ at URI, which may be a file:// URI pointing the package's tree."
            "http://www.wtfpl.net"
            "http://www.wtfpl.net/about/"))
 
+(define wxwindows3.1
+  (license "wxWindows 3.1"
+           "https://wxwidgets.org"
+           "https://wxwidgets.org/about/licence"))
+
 (define x11
   (license "X11"
            "http://directory.fsf.org/wiki/License:X11"
-- 
2.15.1

From 3039ed703888a50cc7f5552578a2c4073a77b829 Mon Sep 17 00:00:00 2001
From: Rutger Helling <[email-masked]>
Date: Fri, 8 Dec 2017 11:33:54 +0100
Subject: [PATCH] gnu: gl: Add virtualgl.

* gnu/packages/gl.scm (virtualgl): New variable.
---
 gnu/packages/gl.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 50c327156..d74362727 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016 David Thompson <[email-masked]>
 ;;; Copyright © 2017 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2017 Arun Isaac <[email-masked]>
+;;; Copyright © 2017 Rutger Helling <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,6 +42,7 @@
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages tls)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
@@ -676,3 +678,36 @@ mixed vector/bitmap output.")
     (license (list license:lgpl2.0+
                    (license:fsf-free "http://www.geuz.org/gl2ps/COPYING.GL2PS"
                                      "GPL-incompatible copyleft license")))))
+
+(define-public virtualgl
+  (package
+    (name "virtualgl")
+    (version "2.5.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/VirtualGL/virtualgl/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0rnid3hwrry9d5d4m7sygq00xxx976rgk00a3557m9r5kxbmy476"))))
+    (arguments
+     `(#:tests? #f ;; no tests are available
+       #:configure-flags (list "-DVGL_USESSL=1" ;; use OpenSSL
+                          (string-append "-DCMAKE_INSTALL_LIBDIR="
+                                         (assoc-ref %outputs "out") "/lib"))))
+    (build-system cmake-build-system)
+    (inputs `(("glu" ,glu)
+              ("libjpeg-turbo" ,libjpeg-turbo)
+              ("mesa" ,mesa)
+              ("openssl" ,openssl)))
+    (native-inputs `(("pkg-config", pkg-config)))
+    (home-page "https://www.virtualgl.org")
+    (synopsis "Redirects 3D commands from an OpenGL application onto a 3D
+graphics card")
+    (description "VirtualGL redirects the 3D rendering commands from OpenGL
+applications to 3D accelerator hardware in a dedicated server and displays the
+rendered output interactively to a thin client located elsewhere on the
+network.")
+    (license license:wxwindows3.1)))
-- 
2.15.1