[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/137: gnu: texlive-libkpathsea: Better default values in "texmf.cnf".
From: |
guix-commits |
Subject: |
05/137: gnu: texlive-libkpathsea: Better default values in "texmf.cnf". |
Date: |
Mon, 24 Jun 2024 18:26:30 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit 0ebb936cd64fc7c60c21b1b65e1a2d2cf6536c13
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 | 38 ++++++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c0c5237b2c..dfaac0397b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -215,21 +215,31 @@
;; 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")
+ (("^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 "!!" prefixes.
(("^TEXMF = .*")
- "TEXMF = {$GUIX_TEXMF}\n")
- (("\\$SELFAUTOLOC(/share/texmf-dist/web2c)" _ suffix)
- (string-append #$output suffix))
- ;; Ignore system-wide cache. Use local one, by default
- ;; "$HOME/.texliveYYYY/texmf-var/".
- (("^TEXMFCACHE = .*")
- "TEXMFCACHE = $TEXMFVAR\n")
+ "TEXMF =
{$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXMFSYSCONFIG,$TEXMFSYSVAR,$TEXMFDIST}\n")
+ (("^TEXMFDBS = .*") "TEXMFDBS = {$TEXMFDIST}\n")
+ ;; Ignore system-wide cache, which is not writable. Use local
+ ;; one instead, i.e. "$HOME/.texliveYYYY/texmf-var/".
+ (("^TEXMFCACHE = .*") "TEXMFCACHE = $TEXMFVAR\n")
+ ;; Set TEXMFCNF. Since earlier values of variables have
+ ;; precedence over later ones, insert the desired value first.
+ (("^TEXMFCNF =")
+ (string-append
+ "TEXMFCNF = " #$output "/share/texmf-dist/web2c\n"
+ "TEXMFCNF ="))
+ ;; 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")
@@ -237,9 +247,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") ""))))
- 07/137: gnu: texlive-updmap.cfg: Fix font file creation in $HOME., (continued)
- 07/137: gnu: texlive-updmap.cfg: Fix font file creation in $HOME., guix-commits, 2024/06/24
- 04/137: gnu: texlive-libkpathsea: Use TEXLIVE-SOURCE., guix-commits, 2024/06/24
- 08/137: gnu: texlive-context: Fix "context" call., guix-commits, 2024/06/24
- 10/137: gnu: texlive-bin: Minimize build surface., guix-commits, 2024/06/24
- 12/137: gnu: texlive-xcjk2uni: Fix build., guix-commits, 2024/06/24
- 11/137: gnu: tex.scm: Remove completed TODO., guix-commits, 2024/06/24
- 02/137: gnu: texlive-libkpathsea: Remove duplicate documentation., guix-commits, 2024/06/24
- 15/137: gnu: Add texlive-mfware-bin., guix-commits, 2024/06/24
- 20/137: gnu: Add texlive-uptex-bin., guix-commits, 2024/06/24
- 16/137: gnu: Add texlive-omegaware-bin., guix-commits, 2024/06/24
- 05/137: gnu: texlive-libkpathsea: Better default values in "texmf.cnf".,
guix-commits <=
- 09/137: gnu: Add texlive-libptexenc., guix-commits, 2024/06/24
- 14/137: gnu: texlive-latex-bin: Create symlinks for "latex" variants., guix-commits, 2024/06/24
- 17/137: gnu: Add texlive-fontware-bin., guix-commits, 2024/06/24
- 18/137: gnu: Add texlive-texware-bin., guix-commits, 2024/06/24
- 21/137: gnu: Add texlive-ptex-bin., guix-commits, 2024/06/24
- 22/137: gnu: Add texlive-bibtex-bin., guix-commits, 2024/06/24
- 23/137: gnu: Add texlive-dvicopy-bin., guix-commits, 2024/06/24
- 24/137: gnu: Add texlive-dvipdfmx-bin., guix-commits, 2024/06/24
- 19/137: gnu: Add texlive-patgen-bin., guix-commits, 2024/06/24
- 25/137: gnu: Add texlive-xetex-bin., guix-commits, 2024/06/24