all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add cool-retro-term.
@ 2017-04-23 11:55 Petter
  2017-04-23 19:18 ` Chris Marusich
  0 siblings, 1 reply; 17+ messages in thread
From: Petter @ 2017-04-23 11:55 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 4621 bytes --]

Hi Guix,

The past is finally here! Had a go at packaging a terminal emulator
which mimics old cathode displays :)

Let me know if there are issues!

Best,
Petter


From 5b71b1613af82b2a5b36d7c1395c27afb0842255 Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..4cb9cee4b 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on its behalf.  It avoids
 calling @code{malloc} during normal running state, allowing it to be used in
 embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+  (package
+    (name "cool-retro-term")
+    (version (string-append "1.0.0-" revision "." (string-take commit 7)))
+    (source (origin
+              (method git-fetch)
+              (modules '((guix build utils)))
+              (file-name (string-append name "-" version "-checkout"))
+              (uri (git-reference
+                    (url (string-append "https://github.com/Swordfish90/" name))
+                    (commit commit)
+                    (recursive? #t)))
+              (sha256
+               (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("qt" ,qt)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("qmltermwidget/qmltermwidget.pro")
+                        (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                         (string-append "INSTALL_DIR = " out "/qml")))
+                      (substitute* '("app/app.pro")
+                        (("target.path \\+= /usr")
+                         (string-append "target.path += " out))
+                        (("icon32.path = /usr/share")
+                         (string-append "icon32.path = " out))
+                        (("icon64.path = /usr/share")
+                         (string-append "icon64.path = " out))
+                        (("icon128.path = /usr/share")
+                         (string-append "icon128.path = " out))
+                        (("icon256.path = /usr/share")
+                         (string-append "icon256.path = " out)))
+                      (zero? (system* "qmake")))))
+         (add-before 'install 'fix-Makefiles
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("Makefile")
+                        (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+         (add-after 'install 'wrap-executable
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out "/bin/cool-retro-term")
+                          `("QML2_IMPORT_PATH" ":" prefix
+                            (,(string-append out "/qml"))))))))))
+    (synopsis "terminal emulator which mimics the look and feel of the old
+cathode tube screens")
+    (description
+     "Cool-retro-term is a terminal emulator which mimics the look and feel of
+the old cathode tube screens. It has been designed to be eye-candy,
+customizable, and reasonably lightweight.")
+    (home-page "https://github.com/Swordfish90/cool-retro-term")
+    (license (list license:gpl2 license:gpl3)))))
-- 
2.12.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-cool-retro-term.patch --]
[-- Type: text/x-patch, Size: 4445 bytes --]

From 5b71b1613af82b2a5b36d7c1395c27afb0842255 Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..4cb9cee4b 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on its behalf.  It avoids
 calling @code{malloc} during normal running state, allowing it to be used in
 embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+  (package
+    (name "cool-retro-term")
+    (version (string-append "1.0.0-" revision "." (string-take commit 7)))
+    (source (origin
+              (method git-fetch)
+              (modules '((guix build utils)))
+              (file-name (string-append name "-" version "-checkout"))
+              (uri (git-reference
+                    (url (string-append "https://github.com/Swordfish90/" name))
+                    (commit commit)
+                    (recursive? #t)))
+              (sha256
+               (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("qt" ,qt)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("qmltermwidget/qmltermwidget.pro")
+                        (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                         (string-append "INSTALL_DIR = " out "/qml")))
+                      (substitute* '("app/app.pro")
+                        (("target.path \\+= /usr")
+                         (string-append "target.path += " out))
+                        (("icon32.path = /usr/share")
+                         (string-append "icon32.path = " out))
+                        (("icon64.path = /usr/share")
+                         (string-append "icon64.path = " out))
+                        (("icon128.path = /usr/share")
+                         (string-append "icon128.path = " out))
+                        (("icon256.path = /usr/share")
+                         (string-append "icon256.path = " out)))
+                      (zero? (system* "qmake")))))
+         (add-before 'install 'fix-Makefiles
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("Makefile")
+                        (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+         (add-after 'install 'wrap-executable
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out "/bin/cool-retro-term")
+                          `("QML2_IMPORT_PATH" ":" prefix
+                            (,(string-append out "/qml"))))))))))
+    (synopsis "terminal emulator which mimics the look and feel of the old
+cathode tube screens")
+    (description
+     "Cool-retro-term is a terminal emulator which mimics the look and feel of
+the old cathode tube screens. It has been designed to be eye-candy,
+customizable, and reasonably lightweight.")
+    (home-page "https://github.com/Swordfish90/cool-retro-term")
+    (license (list license:gpl2 license:gpl3)))))
-- 
2.12.2


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-23 11:55 [PATCH] gnu: Add cool-retro-term Petter
@ 2017-04-23 19:18 ` Chris Marusich
  2017-04-23 21:12   ` Petter
  0 siblings, 1 reply; 17+ messages in thread
From: Chris Marusich @ 2017-04-23 19:18 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]

Petter <petter@mykolab.ch> writes:

> Hi Guix,
>
> The past is finally here! Had a go at packaging a terminal emulator
> which mimics old cathode displays :)

Wow!!  This is really fun.  Thanks for packaging it!

> +       (modify-phases %standard-phases
> +         (replace 'configure
> +                  (lambda* (#:key outputs #:allow-other-keys)
> +                    (let ((out (assoc-ref outputs "out")))
> +                      (substitute* '("qmltermwidget/qmltermwidget.pro")
> +                        (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
> +                         (string-append "INSTALL_DIR = " out "/qml")))
> +                      (substitute* '("app/app.pro")
> +                        (("target.path \\+= /usr")
> +                         (string-append "target.path += " out))
> +                        (("icon32.path = /usr/share")
> +                         (string-append "icon32.path = " out))
> +                        (("icon64.path = /usr/share")
> +                         (string-append "icon64.path = " out))
> +                        (("icon128.path = /usr/share")
> +                         (string-append "icon128.path = " out))
> +                        (("icon256.path = /usr/share")
> +                         (string-append "icon256.path = " out)))
> +                      (zero? (system* "qmake")))))

Should these icons be put somewhere else, like in the $out/share path?
If it works, it works, though.  (info '(standards) Directory Variables'):

> +    (synopsis "terminal emulator which mimics the look and feel of the old
> +cathode tube screens")
> +    (description
> +     "Cool-retro-term is a terminal emulator which mimics the look and feel of
> +the old cathode tube screens. It has been designed to be eye-candy,
> +customizable, and reasonably lightweight.")

Just minor feedback: Maybe use the phrases "CRT" and "cathode ray tube"
to make this easier to discover?

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-23 19:18 ` Chris Marusich
@ 2017-04-23 21:12   ` Petter
  2017-04-23 23:31     ` Chris Marusich
  0 siblings, 1 reply; 17+ messages in thread
From: Petter @ 2017-04-23 21:12 UTC (permalink / raw)
  To: Chris Marusich; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 6806 bytes --]

On Sun, 23 Apr 2017 12:18:05 -0700
Chris Marusich <cmmarusich@gmail.com> wrote:

> Petter <petter@mykolab.ch> writes:
> 
> > Hi Guix,
> >
> > The past is finally here! Had a go at packaging a terminal emulator
> > which mimics old cathode displays :)  
> 
> Wow!!  This is really fun.  Thanks for packaging it!

:)

> > +       (modify-phases %standard-phases
> > +         (replace 'configure
> > +                  (lambda* (#:key outputs #:allow-other-keys)
> > +                    (let ((out (assoc-ref outputs "out")))
> > +                      (substitute*
> > '("qmltermwidget/qmltermwidget.pro")
> > +                        (("INSTALL_DIR =
> > \\$\\$\\[QT_INSTALL_QML\\]")
> > +                         (string-append "INSTALL_DIR = " out
> > "/qml")))
> > +                      (substitute* '("app/app.pro")
> > +                        (("target.path \\+= /usr")
> > +                         (string-append "target.path += " out))
> > +                        (("icon32.path = /usr/share")
> > +                         (string-append "icon32.path = " out))
> > +                        (("icon64.path = /usr/share")
> > +                         (string-append "icon64.path = " out))
> > +                        (("icon128.path = /usr/share")
> > +                         (string-append "icon128.path = " out))
> > +                        (("icon256.path = /usr/share")
> > +                         (string-append "icon256.path = " out)))
> > +                      (zero? (system* "qmake")))))  
> 
> Should these icons be put somewhere else, like in the $out/share path?
> If it works, it works, though.  (info '(standards) Directory
> Variables'):

Indeed, I've fixed it.

> > +    (synopsis "terminal emulator which mimics the look and feel of
> > the old +cathode tube screens")
> > +    (description
> > +     "Cool-retro-term is a terminal emulator which mimics the look
> > and feel of +the old cathode tube screens. It has been designed to
> > be eye-candy, +customizable, and reasonably lightweight.")  
> 
> Just minor feedback: Maybe use the phrases "CRT" and "cathode ray
> tube" to make this easier to discover?
> 

Sure! Added your suggestions in the updated patch.

Thanks for the feedback!

Best,
Petter


From 453f6c6c2017c8598b29690b245f76d691d09870 Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62
  ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62
  insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..69ca46c98 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García
<jmi2k@openmailbox.org> ;;; Copyright © 2017 Tobias Geerinckx-Rice
<me@tobias.gr> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on
its behalf.  It avoids calling @code{malloc} during normal running
state, allowing it to be used in embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+  (package
+    (name "cool-retro-term")
+    (version (string-append "1.0.0-" revision "." (string-take commit
7)))
+    (source (origin
+              (method git-fetch)
+              (modules '((guix build utils)))
+              (file-name (string-append name "-" version "-checkout"))
+              (uri (git-reference
+                    (url (string-append
"https://github.com/Swordfish90/" name))
+                    (commit commit)
+                    (recursive? #t)))
+              (sha256
+               (base32
"1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("qt" ,qt)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("qmltermwidget/qmltermwidget.pro")
+                        (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                         (string-append "INSTALL_DIR = " out "/qml")))
+                      (substitute* '("app/app.pro")
+                        (("target.path \\+= /usr")
+                         (string-append "target.path += " out))
+                        (("icon32.path = /usr/share")
+                         (string-append "icon32.path = " out "/share"))
+                        (("icon64.path = /usr/share")
+                         (string-append "icon64.path = " out "/share"))
+                        (("icon128.path = /usr/share")
+                         (string-append "icon128.path = " out
"/share"))
+                        (("icon256.path = /usr/share")
+                         (string-append "icon256.path = " out
"/share")))
+                      (zero? (system* "qmake")))))
+         (add-before 'install 'fix-Makefiles
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("Makefile")
+                        (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+         (add-after 'install 'wrap-executable
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out
"/bin/cool-retro-term")
+                          `("QML2_IMPORT_PATH" ":" prefix
+                            (,(string-append out "/qml"))))))))))
+    (synopsis "Terminal emulator which mimics the look and feel of the
old +cathode ray tube screens")
+    (description
+     "Cool-retro-term (CRT) is a terminal emulator which mimics the
look and +feel of the old cathode ray tube (CRT) screens. It has been
designed to be +eye-candy, customizable, and reasonably lightweight.")
+    (home-page "https://github.com/Swordfish90/cool-retro-term")
+    (license (list license:gpl2 license:gpl3)))))
-- 
2.12.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-cool-retro-term.patch --]
[-- Type: text/x-patch, Size: 4494 bytes --]

From 453f6c6c2017c8598b29690b245f76d691d09870 Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..69ca46c98 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on its behalf.  It avoids
 calling @code{malloc} during normal running state, allowing it to be used in
 embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+  (package
+    (name "cool-retro-term")
+    (version (string-append "1.0.0-" revision "." (string-take commit 7)))
+    (source (origin
+              (method git-fetch)
+              (modules '((guix build utils)))
+              (file-name (string-append name "-" version "-checkout"))
+              (uri (git-reference
+                    (url (string-append "https://github.com/Swordfish90/" name))
+                    (commit commit)
+                    (recursive? #t)))
+              (sha256
+               (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("qt" ,qt)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("qmltermwidget/qmltermwidget.pro")
+                        (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                         (string-append "INSTALL_DIR = " out "/qml")))
+                      (substitute* '("app/app.pro")
+                        (("target.path \\+= /usr")
+                         (string-append "target.path += " out))
+                        (("icon32.path = /usr/share")
+                         (string-append "icon32.path = " out "/share"))
+                        (("icon64.path = /usr/share")
+                         (string-append "icon64.path = " out "/share"))
+                        (("icon128.path = /usr/share")
+                         (string-append "icon128.path = " out "/share"))
+                        (("icon256.path = /usr/share")
+                         (string-append "icon256.path = " out "/share")))
+                      (zero? (system* "qmake")))))
+         (add-before 'install 'fix-Makefiles
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("Makefile")
+                        (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+         (add-after 'install 'wrap-executable
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out "/bin/cool-retro-term")
+                          `("QML2_IMPORT_PATH" ":" prefix
+                            (,(string-append out "/qml"))))))))))
+    (synopsis "Terminal emulator which mimics the look and feel of the old
+cathode ray tube screens")
+    (description
+     "Cool-retro-term (CRT) is a terminal emulator which mimics the look and
+feel of the old cathode ray tube (CRT) screens. It has been designed to be
+eye-candy, customizable, and reasonably lightweight.")
+    (home-page "https://github.com/Swordfish90/cool-retro-term")
+    (license (list license:gpl2 license:gpl3)))))
-- 
2.12.2


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-23 21:12   ` Petter
@ 2017-04-23 23:31     ` Chris Marusich
  2017-04-24 12:30       ` Petter
  0 siblings, 1 reply; 17+ messages in thread
From: Chris Marusich @ 2017-04-23 23:31 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

Hi Petter,

> +    (synopsis "Terminal emulator which mimics the look and feel of the
> old +cathode ray tube screens")
> +    (description
> +     "Cool-retro-term (CRT) is a terminal emulator which mimics the
> look and +feel of the old cathode ray tube (CRT) screens. It has been
> designed to be +eye-candy, customizable, and reasonably lightweight.")

Oh!  I didn't even realize that the name was a play on words.  Cute.

By the way, the output of 'guix lint' points out the following:

--8<---------------cut here---------------start------------->8---
[0] marusich@garuda:~/guix
$ ./pre-inst-env guix lint cool-retro-term
gnu/packages/terminals.scm:493:5: cool-retro-term@1.0.0-1.e4871
9f: sentences in description should be followed by two spaces; 
possible infraction at 117                                    
checking cool-retro-term@1.0.0-1.e48719f [inputs-should-be-nati
checking cool-retro-term@1.0.0-1.e48719f [inputs-should-not-be-
gnu/packages/terminals.scm:490:14: cool-retro-term@1.0.0-1.e487
19f: synopsis should be less than 80 characters long          
[0] marusich@garuda:~/guix
$
--8<---------------cut here---------------end--------------->8---

Think you could submit one more patch to tidy up those?  Anyway, I can't
commit your patch (I don't have commit access), but somebody else
probably can.

Love this contribution, by the way.  I'm sending an email from within
CRT right now...!  :-)

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-23 23:31     ` Chris Marusich
@ 2017-04-24 12:30       ` Petter
  2017-04-26  3:36         ` Eric Bavier
  2017-04-30 20:47         ` Chris Marusich
  0 siblings, 2 replies; 17+ messages in thread
From: Petter @ 2017-04-24 12:30 UTC (permalink / raw)
  To: Chris Marusich; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 6346 bytes --]

Hi Chris,

> 
> By the way, the output of 'guix lint' points out the following:

Oh lint, I had forgotten about that.

> --8<---------------cut here---------------start------------->8---
> [0] marusich@garuda:~/guix
> $ ./pre-inst-env guix lint cool-retro-term
> gnu/packages/terminals.scm:493:5: cool-retro-term@1.0.0-1.e4871
> 9f: sentences in description should be followed by two spaces; 
> possible infraction at 117                                    
> checking cool-retro-term@1.0.0-1.e48719f [inputs-should-be-nati
> checking cool-retro-term@1.0.0-1.e48719f [inputs-should-not-be-
> gnu/packages/terminals.scm:490:14: cool-retro-term@1.0.0-1.e487
> 19f: synopsis should be less than 80 characters long          
> [0] marusich@garuda:~/guix
> $
> --8<---------------cut here---------------end--------------->8---
> 
> Think you could submit one more patch to tidy up those?  Anyway, I
> can't commit your patch (I don't have commit access), but somebody
> else probably can.

I sure can. Thanks for helping out!

I lowercased the Cool-retro-term abbreviation, (crt). I think it's a
little better, but no strong feelings.

What do you think of adding `crt` as an alternative name
for the binary? I see it's been briefly discussed here,
https://github.com/Swordfish90/cool-retro-term/issues/258

> Love this contribution, by the way.  I'm sending an email from within
> CRT right now...!  :-)

Glad you enjoy it! I'm fond of it too, it makes the whole terminal
experience more engaging/alive or something :)

Unfortunately it has the capasity to introduce lag in my entire system.
F.ex. scrolling and changing tabs in Icecat would take noticeable time
with the default effects settings. I've adjusted them a bit, and
got the lag under control. Is this the case for you as well? I'm on an
x200.

Best,
Petter


From 553902e8a736f356bdc5c7a5bf28e339f9f5cde6 Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62
  ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62
  insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..e53062b16 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García
<jmi2k@openmailbox.org> ;;; Copyright © 2017 Tobias Geerinckx-Rice
<me@tobias.gr> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on
its behalf.  It avoids calling @code{malloc} during normal running
state, allowing it to be used in embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+  (package
+    (name "cool-retro-term")
+    (version (string-append "1.0.0-" revision "." (string-take commit
7)))
+    (source (origin
+              (method git-fetch)
+              (modules '((guix build utils)))
+              (file-name (string-append name "-" version "-checkout"))
+              (uri (git-reference
+                    (url (string-append
"https://github.com/Swordfish90/" name))
+                    (commit commit)
+                    (recursive? #t)))
+              (sha256
+               (base32
"1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("qt" ,qt)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("qmltermwidget/qmltermwidget.pro")
+                        (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                         (string-append "INSTALL_DIR = " out "/qml")))
+                      (substitute* '("app/app.pro")
+                        (("target.path \\+= /usr")
+                         (string-append "target.path += " out))
+                        (("icon32.path = /usr/share")
+                         (string-append "icon32.path = " out "/share"))
+                        (("icon64.path = /usr/share")
+                         (string-append "icon64.path = " out "/share"))
+                        (("icon128.path = /usr/share")
+                         (string-append "icon128.path = " out
"/share"))
+                        (("icon256.path = /usr/share")
+                         (string-append "icon256.path = " out
"/share")))
+                      (zero? (system* "qmake")))))
+         (add-before 'install 'fix-Makefiles
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("Makefile")
+                        (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+         (add-after 'install 'wrap-executable
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out
"/bin/cool-retro-term")
+                          `("QML2_IMPORT_PATH" ":" prefix
+                            (,(string-append out "/qml"))))))))))
+    (synopsis "Terminal emulator mimicking old cathode ray tube (CRT)
+screens")
+    (description
+     "Cool-retro-term (crt) is a terminal emulator which mimics the
look and +feel of the old cathode ray tube (CRT) screens.  It has been
designed to be +eye-candy, customizable, and reasonably lightweight.")
+    (home-page "https://github.com/Swordfish90/cool-retro-term")
+    (license (list license:gpl2 license:gpl3)))))
-- 
2.12.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-cool-retro-term.patch --]
[-- Type: text/x-patch, Size: 4473 bytes --]

