diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2024-05-10 22:49:51 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2024-05-18 16:25:04 +0200 |
commit | 939d66266cec30df197822ec6a468db498c8ba03 (patch) | |
tree | 4682566d2e3f7538aa901092d07630f7bf5c40f4 | |
parent | b91818f96e4d0efa4fd2db77631b846ab186c0d2 (diff) |
gnu: texlive-libkpathsea: Set sane values in "texmf.cnf".
* gnu/packages/tex.scm (texlive-libkpathsea)[arguments]<#:phases>: Configure
environment variables relative to the TeX Live environment according to our
needs. In particular, TEXMFDBS should point to the right places, and not
bogus ones, which impede document compilation speed.
Change-Id: Ia8c2c645dc0d0f0cc2b26dd1e9bad2ffdb4a56f9
-rw-r--r-- | gnu/packages/tex.scm | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 5434f6b04b..bf187a547d 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -218,21 +218,28 @@ ;; environment variable defined via a search path below. ;; ;; This phase must happen before the `configure' phase, because - ;; the value of the TEXMFCNF variable (modified along with the - ;; SELFAUTOLOC reference below) is used at compile time to + ;; the value of the TEXMFCNF variable is used at compile time to ;; generate "paths.h" file. (lambda _ (substitute* "texk/kpathsea/texmf.cnf" - (("^TEXMFROOT = .*") - "TEXMFROOT = {$GUIX_TEXMF}/..\n") - (("^TEXMF = .*") - "TEXMF = {$GUIX_TEXMF}\n") - (("\\$SELFAUTOLOC(/share/texmf-dist/web2c)" _ suffix) - (string-append #$output suffix)) + (("^TEXMFROOT = .*") "TEXMFROOT = {$GUIX_TEXMF}/..\n") + (("^TEXMFDIST = .*") "TEXMFDIST = {$GUIX_TEXMF}\n") + ;; "ls-R" files are to be expected only in the TEXMFDIST + ;; directories. However, those are not always present, e.g., + ;; when building a package with `texlive-build-system' or when + ;; generating a profile. Since both situations need to be + ;; handled, drop the "!!" prefix in front of TEXMFDIST. + (("!!\\$TEXMFDIST") "$TEXMFDIST") + (("^TEXMFDBS = .*") "TEXMFDBS = {$TEXMFDIST}\n") ;; Ignore system-wide cache. Use local one, by default ;; "$HOME/.texliveYYYY/texmf-var/". - (("^TEXMFCACHE = .*") - "TEXMFCACHE = $TEXMFVAR\n") + (("^TEXMFCACHE = .*") "TEXMFCACHE = $TEXMFVAR\n") + ;; Set TEXMFCNF. Since earlier values of variables have + ;; precedence over later ones, instead the appropriate value + ;; above the lengthy one. + (("^TEXMFCNF = " lead) + (string-append + "TEXMFCNF = " #$output "/share/texmf-dist/web2c\n" lead)) ;; Don't truncate lines. (("^error_line = .*$") "error_line = 254\n") (("^half_error_line = .*$") "half_error_line = 238\n") |