From 10d3ab10733221e9c61bd64a617adf7c8c08498a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 17 Aug 2013 00:07:40 +0200 Subject: gnu: Add GNU Freefont. * gnu/packages/xorg.scm (freefont-ttf): New variable. --- gnu/packages/xorg.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) 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 @@ (define-public font-bitstream-vera-ttf (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+))) -- cgit v1.2.3