diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-05-17 00:24:37 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2023-07-18 18:12:21 +0200 |
commit | 6dc6577330e99c29f41d22d3c48e66da383b04b7 (patch) | |
tree | d0d1eae033a07cad66a11ad760b1d7238ce27cad | |
parent | a04232538c06b0b6c619bc0965af15d2ebd363a3 (diff) | |
download | guix-6dc6577330e99c29f41d22d3c48e66da383b04b7.tar.gz |
gnu: texlive-cm: Refresh package definition.
* gnu/packages/tex.scm (texlive-cm): Remove SIMPLE-TEXLIVE-PACKAGE call. [native-inputs]: Remove TEXLIVE-BIN.
-rw-r--r-- | gnu/packages/tex.scm | 128 |
1 files changed, 60 insertions, 68 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index f8d7c0b7ac..79621a6f8e 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -1176,77 +1176,69 @@ cite bundle of the author's citation-related packages.") "/share/texmf-dist/doc/latex/cite/README")))) (define-public texlive-cm - (let ((template (simple-texlive-package - "texlive-cm" - (list "/fonts/source/public/cm/" - "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map" - "/doc/fonts/cm/") - (base32 - "0mfslqs9saqkb3z3xdhsqnklxk858nmipgj1y93by2791jzkma1d") - #:trivial? #t))) - (package - (inherit template) - (arguments - (substitute-keyword-arguments (package-arguments template) - ((#:modules modules '()) - '((guix build gnu-build-system) - (guix build utils) - (srfi srfi-26))) - ((#:phases phases) - `(modify-phases ,phases - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - (let ((mf (assoc-ref inputs "texlive-metafont"))) - ;; Tell mf where to find mf.base - (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c")) - ;; Tell mf where to look for source files - (setenv "MFINPUTS" - (string-append (getcwd) "/fonts/source/public/cm/:" - mf "/share/texmf-dist/metafont/base"))) - (for-each make-file-writable - (cons "fonts/source/public/cm/" - (find-files "fonts/source/public/cm/" ".*"))) - (let ((build (string-append (getcwd) "/build")) - (pkdir (string-append (getcwd) "/pk/ljfour/public/cm/dpi600"))) - (mkdir-p pkdir) - (mkdir-p build) - (with-directory-excursion "fonts/source/public/cm/" - (for-each (lambda (font) - (format #t "building font ~a\n" font) - (invoke "mf" "-progname=mf" - (string-append "-output-directory=" build) - (string-append "\\" - "mode:=ljfour; " - "mag:=1+0/600; " - "scrollmode; " - "input " - (basename font ".mf"))) - (invoke "gftopk" - (string-append build "/" - (basename font ".mf") ".600gf") - (string-append pkdir "/" - (basename font ".mf") ".pk"))) - (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$")))) - #t)) - (add-after 'install 'install-generated-fonts - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (fonts (string-append out "/share/texmf-dist/fonts/")) - (pk (string-append fonts "pk")) - (tfm (string-append fonts "tfm/public/cm"))) - (for-each (cut install-file <> tfm) - (find-files "build" "\\.*")) - (copy-recursively "pk" pk) - #t))))))) - (native-inputs - (list texlive-bin texlive-metafont)) - (home-page "https://www.ctan.org/pkg/cm") - (synopsis "Computer Modern fonts for TeX") - (description "This package provides the Computer Modern fonts by Donald + (package + (name "texlive-cm") + (version (number->string %texlive-revision)) + (source (texlive-origin + name version + (list "doc/fonts/cm/" "fonts/map/dvips/cm/" + "fonts/pk/ljfour/public/cm/dpi600/" + "fonts/source/public/cm/" + "fonts/tfm/public/cm/") + (base32 + "10adgjc3lkj2z50jp1f9n83bdrx8bqxd76rl605d0d5pb435k97m"))) + (outputs '("out" "doc")) + (build-system texlive-build-system) + (arguments + (list + #:texlive-latex-base #f + #:modules + '((guix build texlive-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + #~(modify-phases %standard-phases + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (let ((mf (assoc-ref inputs "texlive-metafont"))) + ;; Tell mf where to find mf.base + (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c")) + ;; Tell mf where to look for source files + (setenv "MFINPUTS" + (string-append (getcwd) "/fonts/source/public/cm/:" + mf "/share/texmf-dist/metafont/base"))) + (for-each make-file-writable + (cons "fonts/source/public/cm/" + (find-files "fonts/source/public/cm/" ".*"))) + (let ((build (string-append (getcwd) "/build")) + (pkdir (string-append (getcwd) "/pk/ljfour/public/cm/dpi600"))) + (mkdir-p pkdir) + (mkdir-p build) + (with-directory-excursion "fonts/source/public/cm/" + (for-each (lambda (font) + (format #t "building font ~a\n" font) + (invoke "mf" "-progname=mf" + (string-append "-output-directory=" build) + (string-append "\\" + "mode:=ljfour; " + "mag:=1+0/600; " + "scrollmode; " + "input " + (basename font ".mf"))) + (invoke "gftopk" + (string-append build "/" + (basename font ".mf") ".600gf") + (string-append pkdir "/" + (basename font ".mf") ".pk"))) + (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))))))) + (native-inputs (list texlive-metafont)) + (home-page "https://ctan.org/pkg/cm") + (synopsis "Computer Modern fonts for TeX") + (description "This package provides the Computer Modern fonts by Donald Knuth. The Computer Modern font family is a large collection of text, display, and mathematical fonts in a range of styles, based on Monotype Modern 8A.") - (license license:knuth)))) + (license license:knuth))) (define-deprecated-package texlive-fonts-cm texlive-cm) |