diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-01-11 11:08:15 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-01-29 13:35:47 -0500 |
commit | 04a0b1e09abce99857e7930336421ca6d15ae630 (patch) | |
tree | 31c3cc55abebc664929578f3ac8a8d00b9ae0d81 /guix/build | |
parent | cf498048aa0c9f7e76e0af029ad147e284dcde46 (diff) | |
download | guix-patches-04a0b1e09abce99857e7930336421ca6d15ae630.tar guix-patches-04a0b1e09abce99857e7930336421ca6d15ae630.tar.gz |
gnu: texlive-bin: Enable the use of multiple TeX Live trees.
Attempting to compose multiple TeX Live trees (such as can happen when using a
texlive-union generated package) proved problematic; only the texmf.cnf
configuration file from the union would be honored, causing other TeX Live
components to be ignored.
This change does away with TeX Live unions, instead relying on the default
texmf.cnf configuration file provided by the texlive-bin package to honor
individual TeX Live trees referred to via the newly introduced GUIX_TEXMF
variable, and replacing the texlive-union procedure by texlive-updmap.cfg, to
explicit that generating the fonts map configuration is now its sole purpose.
* gnu/packages/tex.scm (texlive-bin)[phases]{customize-texmf}: New phase.
{postint}: Move the patching of the texmf.cnf file to the new above phase.
Patch the updmap.pl script to find its Perl modules.
[native-search-paths]: Rename the TEXMF variable to GUIX_TEXMF. Remove the
TEXMFCNF variable.
* guix/profiles.scm (texlive-configuration): Remove procedure.
(%default-profile-hooks)[texlive-configuration]: Unregister hook.
(texlive-union): Alias to what has moved to...
(texlivke-updmap.cfg): ... here. Update doc. Do not provide a different
texmf.cnf configuration.
[inherit]: Do not inherit from texlive-base.
[build-system]: Switch to the copy-build-system.
[arguments]{install-plan}: New argument.
[phases]{regenerate-updmap.cfg}: New phase, which keeps only the fonts map
generating code from the previous builder code.
[inputs]: Remove bash, and move to ...
[propagated-inputs]: ... here.
[native-inputs]: Remove field, and move the source of the base updmap.cfg file
to...
[source]: ... here.
[synopsis]: Update.
[description]: Likewise.
[license]: Delete duplicates.
Diffstat (limited to 'guix/build')
-rw-r--r-- | guix/build/texlive-build-system.scm | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/guix/build/texlive-build-system.scm b/guix/build/texlive-build-system.scm index a4c81f07cd..4c255700bb 100644 --- a/guix/build/texlive-build-system.scm +++ b/guix/build/texlive-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,35 +41,8 @@ (string-append "&" format) file)) -(define* (configure #:key inputs #:allow-other-keys) - (let* ((out (string-append (getcwd) "/.texlive-union")) - (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf"))) - ;; Build a modifiable union of all inputs (but exclude bash) - (match inputs - (((names . directories) ...) - (union-build out (filter directory-exists? directories) - #:create-all-directories? #t - #:log-port (%make-void-port "w")))) - - ;; The configuration file "texmf.cnf" is provided by the - ;; "texlive-bin" package. We take it and override only the - ;; setting for TEXMFROOT and TEXMF. This file won't be consulted - ;; by default, though, so we still need to set TEXMFCNF. - (substitute* texmf.cnf - (("^TEXMFROOT = .*") - (string-append "TEXMFROOT = " out "/share\n")) - (("^TEXMF = .*") - "TEXMF = $TEXMFROOT/share/texmf-dist\n")) - (setenv "TEXMFCNF" (dirname texmf.cnf)) - (setenv "TEXMF" (string-append out "/share/texmf-dist")) - - ;; Don't truncate lines. - (setenv "error_line" "254") ; must be less than 255 - (setenv "half_error_line" "238") ; must be less than error_line - 15 - (setenv "max_print_line" "1000")) - (mkdir "build")) - (define* (build #:key inputs build-targets tex-format #:allow-other-keys) + (mkdir "build") (for-each (cut compile-with-latex tex-format <>) (if build-targets build-targets (scandir "." (cut string-suffix? ".ins" <>))))) @@ -85,7 +59,7 @@ (define %standard-phases (modify-phases gnu:%standard-phases (delete 'bootstrap) - (replace 'configure configure) + (delete 'configure) (replace 'build build) (delete 'check) (replace 'install install))) |