diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2022-10-24 22:42:54 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2022-10-25 09:26:12 +0300 |
commit | 3f0ea68177daafaeaece506067dd006d8669cb0b (patch) | |
tree | d28dcf8d9e0a1cadb35950e5718a61ed76cb569c /gnu/packages/fonts.scm | |
parent | 81c6a28eb0162d8f87dfe7c4d1327f89a5e6b047 (diff) | |
download | guix-3f0ea68177daafaeaece506067dd006d8669cb0b.tar.gz guix-3f0ea68177daafaeaece506067dd006d8669cb0b.zip |
gnu: font-gnu-unifont: Build from source.
* gnu/packages/fonts.scm (font-gnu-unifont)[source]: Add snippet to
remove precompiled fonts.
[arguments]: Add make-flag to build fonts. Add custom phase to adjust
shell invocations.
[native-inputs]: Add bdftopcf, console-setup, fontforge.
[inputs]: Add perl-gd.
Diffstat (limited to 'gnu/packages/fonts.scm')
-rw-r--r-- | gnu/packages/fonts.scm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 5afaf2fd25..902178286a 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -85,6 +85,7 @@ #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gd) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) @@ -857,7 +858,11 @@ for use at smaller text sizes"))) (string-append "mirror://gnu/unifont/unifont-" version "/unifont-" version ".tar.gz"))) (sha256 - (base32 "1m9lfss6sbmcr0b6h7pxxmdl71j9dmnvk8idvxzylqrwpwjaj4bx")))) + (base32 "1m9lfss6sbmcr0b6h7pxxmdl71j9dmnvk8idvxzylqrwpwjaj4bx")) + (snippet + '(begin + (use-modules (guix build utils)) + (delete-file-recursively "font/precompiled"))))) (build-system gnu-build-system) (outputs '("out" ; TrueType/OpenType version "pcf" ; PCF (bitmap) version @@ -866,10 +871,15 @@ for use at smaller text sizes"))) (arguments `(#:tests? #f ; no check target #:make-flags - (list (string-append "CC=" ,(cc-for-target))) + (list (string-append "CC=" ,(cc-for-target)) + "BUILDFONT=TRUE") #:phases (modify-phases %standard-phases (delete 'configure) + (add-after 'unpack 'patch-source + (lambda _ + (substitute* (find-files "." "Makefile") + (("/bin/sh -s") (string-append (which "sh") " -s"))))) (replace 'install (lambda* (#:key make-flags outputs #:allow-other-keys) (let* ((ttf (string-append (assoc-ref outputs "out") @@ -895,8 +905,10 @@ for use at smaller text sizes"))) (invoke "gzip" "-9n" "doc/unifont.info") (install-file "doc/unifont.info.gz" (string-append bin "/share/info")))))))) + (native-inputs + (list bdftopcf console-setup fontforge)) (inputs - (list perl)) ; for utilities + (list perl perl-gd)) ; for utilities (synopsis "Large bitmap font covering Unicode's Basic Multilingual Plane") (description |