From 553902e8a736f356bdc5c7a5bf28e339f9f5cde6 Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 gnu/packages/terminals.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..e53062b16 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +435,63 @@ its embedding program should provide it to draw on its behalf.  It avoids
 calling @code{malloc} during normal running state, allowing it to be used in
 embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+  (package
+    (name "cool-retro-term")
+    (version (string-append "1.0.0-" revision "." (string-take commit 7)))
+    (source (origin
+              (method git-fetch)
+              (modules '((guix build utils)))
+              (file-name (string-append name "-" version "-checkout"))
+              (uri (git-reference
+                    (url (string-append "https://github.com/Swordfish90/" name))
+                    (commit commit)
+                    (recursive? #t)))
+              (sha256
+               (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("qt" ,qt)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("qmltermwidget/qmltermwidget.pro")
+                        (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                         (string-append "INSTALL_DIR = " out "/qml")))
+                      (substitute* '("app/app.pro")
+                        (("target.path \\+= /usr")
+                         (string-append "target.path += " out))
+                        (("icon32.path = /usr/share")
+                         (string-append "icon32.path = " out "/share"))
+                        (("icon64.path = /usr/share")
+                         (string-append "icon64.path = " out "/share"))
+                        (("icon128.path = /usr/share")
+                         (string-append "icon128.path = " out "/share"))
+                        (("icon256.path = /usr/share")
+                         (string-append "icon256.path = " out "/share")))
+                      (zero? (system* "qmake")))))
+         (add-before 'install 'fix-Makefiles
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (substitute* '("Makefile")
+                        (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+         (add-after 'install 'wrap-executable
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out "/bin/cool-retro-term")
+                          `("QML2_IMPORT_PATH" ":" prefix
+                            (,(string-append out "/qml"))))))))))
+    (synopsis "Terminal emulator mimicking old cathode ray tube (CRT)
+screens")
+    (description
+     "Cool-retro-term (crt) is a terminal emulator which mimics the look and
+feel of the old cathode ray tube (CRT) screens.  It has been designed to be
+eye-candy, customizable, and reasonably lightweight.")
+    (home-page "https://github.com/Swordfish90/cool-retro-term")
+    (license (list license:gpl2 license:gpl3)))))
-- 
2.12.2


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-24 12:30       ` Petter
@ 2017-04-26  3:36         ` Eric Bavier
  2017-04-26 18:09           ` Petter
  2017-04-30 20:47         ` Chris Marusich
  1 sibling, 1 reply; 17+ messages in thread
From: Eric Bavier @ 2017-04-26  3:36 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 5717 bytes --]

Petter,

Thanks for the patch!  And Chris, thanks for the review.  

A few notes from my look through:

On Mon, 24 Apr 2017 14:30:26 +0200
Petter <petter@mykolab.ch> wrote:

> 
> * gnu/packages/terminals.scm (cool-retro-term): New variable.
> ---
>  gnu/packages/terminals.scm | 62
>   ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62
>   insertions(+)
> 
> diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
> index 979278a53..e53062b16 100644
> --- a/gnu/packages/terminals.scm
> +++ b/gnu/packages/terminals.scm
> @@ -7,6 +7,7 @@
>  ;;; Copyright © 2016, 2017 José Miguel Sánchez García
> <jmi2k@openmailbox.org> ;;; Copyright © 2017 Tobias Geerinckx-Rice
> <me@tobias.gr> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
> +;;; Copyright © 2017 Petter <petter@mykolab.ch>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -49,6 +50,7 @@
>    #:use-module (gnu packages xdisorg)
>    #:use-module (gnu packages xml)
>    #:use-module (gnu packages docbook)
> +  #:use-module (gnu packages qt)
>    #:use-module (srfi srfi-26))
>  
>  (define-public tilda
> @@ -433,3 +435,63 @@ its embedding program should provide it to draw on
> its behalf.  It avoids calling @code{malloc} during normal running
> state, allowing it to be used in embedded kernel situations.")
>      (license license:expat)))
> +
> +(define-public cool-retro-term
> +  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
> +        (revision "1"))
> +  (package
> +    (name "cool-retro-term")
> +    (version (string-append "1.0.0-" revision "." (string-take commit
> 7)))
> +    (source (origin
> +              (method git-fetch)
> +              (modules '((guix build utils)))
> +              (file-name (string-append name "-" version "-checkout"))
> +              (uri (git-reference
> +                    (url (string-append
> "https://github.com/Swordfish90/" name))
> +                    (commit commit)
> +                    (recursive? #t)))

The 'qmltermwidget' project that's bundled here is a fork of LXDE's
'qtermwidget' project, but it seems to be missing at least one patch
from qtermwidget that might have security implications.  E.g.:

https://github.com/lxde/qtermwidget/commit/1727d921b2d99721b9a8493b15defc8f838baedd
https://github.com/lxde/qtermwidget/commit/f9a7d4ac5de5224c15f5f9184525f81fdcc8c23b

As well as a couple memory leaks:

https://github.com/lxde/qtermwidget/commit/08628fda19128b75248548357e416bc373f14f91
https://github.com/lxde/qtermwidget/commit/ef451424d774feb23b42bdcda56ec09d1cc96e2a

And performance improvements:

https://github.com/lxde/qtermwidget/commit/3ce71a3650d93ff7ca10274c1b3056c7c7494c61

Could you ping the developer about porting some of these fixes to their
fork?  I think we'd want to create a local patch for at least the first
commit.  The others could wait for a new release.

> +    (inputs
> +     `(("qt" ,qt)))

Does this package need all of qt, or could we use the component
packages instead?

> +    (synopsis "Terminal emulator mimicking old cathode ray tube (CRT)
> +screens")

I'd like to shorten this to "Terminal emulator"

> +    (description
> +     "Cool-retro-term (crt) is a terminal emulator which mimics the
> look and +feel of the old cathode ray tube (CRT) screens.  It has been
> designed to be +eye-candy, customizable, and reasonably lightweight.")
> +    (home-page "https://github.com/Swordfish90/cool-retro-term")
> +    (license (list license:gpl2 license:gpl3)))))

The license seems unclear: 1) there is both a gpl-2.txt and gpl-3.txt
in $topsrcdir, but no mention of which actually applies in any of the
source files, 2) $topsrcdir/packaging/debian/copyright claims GPL-3,
while 4) $topsrcdir/packaging/rpm/cool-retro-term.spec and
$topsrcdir/packaging/appdata/cool-retro-term.appdata.xml both claim
GPL-3.0+, and 5) the qmltermwidget component appears to be under
gpl2+.  IANAL but this suggests license:gpl2+ to me.  Does that seem
right?

It would not hurt to also list the SIL license, for
$topsrcdir/app/qml/fonts/modern-hermit, and the X11 license for
fonts/modern-pro-font-win-tweaked and fonts/modern-proggy-tiny.

The fonts/modern-envy-code-r font probably needs to be stripped; it's
license is non-free; from 'Read Me.txt':

  "Free to use but redistribution prohibited."

and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also needs
to be stripped as non-free; from 'FreeLicense.txt':

  "1. The User may not sell copies of the Software for a fee."

The fonts/1979-atari-400-800 font seems to be non-free license, which is
not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine at
https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html :

  "These fonts are freeware and may not be offered for sale seperately
  or as part of a collection."

The fonts/1982-commodore64 font is licensed under non-free terms; see
fonts/1982-commodore64/license.txt

The only mention of a license for fonts/1985-ibm-pc-vga is at
http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
the author says "The license is this: this font is free to use in
whatever you want.", but that probably "doesn't count".

I could not find license info for a few of the other fonts.

OTOH I recall a discussion on IRC recently about fonts embedded in
packages being treated as non-functional data, and thus OK from a FSDG
perspective.  But I would want verification on that.

Sorry for the dump.  I'd like to work these things out; it looks like a
fun terminal to use.

`~Eric

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-26  3:36         ` Eric Bavier
@ 2017-04-26 18:09           ` Petter
  2017-04-28  1:47             ` Eric Bavier
  0 siblings, 1 reply; 17+ messages in thread
From: Petter @ 2017-04-26 18:09 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3471 bytes --]

On Tue, 25 Apr 2017 22:36:27 -0500
Eric Bavier <ericbavier@centurylink.net> wrote:

> Could you ping the developer about porting some of these fixes to their
> fork?  I think we'd want to create a local patch for at least the first
> commit.  The others could wait for a new release.

Sure, I'll do that!

> > +    (inputs
> > +     `(("qt" ,qt)))  
> 
> Does this package need all of qt, or could we use the component
> packages instead?

I don't know. I'll do some experiments and see.

> > +    (synopsis "Terminal emulator mimicking old cathode ray tube (CRT)
> > +screens")  
> 
> I'd like to shorten this to "Terminal emulator"

Ok.

> > +    (description
> > +     "Cool-retro-term (crt) is a terminal emulator which mimics the
> > look and +feel of the old cathode ray tube (CRT) screens.  It has been
> > designed to be +eye-candy, customizable, and reasonably lightweight.")
> > +    (home-page "https://github.com/Swordfish90/cool-retro-term")
> > +    (license (list license:gpl2 license:gpl3)))))  
> 
> The license seems unclear: 1) there is both a gpl-2.txt and gpl-3.txt
> in $topsrcdir, but no mention of which actually applies in any of the
> source files, 2) $topsrcdir/packaging/debian/copyright claims GPL-3,
> while 4) $topsrcdir/packaging/rpm/cool-retro-term.spec and
> $topsrcdir/packaging/appdata/cool-retro-term.appdata.xml both claim
> GPL-3.0+, and 5) the qmltermwidget component appears to be under
> gpl2+.  IANAL but this suggests license:gpl2+ to me.  Does that seem
> right?

I can't answer this, hopefully someone else will chime in.

> It would not hurt to also list the SIL license, for
> $topsrcdir/app/qml/fonts/modern-hermit, and the X11 license for
> fonts/modern-pro-font-win-tweaked and fonts/modern-proggy-tiny.
> 
> The fonts/modern-envy-code-r font probably needs to be stripped; it's
> license is non-free; from 'Read Me.txt':
> 
>   "Free to use but redistribution prohibited."
> 
> and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also needs
> to be stripped as non-free; from 'FreeLicense.txt':
> 
>   "1. The User may not sell copies of the Software for a fee."
> 
> The fonts/1979-atari-400-800 font seems to be non-free license, which is
> not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine at
> https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html :
> 
>   "These fonts are freeware and may not be offered for sale seperately
>   or as part of a collection."
> 
> The fonts/1982-commodore64 font is licensed under non-free terms; see
> fonts/1982-commodore64/license.txt
> 
> The only mention of a license for fonts/1985-ibm-pc-vga is at
> http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> the author says "The license is this: this font is free to use in
> whatever you want.", but that probably "doesn't count".
> 
> I could not find license info for a few of the other fonts.
> 
> OTOH I recall a discussion on IRC recently about fonts embedded in
> packages being treated as non-functional data, and thus OK from a FSDG
> perspective.  But I would want verification on that.

Let's see if someone can shine some light on this.

> Sorry for the dump.  I'd like to work these things out; it looks like a
> fun terminal to use.

No problem, there's the right way and there's the not-right way!
Let's do it right! :)

Best,
Petter

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-26 18:09           ` Petter
@ 2017-04-28  1:47             ` Eric Bavier
  2017-04-28 12:10               ` Petter
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Bavier @ 2017-04-28  1:47 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3809 bytes --]

On Wed, 26 Apr 2017 20:09:33 +0200
Petter <petter@mykolab.ch> wrote:

> On Tue, 25 Apr 2017 22:36:27 -0500
> Eric Bavier <ericbavier@centurylink.net> wrote:
> 
> > Could you ping the developer about porting some of these fixes to their
> > fork?  I think we'd want to create a local patch for at least the first
> > commit.  The others could wait for a new release.  
> 
> Sure, I'll do that!

Thanks!

> 
> > > +    (inputs
> > > +     `(("qt" ,qt)))    
> > 
> > Does this package need all of qt, or could we use the component
> > packages instead?  
> 
> I don't know. I'll do some experiments and see.

OK, great.

> > > +    (description
> > > +     "Cool-retro-term (crt) is a terminal emulator which mimics the
> > > look and +feel of the old cathode ray tube (CRT) screens.  It has been
> > > designed to be +eye-candy, customizable, and reasonably lightweight.")
> > > +    (home-page "https://github.com/Swordfish90/cool-retro-term")
> > > +    (license (list license:gpl2 license:gpl3)))))    
> > 
> > The license seems unclear: 1) there is both a gpl-2.txt and gpl-3.txt
> > in $topsrcdir, but no mention of which actually applies in any of the
> > source files, 2) $topsrcdir/packaging/debian/copyright claims GPL-3,
> > while 4) $topsrcdir/packaging/rpm/cool-retro-term.spec and
> > $topsrcdir/packaging/appdata/cool-retro-term.appdata.xml both claim
> > GPL-3.0+, and 5) the qmltermwidget component appears to be under
> > gpl2+.  IANAL but this suggests license:gpl2+ to me.  Does that seem
> > right?  
> 
> I can't answer this, hopefully someone else will chime in.

I did a little more looking: The sources in app/qml seem to have
license headers marked as GPLv3+, so we can mark it as such.

> 
> > It would not hurt to also list the SIL license, for
> > $topsrcdir/app/qml/fonts/modern-hermit, and the X11 license for
> > fonts/modern-pro-font-win-tweaked and fonts/modern-proggy-tiny.
> > 
> > The fonts/modern-envy-code-r font probably needs to be stripped; it's
> > license is non-free; from 'Read Me.txt':
> > 
> >   "Free to use but redistribution prohibited."
> > 
> > and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also needs
> > to be stripped as non-free; from 'FreeLicense.txt':
> > 
> >   "1. The User may not sell copies of the Software for a fee."
> > 
> > The fonts/1979-atari-400-800 font seems to be non-free license, which is
> > not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine at
> > https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html :
> > 
> >   "These fonts are freeware and may not be offered for sale seperately
> >   or as part of a collection."
> > 
> > The fonts/1982-commodore64 font is licensed under non-free terms; see
> > fonts/1982-commodore64/license.txt
> > 
> > The only mention of a license for fonts/1985-ibm-pc-vga is at
> > http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> > the author says "The license is this: this font is free to use in
> > whatever you want.", but that probably "doesn't count".
> > 
> > I could not find license info for a few of the other fonts.
> > 
> > OTOH I recall a discussion on IRC recently about fonts embedded in
> > packages being treated as non-functional data, and thus OK from a FSDG
> > perspective.  But I would want verification on that.  
> 
> Let's see if someone can shine some light on this.
> 

Leo pointed me at https://bugs.gnu.org/26588 which references
https://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data .
I think many of these fonts would need to be stripped out or
substituted because their license prohibits commercial/non-commercial
redistribution.

`~Eric

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-28  1:47             ` Eric Bavier
@ 2017-04-28 12:10               ` Petter
  2017-04-30 20:59                 ` Chris Marusich
  2017-05-02 13:51                 ` Eric Bavier
  0 siblings, 2 replies; 17+ messages in thread
From: Petter @ 2017-04-28 12:10 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 5424 bytes --]

On Thu, 27 Apr 2017 20:47:54 -0500
Eric Bavier <ericbavier@centurylink.net> wrote:

> > > > +    (inputs
> > > > +     `(("qt" ,qt)))      
> > > 
> > > Does this package need all of qt, or could we use the component
> > > packages instead?    
> > 
> > I don't know. I'll do some experiments and see.  
> 
> OK, great.

Fixed!

Now it is:
      (inputs
       `(("qtbase" ,qtbase)
         ("qtdeclarative" ,qtdeclarative)
         ("qtgraphicaleffects" ,qtgraphicaleffects)
         ("qtquickcontrols" ,qtquickcontrols)))

> > > > +    (description
> > > > +     "Cool-retro-term (crt) is a terminal emulator which mimics the
> > > > look and +feel of the old cathode ray tube (CRT) screens.  It has been
> > > > designed to be +eye-candy, customizable, and reasonably lightweight.")
> > > > +    (home-page "https://github.com/Swordfish90/cool-retro-term")
> > > > +    (license (list license:gpl2 license:gpl3)))))      
> > > 
> > > The license seems unclear: 1) there is both a gpl-2.txt and gpl-3.txt
> > > in $topsrcdir, but no mention of which actually applies in any of the
> > > source files, 2) $topsrcdir/packaging/debian/copyright claims GPL-3,
> > > while 4) $topsrcdir/packaging/rpm/cool-retro-term.spec and
> > > $topsrcdir/packaging/appdata/cool-retro-term.appdata.xml both claim
> > > GPL-3.0+, and 5) the qmltermwidget component appears to be under
> > > gpl2+.  IANAL but this suggests license:gpl2+ to me.  Does that seem
> > > right?    
> > 
> > I can't answer this, hopefully someone else will chime in.  
> 
> I did a little more looking: The sources in app/qml seem to have
> license headers marked as GPLv3+, so we can mark it as such.

