gnu: texlive-amsfonts: Adjust to build with texlive-updmap.cfg.

* gnu/packages/tex.scm (texlive-amsfonts)[phases]
{build-fonts}: Do not set SOURCE_DATE_EPOCH, already done by the build
system.  Let resources be auto-discovered by TeX Live machinery by simply
setting GUIX_TEXMF.  Remove references to the texlive-union input.  Remove
trailing #t.
{install-generated-fonts}: Remove trailing #t.
[native-inputs]: Replace texlive-union by texlive-updmap.cfg.  Remove the
texlive-cm and texlive-metafont arguments of texlive-updmap.cfg.
This commit is contained in:
Maxim Cournoyer 2021-01-13 16:52:20 -05:00
parent 04a0b1e09a
commit 57fad03c4f
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -1245,22 +1245,11 @@ (define-public texlive-amsfonts
`(modify-phases ,phases `(modify-phases ,phases
(add-before 'build 'build-fonts (add-before 'build 'build-fonts
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((mf (assoc-ref inputs "texlive-union")) ;; Allow self fonts sources and other resources to be
(src (string-append (getcwd) "/fonts/source/public/amsfonts/"))) ;; discovered.
;; Make METAFONT reproducible (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF")
(setenv "SOURCE_DATE_EPOCH" "1") ":" (getcwd)))
;; 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 src ":"
src "/cmextra:"
src "/cyrillic:"
src "/dummy:"
src "/symbols:"
mf "/share/texmf-dist/metafont/base:"
(assoc-ref inputs "texlive-cm")
"/share/texmf-dist/fonts/source/public/cm")))
(let ((build (string-append (getcwd) "/build-fonts"))) (let ((build (string-append (getcwd) "/build-fonts")))
(mkdir-p build) (mkdir-p build)
(with-directory-excursion "fonts/source/public/amsfonts" (with-directory-excursion "fonts/source/public/amsfonts"
@ -1295,10 +1284,9 @@ (define-public texlive-amsfonts
;; eufm10.afm to eufm8.pl, and then generate the tfm file from ;; eufm10.afm to eufm8.pl, and then generate the tfm file from
;; the pl file. ;; the pl file.
(setenv "TEXINPUTS" (setenv "TEXINPUTS"
(string-append build "//:" (string-append ":" build "//:"
(getcwd) "/fonts/afm/public/amsfonts//:" (getcwd) "/fonts/afm/public/amsfonts//:"
(getcwd) "/source/latex/amsfonts//:" (getcwd) "/source/latex/amsfonts//:"))
(assoc-ref inputs "texlive-union") "//"))
(with-directory-excursion build (with-directory-excursion build
(for-each (match-lambda (for-each (match-lambda
(((target-base target-size) (((target-base target-size)
@ -1333,19 +1321,16 @@ (define-public texlive-amsfonts
(("eurm6" 6) ("eurm7" 7)) (("eurm6" 6) ("eurm7" 7))
(("eurm8" 8) ("eurm10" 10)) (("eurm8" 8) ("eurm10" 10))
(("eurm9" 9) ("eurm10" 10)))))) (("eurm9" 9) ("eurm10" 10))))))))
#t))
(add-after 'install 'install-generated-fonts (add-after 'install 'install-generated-fonts
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(copy-recursively "build-fonts" (copy-recursively "build-fonts"
(string-append (string-append
(assoc-ref outputs "out") (assoc-ref outputs "out")
"/share/texmf-dist/fonts/tfm/public/amsfonts")) "/share/texmf-dist/fonts/tfm/public/amsfonts"))))))))
#t))))))
(native-inputs (native-inputs
`(("texlive-union" ,(texlive-union (list texlive-tex-fontinst-base `(("texlive-updmap.cfg" ,(texlive-updmap.cfg
texlive-cm (list texlive-fontinst)))))
texlive-metafont)))))
(home-page "https://www.ctan.org/pkg/amsfonts") (home-page "https://www.ctan.org/pkg/amsfonts")
(synopsis "TeX fonts from the American Mathematical Society") (synopsis "TeX fonts from the American Mathematical Society")
(description (description