Archived
1
0
Fork 0

gnu: texlive-cm: Refresh package definition.

* gnu/packages/tex.scm (texlive-cm): Remove SIMPLE-TEXLIVE-PACKAGE
call.
[native-inputs]: Remove TEXLIVE-BIN.
This commit is contained in:
Nicolas Goaziou 2023-05-17 00:24:37 +02:00
parent a04232538c
commit 6dc6577330
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -1176,77 +1176,69 @@ cite bundle of the author's citation-related packages.")
"/share/texmf-dist/doc/latex/cite/README")))) "/share/texmf-dist/doc/latex/cite/README"))))
(define-public texlive-cm (define-public texlive-cm
(let ((template (simple-texlive-package (package
"texlive-cm" (name "texlive-cm")
(list "/fonts/source/public/cm/" (version (number->string %texlive-revision))
"/fonts/map/dvips/cm/cmtext-bsr-interpolated.map" (source (texlive-origin
"/doc/fonts/cm/") name version
(base32 (list "doc/fonts/cm/" "fonts/map/dvips/cm/"
"0mfslqs9saqkb3z3xdhsqnklxk858nmipgj1y93by2791jzkma1d") "fonts/pk/ljfour/public/cm/dpi600/"
#:trivial? #t))) "fonts/source/public/cm/"
(package "fonts/tfm/public/cm/")
(inherit template) (base32
(arguments "10adgjc3lkj2z50jp1f9n83bdrx8bqxd76rl605d0d5pb435k97m")))
(substitute-keyword-arguments (package-arguments template) (outputs '("out" "doc"))
((#:modules modules '()) (build-system texlive-build-system)
'((guix build gnu-build-system) (arguments
(guix build utils) (list
(srfi srfi-26))) #:texlive-latex-base #f
((#:phases phases) #:modules
`(modify-phases ,phases '((guix build texlive-build-system)
(replace 'build (guix build utils)
(lambda* (#:key inputs #:allow-other-keys) (srfi srfi-26))
(let ((mf (assoc-ref inputs "texlive-metafont"))) #:phases
;; Tell mf where to find mf.base #~(modify-phases %standard-phases
(setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c")) (replace 'build
;; Tell mf where to look for source files (lambda* (#:key inputs #:allow-other-keys)
(setenv "MFINPUTS" (let ((mf (assoc-ref inputs "texlive-metafont")))
(string-append (getcwd) "/fonts/source/public/cm/:" ;; Tell mf where to find mf.base
mf "/share/texmf-dist/metafont/base"))) (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
(for-each make-file-writable ;; Tell mf where to look for source files
(cons "fonts/source/public/cm/" (setenv "MFINPUTS"
(find-files "fonts/source/public/cm/" ".*"))) (string-append (getcwd) "/fonts/source/public/cm/:"
(let ((build (string-append (getcwd) "/build")) mf "/share/texmf-dist/metafont/base")))
(pkdir (string-append (getcwd) "/pk/ljfour/public/cm/dpi600"))) (for-each make-file-writable
(mkdir-p pkdir) (cons "fonts/source/public/cm/"
(mkdir-p build) (find-files "fonts/source/public/cm/" ".*")))
(with-directory-excursion "fonts/source/public/cm/" (let ((build (string-append (getcwd) "/build"))
(for-each (lambda (font) (pkdir (string-append (getcwd) "/pk/ljfour/public/cm/dpi600")))
(format #t "building font ~a\n" font) (mkdir-p pkdir)
(invoke "mf" "-progname=mf" (mkdir-p build)
(string-append "-output-directory=" build) (with-directory-excursion "fonts/source/public/cm/"
(string-append "\\" (for-each (lambda (font)
"mode:=ljfour; " (format #t "building font ~a\n" font)
"mag:=1+0/600; " (invoke "mf" "-progname=mf"
"scrollmode; " (string-append "-output-directory=" build)
"input " (string-append "\\"
(basename font ".mf"))) "mode:=ljfour; "
(invoke "gftopk" "mag:=1+0/600; "
(string-append build "/" "scrollmode; "
(basename font ".mf") ".600gf") "input "
(string-append pkdir "/" (basename font ".mf")))
(basename font ".mf") ".pk"))) (invoke "gftopk"
(find-files "." "cm(.*[0-9]+.*|inch)\\.mf$")))) (string-append build "/"
#t)) (basename font ".mf") ".600gf")
(add-after 'install 'install-generated-fonts (string-append pkdir "/"
(lambda* (#:key inputs outputs #:allow-other-keys) (basename font ".mf") ".pk")))
(let* ((out (assoc-ref outputs "out")) (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$")))))))))
(fonts (string-append out "/share/texmf-dist/fonts/")) (native-inputs (list texlive-metafont))
(pk (string-append fonts "pk")) (home-page "https://ctan.org/pkg/cm")
(tfm (string-append fonts "tfm/public/cm"))) (synopsis "Computer Modern fonts for TeX")
(for-each (cut install-file <> tfm) (description "This package provides the Computer Modern fonts by Donald
(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
Knuth. The Computer Modern font family is a large collection of text, 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 display, and mathematical fonts in a range of styles, based on Monotype Modern
8A.") 8A.")
(license license:knuth)))) (license license:knuth)))
(define-deprecated-package texlive-fonts-cm texlive-cm) (define-deprecated-package texlive-fonts-cm texlive-cm)