Subject: Re: [bug#27440] [PATCH 1/4] gnu: python: Add python2-pyopengl.

From: Rutger Helling <[email-masked]>
Date: Thu, 22 Jun 2017 22:42:54 +0200

Sorry about that! Here are the patches changed with your suggestions,
sent as attachments. 

On 2017-06-22 21:46, [email-masked] wrote:

> Hi Rutger,
> 
> Rutger Helling <[email-masked]> skribis:
> 
>> +   (description
>> +         "PyOpenGL is the most common cross platform Python binding
>> to OpenGL
>> +and related APIs.  The binding is created using the standard ctypes
>> library.")
> 
> It seems your patches were somehow mangled on the way, with lines
> wrapped as in the example above.
> 
> Could you resend them to this address, preferably with 'git send-email'?
> 
> I would also suggest merging patches 2 and 3, and expounding a bit on
> the 'description' of Xpra in patch 4.  Apart from that it looks alright!
> 
> Thanks,
> Ludo'.

From 68baddf334f1b02ee7ee67a5408d112eba87f8f3 Mon Sep 17 00:00:00 2001
From: Rutger Helling <[email-masked]>
Date: Thu, 22 Jun 2017 22:31:35 +0200
Subject: [PATCH] gnu: python: Add python2-pyopengl.

* gnu/packages/python.scm (python2-pyopengl): New variable.
---
 gnu/packages/python.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a63006a04..27ae2093c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2017 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2017 José Miguel Sánchez García <[email-masked]>
 ;;; Copyright © 2017 Roel Janssen <[email-masked]>
+;;; Copyright © 2017 Rutger Helling <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -15412,3 +15413,25 @@ functionality like full case-folding for case-insensitive matches in Unicode.")
 
 (define-public python2-regex
   (package-with-python2 python-regex))
+
+(define-public python2-pyopengl
+  (package
+   (name "python2-pyopengl")
+   (version "3.1.0")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (pypi-uri "PyOpenGL" version))
+     (sha256
+      (base32
+       "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
+   (arguments
+     `(#:python ,python-2))
+   (build-system python-build-system)
+   (home-page "http://pyopengl.sourceforge.net")
+   (synopsis "Standard OpenGL bindings for Python")
+   (description
+         "PyOpenGL is the most common cross platform Python binding to OpenGL
+and related APIs.  The binding is created using the standard ctypes library, and
+is provided under an extremely liberal BSD-style Open-Source license.")
+   (license license:bsd-3)))
-- 
2.13.1

From 61e2259cdc6167e4747c32f07188917dd0d94413 Mon Sep 17 00:00:00 2001
From: Rutger Helling <[email-masked]>
Date: Thu, 22 Jun 2017 22:33:28 +0200
Subject: [PATCH] gnu: python: Add python-rencode.

* gnu/packages/python.scm (python-rencode): New variable.
---
 gnu/packages/python.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 27ae2093c..fa5ff0cfc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -15435,3 +15435,30 @@ functionality like full case-folding for case-insensitive matches in Unicode.")
 and related APIs.  The binding is created using the standard ctypes library, and
 is provided under an extremely liberal BSD-style Open-Source license.")
    (license license:bsd-3)))
+
+(define-public python-rencode
+  (package
+   (name "python-rencode")
+   (version "1.0.3")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (pypi-uri "rencode" version))
+     (sha256
+      (base32
+       "08if5yax1xn5yfp8p3765ccjmfcv9di7i4m5jckgnwvdsgznwkbj"))))
+   (build-system python-build-system)
+   (native-inputs `(("pkg-config" ,pkg-config)
+                   ("python-cython", python-cython)))
+   (home-page "https://github.com/aresch/rencode")
+   (synopsis "For complex, heterogeneous data structures with many small elements")
+   (description
+         "The rencode module is similar to bencode from the BitTorrent project.
+For complex, heterogeneous data structures with many small elements, r-encoding
+stake up significantly less space than b-encodings.  This version of rencode is a
+complete rewrite in Cython to attempt to increase the performance over the pure
+Python module written by Petru Paler, Connelly Barnes et al.")
+   (license license:bsd-3)))
+
+(define-public python2-rencode
+  (package-with-python2 python-rencode))
-- 
2.13.1
From ae9a4999066f6ae35a9c90cd2b23ec98e61c26c7 Mon Sep 17 00:00:00 2001
From: Rutger Helling <[email-masked]>
Date: Thu, 22 Jun 2017 22:19:42 +0200
Subject: [PATCH] gnu: xorg: Add xpra.

* gnu/packages/xorg.scm (xpra): New variable.
---
 gnu/packages/xorg.scm | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index e40e681d2..6ace94e96 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2016 David Craven <[email-masked]>
 ;;; Copyright © 2016, 2017 John Darrington <[email-masked]>
 ;;; Copyright © 2017 Marius Bakke <[email-masked]>
+;;; Copyright © 2017 Rutger Helling <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +36,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
+  #:use-module (guix build-system python)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
@@ -48,6 +50,7 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
   #:use-module (gnu packages linux)
@@ -58,6 +61,8 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages spice)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xdisorg))
 
@@ -5790,3 +5795,81 @@ basic eye-candy effects.")
     (home-page "https://cgit.freedesktop.org/xorg/app/xcompmgr/")
     (license (license:x11-style
               "https://cgit.freedesktop.org/xorg/app/xcompmgr/tree/COPYING"))))
