gnu: font-linuxlibertine: Switch to font-build-system.

* gnu/packages/fonts.scm (font-linuxlibertine): Switch to font-build-system.
[arguments]: Replace system* with invoke.
This commit is contained in:
Arun Isaac 2018-03-27 01:58:19 +05:30
parent 803b9e8bf4
commit 15795e0723
No known key found for this signature in database
GPG Key ID: 2E25EE8B61802BB3
1 changed files with 13 additions and 26 deletions

View File

@ -305,37 +305,24 @@ The Liberation Fonts are sponsored by Red Hat.")
(sha256 (sha256
(base32 (base32
"0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v")))) "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v"))))
(build-system gnu-build-system) (build-system font-build-system)
(arguments (arguments
`(#:tests? #f ; there are no tests `(#:phases
#:modules ((guix build utils)
(guix build gnu-build-system)
(srfi srfi-1)
(srfi srfi-26))
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (add-before 'install 'build
(replace 'build
(lambda _ (lambda _
(let ((compile (let ((compile
(lambda (name ext) (lambda (name ext)
(zero? (system* (invoke
"fontforge" "-lang=ff" "fontforge" "-lang=ff"
"-c" (string-append "Open('" name "');" "-c" (string-append "Open('" name "');"
"Generate('" "Generate('"
(basename name "sfd") ext (basename name "sfd") ext
"')")))))) "')")))))
(every (lambda (name) (for-each (lambda (name)
(and (compile name "ttf") (and (compile name "ttf")
(compile name "otf"))) (compile name "otf")))
(find-files "." "\\.sfd$"))))) (find-files "." "\\.sfd$"))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((font-dir (string-append (assoc-ref outputs "out")
"/share/fonts/truetype")))
(mkdir-p font-dir)
(for-each (cut install-file <> font-dir)
(find-files "." "\\.(otf|ttf)$"))
#t)))))) #t))))))
(native-inputs (native-inputs
`(("fontforge" ,fontforge))) `(("fontforge" ,fontforge)))