I changed the GPL3 license GPL3+.

The owner has replied in an issue about this.

---[Swordfish90 commented on Dec 1, 2015]---
Hi @nadams810 and sorry for the late response. Since the project is split
into two different components, the idea behind the licensing was the
following:

    1. All the files belonging to QMLTermWidget which is a separate library
forked by qtermwidget are licensed under GPL2 (as the original library).
    2. All the files belonging to CRT are licensed under GPL3.
 
To be fair I'm not really an expert when it comes to licensing and if there
is something wrong with the following approach just let me know.
---end-quote---

https://github.com/Swordfish90/cool-retro-term/issues/269

> >   
> > > It would not hurt to also list the SIL license, for
> > > $topsrcdir/app/qml/fonts/modern-hermit, and the X11 license for
> > > fonts/modern-pro-font-win-tweaked and fonts/modern-proggy-tiny.

Added.

> > > The fonts/modern-envy-code-r font probably needs to be stripped; it's
> > > license is non-free; from 'Read Me.txt':
> > > 
> > >   "Free to use but redistribution prohibited."
> > > 

This font was removed Mar 13, 2016.
https://github.com/Swordfish90/cool-retro-term/commit/c505dfaa11166054686df7390cf04dba324ad869

> > > and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also needs
> > > to be stripped as non-free; from 'FreeLicense.txt':
> > > 
> > >   "1. The User may not sell copies of the Software for a fee."
> > > 
> > > The fonts/1979-atari-400-800 font seems to be non-free license, which is
> > > not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine at
> > > https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html :
> > > 
> > >   "These fonts are freeware and may not be offered for sale seperately
> > >   or as part of a collection."
> > > 
> > > The fonts/1982-commodore64 font is licensed under non-free terms; see
> > > fonts/1982-commodore64/license.txt
> > > 
> > > The only mention of a license for fonts/1985-ibm-pc-vga is at
> > > http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> > > the author says "The license is this: this font is free to use in
> > > whatever you want.", but that probably "doesn't count".
> > > 
> > > I could not find license info for a few of the other fonts.
> > > 
> > > OTOH I recall a discussion on IRC recently about fonts embedded in
> > > packages being treated as non-functional data, and thus OK from a FSDG
> > > perspective.  But I would want verification on that.    
> > 
> > Let's see if someone can shine some light on this.
> >   
> 
> Leo pointed me at https://bugs.gnu.org/26588 which references
> https://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data .
> I think many of these fonts would need to be stripped out or
> substituted because their license prohibits commercial/non-commercial
> redistribution.

Recipe is now removing the following from disk and GUI:
                                  '("1977-apple2"
                                    "1977-commodore-pet"
                                    "1979-atari-400-800"
                                    "1982-commodore64"
                                    "1985-ibm-pc-vga")

Should more be removed?

What do we do about the fonts without licensing info?

Also, I've added 3 patches from lxde/qtermwidget. The 2 with possible security
implications, and 1 memory leak (of those you listed). With the remaining two
you linked, memory leak and perfomance fix, git was unable to apply to the
current qmltermwidget codebase.

Best,
Petter

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-cool-retro-term.patch --]
[-- Type: text/x-patch, Size: 24965 bytes --]

