From: Ricardo Wurmus <rekado@elephly.net>
To: 36513@debbugs.gnu.org
Subject: [bug#36513] texlive-union: Build missing font maps.
Date: Fri, 05 Jul 2019 17:54:54 +0200 [thread overview]
Message-ID: <87d0ioschd.fsf@elephly.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 404 bytes --]
Hi Guix,
this patch causes texlive-union to include pdftex.map, among other font
map files. This is achieved by running updmap in the builder.
This should fix a couple of problems.
Unfortunately, this doesn’t fix the same problem with the profile hook,
so I think this means that the profile hook should be using
texlive-union to avoid duplication.
What do you think?
--
Ricardo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-texlive-union-Build-font-maps.patch --]
[-- Type: text/x-patch, Size: 4351 bytes --]
From 11900d109a617d07e0085a25e747da76fcb12c2e Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Fri, 5 Jul 2019 17:48:45 +0200
Subject: [PATCH] gnu: texlive-union: Build font maps.
* gnu/packages/tex.scm (texlive-union)[arguments]: Execute updmap to generate
missing font maps.
[native-inputs]: Add coreutils, sed, and updmap.cfg.
---
gnu/packages/tex.scm | 38 ++++++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ec35315f22..85c72e006a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -2387,16 +2387,18 @@ standard LaTeX packages."
#:builder
(begin
(use-modules (ice-9 match)
+ (ice-9 popen)
(srfi srfi-26)
(guix build union)
(guix build utils)
(guix build texlive-build-system))
(let* ((out (assoc-ref %outputs "out"))
(texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
- ;; Build a modifiable union of all inputs (but exclude bash)
+ ;; Build a modifiable union of all inputs (but exclude bash and
+ ;; the updmap.cfg file)
(match (filter (match-lambda
((name . _)
- (not (string=? "bash" name))))
+ (not (member name '("bash" "updmap.cfg")))))
%build-inputs)
(((names . directories) ...)
(union-build (assoc-ref %outputs "out")
@@ -2413,19 +2415,47 @@ standard LaTeX packages."
(string-append "TEXMFROOT = " out "/share\n"))
(("^TEXMF = .*")
"TEXMF = $TEXMFROOT/share/texmf-dist\n"))
- (setenv "PATH" (string-append (assoc-ref %build-inputs "bash")
- "/bin"))
+ (setenv "PATH" (string-append
+ (assoc-ref %build-inputs "bash") "/bin:"
+ (assoc-ref %build-inputs "coreutils") "/bin:"
+ (string-append out "/bin")))
(for-each
(cut wrap-program <>
`("TEXMFCNF" ":" suffix (,(dirname texmf.cnf)))
`("TEXMF" ":" suffix (,(string-append out "/share/texmf-dist"))))
(find-files (string-append out "/bin") ".*"))
+
+ ;; Remove invalid maps from config file.
+ (let ((port (open-pipe* OPEN_WRITE "updmap-sys"
+ "--syncwithtrees"
+ "--nohash"
+ (assoc-ref %build-inputs "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" "--force"
+ (string-append out "/share/texmf-config/web2c/updmap.cfg"))
#t))))
(inputs
`(("bash" ,bash)
,@(map (lambda (package)
(list (package-name package) package))
(append default-packages packages))))
+ (native-inputs
+ `(("coreutils" ,coreutils)
+ ("sed" ,sed)
+ ("updmap.cfg"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "https://tug.org/svn/texlive/tags/"
+ %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
+ "?revision=" (number->string %texlive-revision)))
+ (file-name (string-append "updmap.cfg-"
+ (number->string %texlive-revision)))
+ (sha256
+ (base32
+ "06mwpy5i218g5k3sf4gba0fmxgas82hkzx9fhwn67z5ik37d8apq"))))))
(home-page (package-home-page texlive-bin))
(synopsis "Union of TeX Live packages")
(description "This package provides a subset of the TeX Live
--
2.21.0
next reply other threads:[~2019-07-05 15:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-05 15:54 Ricardo Wurmus [this message]
2019-07-15 20:31 ` [bug#36513] texlive-union: Build missing font maps Ludovic Courtès
2019-07-15 20:47 ` Ricardo Wurmus
2019-07-19 12:04 ` Ludovic Courtès
2019-07-22 19:28 ` Ricardo Wurmus
2019-07-22 20:19 ` Pierre Neidhardt
2019-07-22 21:27 ` Ricardo Wurmus
2019-09-04 13:37 ` Ludovic Courtès
2019-09-04 14:17 ` Ricardo Wurmus
2019-09-04 14:51 ` Pierre Neidhardt
2019-09-04 16:07 ` Ricardo Wurmus
2019-09-05 8:35 ` Ludovic Courtès
2020-10-17 10:07 ` bug#36513: " Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0ioschd.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=36513@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).