[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/69: gnu: texlive-libkpathsea: Better default values in "texmf.cnf".
From: |
guix-commits |
Subject: |
05/69: gnu: texlive-libkpathsea: Better default values in "texmf.cnf". |
Date: |
Fri, 31 May 2024 19:04:34 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit 13f9b6c085a55032328ae83977f959283a2fc6c9
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Mon May 27 10:47:28 2024 +0200
gnu: texlive-libkpathsea: Better default values in "texmf.cnf".
* gnu/packages/tex.scm (texlive-libkpathsea)[arguments]<#:phases>: Use
better
default values in "texmf.cnf". This fixes slowness in ".tex" documents
compilation, left-over "{/" directories in compilation directory, and helps
LuaTeX finding system fonts.
Change-Id: I3a914507e9bf1e5cbff16d7d37924eadf1316d89
---
gnu/packages/tex.scm | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e50b713ea7..5de8e5af79 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -214,21 +214,30 @@
;; 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 lead #$output "/share/texmf-dist/web2c\n"
+ lead))
+ ;; Help TeX finding fonts installed on the system.
+ (("^OSFONTDIR = .*") "OSFONTDIR = {$XDG_DATA_DIRS}\n")
;; Don't truncate lines.
(("^error_line = .*$") "error_line = 254\n")
(("^half_error_line = .*$") "half_error_line = 238\n")
@@ -236,9 +245,9 @@
(add-after 'unpack 'patch-directory-traversal
;; When ST_NLINK_TRICK is set, kpathsea attempts to avoid work
;; when searching files by assuming that a directory with exactly
- ;; two links has no subdirectories. This assumption does not hold
- ;; in our case, so some directories with symlinked sub-directories
- ;; would not be traversed.
+ ;; two links has no sub-directories. This assumption does not
+ ;; hold in our case, so some directories with symlinked
+ ;; sub-directories would not be traversed.
(lambda _
(substitute* "texk/kpathsea/config.h"
(("#define ST_NLINK_TRICK") ""))))
- branch tex-team created (now fa5229cfe8), guix-commits, 2024/05/31
- 01/69: gnu: texlive-libkpathsea: Fix TEXMFCACHE location., guix-commits, 2024/05/31
- 02/69: gnu: texlive-libkpathsea: Remove duplicate documentation., guix-commits, 2024/05/31
- 07/69: gnu: texlive-context: Fix "context" call., guix-commits, 2024/05/31
- 03/69: gnu: Add texlive-source., guix-commits, 2024/05/31
- 06/69: gnu: texlive-luatex: Set proper default values for "texmfcnf.lua"., guix-commits, 2024/05/31
- 11/69: gnu: texlive-latex-bin: Create symlinks for "latex" variants., guix-commits, 2024/05/31
- 12/69: gnu: Add texlive-mfware-bin., guix-commits, 2024/05/31
- 05/69: gnu: texlive-libkpathsea: Better default values in "texmf.cnf".,
guix-commits <=
- 04/69: gnu: texlive-libkpathsea: Use TEXLIVE-SOURCE., guix-commits, 2024/05/31
- 10/69: gnu: tex.scm: Remove completed TODO., guix-commits, 2024/05/31
- 09/69: gnu: texlive-bin: Minimize build surface., guix-commits, 2024/05/31
- 08/69: gnu: Add texlive-libptexenc., guix-commits, 2024/05/31
- 13/69: gnu: Add texlive-omegaware-bin., guix-commits, 2024/05/31
- 15/69: gnu: Add texlive-texware-bin., guix-commits, 2024/05/31
- 14/69: gnu: Add texlive-fontware-bin., guix-commits, 2024/05/31
- 16/69: gnu: Add texlive-patgen-bin., guix-commits, 2024/05/31
- 17/69: gnu: Add texlive-uptex-bin., guix-commits, 2024/05/31
- 18/69: gnu: Add texlive-ptex-bin., guix-commits, 2024/05/31