+
+(define-public xpra
+  (package
+    (name "xpra")
+    (version "2.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.xpra.org/src/xpra-"
+                           version ".tar.xz"))
+       (sha256
+        (base32
+         "09hzgbsj9v5qyh41rbz968ipi7016jk66b60vm6piryna9kbnha3"))))
+    (build-system python-build-system)
+    (inputs `(("ffmpeg", ffmpeg)
+              ("flac", flac)
+              ("gtk+-2" ,gtk+-2) ;; no full GTK3 support yet
+              ("libjpeg", libjpeg)
+              ("libpng", libpng)
+              ("libvpx", libvpx)
+              ("libx264", libx264)
+              ("libxcomposite", libxcomposite)
+              ("libxdamage", libxdamage)
+              ("libxkbfile", libxkbfile)
+              ("libxrandr", libxrandr)
+              ("libxtst", libxtst)
+              ("lzo", lzo)
+              ("python2-cryptography", python2-cryptography)
+              ("python2-dbus", python2-dbus)
+              ("python2-lz4", python2-lz4)
+              ("python2-lzo", python2-lzo)
+              ("python2-numpy", python2-numpy)
+              ("python2-pillow" ,python2-pillow)
+              ("python2-pycairo", python2-pycairo)
+              ("python2-pycrypto", python2-pycrypto)
+              ("python2-pygobject", python2-pygobject)
+              ("python2-pyopengl", python2-pyopengl)
+              ("python2-pygtk", python2-pygtk)
+              ("python2-rencode", python2-rencode)
+              ("xorg-server", xorg-server)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                    ("python2-cython", python2-cython)))
+    (arguments
+      `(#:python ,python-2 ;; no full Python 3 support yet
+        #:configure-flags '("--with-tests"
+                            "--with-bundle_tests"
+                            "--without-strict")
+        #:modules ((guix build python-build-system) (guix build utils))
+        #:phases (modify-phases %standard-phases
+          (delete 'build)
+          (delete 'check) ;; There's no test suite at the moment.
+          ;; Remove BUILD_CPU, BUILD_DATE, BUILD_TIME
+          ;; from build info to prevent deterministic issues.
+          ;; Also correct some directories and use the xvfb
+          ;; binary instead of xorg-server (which doesn't seem
+          ;; to work).
+          (add-before 'install 'fix-output
+            (lambda _
+              (substitute* "add_build_info.py"
+                ((".*\"BUILD_CPU\", get_cpuinfo.*") ""))
+              (substitute* "add_build_info.py"
+                ((".*\"BUILD_DATE\", datetime.*") ""))
+              (substitute* "add_build_info.py"
+                ((".*\"BUILD_TIME\", datetime.*") ""))
+              (substitute* "setup.py"
+                (("/etc/init.d/") (string-append %output "/etc/init.d/")))
+              (substitute* "setup.py"
+                (("/usr/lib/") (string-append %output "/lib/")))
+              (substitute* "./etc/xpra/conf.d/55_server_x11.conf.in"
+                           (("xvfb = %.*") (string-append "xvfb = " (assoc-ref
+%build-inputs "xorg-server") "/bin/Xvfb +extension Composite -nolisten tcp"
+"-noreset -auth $XAUTHORITY -screen 0 5760x2560x24+32"))))))))
+    (home-page "https://www.xpra.org/")
+    (synopsis "Remote access to individual applications or full desktops")
+    (description "Xpra is a persistent remote display server and client for
+forwarding applications and desktop screens.")
+    (license license:gpl2+)))
+ 
-- 
2.13.1