font-fantasque-sans: Upgrade to 1.7.2.

* gnu/packages/fonts.scm (font-fantasque-sans): Upgrade to 1.7.2.
[native-inputs]: Add zip.
[arguments]: Add 'xrange->range phase for python3 compatibility.  Adjust
install phase to work with newly generated font variants.
This commit is contained in:
Eric Bavier 2018-09-07 22:09:32 -05:00
parent 2b0820bf0d
commit 5882078e8c
No known key found for this signature in database
GPG Key ID: FD73CAC719D32566
1 changed files with 23 additions and 13 deletions

View File

@ -753,41 +753,51 @@ It contains the following fonts and styles:
(define-public font-fantasque-sans (define-public font-fantasque-sans
(package (package
(name "font-fantasque-sans") (name "font-fantasque-sans")
(version "1.7.1") (version "1.7.2")
(source (source
(origin (origin
(method url-fetch) (method git-fetch)
(uri (string-append "https://github.com/belluzj/fantasque-sans/" (uri (git-reference
"archive/v" version ".tar.gz")) (url "https://github.com/belluzj/fantasque-sans.git")
(file-name (string-append name "-" version ".tar.gz")) (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"07fpy53k2x2nz5q61swkab6cfk9gw2kc4x4brsj6zjgbm16fap85")))) "1gjranq7qf20rfxnpxsckv1hl35nzsal0rjs475nhfbpqy5wmly6"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("ttfautohint" ,ttfautohint) `(("ttfautohint" ,ttfautohint)
("woff-tools" ,woff-tools) ("woff-tools" ,woff-tools)
("fontforge" ,fontforge) ("fontforge" ,fontforge)
("woff2" ,woff2) ("woff2" ,woff2)
("ttf2eot" ,ttf2eot))) ("ttf2eot" ,ttf2eot)
("zip" ,zip)))
(arguments (arguments
`(#:tests? #f ;test target intended for visual inspection `(#:tests? #f ;test target intended for visual inspection
#:phases (modify-phases %standard-phases #:phases (modify-phases %standard-phases
(delete 'configure) ;no configuration (delete 'configure) ;no configuration
(add-before 'build 'xrange->range
;; Rather than use a python2 fontforge, just replace the
;; offending function.
(lambda _
(substitute* "Scripts/fontbuilder.py"
(("xrange") "range"))
#t))
(replace 'install (replace 'install
;; 'make install' wants to install to ~/.fonts, install to ;; 'make install' wants to install to ~/.fonts, install to
;; output instead. ;; output instead. Install only the "Normal" variant.
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(font-dir (string-append out "/share/fonts")) (font-dir (string-append out "/share/fonts"))
(truetype-dir (string-append font-dir "/truetype")) (truetype-dir (string-append font-dir "/truetype"))
(opentype-dir (string-append font-dir "/opentype")) (opentype-dir (string-append font-dir "/opentype"))
(webfonts-dir (string-append font-dir "/webfonts"))) (webfonts-dir (string-append font-dir "/webfonts")))
(copy-recursively "OTF" opentype-dir) (with-directory-excursion "Variants/Normal"
(for-each (lambda (f) (install-file f truetype-dir)) (copy-recursively "OTF" opentype-dir)
(find-files "." "\\.ttf$")) (for-each (lambda (f) (install-file f truetype-dir))
(copy-recursively "Webfonts" webfonts-dir) (find-files "." "\\.ttf$"))
#t)))))) (copy-recursively "Webfonts" webfonts-dir)
#t)))))))
(synopsis "Font family with a monospaced variant for programmers") (synopsis "Font family with a monospaced variant for programmers")
(description (description
"Fantasque Sans Mono is a programming font designed with functionality in "Fantasque Sans Mono is a programming font designed with functionality in