gnu: Add texlive-cm.

* gnu/packages/tex.scm (texlive-cm): New variable.
(texlive-fonts-cm): Deprecate package.
This commit is contained in:
Ricardo Wurmus 2019-07-16 15:14:30 +02:00
parent df19dc2f86
commit b7d779db34
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 73 additions and 83 deletions

View File

@ -699,27 +699,25 @@ from (almost) arbitrarily complex font names, thus helping portability of TeX
documents.") documents.")
(license license:public-domain))) (license license:public-domain)))
(define-public texlive-fonts-cm (define-public texlive-cm
(package (let ((template (simple-texlive-package
(inherit (simple-texlive-package "texlive-cm"
"texlive-fonts-cm"
(list "/fonts/source/public/cm/" (list "/fonts/source/public/cm/"
"/fonts/map/dvips/cm/cmtext-bsr-interpolated.map" "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map"
"/doc/fonts/cm/README" "/doc/fonts/cm/")
"/doc/fonts/cm/README-cmps.txt")
(base32 (base32
"1h0q71paqmg1xjg6k35ni2i6m93kmlq9rdwm913xg9n4qngywl18"))) "1h0q71paqmg1xjg6k35ni2i6m93kmlq9rdwm913xg9n4qngywl18")
(outputs '("out" "doc")) #:trivial? #t)))
(build-system gnu-build-system) (package
(inherit template)
(arguments (arguments
`(#:modules ((guix build gnu-build-system) (substitute-keyword-arguments (package-arguments template)
((#:modules modules '())
'((guix build gnu-build-system)
(guix build utils) (guix build utils)
(srfi srfi-1) (srfi srfi-26)))
(srfi srfi-26)) ((#:phases phases)
#:tests? #f ; no tests `(modify-phases ,phases
#:phases
(modify-phases %standard-phases
(delete 'configure)
(replace 'build (replace 'build
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((mf (assoc-ref inputs "texlive-metafont-base"))) (let ((mf (assoc-ref inputs "texlive-metafont-base")))
@ -754,27 +752,16 @@ documents.")
(basename font ".mf") ".pk"))) (basename font ".mf") ".pk")))
(find-files "." "cm(.*[0-9]+.*|inch)\\.mf$")))) (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))
#t)) #t))
(replace 'install (add-after 'install 'install-generated-fonts
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))
(doc (assoc-ref outputs "doc"))
(source (assoc-ref inputs "source"))
(fonts (string-append out "/share/texmf-dist/fonts/")) (fonts (string-append out "/share/texmf-dist/fonts/"))
(pk (string-append fonts "pk")) (pk (string-append fonts "pk"))
(tfm (string-append fonts "tfm/public/cm")) (tfm (string-append fonts "tfm/public/cm")))
(mf (string-append fonts "source/public/cm")))
(for-each (cut install-file <> tfm) (for-each (cut install-file <> tfm)
(find-files "build" "\\.*")) (find-files "build" "\\.*"))
(for-each (cut install-file <> mf)
(find-files "." "\\.mf"))
(copy-recursively "pk" pk) (copy-recursively "pk" pk)
(copy-recursively #t)))))))
(string-append source "/doc")
(string-append doc "/doc"))
(install-file
(string-append source "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map")
(string-append fonts "/map/dvips/cm/cmtext-bsr-interpolated.map"))
#t))))))
(native-inputs (native-inputs
`(("texlive-bin" ,texlive-bin) `(("texlive-bin" ,texlive-bin)
("texlive-metafont-base" ,texlive-metafont-base))) ("texlive-metafont-base" ,texlive-metafont-base)))
@ -784,7 +771,10 @@ documents.")
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-public texlive-fonts-cm
(deprecated-package "texlive-fonts-cm" texlive-cm))
(define-public texlive-cm-super (define-public texlive-cm-super
(let ((template (simple-texlive-package (let ((template (simple-texlive-package