unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
@ 2016-03-26 14:47 alírio eyng
  2016-03-28 13:40 ` 宋文武
  0 siblings, 1 reply; 10+ messages in thread
From: alírio eyng @ 2016-03-26 14:47 UTC (permalink / raw)
  To: guix-devel

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



[-- Attachment #2: 0001-gnu-font-gnu-freefont-ttf-Update-to-20120503-and-bui.patch --]
[-- Type: text/x-patch, Size: 5692 bytes --]

From dac1dfe1d9b6716d1aefa339e5145c26dd798565 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?al=C3=ADrio=20eyng?= <alirioeyng@gmail.com>
Date: Sat, 26 Mar 2016 14:39:27 +0000
Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
 source.

* gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
[arguments]: Build from source.
* guix/gnu-maintenance.scm (%tarball-rx): Remove comment.
---
 gnu/packages/fonts.scm   | 68 +++++++++++++++++++++++-------------------------
 guix/gnu-maintenance.scm |  1 -
 2 files changed, 32 insertions(+), 37 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index f07e052..793a30c 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -33,10 +33,12 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages zip)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages zip))
 
 (define-public font-inconsolata
   (package
@@ -260,47 +262,41 @@ sans-serif designed for on-screen reading.  It is used by GNOME@tie{}3.")
 (define-public font-gnu-freefont-ttf
   (package
     (name "font-gnu-freefont-ttf")
-    (version "20100919")
+    (version "20120503")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
+             (uri (string-append "mirror://gnu/freefont/freefont-src-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
-    (build-system trivial-build-system)
+               "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
+    (build-system gnu-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder (begin
-                   (use-modules (guix build utils)
-                                (srfi srfi-26))
-
-                   (let ((tar      (string-append (assoc-ref %build-inputs
-                                                             "tar")
-                                                  "/bin/tar"))
-                         (PATH     (string-append (assoc-ref %build-inputs
-                                                             "gzip")
-                                                  "/bin"))
-                         (font-dir (string-append %output
-                                                  "/share/fonts/truetype"))
-                         (doc-dir  (string-append %output "/share/doc/"
-                                                  ,name "-" ,version)))
-                     (setenv "PATH" PATH)
-                     (system* tar "xvf" (assoc-ref %build-inputs "source"))
-
-                     (mkdir-p font-dir)
-                     (mkdir-p doc-dir)
-                     (chdir (string-append "freefont-" ,version))
-                     (for-each (lambda (file)
-                                 (let ((dir (if (string-suffix? "ttf" file)
-                                                font-dir
-                                                doc-dir)))
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (replace 'install
+                   (lambda _
+                     (let ((doc-dir  (string-append %output "/share/doc/"
+                                                    ,name "-" ,version))
+                           (font-dir (string-append %output
+                                                    "/share/fonts/truetype")))
+                       (mkdir-p doc-dir)
+                       (substitute* "Makefile"
+                         (("\\$\\(TMPDIR\\)") doc-dir)
+                         (("sfd/\\*.ttf") ""))
+                       (system* "make" "ttftar")
+                       (mkdir-p font-dir)
+                       (for-each (lambda (file)
                                    (copy-file file
-                                              (string-append dir "/" file))))
-                               (find-files "." ""))))))
-    (native-inputs `(("source" ,source)
-                     ("tar" ,tar)
-                     ("gzip" ,gzip)))
+                                              (string-append font-dir "/"
+                                                             (basename file))))
+                                 (filter
+                                   (lambda (file) (string-suffix? "ttf" file))
+                                   (find-files "." "")))))))
+       #:test-target "tests"))
+    (native-inputs `(("fontforge" ,(package (inherit fontforge)
+                                     (inputs `(("python-2" ,python-2)
+                                     ,@(package-inputs fontforge)))))))
     (home-page "http://www.gnu.org/software/freefont/")
     (synopsis "Unicode-encoded outline fonts")
     (description
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 9d720ca..eb9dcf8 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -243,7 +243,6 @@ stored."
     (substring tarball 0 end)))
 
 (define %tarball-rx
-  ;; The .zip extensions is notably used for freefont-ttf.
   ;; The "-src" pattern is for "TeXmacs-1.0.7.9-src.tar.gz".
   ;; The "-gnu[0-9]" pattern is for "icecat-38.4.0-gnu1.tar.bz2".
   (make-regexp "^([^.]+)-([0-9]|[^-])+(-(src|gnu[0-9]))?\\.(tar\\.|zip$)"))
