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

* gnu/packages/fonts.scm (culmus): Switch to font-build-system.
[arguments]: Replace system* with invoke.
This commit is contained in:
Arun Isaac 2018-03-27 11:51:20 +05:30
parent 15795e0723
commit 0328c514ed
No known key found for this signature in database
GPG key ID: 2E25EE8B61802BB3

View file

@ -1202,49 +1202,27 @@ (define-public culmus
(sha256 (sha256
(base32 (base32
"1djxalm26r7bcq33ckmfa15xfs6pmqzvcl64d5lqa1dl01bl4j4z")))) "1djxalm26r7bcq33ckmfa15xfs6pmqzvcl64d5lqa1dl01bl4j4z"))))
(build-system gnu-build-system) (build-system font-build-system)
(arguments (arguments
`(#:tests? #f ; 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
"')")))))) "')")))))
;; This part based on the fonts shipped in the non-source package. ;; This part based on the fonts shipped in the non-source package.
(every (lambda (name) (for-each (lambda (name)
(compile name "ttf")) (compile name "ttf"))
(find-files "." "^[^Nachlieli].*\\.sfd$")) (find-files "." "^[^Nachlieli].*\\.sfd$"))
(every (lambda (name) (for-each (lambda (name)
(compile name "otf")) (compile name "otf"))
(find-files "." "^Nachlieli.*\\.sfd$")) (find-files "." "^Nachlieli.*\\.sfd$"))
#t)))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref %outputs "out"))
(ttf (string-append out "/share/fonts/truetype"))
(otf (string-append out "/share/fonts/opentype"))
(license (string-append out "/share/doc/" ,name)))
(for-each (lambda (file)
(install-file file ttf))
(find-files "." "\\.ttf$"))
(for-each (lambda (file)
(install-file file otf))
(find-files "." "\\.otf$"))
(for-each (lambda (file)
(install-file file license))
'("GNU-GPL" "LICENSE" "LICENSE-BITSTREAM"))
#t)))))) #t))))))
(native-inputs (native-inputs
`(("fontforge" ,fontforge))) `(("fontforge" ,fontforge)))