unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "alírio eyng" <alirioeyng@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH] gnu: font-gnu-freefont-ttf: Update to 20120503 and build from source.
Date: Sat, 26 Mar 2016 14:47:09 +0000	[thread overview]
Message-ID: <CALkz57HFovcgWx4PdyW_LZck4f24rS+Q=7gwiivu5V3gCX0tEQ@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2016-03-26 14:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-26 14:47 alírio eyng [this message]
2016-03-28 13:40 ` [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
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALkz57HFovcgWx4PdyW_LZck4f24rS+Q=7gwiivu5V3gCX0tEQ@mail.gmail.com' \
    --to=alirioeyng@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).