-- 
1.9.1


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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-03-26 14:47 [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source alírio eyng
@ 2016-03-28 13:40 ` 宋文武
  2016-03-29  3:38   ` alírio eyng
  0 siblings, 1 reply; 10+ messages in thread
From: 宋文武 @ 2016-03-28 13:40 UTC (permalink / raw)
  To: alírio eyng; +Cc: guix-devel

alírio eyng <alirioeyng@gmail.com> writes:

> From dac1dfe1d9b6716d1aefa339e5145c26dd798565 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?al=C3=ADrio=20eyng?= <alirioeyng@gmail.com>
> Date: Sat, 26 Mar 2016 14:39:27 +0000
> Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
>  source.
Cool!
>
> * gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
> [arguments]: Build from source.
> * guix/gnu-maintenance.scm (%tarball-rx): Remove comment.
Not clear, how about “Remove comment about freefont-ttf.”?
> […]
> +    (native-inputs `(("fontforge" ,(package (inherit fontforge)
> +                                     (inputs `(("python-2" ,python-2)
> +                                     ,@(package-inputs fontforge)))))))
Why not add ‘python-2’ to the fontforge package directly?


Thanks!

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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-03-28 13:40 ` 宋文武
@ 2016-03-29  3:38   ` alírio eyng
  2016-03-31  7:48     ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: alírio eyng @ 2016-03-29  3:38 UTC (permalink / raw)
  To: iyzsong; +Cc: guix-devel

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

>> * gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
>> [arguments]: Build from source.
>> * guix/gnu-maintenance.scm (%tarball-rx): Remove comment.
> Not clear, how about “Remove comment about freefont-ttf.”?
ok
>> […]
>> +    (native-inputs `(("fontforge" ,(package (inherit fontforge)
>> +                                     (inputs `(("python-2" ,python-2)
>> +                                     ,@(package-inputs fontforge)))))))
> Why not add ‘python-2’ to the fontforge package directly?
see inline references in the updated patch

