gnu: texlive-union: Fix font map generation.
* gnu/packages/tex.scm (texlive-union)[arguments]: Exclude sed and coreutils from union; add sed to the PATH; run updmap-sys twice; delete ls-R to avoid lookup failures.
This commit is contained in:
parent
09e2f25842
commit
813ed0bd3d
|
@ -3567,7 +3567,10 @@ standard LaTeX packages."
|
||||||
;; the updmap.cfg file)
|
;; the updmap.cfg file)
|
||||||
(match (filter (match-lambda
|
(match (filter (match-lambda
|
||||||
((name . _)
|
((name . _)
|
||||||
(not (member name '("bash" "updmap.cfg")))))
|
(not (member name '("bash"
|
||||||
|
"coreutils"
|
||||||
|
"sed"
|
||||||
|
"updmap.cfg")))))
|
||||||
%build-inputs)
|
%build-inputs)
|
||||||
(((names . directories) ...)
|
(((names . directories) ...)
|
||||||
(union-build (assoc-ref %outputs "out")
|
(union-build (assoc-ref %outputs "out")
|
||||||
|
@ -3587,6 +3590,7 @@ standard LaTeX packages."
|
||||||
(setenv "PATH" (string-append
|
(setenv "PATH" (string-append
|
||||||
(assoc-ref %build-inputs "bash") "/bin:"
|
(assoc-ref %build-inputs "bash") "/bin:"
|
||||||
(assoc-ref %build-inputs "coreutils") "/bin:"
|
(assoc-ref %build-inputs "coreutils") "/bin:"
|
||||||
|
(assoc-ref %build-inputs "sed") "/bin:"
|
||||||
(string-append out "/bin")))
|
(string-append out "/bin")))
|
||||||
(for-each
|
(for-each
|
||||||
(cut wrap-program <>
|
(cut wrap-program <>
|
||||||
|
@ -3595,16 +3599,32 @@ standard LaTeX packages."
|
||||||
(find-files (string-append out "/bin") ".*"))
|
(find-files (string-append out "/bin") ".*"))
|
||||||
|
|
||||||
;; Remove invalid maps from config file.
|
;; Remove invalid maps from config file.
|
||||||
(let ((port (open-pipe* OPEN_WRITE "updmap-sys"
|
(let ((web2c (string-append out "/share/texmf-config/web2c/"))
|
||||||
"--syncwithtrees"
|
(maproot (string-append out "/share/texmf-dist/fonts/map/")))
|
||||||
"--nohash"
|
(mkdir-p web2c)
|
||||||
(assoc-ref %build-inputs "updmap.cfg"))))
|
(copy-file
|
||||||
(display "Y\n" port)
|
(assoc-ref %build-inputs "updmap.cfg")
|
||||||
(when (not (zero? (status:exit-val (close-pipe port))))
|
(string-append web2c "updmap.cfg"))
|
||||||
(error "failed to filter updmap.cfg")))
|
(make-file-writable (string-append web2c "updmap.cfg"))
|
||||||
;; Generate maps.
|
|
||||||
(invoke "updmap-sys" "--force"
|
(let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
|
||||||
(string-append out "/share/texmf-config/web2c/updmap.cfg"))
|
"--syncwithtrees"
|
||||||
|
"--nohash"
|
||||||
|
(string-append "--cnffile=" web2c "updmap.cfg"))))
|
||||||
|
(display "Y\n" port)
|
||||||
|
(when (not (zero? (status:exit-val (close-pipe port))))
|
||||||
|
(error "failed to filter updmap.cfg")))
|
||||||
|
;; Generate maps.
|
||||||
|
(invoke "updmap-sys"
|
||||||
|
(string-append "--cnffile=" web2c "updmap.cfg")
|
||||||
|
(string-append "--dvipdfmxoutputdir="
|
||||||
|
maproot "dvipdfmx/updmap/")
|
||||||
|
(string-append "--dvipsoutputdir="
|
||||||
|
maproot "dvips/updmap/")
|
||||||
|
(string-append "--pdftexoutputdir="
|
||||||
|
maproot "pdftex/updmap/"))
|
||||||
|
;; Having this file breaks all file lookups later.
|
||||||
|
(delete-file (string-append out "/share/texmf-dist/ls-R")))
|
||||||
#t))))
|
#t))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("bash" ,bash)
|
`(("bash" ,bash)
|
||||||
|
|
Loading…
Reference in New Issue