From 04e80290bf1023f83649f807ddcd4d980da1747b Mon Sep 17 00:00:00 2001 From: Thiago Jung Bauermann Date: Sun, 4 Jul 2021 21:00:59 -0300 Subject: gnu: TeX Live: Use IniTeX to build a couple of packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The package texlive-latex-base in TeX Live 2021 will depend on texlive-latex-l3kernel and texlive-latex-l3packages. Therefore we need to remove their build dependency on texlive-latex-base to avoid a circular dependency. l3kernel and l3packages don’t need LaTeX during build, just IniTeX. So to make them use it, modify texlive-build-system to allow disabling the #:texlive-latex-base and #:tex-format parameters, and also add a #:tex-engine parameter. We also need to add texlive-docstrip as a native input, which was previously provided by texlive-latex-base. * gnu/packages/tex.scm (texlive-latex-l3kernel, texlive-latex-l3packages)[arguments]: Add ‘#:tex-engine’, ‘#:tex-format’ and ‘#:texlive-latex-base’ parameters. [native-inputs]: Add ‘texlive-docstrip’. * guix/build-system/texlive.scm (lower)[build-inputs]: Don’t add ‘texlive-latex-base’ if its keyword parameter is false. (texlive-build): Add ‘tex-engine’ keyword parameter. [builder]: If a ‘tex-engine’ parameter was passed, use it. Otherwise, use ‘tex-format’ as the engine. * guix/build/texlive-build-system.scm (compile-with-latex): Add ‘engine’ parameter. If the ‘format’ parameter is false, add “-ini” option to the command line. (build): Add ‘tex-engine’ parameter. Pass it down to ‘compile-with-latex’. Signed-off-by: Ludovic Courtès --- guix/build/texlive-build-system.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'guix/build/texlive-build-system.scm') diff --git a/guix/build/texlive-build-system.scm b/guix/build/texlive-build-system.scm index 4c255700bb..353fb934a6 100644 --- a/guix/build/texlive-build-system.scm +++ b/guix/build/texlive-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Thiago Jung Bauermann ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,16 +35,17 @@ ;; ;; Code: -(define (compile-with-latex format file) - (invoke format +(define (compile-with-latex engine format file) + (invoke engine "-interaction=nonstopmode" "-output-directory=build" - (string-append "&" format) + (if format (string-append "&" format) "-ini") file)) -(define* (build #:key inputs build-targets tex-format #:allow-other-keys) +(define* (build #:key inputs build-targets tex-engine tex-format + #:allow-other-keys) (mkdir "build") - (for-each (cut compile-with-latex tex-format <>) + (for-each (cut compile-with-latex tex-engine tex-format <>) (if build-targets build-targets (scandir "." (cut string-suffix? ".ins" <>))))) -- cgit v1.2.3