summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-08-17 00:07:40 +0200
committerLudovic Courtès <ludo@gnu.org>2013-08-17 00:07:40 +0200
commit10d3ab10733221e9c61bd64a617adf7c8c08498a (patch)
tree8b248bab3614daa816ac5c50f67148fc3c0123f0 /gnu/packages
parent50731c51a4642e723829da7b76d1333e2a225151 (diff)
downloadguix-10d3ab10733221e9c61bd64a617adf7c8c08498a.tar.gz
gnu: Add GNU Freefont.
* gnu/packages/xorg.scm (freefont-ttf): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/xorg.scm52
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 0760c93405..61555267dd 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4949,3 +4949,55 @@ package provides the TrueType (TTF) files.")
     (license
      (license:x11-style
       "https://www-old.gnome.org/fonts/#Final_Bitstream_Vera_Fonts"))))
+
+(define-public freefont-ttf
+  (package
+    (name "freefont")
+    (version "20100919")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://gnu/freefont/freefont-ttf-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "1q3h5jp1mbdkinkwxy0lfd0a1q7azlbagraydlzaa2ng82836wg4"))))
+    (build-system trivial-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)))
+                                   (copy-file file
+                                              (string-append dir "/" file))))
+                               (find-files "." ""))))))
+    (native-inputs `(("source" ,source)
+                     ("tar" ,tar)
+                     ("gzip" ,gzip)))
+    (home-page "http://www.gnu.org/software/freefont/")
+    (synopsis "Outline fonts covering the Universal Character Set (UCS)")
+    (description
+     "The GNU Freefont project aims to provide a set of free outline
+ (PostScript Type0, TrueType, OpenType...) fonts covering the ISO
+10646/Unicode UCS (Universal Character Set).")
+   (license license:gpl3+)))