From 6d386588ae273e3b61e415469fb226379336b15b Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 ...-term-avoid-checking-uninitialized-member.patch |  33 +++
 .../cool-retro-term-dont-check-uninit-member.patch |  33 +++
 .../patches/cool-retro-term-fix-array-size.patch   |  25 ++
 .../patches/cool-retro-term-memory-leak-1.patch    |  32 +++
 .../cool-retro-term-remove-non-free-fonts.patch    | 268 +++++++++++++++++++++
 gnu/packages/terminals.scm                         |  90 +++++++
 6 files changed, 481 insertions(+)
 create mode 100644 gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-fix-array-size.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-memory-leak-1.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch

diff --git a/gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch b/gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch
new file mode 100644
index 000000000..c6e1d2731
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-avoid-checking-uninitialized-member.patch
@@ -0,0 +1,33 @@
+From 126a97d1f22f7d784d392b2b7d5aadf0a4e18c0d Mon Sep 17 00:00:00 2001
+From: Petter <petter@mykolab.ch>
+Date: Thu, 27 Apr 2017 20:28:02 +0200
+Subject: [PATCH] Avoid checking uninitialized member + simplify condition
+
+---
+ qmltermwidget/lib/TerminalDisplay.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qmltermwidget/lib/TerminalDisplay.cpp b/qmltermwidget/lib/TerminalDisplay.cpp
+index 189a609..36d2cd2 100644
+--- a/qmltermwidget/lib/TerminalDisplay.cpp
++++ b/qmltermwidget/lib/TerminalDisplay.cpp
+@@ -325,6 +325,7 @@ TerminalDisplay::TerminalDisplay(QQuickItem *parent)
+ ,_terminalSizeHint(false)
+ ,_terminalSizeStartup(true)
+ ,_bidiEnabled(false)
++,_mouseMarks(false)
+ ,_actSel(0)
+ ,_wordSelectionMode(false)
+ ,_lineSelectionMode(false)
+@@ -1846,7 +1847,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
+   }
+   else if ( ev->button() == Qt::MidButton )
+   {
+-    if ( _mouseMarks || (!_mouseMarks && (ev->modifiers() & Qt::ShiftModifier)) )
++    if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
+       emitSelection(true,ev->modifiers() & Qt::ControlModifier);
+     else
+       emit mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch b/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
new file mode 100644
index 000000000..c6e1d2731
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
@@ -0,0 +1,33 @@
+From 126a97d1f22f7d784d392b2b7d5aadf0a4e18c0d Mon Sep 17 00:00:00 2001
+From: Petter <petter@mykolab.ch>
+Date: Thu, 27 Apr 2017 20:28:02 +0200
+Subject: [PATCH] Avoid checking uninitialized member + simplify condition
+
+---
+ qmltermwidget/lib/TerminalDisplay.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qmltermwidget/lib/TerminalDisplay.cpp b/qmltermwidget/lib/TerminalDisplay.cpp
+index 189a609..36d2cd2 100644
+--- a/qmltermwidget/lib/TerminalDisplay.cpp
++++ b/qmltermwidget/lib/TerminalDisplay.cpp
+@@ -325,6 +325,7 @@ TerminalDisplay::TerminalDisplay(QQuickItem *parent)
+ ,_terminalSizeHint(false)
+ ,_terminalSizeStartup(true)
+ ,_bidiEnabled(false)
++,_mouseMarks(false)
+ ,_actSel(0)
+ ,_wordSelectionMode(false)
+ ,_lineSelectionMode(false)
+@@ -1846,7 +1847,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
+   }
+   else if ( ev->button() == Qt::MidButton )
+   {
+-    if ( _mouseMarks || (!_mouseMarks && (ev->modifiers() & Qt::ShiftModifier)) )
++    if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
+       emitSelection(true,ev->modifiers() & Qt::ControlModifier);
+     else
+       emit mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-fix-array-size.patch b/gnu/packages/patches/cool-retro-term-fix-array-size.patch
new file mode 100644
index 000000000..04a2a2797
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-fix-array-size.patch
@@ -0,0 +1,25 @@
+From c91d7ae5dbb00c8392a9f93283dc56c3e296cccd Mon Sep 17 00:00:00 2001
+From: Petter <petter@mykolab.ch>
+Date: Thu, 27 Apr 2017 20:19:21 +0200
+Subject: [PATCH] Fix size of the array passed to memset()
+
+---
+ qmltermwidget/lib/History.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qmltermwidget/lib/History.cpp b/qmltermwidget/lib/History.cpp
+index 0f9c13f..ab6f7be 100644
+--- a/qmltermwidget/lib/History.cpp
++++ b/qmltermwidget/lib/History.cpp
+@@ -515,7 +515,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count)
+   // put cells in block's data
+   assert((count * sizeof(Character)) < ENTRIES);
+ 
+-  memset(b->data, 0, ENTRIES);
++  memset(b->data, 0, sizeof(b->data));
+ 
+   memcpy(b->data, a, count * sizeof(Character));
+   b->size = count * sizeof(Character);
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-memory-leak-1.patch b/gnu/packages/patches/cool-retro-term-memory-leak-1.patch
new file mode 100644
index 000000000..f3fbac17d
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-memory-leak-1.patch
@@ -0,0 +1,32 @@
+From 08628fda19128b75248548357e416bc373f14f91 Mon Sep 17 00:00:00 2001
+From: Yen Chi Hsuan <yan12125@gmail.com>
+Date: Sat, 18 Mar 2017 02:50:34 +0800
+Subject: [PATCH] Fix memory leak in hotspot (URLs & emails) detection
+
+---
+ qmltermwidget/lib/Filter.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/qmltermwidget/lib/Filter.cpp b/qmltermwidget/lib/Filter.cpp
+index 5ca7bee..2e8d2fb 100644
+--- a/qmltermwidget/lib/Filter.cpp
++++ b/qmltermwidget/lib/Filter.cpp
+@@ -26,6 +26,7 @@
+ // Qt
+ #include <QAction>
+ #include <QApplication>
++#include <QtAlgorithms>
+ #include <QClipboard>
+ #include <QString>
+ #include <QTextStream>
+@@ -194,6 +195,7 @@ Filter::~Filter()
+ }
+ void Filter::reset()
+ {
++    qDeleteAll(_hotspotList);
+     _hotspots.clear();
+     _hotspotList.clear();
+ }
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch b/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch
new file mode 100644
index 000000000..a00e1f252
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch
@@ -0,0 +1,268 @@
+From be4e30368ea3b4b99af647b44a32dae464511c2b Mon Sep 17 00:00:00 2001
+From: Petter <petter@mykolab.ch>
+Date: Thu, 27 Apr 2017 18:55:10 +0200
+Subject: [PATCH] Remove non-free fonts from settings menu
+
+---
+ app/qml/ApplicationSettings.qml | 20 ++++++++++----------
+ app/qml/FontPixels.qml          | 16 ++++++++--------
+ app/qml/FontScanlines.qml       | 16 ++++++++--------
+ app/qml/Fonts.qml               | 20 ++++++++++----------
+ 4 files changed, 36 insertions(+), 36 deletions(-)
+
+diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml
+index d0f8beb..240c522 100644
+--- a/app/qml/ApplicationSettings.qml
++++ b/app/qml/ApplicationSettings.qml
+@@ -409,36 +409,36 @@ QtObject{
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.45,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+         }
+-        ListElement{
++        /*ListElement{
+             text: "Default Scanlines"
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"COMMODORE_PET","fontColor":"#00ff5b","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.14,"jitter":0.11,"burnIn":0.4,"staticNoise":0.05,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "Default Pixelated"
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0,"brightness":0.5,"flickering":0.2,"contrast":0.85,"fontName":"COMMODORE_PET","fontColor":"#ffffff","frameName":"ROUGH_BLACK_FRAME","glowingLine":0.2,"horizontalSync":0.2,"jitter":0,"burnIn":0.45,"staticNoise":0.19,"rasterization":2,"screenCurvature":0.05,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "Apple ]["
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.5,"brightness":0.5,"flickering":0.2,"contrast":0.85,"fontName":"APPLE_II","fontColor":"#2fff91","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.22,"horizontalSync":0.16,"jitter":0.1,"burnIn":0.65,"staticNoise":0.08,"rasterization":1,"screenCurvature":0.18,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "Vintage"
+             obj_string: '{"ambientLight":0.5,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.9,"contrast":0.80,"fontName":"COMMODORE_PET","fontColor":"#00ff3e","frameName":"ROUGH_BLACK_FRAME","glowingLine":0.3,"horizontalSync":0.42,"jitter":0.4,"burnIn":0.75,"staticNoise":0.2,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
++        }*/
+         ListElement{
+             text: "IBM Dos"
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.07,"contrast":0.85,"fontName":"IBM_DOS","fontColor":"#ffffff","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.13,"horizontalSync":0,"jitter":0.16,"burnIn":0.3,"staticNoise":0.03,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":1,"saturationColor":0,"rbgShift":0.35,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+         }
+-        ListElement{
++        /*ListElement{
+             text: "IBM 3278"
+             obj_string: '{"ambientLight":0.1,"backgroundColor":"#000000","bloom":0.15,"brightness":0.5,"flickering":0,"contrast":0.85,"fontName":"IBM_3278","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0,"horizontalSync":0,"jitter":0,"burnIn":0.6,"staticNoise":0,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
++        }*/
+         ListElement{
+             text: "Transparent Green"
+             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.45,"brightness":0.5,"flickering":0.20,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#0ccc68","frameName":"NO_FRAME","glowingLine":0.16,"horizontalSync":0.1,"jitter":0.20,"burnIn":0.25,"staticNoise":0.20,"rasterization":0,"screenCurvature":0.05,"windowOpacity":0.60,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+diff --git a/app/qml/FontPixels.qml b/app/qml/FontPixels.qml
+index 6ff85da..88ff6c1 100644
+--- a/app/qml/FontPixels.qml
++++ b/app/qml/FontPixels.qml
+@@ -32,7 +32,7 @@ QtObject{
+     property bool lowResolutionFont: true
+ 
+     property ListModel fontlist: ListModel{
+-        ListElement{
++        /*ListElement{
+             name: "COMMODORE_PET"
+             text: "Commodore PET (1977)"
+             source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
+@@ -40,7 +40,7 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
++        }*/
+         ListElement{
+             name: "PROGGY_TINY"
+             text: "Proggy Tiny (Modern)"
+@@ -68,7 +68,7 @@ QtObject{
+             baseScaling: 3.0
+             fontWidth: 1.0
+         }
+-        ListElement{
++        /*ListElement{
+             name: "APPLE_II"
+             text: "Apple ][ (1977)"
+             source: "fonts/1977-apple2/PrintChar21.ttf"
+@@ -76,8 +76,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.9
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "ATARI_400"
+             text: "Atari 400-800 (1979)"
+             source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
+@@ -85,8 +85,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "COMMODORE_64"
+             text: "Commodore 64 (1982)"
+             source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
+@@ -94,6 +94,6 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
++        }*/
+     }
+ }
+diff --git a/app/qml/FontScanlines.qml b/app/qml/FontScanlines.qml
+index eebf00b..112f446 100644
+--- a/app/qml/FontScanlines.qml
++++ b/app/qml/FontScanlines.qml
+@@ -32,7 +32,7 @@ QtObject{
+     property bool lowResolutionFont: true
+ 
+     property ListModel fontlist: ListModel{
+-        ListElement{
++        /*ListElement{
+             name: "COMMODORE_PET"
+             text: "Commodore PET (1977)"
+             source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
+@@ -40,7 +40,7 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.7
+-        }
++        }*/
+         ListElement{
+             name: "PROGGY_TINY"
+             text: "Proggy Tiny (Modern)"
+@@ -68,7 +68,7 @@ QtObject{
+             baseScaling: 3.0
+             fontWidth: 1.0
+         }
+-        ListElement{
++        /*ListElement{
+             name: "APPLE_II"
+             text: "Apple ][ (1977)"
+             source: "fonts/1977-apple2/PrintChar21.ttf"
+@@ -76,8 +76,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "ATARI_400"
+             text: "Atari 400-800 (1979)"
+             source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
+@@ -85,8 +85,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.7
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "COMMODORE_64"
+             text: "Commodore 64 (1982)"
+             source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
+@@ -94,6 +94,6 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.7
+-        }
++        }*/
+     }
+ }
+diff --git a/app/qml/Fonts.qml b/app/qml/Fonts.qml
+index ad20844..857d00e 100644
+--- a/app/qml/Fonts.qml
++++ b/app/qml/Fonts.qml
+@@ -80,7 +80,7 @@ QtObject{
+             fontWidth: 1.0
+             lowResolutionFont: true
+         }
+-        ListElement{
++        /*ListElement{
+             name: "COMMODORE_PET_SCALED"
+             text: "Commodore PET (1977)"
+             source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
+@@ -89,7 +89,7 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.7
+             lowResolutionFont: true
+-        }
++        }*/
+         ListElement{
+             name: "PROGGY_TINY_SCALED"
+             text: "Proggy Tiny (Modern)"
+@@ -100,7 +100,7 @@ QtObject{
+             fontWidth: 0.9
+             lowResolutionFont: true
+         }
+-        ListElement{
++        /*ListElement{
+             name: "APPLE_II_SCALED"
+             text: "Apple ][ (1977)"
+             source: "fonts/1977-apple2/PrintChar21.ttf"
+@@ -109,8 +109,8 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.8
+             lowResolutionFont: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "ATARI_400_SCALED"
+             text: "Atari 400-800 (1979)"
+             source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
+@@ -119,8 +119,8 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.7
+             lowResolutionFont: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "COMMODORE_64_SCALED"
+             text: "Commodore 64 (1982)"
+             source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
+@@ -129,7 +129,7 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.7
+             lowResolutionFont: true
+-        }
++        }*/
+         ListElement{
+             name: "ATARI_ST_SCALED"
+             text: "Atari ST (1985)"
+@@ -140,7 +140,7 @@ QtObject{
+             fontWidth: 1.0
+             lowResolutionFont: true
+         }
+-        ListElement{
++        /*ListElement{
+             name: "IBM_DOS"
+             text: "IBM DOS (1985)"
+             source: "fonts/1985-ibm-pc-vga/Perfect DOS VGA 437 Win.ttf"
+@@ -149,7 +149,7 @@ QtObject{
+             baseScaling: 2.0
+             fontWidth: 1.0
+             lowResolutionFont: true
+-        }
++        }*/
+         ListElement{
+             name: "HERMIT"
+             text: "HD: Hermit (Modern)"
+-- 
+2.12.2
+
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..35105d64a 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,6 +32,7 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
+  #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
@@ -49,6 +51,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +436,90 @@ its embedding program should provide it to draw on its behalf.  It avoids
 calling @code{malloc} during normal running state, allowing it to be used in
 embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+    (package
+      (name "cool-retro-term")
+      (version (string-append "1.0.0-" revision "." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (file-name (string-append name "-" version "-checkout"))
+                (uri (git-reference
+                      (url (string-append "https://github.com/Swordfish90/" name))
+                      (commit commit)
+                      (recursive? #t)))
+                (sha256
+                 (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))
+                (patches
+                 (search-patches "cool-retro-term-remove-non-free-fonts.patch"
+                                 "cool-retro-term-fix-array-size.patch"
+                                 "cool-retro-term-dont-check-uninit-member.patch"
+                                 "cool-retro-term-memory-leak-1.patch"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("qtbase" ,qtbase)
+         ("qtdeclarative" ,qtdeclarative)
+         ("qtgraphicaleffects" ,qtgraphicaleffects)
+         ("qtquickcontrols" ,qtquickcontrols)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'clean
+                      (lambda _
+                        (for-each (lambda (font)
+                                    (display font)
+                                    (delete-file-recursively
+                                     (string-append "app/qml/fonts/" font))
+                                    (substitute* '("app/qml/resources.qrc")
+                                      (((string-append "<file>fonts/" font ".*"))
+                                       "")))
+                                  '("1977-apple2"
+                                    "1977-commodore-pet"
+                                    "1979-atari-400-800"
+                                    "1982-commodore64"
+                                    "1985-ibm-pc-vga"))))
+           (replace 'configure
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (share (string-append out "/share")))
+                        (substitute* '("qmltermwidget/qmltermwidget.pro")
+                          (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                           (string-append "INSTALL_DIR = " out "/qml")))
+                        (substitute* '("app/app.pro")
+                          (("target.path \\+= /usr")
+                           (string-append "target.path += " out))
+                          (("icon32.path = /usr/share")
+                           (string-append "icon32.path = " share))
+                          (("icon64.path = /usr/share")
+                           (string-append "icon64.path = " share))
+                          (("icon128.path = /usr/share")
+                           (string-append "icon128.path = " share))
+                          (("icon256.path = /usr/share")
+                           (string-append "icon256.path = " share)))
+                        (zero? (system* "qmake")))))
+           (add-before 'install 'fix-Makefiles
+                       (lambda* (#:key outputs #:allow-other-keys)
+                         (let* ((out (assoc-ref outputs "out")))
+                           (substitute* '("Makefile")
+                             (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+           (add-after 'install 'wrap-executable
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let* ((out (assoc-ref outputs "out"))
+                               (qml "/qml"))
+                          (wrap-program (string-append out "/bin/cool-retro-term")
+                            `("QML2_IMPORT_PATH" ":" prefix
+                              (,(string-append
+                                 (assoc-ref %build-inputs "qtdeclarative") qml)
+                               ,(string-append
+                                 (assoc-ref %build-inputs "qtgraphicaleffects") qml)
+                               ,(string-append
+                                 (assoc-ref %build-inputs "qtquickcontrols") qml))))))))))
+      (synopsis "Terminal emulator")
+      (description
+       "Cool-retro-term (crt) is a terminal emulator which mimics the look and
+feel of the old cathode ray tube (CRT) screens.  It has been designed to be
+eye-candy, customizable, and reasonably lightweight.")
+      (home-page "https://github.com/Swordfish90/cool-retro-term")
+      (license (list license:gpl2 license:gpl3+ license:silofl1.1 license:x11)))))
-- 
2.12.2


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-24 12:30       ` Petter
  2017-04-26  3:36         ` Eric Bavier
@ 2017-04-30 20:47         ` Chris Marusich
  1 sibling, 0 replies; 17+ messages in thread
From: Chris Marusich @ 2017-04-30 20:47 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Hi Petter,

Sorry for the slow reply.

Petter <petter@mykolab.ch> writes:

> What do you think of adding `crt` as an alternative name
> for the binary? I see it's been briefly discussed here,
> https://github.com/Swordfish90/cool-retro-term/issues/258

I think that'd be fine.  I don't know of any other common programs that
use this name, so I don't think it'll introduce any symlinking conflicts
when used in a profile.

> Unfortunately it has the capasity to introduce lag in my entire system.
> F.ex. scrolling and changing tabs in Icecat would take noticeable time
> with the default effects settings. I've adjusted them a bit, and
> got the lag under control. Is this the case for you as well? I'm on an
> x200.

I also use an x200, but I haven't used CRT enough to be able to comment
on this.  Good to know that with some adjustment, the lag can be brought
under control.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-28 12:10               ` Petter
@ 2017-04-30 20:59                 ` Chris Marusich
  2017-05-03 11:38                   ` Petter
  2017-05-02 13:51                 ` Eric Bavier
  1 sibling, 1 reply; 17+ messages in thread
From: Chris Marusich @ 2017-04-30 20:59 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2162 bytes --]

Petter <petter@mykolab.ch> writes:

> What do we do about the fonts without licensing info?

Unfortunately, "no license" is not a free license:

https://www.gnu.org/licenses/license-list.en.html#NoLicense

"If source code does not carry a license to give users the four
essential freedoms, then unless it has been explicitly and validly
placed in the public domain, it is not free software."

The FSDG states:

https://www.gnu.org/distros/free-system-distribution-guidelines.html

"License Rules

'Information for practical use' includes software, documentation,
fonts, and other data that has direct functional applications. It does
not include artistic works that have an aesthetic (rather than
functional) purpose, or statements of opinion or judgment.

All information for practical use in a free distribution must be
available in source form. ('Source' means the form of the information
that is preferred for making changes to it.)

The information, and the source, must be provided under an appropriate
free license. We evaluate specific licenses and list our determinations
in our license list, with separate sections for licenses that are
suitable for software, documentation, fonts, and other useful works. If
such a work is released under a disjunction of licenses, the work is
free as long as at least one of its licenses is free; the system
developers should follow the terms of the applicable free license(s)
when they distribute and/or modify it."

The same page also has a section on fonts:

https://www.gnu.org/licenses/license-list.en.html#Fonts

"The licenses below apply to an instantiation of a design in a computer
file, not the artistic design. As far as we know, an implementation of a
design is always copyrightable. The legal status of the artistic design
is complex, and varies by jurisdiction."

To ensure that this contribution meets these guidelines and respects the
freedom of the system's users, I think we cannot include a font for
which we cannot find an associated license.  If we can find a license
for the font and it is a free license, then we could include it.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-28 12:10               ` Petter
  2017-04-30 20:59                 ` Chris Marusich
@ 2017-05-02 13:51                 ` Eric Bavier
  2017-05-03 12:37                   ` Petter
  1 sibling, 1 reply; 17+ messages in thread
From: Eric Bavier @ 2017-05-02 13:51 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 6685 bytes --]

Hi Petter,

Thanks again for your patience with this review.

On Fri, 28 Apr 2017 14:10:37 +0200
Petter <petter@mykolab.ch> wrote:

> On Thu, 27 Apr 2017 20:47:54 -0500
> Eric Bavier <ericbavier@centurylink.net> wrote:
> 
> > > > > +    (inputs
> > > > > +     `(("qt" ,qt)))        
> > > > 
> > > > Does this package need all of qt, or could we use the component
> > > > packages instead?      
> > > 
> > > I don't know. I'll do some experiments and see.    
> > 
> > OK, great.  
> 
> Fixed!
> 
> Now it is:
>       (inputs
>        `(("qtbase" ,qtbase)
>          ("qtdeclarative" ,qtdeclarative)
>          ("qtgraphicaleffects" ,qtgraphicaleffects)
>          ("qtquickcontrols" ,qtquickcontrols)))

Excellent.

> 
> > > > > +    (description
> > > > > +     "Cool-retro-term (crt) is a terminal emulator which mimics the
> > > > > look and +feel of the old cathode ray tube (CRT) screens.  It has been
> > > > > designed to be +eye-candy, customizable, and reasonably lightweight.")
> > > > > +    (home-page "https://github.com/Swordfish90/cool-retro-term")
> > > > > +    (license (list license:gpl2 license:gpl3)))))        
> > > > 
> > > > The license seems unclear: 1) there is both a gpl-2.txt and gpl-3.txt
> > > > in $topsrcdir, but no mention of which actually applies in any of the
> > > > source files, 2) $topsrcdir/packaging/debian/copyright claims GPL-3,
> > > > while 4) $topsrcdir/packaging/rpm/cool-retro-term.spec and
> > > > $topsrcdir/packaging/appdata/cool-retro-term.appdata.xml both claim
> > > > GPL-3.0+, and 5) the qmltermwidget component appears to be under
> > > > gpl2+.  IANAL but this suggests license:gpl2+ to me.  Does that seem
> > > > right?      
> > > 
> > > I can't answer this, hopefully someone else will chime in.    
> > 
> > I did a little more looking: The sources in app/qml seem to have
> > license headers marked as GPLv3+, so we can mark it as such.  
> 
> I changed the GPL3 license GPL3+.
> 
> The owner has replied in an issue about this.
> 
> ---[Swordfish90 commented on Dec 1, 2015]---
> Hi @nadams810 and sorry for the late response. Since the project is split
> into two different components, the idea behind the licensing was the
> following:
> 
>     1. All the files belonging to QMLTermWidget which is a separate library
> forked by qtermwidget are licensed under GPL2 (as the original library).
>     2. All the files belonging to CRT are licensed under GPL3.
>  
> To be fair I'm not really an expert when it comes to licensing and if there
> is something wrong with the following approach just let me know.
> ---end-quote---
> 
> https://github.com/Swordfish90/cool-retro-term/issues/269

"gpl2" in the license field should be "gpl2+" according to
qmltermwidget license headers.  Could you also include a comment noting
the component split?  Nothing fancy, just "for qmltermwidget" or so next
to gpl2+ and "for cool-retro-term" next to gpl3+.

> 
> > >     
> > > > It would not hurt to also list the SIL license, for
> > > > $topsrcdir/app/qml/fonts/modern-hermit, and the X11 license for
> > > > fonts/modern-pro-font-win-tweaked and fonts/modern-proggy-tiny.  
> 
> Added.
> 
> > > > The fonts/modern-envy-code-r font probably needs to be stripped; it's
> > > > license is non-free; from 'Read Me.txt':
> > > > 
> > > >   "Free to use but redistribution prohibited."
> > > >   
> 
> This font was removed Mar 13, 2016.
> https://github.com/Swordfish90/cool-retro-term/commit/c505dfaa11166054686df7390cf04dba324ad869

I see.  I must have been browsing while pinned at an older commit.  No
rationale given. Hmm.

> 
> > > > and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also needs
> > > > to be stripped as non-free; from 'FreeLicense.txt':
> > > > 
> > > >   "1. The User may not sell copies of the Software for a fee."
> > > > 
> > > > The fonts/1979-atari-400-800 font seems to be non-free license, which is
> > > > not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine at
> > > > https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html :
> > > > 
> > > >   "These fonts are freeware and may not be offered for sale seperately
> > > >   or as part of a collection."
> > > > 
> > > > The fonts/1982-commodore64 font is licensed under non-free terms; see
> > > > fonts/1982-commodore64/license.txt
> > > > 
> > > > The only mention of a license for fonts/1985-ibm-pc-vga is at
> > > > http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> > > > the author says "The license is this: this font is free to use in
> > > > whatever you want.", but that probably "doesn't count".
> > > > 
> > > > I could not find license info for a few of the other fonts.
> > > > 
> > > > OTOH I recall a discussion on IRC recently about fonts embedded in
> > > > packages being treated as non-functional data, and thus OK from a FSDG
> > > > perspective.  But I would want verification on that.      
> > > 
> > > Let's see if someone can shine some light on this.
> > >     
> > 
> > Leo pointed me at https://bugs.gnu.org/26588 which references
> > https://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data .
> > I think many of these fonts would need to be stripped out or
> > substituted because their license prohibits commercial/non-commercial
> > redistribution.  
> 
> Recipe is now removing the following from disk and GUI:
>                                   '("1977-apple2"
>                                     "1977-commodore-pet"
>                                     "1979-atari-400-800"
>                                     "1982-commodore64"
>                                     "1985-ibm-pc-vga")

The code you've added to delete these fonts and adjust the source
accordingly would be better in an origin 'snippet' so that `guix build
-S cool-retro-term` does not include the fonts.

> 
> Should more be removed?

modern-monaco.  It's a font from Apple which is specifically *not*
freely distributable, but the ttf file is still floating around the
internet, giving many projects the impression that it is.

> 
> What do we do about the fonts without licensing info?

I agree with Chris that we need to remove them.

> 
> Also, I've added 3 patches from lxde/qtermwidget. The 2 with possible security
> implications, and 1 memory leak (of those you listed). With the remaining two
> you linked, memory leak and perfomance fix, git was unable to apply to the
> current qmltermwidget codebase.

Excellent.

Thanks,
`~Eric

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-04-30 20:59                 ` Chris Marusich
@ 2017-05-03 11:38                   ` Petter
  0 siblings, 0 replies; 17+ messages in thread
From: Petter @ 2017-05-03 11:38 UTC (permalink / raw)
  To: Chris Marusich; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2542 bytes --]

On Sun, 30 Apr 2017 13:59:29 -0700
Chris Marusich <cmmarusich@gmail.com> wrote:

> Petter <petter@mykolab.ch> writes:
> 
> > What do we do about the fonts without licensing info?  
> 
> Unfortunately, "no license" is not a free license:

Yeah, I kinda figured that one just after I sent the e-mail :)

> 
> https://www.gnu.org/licenses/license-list.en.html#NoLicense
> 
> "If source code does not carry a license to give users the four
> essential freedoms, then unless it has been explicitly and validly
> placed in the public domain, it is not free software."
> 
> The FSDG states:
> 
> https://www.gnu.org/distros/free-system-distribution-guidelines.html
> 
> "License Rules
> 
> 'Information for practical use' includes software, documentation,
> fonts, and other data that has direct functional applications. It does
> not include artistic works that have an aesthetic (rather than
> functional) purpose, or statements of opinion or judgment.
> 
> All information for practical use in a free distribution must be
> available in source form. ('Source' means the form of the information
> that is preferred for making changes to it.)
> 
> The information, and the source, must be provided under an appropriate
> free license. We evaluate specific licenses and list our determinations
> in our license list, with separate sections for licenses that are
> suitable for software, documentation, fonts, and other useful works. If
> such a work is released under a disjunction of licenses, the work is
> free as long as at least one of its licenses is free; the system
> developers should follow the terms of the applicable free license(s)
> when they distribute and/or modify it."
> 
> The same page also has a section on fonts:
> 
> https://www.gnu.org/licenses/license-list.en.html#Fonts
> 
> "The licenses below apply to an instantiation of a design in a computer
> file, not the artistic design. As far as we know, an implementation of a
> design is always copyrightable. The legal status of the artistic design
> is complex, and varies by jurisdiction."
> 
> To ensure that this contribution meets these guidelines and respects the
> freedom of the system's users, I think we cannot include a font for
> which we cannot find an associated license.  If we can find a license
> for the font and it is a free license, then we could include it.
> 

Thanks for this information! Licensing is a weak field for me.

I've made a mental change from blacklisting fonts to whitelisting.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-05-02 13:51                 ` Eric Bavier
@ 2017-05-03 12:37                   ` Petter
  2017-05-05  3:03                     ` Eric Bavier
  0 siblings, 1 reply; 17+ messages in thread
From: Petter @ 2017-05-03 12:37 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 3984 bytes --]

On Tue, 2 May 2017 08:51:06 -0500
Eric Bavier <ericbavier@centurylink.net> wrote:

> Hi Petter,
> 
> Thanks again for your patience with this review.

Hi Eric,

I'm in no rush :)

> "gpl2" in the license field should be "gpl2+" according to
> qmltermwidget license headers.  Could you also include a comment noting
> the component split?  Nothing fancy, just "for qmltermwidget" or so next
> to gpl2+ and "for cool-retro-term" next to gpl3+.

Done. I did it like this:
      (license (list 
                license:gpl2+ ; qmltermwidget
                license:gpl3+ ; cool-retro-term
                ;; Fonts
                license:silofl1.1
                license:x11)))))

> > > > > and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also
> > > > > needs to be stripped as non-free; from 'FreeLicense.txt':
> > > > > 
> > > > >   "1. The User may not sell copies of the Software for a fee."
> > > > > 
> > > > > The fonts/1979-atari-400-800 font seems to be non-free license, which
> > > > > is not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine
> > > > > at
> > > > > https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html :
> > > > > 
> > > > >   "These fonts are freeware and may not be offered for sale seperately
> > > > >   or as part of a collection."
> > > > > 
> > > > > The fonts/1982-commodore64 font is licensed under non-free terms; see
> > > > > fonts/1982-commodore64/license.txt
> > > > > 
> > > > > The only mention of a license for fonts/1985-ibm-pc-vga is at
> > > > > http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> > > > > the author says "The license is this: this font is free to use in
> > > > > whatever you want.", but that probably "doesn't count".
> > > > > 
> > > > > I could not find license info for a few of the other fonts.
> > > > > 
> > > > > OTOH I recall a discussion on IRC recently about fonts embedded in
> > > > > packages being treated as non-functional data, and thus OK from a FSDG
> > > > > perspective.  But I would want verification on that.        
> > > > 
> > > > Let's see if someone can shine some light on this.
> > > >       
> > > 
> > > Leo pointed me at https://bugs.gnu.org/26588 which references
> > > https://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data .
> > > I think many of these fonts would need to be stripped out or
> > > substituted because their license prohibits commercial/non-commercial
> > > redistribution.    
> > 
> > Recipe is now removing the following from disk and GUI:
> >                                   '("1977-apple2"
> >                                     "1977-commodore-pet"
> >                                     "1979-atari-400-800"
> >                                     "1982-commodore64"
> >                                     "1985-ibm-pc-vga")  
> 
> The code you've added to delete these fonts and adjust the source
> accordingly would be better in an origin 'snippet' so that `guix build
> -S cool-retro-term` does not include the fonts.

Done.

> > 
> > Should more be removed?  
> 
> modern-monaco.  It's a font from Apple which is specifically *not*
> freely distributable, but the ttf file is still floating around the
> internet, giving many projects the impression that it is.
> 
> > 
> > What do we do about the fonts without licensing info?  
> 
> I agree with Chris that we need to remove them.

Right, I've made the mental switch now to whitelist rather than blacklist.
The ones that are included now are modern-hermit, modern-pro-font-win-tweaked
and modern-proggy-tiny. The rest are out until proven Free.

Let me know if there are other fonts /we can include/ ;)


Also added a `crt` as a symlink to cool-retro-term.


Thanks Eric and Chris for being so thorough and helpful! Let me know if there
are more issues.


Best,
Petter

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-cool-retro-term.patch --]
[-- Type: text/x-patch, Size: 28380 bytes --]

From c4b0d4bc32053660476c54a7471c6d312651788a Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Sun, 23 Apr 2017 13:46:41 +0200
Subject: [PATCH] gnu: Add cool-retro-term.

* gnu/packages/terminals.scm (cool-retro-term): New variable.
---
 .../cool-retro-term-dont-check-uninit-member.patch |  33 ++
 .../patches/cool-retro-term-fix-array-size.patch   |  25 ++
 .../patches/cool-retro-term-memory-leak-1.patch    |  32 ++
 .../cool-retro-term-remove-non-free-fonts.patch    | 403 +++++++++++++++++++++
 gnu/packages/terminals.scm                         | 109 ++++++
 5 files changed, 602 insertions(+)
 create mode 100644 gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-fix-array-size.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-memory-leak-1.patch
 create mode 100644 gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch

diff --git a/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch b/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
new file mode 100644
index 000000000..c6e1d2731
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-dont-check-uninit-member.patch
@@ -0,0 +1,33 @@
+From 126a97d1f22f7d784d392b2b7d5aadf0a4e18c0d Mon Sep 17 00:00:00 2001
+From: Petter <petter@mykolab.ch>
+Date: Thu, 27 Apr 2017 20:28:02 +0200
+Subject: [PATCH] Avoid checking uninitialized member + simplify condition
+
+---
+ qmltermwidget/lib/TerminalDisplay.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qmltermwidget/lib/TerminalDisplay.cpp b/qmltermwidget/lib/TerminalDisplay.cpp
+index 189a609..36d2cd2 100644
+--- a/qmltermwidget/lib/TerminalDisplay.cpp
++++ b/qmltermwidget/lib/TerminalDisplay.cpp
+@@ -325,6 +325,7 @@ TerminalDisplay::TerminalDisplay(QQuickItem *parent)
+ ,_terminalSizeHint(false)
+ ,_terminalSizeStartup(true)
+ ,_bidiEnabled(false)
++,_mouseMarks(false)
+ ,_actSel(0)
+ ,_wordSelectionMode(false)
+ ,_lineSelectionMode(false)
+@@ -1846,7 +1847,7 @@ void TerminalDisplay::mousePressEvent(QMouseEvent* ev)
+   }
+   else if ( ev->button() == Qt::MidButton )
+   {
+-    if ( _mouseMarks || (!_mouseMarks && (ev->modifiers() & Qt::ShiftModifier)) )
++    if ( _mouseMarks || (ev->modifiers() & Qt::ShiftModifier) )
+       emitSelection(true,ev->modifiers() & Qt::ControlModifier);
+     else
+       emit mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-fix-array-size.patch b/gnu/packages/patches/cool-retro-term-fix-array-size.patch
new file mode 100644
index 000000000..04a2a2797
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-fix-array-size.patch
@@ -0,0 +1,25 @@
+From c91d7ae5dbb00c8392a9f93283dc56c3e296cccd Mon Sep 17 00:00:00 2001
+From: Petter <petter@mykolab.ch>
+Date: Thu, 27 Apr 2017 20:19:21 +0200
+Subject: [PATCH] Fix size of the array passed to memset()
+
+---
+ qmltermwidget/lib/History.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qmltermwidget/lib/History.cpp b/qmltermwidget/lib/History.cpp
+index 0f9c13f..ab6f7be 100644
+--- a/qmltermwidget/lib/History.cpp
++++ b/qmltermwidget/lib/History.cpp
+@@ -515,7 +515,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count)
+   // put cells in block's data
+   assert((count * sizeof(Character)) < ENTRIES);
+ 
+-  memset(b->data, 0, ENTRIES);
++  memset(b->data, 0, sizeof(b->data));
+ 
+   memcpy(b->data, a, count * sizeof(Character));
+   b->size = count * sizeof(Character);
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-memory-leak-1.patch b/gnu/packages/patches/cool-retro-term-memory-leak-1.patch
new file mode 100644
index 000000000..f3fbac17d
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-memory-leak-1.patch
@@ -0,0 +1,32 @@
+From 08628fda19128b75248548357e416bc373f14f91 Mon Sep 17 00:00:00 2001
+From: Yen Chi Hsuan <yan12125@gmail.com>
+Date: Sat, 18 Mar 2017 02:50:34 +0800
+Subject: [PATCH] Fix memory leak in hotspot (URLs & emails) detection
+
+---
+ qmltermwidget/lib/Filter.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/qmltermwidget/lib/Filter.cpp b/qmltermwidget/lib/Filter.cpp
+index 5ca7bee..2e8d2fb 100644
+--- a/qmltermwidget/lib/Filter.cpp
++++ b/qmltermwidget/lib/Filter.cpp
+@@ -26,6 +26,7 @@
+ // Qt
+ #include <QAction>
+ #include <QApplication>
++#include <QtAlgorithms>
+ #include <QClipboard>
+ #include <QString>
+ #include <QTextStream>
+@@ -194,6 +195,7 @@ Filter::~Filter()
+ }
+ void Filter::reset()
+ {
++    qDeleteAll(_hotspotList);
+     _hotspots.clear();
+     _hotspotList.clear();
+ }
+-- 
+2.12.2
+
diff --git a/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch b/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch
new file mode 100644
index 000000000..2fc61f817
--- /dev/null
+++ b/gnu/packages/patches/cool-retro-term-remove-non-free-fonts.patch
@@ -0,0 +1,403 @@
+From 96ceffdfdcedd3ae33c46b11357aa2518e0a6152 Mon Sep 17 00:00:00 2001
+From: Petter <petter@mykolab.ch>
+Date: Thu, 27 Apr 2017 18:55:10 +0200
+Subject: [PATCH] Remove non-free fonts from settings menu
+
+---
+ app/qml/ApplicationSettings.qml | 28 ++++++++++++------------
+ app/qml/FontPixels.qml          | 20 ++++++++---------
+ app/qml/FontScanlines.qml       | 20 ++++++++---------
+ app/qml/Fonts.qml               | 48 ++++++++++++++++++++---------------------
+ 4 files changed, 58 insertions(+), 58 deletions(-)
+
+diff --git a/app/qml/ApplicationSettings.qml b/app/qml/ApplicationSettings.qml
+index d0f8beb..505a4e7 100644
+--- a/app/qml/ApplicationSettings.qml
++++ b/app/qml/ApplicationSettings.qml
+@@ -409,41 +409,41 @@ QtObject{
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.16,"jitter":0.18,"burnIn":0.45,"staticNoise":0.1,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+         }
+-        ListElement{
++        /*ListElement{
+             text: "Default Scanlines"
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.1,"contrast":0.85,"fontName":"COMMODORE_PET","fontColor":"#00ff5b","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.2,"horizontalSync":0.14,"jitter":0.11,"burnIn":0.4,"staticNoise":0.05,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "Default Pixelated"
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0,"brightness":0.5,"flickering":0.2,"contrast":0.85,"fontName":"COMMODORE_PET","fontColor":"#ffffff","frameName":"ROUGH_BLACK_FRAME","glowingLine":0.2,"horizontalSync":0.2,"jitter":0,"burnIn":0.45,"staticNoise":0.19,"rasterization":2,"screenCurvature":0.05,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "Apple ]["
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.5,"brightness":0.5,"flickering":0.2,"contrast":0.85,"fontName":"APPLE_II","fontColor":"#2fff91","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.22,"horizontalSync":0.16,"jitter":0.1,"burnIn":0.65,"staticNoise":0.08,"rasterization":1,"screenCurvature":0.18,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "Vintage"
+             obj_string: '{"ambientLight":0.5,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.9,"contrast":0.80,"fontName":"COMMODORE_PET","fontColor":"#00ff3e","frameName":"ROUGH_BLACK_FRAME","glowingLine":0.3,"horizontalSync":0.42,"jitter":0.4,"burnIn":0.75,"staticNoise":0.2,"rasterization":1,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "IBM Dos"
+             obj_string: '{"ambientLight":0.16,"backgroundColor":"#000000","bloom":0.4,"brightness":0.5,"flickering":0.07,"contrast":0.85,"fontName":"IBM_DOS","fontColor":"#ffffff","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0.13,"horizontalSync":0,"jitter":0.16,"burnIn":0.3,"staticNoise":0.03,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":1,"saturationColor":0,"rbgShift":0.35,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "IBM 3278"
+             obj_string: '{"ambientLight":0.1,"backgroundColor":"#000000","bloom":0.15,"brightness":0.5,"flickering":0,"contrast":0.85,"fontName":"IBM_3278","fontColor":"#0ccc68","frameName":"SIMPLE_WHITE_FRAME","glowingLine":0,"horizontalSync":0,"jitter":0,"burnIn":0.6,"staticNoise":0,"rasterization":0,"screenCurvature":0.1,"windowOpacity":1,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             text: "Transparent Green"
+             obj_string: '{"ambientLight":0.2,"backgroundColor":"#000000","bloom":0.45,"brightness":0.5,"flickering":0.20,"contrast":0.85,"fontName":"TERMINUS_SCALED","fontColor":"#0ccc68","frameName":"NO_FRAME","glowingLine":0.16,"horizontalSync":0.1,"jitter":0.20,"burnIn":0.25,"staticNoise":0.20,"rasterization":0,"screenCurvature":0.05,"windowOpacity":0.60,"chromaColor":0,"saturationColor":0,"rbgShift":0,"fontWidth":1.0,"useCustomCommand":false,"customCommand":""}'
+             builtin: true
+-        }
++        }*/
+     }
+ 
+     function getProfileIndexByName(name) {
+diff --git a/app/qml/FontPixels.qml b/app/qml/FontPixels.qml
+index 6ff85da..6f0d0ba 100644
+--- a/app/qml/FontPixels.qml
++++ b/app/qml/FontPixels.qml
+@@ -32,7 +32,7 @@ QtObject{
+     property bool lowResolutionFont: true
+ 
+     property ListModel fontlist: ListModel{
+-        ListElement{
++        /*ListElement{
+             name: "COMMODORE_PET"
+             text: "Commodore PET (1977)"
+             source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
+@@ -40,7 +40,7 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
++        }*/
+         ListElement{
+             name: "PROGGY_TINY"
+             text: "Proggy Tiny (Modern)"
+@@ -50,7 +50,7 @@ QtObject{
+             baseScaling: 4.0
+             fontWidth: 0.9
+         }
+-        ListElement{
++        /*ListElement{
+             name: "TERMINUS_SCALED"
+             text: "Terminus (Modern)"
+             source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
+@@ -58,7 +58,7 @@ QtObject{
+             pixelSize: 12
+             baseScaling: 3.0
+             fontWidth: 1.0
+-        }
++        }*/
+         ListElement{
+             name: "PRO_FONT_SCALED"
+             text: "Pro Font (Modern)"
+@@ -68,7 +68,7 @@ QtObject{
+             baseScaling: 3.0
+             fontWidth: 1.0
+         }
+-        ListElement{
++        /*ListElement{
+             name: "APPLE_II"
+             text: "Apple ][ (1977)"
+             source: "fonts/1977-apple2/PrintChar21.ttf"
+@@ -76,8 +76,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.9
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "ATARI_400"
+             text: "Atari 400-800 (1979)"
+             source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
+@@ -85,8 +85,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "COMMODORE_64"
+             text: "Commodore 64 (1982)"
+             source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
+@@ -94,6 +94,6 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
++        }*/
+     }
+ }
+diff --git a/app/qml/FontScanlines.qml b/app/qml/FontScanlines.qml
+index eebf00b..410d7b6 100644
+--- a/app/qml/FontScanlines.qml
++++ b/app/qml/FontScanlines.qml
+@@ -32,7 +32,7 @@ QtObject{
+     property bool lowResolutionFont: true
+ 
+     property ListModel fontlist: ListModel{
+-        ListElement{
++        /*ListElement{
+             name: "COMMODORE_PET"
+             text: "Commodore PET (1977)"
+             source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
+@@ -40,7 +40,7 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.7
+-        }
++        }*/
+         ListElement{
+             name: "PROGGY_TINY"
+             text: "Proggy Tiny (Modern)"
+@@ -50,7 +50,7 @@ QtObject{
+             baseScaling: 4.0
+             fontWidth: 0.9
+         }
+-        ListElement{
++        /*ListElement{
+             name: "TERMINUS_SCALED"
+             text: "Terminus (Modern)"
+             source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
+@@ -58,7 +58,7 @@ QtObject{
+             pixelSize: 12
+             baseScaling: 3.0
+             fontWidth: 1.0
+-        }
++        }*/
+         ListElement{
+             name: "PRO_FONT_SCALED"
+             text: "Pro Font (Modern)"
+@@ -68,7 +68,7 @@ QtObject{
+             baseScaling: 3.0
+             fontWidth: 1.0
+         }
+-        ListElement{
++        /*ListElement{
+             name: "APPLE_II"
+             text: "Apple ][ (1977)"
+             source: "fonts/1977-apple2/PrintChar21.ttf"
+@@ -76,8 +76,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.8
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "ATARI_400"
+             text: "Atari 400-800 (1979)"
+             source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
+@@ -85,8 +85,8 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.7
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "COMMODORE_64"
+             text: "Commodore 64 (1982)"
+             source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
+@@ -94,6 +94,6 @@ QtObject{
+             pixelSize: 8
+             baseScaling: 4.0
+             fontWidth: 0.7
+-        }
++        }*/
+     }
+ }
+diff --git a/app/qml/Fonts.qml b/app/qml/Fonts.qml
+index ad20844..882808a 100644
+--- a/app/qml/Fonts.qml
++++ b/app/qml/Fonts.qml
+@@ -50,7 +50,7 @@ QtObject{
+     // Those are slower to render but are not pixelated.
+ 
+     property ListModel fontlist: ListModel{
+-        ListElement{
++        /*ListElement{
+             name: "TERMINUS_SCALED"
+             text: "Terminus (Modern)"
+             source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
+@@ -59,7 +59,7 @@ QtObject{
+             baseScaling: 3.0
+             fontWidth: 1.0
+             lowResolutionFont: true
+-        }
++        }*/
+         ListElement{
+             name: "PRO_FONT_SCALED"
+             text: "Pro Font (Modern)"
+@@ -70,7 +70,7 @@ QtObject{
+             fontWidth: 1.0
+             lowResolutionFont: true
+         }
+-        ListElement{
++        /*ListElement{
+             name: "EXCELSIOR_SCALED"
+             text: "Fixedsys Excelsior (Modern)"
+             source: "fonts/modern-fixedsys-excelsior/FSEX301-L2.ttf"
+@@ -79,8 +79,8 @@ QtObject{
+             baseScaling: 2.4
+             fontWidth: 1.0
+             lowResolutionFont: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "COMMODORE_PET_SCALED"
+             text: "Commodore PET (1977)"
+             source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
+@@ -89,7 +89,7 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.7
+             lowResolutionFont: true
+-        }
++        }*/
+         ListElement{
+             name: "PROGGY_TINY_SCALED"
+             text: "Proggy Tiny (Modern)"
+@@ -100,7 +100,7 @@ QtObject{
+             fontWidth: 0.9
+             lowResolutionFont: true
+         }
+-        ListElement{
++        /*ListElement{
+             name: "APPLE_II_SCALED"
+             text: "Apple ][ (1977)"
+             source: "fonts/1977-apple2/PrintChar21.ttf"
+@@ -109,8 +109,8 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.8
+             lowResolutionFont: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "ATARI_400_SCALED"
+             text: "Atari 400-800 (1979)"
+             source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
+@@ -119,8 +119,8 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.7
+             lowResolutionFont: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "COMMODORE_64_SCALED"
+             text: "Commodore 64 (1982)"
+             source: "fonts/1982-commodore64/C64_Pro_Mono_v1.0-STYLE.ttf"
+@@ -129,8 +129,8 @@ QtObject{
+             baseScaling: 3.5
+             fontWidth: 0.7
+             lowResolutionFont: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "ATARI_ST_SCALED"
+             text: "Atari ST (1985)"
+             source: "fonts/1985-atari-st/AtariST8x16SystemFont.ttf"
+@@ -139,8 +139,8 @@ QtObject{
+             baseScaling: 2.0
+             fontWidth: 1.0
+             lowResolutionFont: true
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "IBM_DOS"
+             text: "IBM DOS (1985)"
+             source: "fonts/1985-ibm-pc-vga/Perfect DOS VGA 437 Win.ttf"
+@@ -149,7 +149,7 @@ QtObject{
+             baseScaling: 2.0
+             fontWidth: 1.0
+             lowResolutionFont: true
+-        }
++        }*/
+         ListElement{
+             name: "HERMIT"
+             text: "HD: Hermit (Modern)"
+@@ -159,7 +159,7 @@ QtObject{
+             fontWidth: 1.0
+             lowResolutionFont: false
+         }
+-        ListElement{
++        /*ListElement{
+             name: "TERMINUS"
+             text: "HD: Terminus (Modern)"
+             source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
+@@ -167,7 +167,7 @@ QtObject{
+             pixelSize: 35
+             fontWidth: 1.0
+             lowResolutionFont: false
+-        }
++        }*/
+         ListElement{
+             name: "PRO_FONT"
+             text: "HD: Pro Font (Modern)"
+@@ -177,7 +177,7 @@ QtObject{
+             fontWidth: 1.0
+             lowResolutionFont: false
+         }
+-        ListElement{
++        /*ListElement{
+             name: "MONACO"
+             text: "HD: Monaco (Modern)"
+             source: "fonts/modern-monaco/monaco.ttf"
+@@ -185,8 +185,8 @@ QtObject{
+             pixelSize: 30
+             fontWidth: 1.0
+             lowResolutionFont: false
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "INCONSOLATA"
+             text: "HD: Inconsolata (Modern)"
+             source: "fonts/modern-inconsolata/Inconsolata.otf"
+@@ -194,8 +194,8 @@ QtObject{
+             pixelSize: 35
+             fontWidth: 1.0
+             lowResolutionFont: false
+-        }
+-        ListElement{
++        }*/
++        /*ListElement{
+             name: "IBM_3278"
+             text: "HD: IBM 3278 (1971)"
+             source: "fonts/1971-ibm-3278/3270Medium.ttf"
+@@ -203,6 +203,6 @@ QtObject{
+             pixelSize: 32
+             fontWidth: 1.0
+             lowResolutionFont: false
+-        }
++        }*/
+     }
+ }
+-- 
+2.12.2
+
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 979278a53..ea6777e54 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Petter <petter@mykolab.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,6 +32,7 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix packages)
+  #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
@@ -49,6 +51,7 @@
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages docbook)
+  #:use-module (gnu packages qt)
   #:use-module (srfi srfi-26))
 
 (define-public tilda
@@ -433,3 +436,109 @@ its embedding program should provide it to draw on its behalf.  It avoids
 calling @code{malloc} during normal running state, allowing it to be used in
 embedded kernel situations.")
     (license license:expat)))
+
+(define-public cool-retro-term
+  (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863")
+        (revision "1"))
+    (package
+      (name "cool-retro-term")
+      (version (string-append "1.0.0-" revision "." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (file-name (string-append name "-" version "-checkout"))
+                (uri (git-reference
+                      (url (string-append "https://github.com/Swordfish90/" name))
+                      (commit commit)
+                      (recursive? #t)))
+                (sha256
+                 (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3"))
+                (patches
+                 (search-patches "cool-retro-term-remove-non-free-fonts.patch"
+                                 "cool-retro-term-fix-array-size.patch"
+                                 "cool-retro-term-dont-check-uninit-member.patch"
+                                 "cool-retro-term-memory-leak-1.patch"))
+                (modules '((guix build utils)))
+                (snippet
+                 '(for-each (lambda (font)
+                              (delete-file-recursively
+                               (string-append "app/qml/fonts/" font))
+                              (substitute* '("app/qml/resources.qrc")
+                                (((string-append "<file>fonts/" font ".*"))
+                                 "")))
+                            '("1971-ibm-3278"      ; ?
+                              "1977-apple2"        ; Probably non-free
+                              "1977-commodore-pet" ; Non-Free
+                              "1979-atari-400-800" ; Probably non-free
+                              "1982-commodore64"   ; Non-Free
+                              "1985-atari-st"      ; ?
+                              "1985-ibm-pc-vga"    ; Probably non-free
+                              "modern-fixedsys-excelsior" ; ?
+                              ;"modern-hermit"     ; FREE
+                              "modern-inconsolata" ; ?
+                              "modern-monaco"      ; ?
+                              ;"modern-pro-font-win-tweaked" ; FREE
+                              ;"modern-proggy-tiny"          ; FREE
+                              "modern-terminus"))))) ; ?
+      (build-system gnu-build-system)
+      (inputs
+       `(("qtbase" ,qtbase)
+         ("qtdeclarative" ,qtdeclarative)
+         ("qtgraphicaleffects" ,qtgraphicaleffects)
+         ("qtquickcontrols" ,qtquickcontrols)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (share (string-append out "/share")))
+                        (substitute* '("qmltermwidget/qmltermwidget.pro")
+                          (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
+                           (string-append "INSTALL_DIR = " out "/qml")))
+                        (substitute* '("app/app.pro")
+                          (("target.path \\+= /usr")
+                           (string-append "target.path += " out))
+                          (("icon32.path = /usr/share")
+                           (string-append "icon32.path = " share))
+                          (("icon64.path = /usr/share")
+                           (string-append "icon64.path = " share))
+                          (("icon128.path = /usr/share")
+                           (string-append "icon128.path = " share))
+                          (("icon256.path = /usr/share")
+                           (string-append "icon256.path = " share)))
+                        (zero? (system* "qmake")))))
+           (add-before 'install 'fix-Makefiles
+                       (lambda* (#:key outputs #:allow-other-keys)
+                         (let* ((out (assoc-ref outputs "out")))
+                           (substitute* '("Makefile")
+                             (("\\$\\(INSTALL_ROOT\\)/usr") out)))))
+           (add-after 'install 'wrap-executable
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let* ((out (assoc-ref outputs "out"))
+                               (qml "/qml"))
+                          (wrap-program (string-append out "/bin/cool-retro-term")
+                            `("QML2_IMPORT_PATH" ":" prefix
+                              (,(string-append
+                                 (assoc-ref %build-inputs "qtdeclarative") qml)
+                               ,(string-append
+                                 (assoc-ref %build-inputs "qtgraphicaleffects") qml)
+                               ,(string-append
+                                 (assoc-ref %build-inputs "qtquickcontrols") qml)))))))
+           (add-after 'install 'add-alternate-name
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let* ((bin (string-append (assoc-ref outputs "out") "/bin")))
+                          (symlink (string-append bin "/cool-retro-term")
+                                   (string-append bin "/crt"))))))))
+      
+      (synopsis "Terminal emulator")
+      (description
+       "Cool-retro-term (crt) is a terminal emulator which mimics the look and
+feel of the old cathode ray tube (CRT) screens.  It has been designed to be
+eye-candy, customizable, and reasonably lightweight.")
+      (home-page "https://github.com/Swordfish90/cool-retro-term")
+      (license (list 
+                license:gpl2+           ; qmltermwidget
+                license:gpl3+           ; cool-retro-term
+                ;; Fonts
+                license:silofl1.1
+                license:x11)))))
-- 
2.12.2


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-05-03 12:37                   ` Petter
@ 2017-05-05  3:03                     ` Eric Bavier
  2017-05-05 22:58                       ` Petter
  2017-05-08  9:39                       ` Efraim Flashner
  0 siblings, 2 replies; 17+ messages in thread
From: Eric Bavier @ 2017-05-05  3:03 UTC (permalink / raw)
  To: Petter; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 4808 bytes --]

Hello Petter,

Pushed as f9ff014bf623071b9343265e8a5aa994a10ec9d4 !

I ended up whitelisting a few more of the fonts, after verifying their
licenses, and made some more specific notes on the license of each
font.

I had to add $out/qml to the wrapper QML2_IMPORT_PATH in order for crt
to start up.  I figured that was alright, since that path was present
in your initial patch.

I added the patches to dist_patch_DATA in gnu/local.mk and listed them
in the commit log too.

It even builds with "--rounds=2" :)

Thanks again,
`~Eric

On Wed, 3 May 2017 14:37:53 +0200
Petter <petter@mykolab.ch> wrote:

> On Tue, 2 May 2017 08:51:06 -0500
> Eric Bavier <ericbavier@centurylink.net> wrote:
> 
> > Hi Petter,
> > 
> > Thanks again for your patience with this review.  
> 
> Hi Eric,
> 
> I'm in no rush :)
> 
> > "gpl2" in the license field should be "gpl2+" according to
> > qmltermwidget license headers.  Could you also include a comment noting
> > the component split?  Nothing fancy, just "for qmltermwidget" or so next
> > to gpl2+ and "for cool-retro-term" next to gpl3+.  
> 
> Done. I did it like this:
>       (license (list 
>                 license:gpl2+ ; qmltermwidget
>                 license:gpl3+ ; cool-retro-term
>                 ;; Fonts
>                 license:silofl1.1
>                 license:x11)))))
> 
> > > > > > and the fonts/1977-apple2, fonts/1977-commodore-pet, probably also
> > > > > > needs to be stripped as non-free; from 'FreeLicense.txt':
> > > > > > 
> > > > > >   "1. The User may not sell copies of the Software for a fee."
> > > > > > 
> > > > > > The fonts/1979-atari-400-800 font seems to be non-free license, which
> > > > > > is not mentioned in the 'ReadMe.rtf' but only on the WayBack Machine
> > > > > > at
> > > > > > https://web-beta.archive.org/web/20080907111008/http://www2.bitstream.net/~marksim/atarimac/fonts.html :
> > > > > > 
> > > > > >   "These fonts are freeware and may not be offered for sale seperately
> > > > > >   or as part of a collection."
> > > > > > 
> > > > > > The fonts/1982-commodore64 font is licensed under non-free terms; see
> > > > > > fonts/1982-commodore64/license.txt
> > > > > > 
> > > > > > The only mention of a license for fonts/1985-ibm-pc-vga is at
> > > > > > http://www.dafont.com/font-comment.php?file=perfect_dos_vga_437 where
> > > > > > the author says "The license is this: this font is free to use in
> > > > > > whatever you want.", but that probably "doesn't count".
> > > > > > 
> > > > > > I could not find license info for a few of the other fonts.
> > > > > > 
> > > > > > OTOH I recall a discussion on IRC recently about fonts embedded in
> > > > > > packages being treated as non-functional data, and thus OK from a FSDG
> > > > > > perspective.  But I would want verification on that.          
> > > > > 
> > > > > Let's see if someone can shine some light on this.
> > > > >         
> > > > 
> > > > Leo pointed me at https://bugs.gnu.org/26588 which references
> > > > https://www.gnu.org/distros/free-system-distribution-guidelines.html#non-functional-data .
> > > > I think many of these fonts would need to be stripped out or
> > > > substituted because their license prohibits commercial/non-commercial
> > > > redistribution.      
> > > 
> > > Recipe is now removing the following from disk and GUI:
> > >                                   '("1977-apple2"
> > >                                     "1977-commodore-pet"
> > >                                     "1979-atari-400-800"
> > >                                     "1982-commodore64"
> > >                                     "1985-ibm-pc-vga")    
> > 
> > The code you've added to delete these fonts and adjust the source
> > accordingly would be better in an origin 'snippet' so that `guix build
> > -S cool-retro-term` does not include the fonts.  
> 
> Done.
> 
> > > 
> > > Should more be removed?    
> > 
> > modern-monaco.  It's a font from Apple which is specifically *not*
> > freely distributable, but the ttf file is still floating around the
> > internet, giving many projects the impression that it is.
> >   
> > > 
> > > What do we do about the fonts without licensing info?    
> > 
> > I agree with Chris that we need to remove them.  
> 
> Right, I've made the mental switch now to whitelist rather than blacklist.
> The ones that are included now are modern-hermit, modern-pro-font-win-tweaked
> and modern-proggy-tiny. The rest are out until proven Free.
> 
> Let me know if there are other fonts /we can include/ ;)
> 
> 
> Also added a `crt` as a symlink to cool-retro-term.
> 
> 
> Thanks Eric and Chris for being so thorough and helpful! Let me know if there
> are more issues.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-05-05  3:03                     ` Eric Bavier
@ 2017-05-05 22:58                       ` Petter
  2017-05-08  9:39                       ` Efraim Flashner
  1 sibling, 0 replies; 17+ messages in thread
From: Petter @ 2017-05-05 22:58 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2357 bytes --]

Hi Eric,

On Thu, 4 May 2017 22:03:24 -0500
Eric Bavier <ericbavier@centurylink.net> wrote:

> Hello Petter,
> 
> Pushed as f9ff014bf623071b9343265e8a5aa994a10ec9d4 !

Cool! :)

> I ended up whitelisting a few more of the fonts, after verifying their
> licenses, and made some more specific notes on the license of each
> font.

Nice! I appreciate you taking care of this. My interest and knowledge of
licensing is pretty low, so I find this quite daunting at the moment. I'm sure
this will be easier for me when I gain more knowledge.

I see you updated both the snippet and the patch for the settings menu. Good!

Maybe we should start, or perhaps encourage the FSF, to maintain a list of Free
fonts. Guess this isn't the last time we need to determine a font's license.
Just a thought.

> I had to add $out/qml to the wrapper QML2_IMPORT_PATH in order for crt
> to start up.  I figured that was alright, since that path was present
> in your initial patch.

Hm. Yeah, it certainly looks alright; in fact it looks "too alright". I don't
really understand now how this even can work for me without it. This is after
all where the qml for the embedded library is, which I assume is quite
important for the program :)

Aha! I had to investigate and now I get it. I've been using cool-retro-term
since the first time I was able to start it. At this point I built it with
(inputs qml). The wrapper at this point added only cool-retro-term/qml to
QML2_IMPORT_PATH (what you've added again). And QML2_IMPORT_PATH has been set
to this in my terminal environment ever since, and have further been included by
the wrapper script when I've run later builds:
  export QML2_IMPORT_PATH=
  "...988icm-qtquickcontrols-5.7.1/qml${QML2_IMPORT_PATH:+:}$QML2_IMPORT_PATH"

Now, when I went from full qml to qml components, I checked if this was still
required (wasn't thinking). It built and started fine without it so I removed
it.

Good thing you tried it!

> I added the patches to dist_patch_DATA in gnu/local.mk and listed them
> in the commit log too.

Thanks! I'm not familiar with gnu/local.mk. Looks like a build script.

I see you also changed (assoc-ref %build-inputs ..) to use "inputs". Noted!

> It even builds with "--rounds=2" :)

Yay! :)

> Thanks again,
> `~Eric

Thanks yourself! :)
Petter

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH] gnu: Add cool-retro-term.
  2017-05-05  3:03                     ` Eric Bavier
  2017-05-05 22:58                       ` Petter
@ 2017-05-08  9:39                       ` Efraim Flashner
  1 sibling, 0 replies; 17+ messages in thread
From: Efraim Flashner @ 2017-05-08  9:39 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

On Thu, May 04, 2017 at 10:03:24PM -0500, Eric Bavier wrote:
> Hello Petter,
> 
...
> 
> I had to add $out/qml to the wrapper QML2_IMPORT_PATH in order for crt
> to start up.  I figured that was alright, since that path was present
> in your initial patch.
> 
...
>
> Thanks again,
> `~Eric
> 

I looked in gnu/packages/qt.scm, qtbase has QML2_IMPORT_PATH already set
in the native-search-paths, so my understanding was that wrapping the
program shouldn't be needed. Does it work without the wrapping?


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-05-08  9:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-23 11:55 [PATCH] gnu: Add cool-retro-term Petter
2017-04-23 19:18 ` Chris Marusich
2017-04-23 21:12   ` Petter
2017-04-23 23:31     ` Chris Marusich
2017-04-24 12:30       ` Petter
2017-04-26  3:36         ` Eric Bavier
2017-04-26 18:09           ` Petter
2017-04-28  1:47             ` Eric Bavier
2017-04-28 12:10               ` Petter
2017-04-30 20:59                 ` Chris Marusich
2017-05-03 11:38                   ` Petter
2017-05-02 13:51                 ` Eric Bavier
2017-05-03 12:37                   ` Petter
2017-05-05  3:03                     ` Eric Bavier
2017-05-05 22:58                       ` Petter
2017-05-08  9:39                       ` Efraim Flashner
2017-04-30 20:47         ` Chris Marusich

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.