[-- Attachment #2: 0001-gnu-font-gnu-freefont-ttf-Update-to-20120503-and-bui.patch --]
[-- Type: text/x-patch, Size: 5970 bytes --]

From ab7a628f7d8fc9f68f0ebfdd27b3bcb32a607724 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?al=C3=ADrio=20eyng?= <alirioeyng@gmail.com>
Date: Tue, 29 Mar 2016 03:32:58 +0000
Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
 source.

* gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
[arguments]: Build from source.
* guix/gnu-maintenance.scm (%tarball-rx): Remove comment about freefont-ttf.
---
 gnu/packages/fonts.scm   | 72 ++++++++++++++++++++++++------------------------
 guix/gnu-maintenance.scm |  1 -
 2 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index f07e052..c579c23 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -33,10 +33,12 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages zip)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages zip))
 
 (define-public font-inconsolata
   (package
@@ -260,47 +262,45 @@ sans-serif designed for on-screen reading.  It is used by GNOME@tie{}3.")
 (define-public font-gnu-freefont-ttf
   (package
     (name "font-gnu-freefont-ttf")
-    (version "20100919")
+    (version "20120503")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
+             (uri (string-append "mirror://gnu/freefont/freefont-src-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
-    (build-system trivial-build-system)
+               "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
+    (build-system gnu-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder (begin
-                   (use-modules (guix build utils)
-                                (srfi srfi-26))
-
-                   (let ((tar      (string-append (assoc-ref %build-inputs
-                                                             "tar")
-                                                  "/bin/tar"))
-                         (PATH     (string-append (assoc-ref %build-inputs
-                                                             "gzip")
-                                                  "/bin"))
-                         (font-dir (string-append %output
-                                                  "/share/fonts/truetype"))
-                         (doc-dir  (string-append %output "/share/doc/"
-                                                  ,name "-" ,version)))
-                     (setenv "PATH" PATH)
-                     (system* tar "xvf" (assoc-ref %build-inputs "source"))
-
-                     (mkdir-p font-dir)
-                     (mkdir-p doc-dir)
-                     (chdir (string-append "freefont-" ,version))
-                     (for-each (lambda (file)
-                                 (let ((dir (if (string-suffix? "ttf" file)
-                                                font-dir
-                                                doc-dir)))
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (replace 'install
+                   (lambda _
+                     (let ((doc-dir  (string-append %output "/share/doc/"
+                                                    ,name "-" ,version))
+                           (font-dir (string-append %output
+                                                    "/share/fonts/truetype")))
+                       (mkdir-p doc-dir)
+                       (substitute* "Makefile"
+                         (("\\$\\(TMPDIR\\)") doc-dir)
+                         (("sfd/\\*.ttf") ""))
+                       (system* "make" "ttftar")
+                       (mkdir-p font-dir)
+                       (for-each (lambda (file)
                                    (copy-file file
-                                              (string-append dir "/" file))))
-                               (find-files "." ""))))))
-    (native-inputs `(("source" ,source)
-                     ("tar" ,tar)
-                     ("gzip" ,gzip)))
+                                              (string-append font-dir "/"
+                                                             (basename file))))
+                                 (filter
+                                   (lambda (file) (string-suffix? "ttf" file))
+                                   (find-files "." "")))))))
+       #:test-target "tests"))
+    ;; https://github.com/fontforge/fontforge/pull/109
+    ;;  "fontforge has to be compiled against only one python version"
+    ;; https://github.com/fontforge/fontforge/issues/1731
+    ;;  "default python version that fontforge links with is python 2"
+    (native-inputs `(("fontforge" ,(package (inherit fontforge)
+                                     (inputs `(("python-2" ,python-2)
+                                     ,@(package-inputs fontforge)))))))
     (home-page "http://www.gnu.org/software/freefont/")
     (synopsis "Unicode-encoded outline fonts")
     (description
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 9d720ca..eb9dcf8 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -243,7 +243,6 @@ stored."
     (substring tarball 0 end)))
 
 (define %tarball-rx
-  ;; The .zip extensions is notably used for freefont-ttf.
   ;; The "-src" pattern is for "TeXmacs-1.0.7.9-src.tar.gz".
   ;; The "-gnu[0-9]" pattern is for "icecat-38.4.0-gnu1.tar.bz2".
   (make-regexp "^([^.]+)-([0-9]|[^-])+(-(src|gnu[0-9]))?\\.(tar\\.|zip$)"))
-- 
1.9.1


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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-03-29  3:38   ` alírio eyng
@ 2016-03-31  7:48     ` Ludovic Courtès
  2016-03-31 13:18       ` alírio eyng
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2016-03-31  7:48 UTC (permalink / raw)
  To: alírio eyng; +Cc: guix-devel

alírio eyng <alirioeyng@gmail.com> skribis:

>>> * gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
>>> [arguments]: Build from source.
>>> * guix/gnu-maintenance.scm (%tarball-rx): Remove comment.
>> Not clear, how about “Remove comment about freefont-ttf.”?
> ok
>>> […]
>>> +    (native-inputs `(("fontforge" ,(package (inherit fontforge)
>>> +                                     (inputs `(("python-2" ,python-2)
>>> +                                     ,@(package-inputs fontforge)))))))
>> Why not add ‘python-2’ to the fontforge package directly?
> see inline references in the updated patch
>
> From ab7a628f7d8fc9f68f0ebfdd27b3bcb32a607724 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?al=C3=ADrio=20eyng?= <alirioeyng@gmail.com>
> Date: Tue, 29 Mar 2016 03:32:58 +0000
> Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
>  source.
>
> * gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
> [arguments]: Build from source.
> * guix/gnu-maintenance.scm (%tarball-rx): Remove comment about freefont-ttf.

[...]

> +    ;; https://github.com/fontforge/fontforge/pull/109
> +    ;;  "fontforge has to be compiled against only one python version"
> +    ;; https://github.com/fontforge/fontforge/issues/1731
> +    ;;  "default python version that fontforge links with is python 2"
> +    (native-inputs `(("fontforge" ,(package (inherit fontforge)
> +                                     (inputs `(("python-2" ,python-2)
> +                                     ,@(package-inputs fontforge)))))))

I understand cannot support Python 2 and 3 simultaneously, but I think
Leo was suggesting changing the ‘fontforge’ package to use Python 2.x
instead of 3.x.  WDYT?

Also, could you explain why we need fontforge-with-python2 instead of
fontforge-with-python3?

> diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
> index 9d720ca..eb9dcf8 100644
> --- a/guix/gnu-maintenance.scm
> +++ b/guix/gnu-maintenance.scm
> @@ -243,7 +243,6 @@ stored."
>      (substring tarball 0 end)))
>  
>  (define %tarball-rx
> -  ;; The .zip extensions is notably used for freefont-ttf.
>    ;; The "-src" pattern is for "TeXmacs-1.0.7.9-src.tar.gz".
>    ;; The "-gnu[0-9]" pattern is for "icecat-38.4.0-gnu1.tar.bz2".
>    (make-regexp "^([^.]+)-([0-9]|[^-])+(-(src|gnu[0-9]))?\\.(tar\\.|zip$)"))

This comment remains valid because there are .zip files in
ftp.gnu.org/gnu/freefont, so I think we should keep it.

Thanks, it’s a nice to have these fonts built from source!

Ludo’.

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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-03-31  7:48     ` Ludovic Courtès
@ 2016-03-31 13:18       ` alírio eyng
  2016-03-31 21:45         ` Ludovic Courtès
  2016-04-02  8:39         ` Eric Bavier
  0 siblings, 2 replies; 10+ messages in thread
From: alírio eyng @ 2016-03-31 13:18 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel

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

reiterating for the list
On 3/31/16, Ludovic Courtès <ludo@gnu.org> wrote:
> I understand cannot support Python 2 and 3 simultaneously, but I think
> Leo was suggesting changing the ‘fontforge’ package to use Python 2.x
> instead of 3.x.  WDYT?
python 2 has a end of life determined, 2020,
https://www.python.org/dev/peps/pep-0373/
so the default should be python 3
> Also, could you explain why we need fontforge-with-python2 instead of
> fontforge-with-python3?
inline comment in patch
>> +++ b/guix/gnu-maintenance.scm
>>  (define %tarball-rx
>> -  ;; The .zip extensions is notably used for freefont-ttf.
>>    ;; The "-src" pattern is for "TeXmacs-1.0.7.9-src.tar.gz".
>>    ;; The "-gnu[0-9]" pattern is for "icecat-38.4.0-gnu1.tar.bz2".
>>    (make-regexp
>> "^([^.]+)-([0-9]|[^-])+(-(src|gnu[0-9]))?\\.(tar\\.|zip$)"))
>
> This comment remains valid because there are .zip files in
> ftp.gnu.org/gnu/freefont, so I think we should keep it.
.zip files in freefont and icecat are binaries, not useful for guix
another patch will remove .zip support

[-- Attachment #2: 0001-gnu-font-gnu-freefont-ttf-Update-to-20120503-and-bui.patch --]
[-- Type: text/x-patch, Size: 5252 bytes --]

From db9e80ea3d6e79e71b9b67e440a78f49ee8a26d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?al=C3=ADrio=20eyng?= <alirioeyng@gmail.com>
Date: Thu, 31 Mar 2016 12:51:47 +0000
Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
 source.

* gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
[arguments]: Build from source.
---
 gnu/packages/fonts.scm | 71 +++++++++++++++++++++++++-------------------------
 1 file changed, 35 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index f07e052..3d75591 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -33,10 +33,12 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages zip)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
   #:use-module (gnu packages xorg)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages zip))
 
 (define-public font-inconsolata
   (package
@@ -260,47 +262,44 @@ sans-serif designed for on-screen reading.  It is used by GNOME@tie{}3.")
 (define-public font-gnu-freefont-ttf
   (package
     (name "font-gnu-freefont-ttf")
-    (version "20100919")
+    (version "20120503")
     (source (origin
              (method url-fetch)
-             (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
+             (uri (string-append "mirror://gnu/freefont/freefont-src-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
-    (build-system trivial-build-system)
+               "0yk58blhcd4hm7nyincmqq4jrzjjk82wif2zmk1l3y2m4vif4qhd"))))
+    (build-system gnu-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder (begin
-                   (use-modules (guix build utils)
-                                (srfi srfi-26))
-
-                   (let ((tar      (string-append (assoc-ref %build-inputs
-                                                             "tar")
-                                                  "/bin/tar"))
-                         (PATH     (string-append (assoc-ref %build-inputs
-                                                             "gzip")
-                                                  "/bin"))
-                         (font-dir (string-append %output
-                                                  "/share/fonts/truetype"))
-                         (doc-dir  (string-append %output "/share/doc/"
-                                                  ,name "-" ,version)))
-                     (setenv "PATH" PATH)
-                     (system* tar "xvf" (assoc-ref %build-inputs "source"))
-
-                     (mkdir-p font-dir)
-                     (mkdir-p doc-dir)
-                     (chdir (string-append "freefont-" ,version))
-                     (for-each (lambda (file)
-                                 (let ((dir (if (string-suffix? "ttf" file)
-                                                font-dir
-                                                doc-dir)))
+     `(#:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (replace 'install
+                   (lambda _
+                     (let ((doc-dir  (string-append %output "/share/doc/"
+                                                    ,name "-" ,version))
+                           (font-dir (string-append %output
+                                                    "/share/fonts/truetype")))
+                       (mkdir-p doc-dir)
+                       (substitute* "Makefile"
+                         (("\\$\\(TMPDIR\\)") doc-dir)
+                         (("sfd/\\*.ttf") ""))
+                       (system* "make" "ttftar")
+                       (mkdir-p font-dir)
+                       (for-each (lambda (file)
                                    (copy-file file
-                                              (string-append dir "/" file))))
-                               (find-files "." ""))))))
-    (native-inputs `(("source" ,source)
-                     ("tar" ,tar)
-                     ("gzip" ,gzip)))
+                                              (string-append font-dir "/"
+                                                             (basename file))))
+                                 (filter
+                                   (lambda (file) (string-suffix? "ttf" file))
+                                   (find-files "." "")))))))
+       #:test-target "tests"))
+    ;; replace python 3 with python 2
+    ;; python 3 support commits aren't yet released in 20120503
+    ;; so freefont needs python 2 support in fontforge
+    (native-inputs `(("fontforge" ,(package (inherit fontforge)
+                                     (inputs `(("python-2" ,python-2)
+                                     ,@(package-inputs fontforge)))))))
     (home-page "http://www.gnu.org/software/freefont/")
     (synopsis "Unicode-encoded outline fonts")
     (description
-- 
1.9.1


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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-03-31 13:18       ` alírio eyng
@ 2016-03-31 21:45         ` Ludovic Courtès
  2016-04-02  8:39         ` Eric Bavier
  1 sibling, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2016-03-31 21:45 UTC (permalink / raw)
  To: alírio eyng; +Cc: guix-devel

alírio eyng <alirioeyng@gmail.com> skribis:

> From db9e80ea3d6e79e71b9b67e440a78f49ee8a26d8 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?al=C3=ADrio=20eyng?= <alirioeyng@gmail.com>
> Date: Thu, 31 Mar 2016 12:51:47 +0000
> Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from
>  source.
>
> * gnu/packages/fonts.scm (font-gnu-freefont-ttf): Update to 20120503.
> [arguments]: Build from source.

Thanks, applied.

However, --rounds=2 suggests that the build is not deterministic, which
we should fix at some point.

Ludo’.

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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-03-31 13:18       ` alírio eyng
  2016-03-31 21:45         ` Ludovic Courtès
@ 2016-04-02  8:39         ` Eric Bavier
  2016-04-02 10:38           ` alírio eyng
  1 sibling, 1 reply; 10+ messages in thread
From: Eric Bavier @ 2016-04-02  8:39 UTC (permalink / raw)
  To: guix-devel; +Cc: alírio eyng

On Thu, 31 Mar 2016 13:18:06 +0000
alírio eyng <alirioeyng@gmail.com> wrote:

> reiterating for the list
> On 3/31/16, Ludovic Courtès <ludo@gnu.org> wrote:
> > I understand cannot support Python 2 and 3 simultaneously, but I think
> > Leo was suggesting changing the ‘fontforge’ package to use Python 2.x
> > instead of 3.x.  WDYT?  
> python 2 has a end of life determined, 2020,
> https://www.python.org/dev/peps/pep-0373/
> so the default should be python 3

It often appears that in trivial scripts it is simply the 'print'
syntax that causes breakage between python2 and 3.  FontForge's
documentation/examples seems to use the python2 print syntax.  Also,
while packaging the fantasque-sans font, I found that it requires
fontforge with python2 (because of print syntax, ugh).

While I support moving things forward for python3, do we really want
python3 for fontforge if their documentation is introducing users to
python2 syntax and many font packages need python2?

Perhaps we leave python3 in the user-installable fontforge, but have a
private python2 variant for building fonts when necessary?  What do
others think?

`~Eric

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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-04-02  8:39         ` Eric Bavier
@ 2016-04-02 10:38           ` alírio eyng
  2016-04-03 21:47             ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: alírio eyng @ 2016-04-02 10:38 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel

On 4/2/16, Eric Bavier <ericbavier@openmailbox.org> wrote:
> It often appears that in trivial scripts it is simply the 'print'
> syntax that causes breakage between python2 and 3.
and you trivially fix it with 2to3 command

> while packaging the fantasque-sans font, I found that it requires
> fontforge with python2 (because of print syntax, ugh).
[1] uses obsolete print statement, i think it isn't needed to build
[2] uses print function

> do we really want
> python3 for fontforge if their documentation is introducing users to
> python2 syntax and many font packages need python2?
making people downgrade to python2 isn't nice[3]
"many font packages need python2" is questionable, freefont should
support python3 in next release, i think you can _build_
fantasque-sans with python3

> Perhaps we leave python3 in the user-installable fontforge, but have a
> private python2 variant for building fonts when necessary?  What do
> others think?
ok

the ideal would be to make a font-build-system so we could use the
isMonoMono.py from freefont to validate all mono fonts; and the build
system would have the right python, not individual fonts

the problem with fantasque-sans is they have python code embedded in
bash, so i think 2to3 won't work
freefont had nontrivial code 2to3 can't convert

[1]https://github.com/belluzj/fantasque-sans/blob/master/fontdiff
[2]https://github.com/belluzj/fantasque-sans/blob/master/validate-generate
[3]https://github.com/ncraun/smoothscan/issues/3#issuecomment-24867766

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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-04-02 10:38           ` alírio eyng
@ 2016-04-03 21:47             ` Ludovic Courtès
  2016-04-04 14:19               ` alírio eyng
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2016-04-03 21:47 UTC (permalink / raw)
  To: alírio eyng; +Cc: guix-devel

alírio eyng <alirioeyng@gmail.com> skribis:

> On 4/2/16, Eric Bavier <ericbavier@openmailbox.org> wrote:

[...]

>> do we really want
>> python3 for fontforge if their documentation is introducing users to
>> python2 syntax and many font packages need python2?
> making people downgrade to python2 isn't nice[3]

I think we should stay close to what Fontforge developers recommend.

Ludo’.

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

* Re: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
  2016-04-03 21:47             ` Ludovic Courtès
@ 2016-04-04 14:19               ` alírio eyng
  0 siblings, 0 replies; 10+ messages in thread
From: alírio eyng @ 2016-04-04 14:19 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel

On 4/3/16, Ludovic Courtès <ludo@gnu.org> wrote:
> alírio eyng <alirioeyng@gmail.com> skribis:
>> On 4/2/16, Eric Bavier <ericbavier@openmailbox.org> wrote:
>>> do we really want
>>> python3 for fontforge if their documentation is introducing users to
>>> python2 syntax and many font packages need python2?
...
> I think we should stay close to what Fontforge developers recommend.
following upstream is good.[1]
i don't think old documentation[2][3] last modified more than five
years ago and created before python3 was released is a recommendation.

[1]"Python 2.x is legacy, Python 3.x is the present and future of the language"
https://wiki.python.org/moin/Python2orPython3
[2]"Created on: 29-Nov-2006"
"Last modified: 30-Nov-2006"
https://github.com/fontforge/fontforge.github.io/blob/master/pythonscripts.html
[3]"Created on: 6-Apr-2007"
"Last modified: 28-Apr-2010"
https://github.com/fontforge/fontforge.github.io/blob/master/python.html

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

end of thread, other threads:[~2016-04-04 14:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-26 14:47 [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source alírio eyng
2016-03-28 13:40 ` 宋文武
2016-03-29  3:38   ` alírio eyng
2016-03-31  7:48     ` Ludovic Courtès
2016-03-31 13:18       ` alírio eyng
2016-03-31 21:45         ` Ludovic Courtès
2016-04-02  8:39         ` Eric Bavier
2016-04-02 10:38           ` alírio eyng
2016-04-03 21:47             ` Ludovic Courtès
2016-04-04 14:19               ` alírio eyng

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).