[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
29/31: gnu: texlive-bin: Unpack the texlive-scripts and texlive-extra in
From: |
guix-commits |
Subject: |
29/31: gnu: texlive-bin: Unpack the texlive-scripts and texlive-extra inputs early. |
Date: |
Thu, 14 Jan 2021 10:13:00 -0500 (EST) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit ec14d5f7294a2776e288ccab74221b50fe653cad
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Jan 11 11:33:32 2021 -0500
gnu: texlive-bin: Unpack the texlive-scripts and texlive-extra inputs early.
This allows the sources to processed normally by the other phases such as
patch-source-shebangs.
* gnu/packages/tex.scm (texlive-bin)[arguments]: Specify #:modules.
[phases]{unpack-texlive-extra, unpack-texlive-scripts}: New phases.
{postint}: Move the unpacking of the texlive-extra and texlive-scripts
inputs
to the above newly added phases. The installation of these extra
directories
now simply uses copy-recursively.
---
gnu/packages/tex.scm | 64 ++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 47 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2733eb6..3f17bf4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -321,7 +321,12 @@ files from LOCATIONS with expected checksum HASH. CODE is
not currently in use.
(native-inputs
`(("pkg-config" ,pkg-config)))
(arguments
- `(#:out-of-source? #t
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (ice-9 ftw)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:out-of-source? #t
#:configure-flags
'("--disable-static"
"--disable-native-texlive-build"
@@ -388,14 +393,38 @@ files from LOCATIONS with expected checksum HASH. CODE
is not currently in use.
(("^\\./omfonts -ofm2opl \\$srcdir/tests/check tests/xcheck
\\|\\| exit 1")
"./omfonts -ofm2opl $srcdir/tests/check tests/xcheck || exit
77"))
#t))
+ (add-after 'unpack 'unpack-texlive-extra
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir "texlive-extra")
+ (with-directory-excursion "texlive-extra"
+ (apply (assoc-ref %standard-phases 'unpack)
+ (list #:source (assoc-ref inputs
"texlive-extra-src"))))))
+ (add-after 'unpack-texlive-extra 'unpack-texlive-scripts
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir "texlive-scripts")
+ (with-directory-excursion "texlive-scripts"
+ (apply (assoc-ref %standard-phases 'unpack)
+ (list #:source (assoc-ref inputs "texlive-scripts"))))))
(add-after 'install 'postint
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
(let* ((out (assoc-ref outputs "out"))
+ (patch-source-shebangs (assoc-ref %standard-phases
+ 'patch-source-shebangs))
(share (string-append out "/share"))
- (texlive-extra (assoc-ref inputs "texlive-extra-src"))
- (unpack (assoc-ref %standard-phases 'unpack))
- (patch-source-shebangs
- (assoc-ref %standard-phases 'patch-source-shebangs)))
+ (scripts (string-append share
+ "/texmf-dist/scripts/texlive"))
+ (source (string-append
+ "../" (first (scandir ".." (cut string-suffix?
+ "source" <>)))))
+ (tl-extra-root (string-append source "/texlive-extra"))
+ (tl-extra-dir (first
+ (scandir tl-extra-root
+ (negate
+ (cut member <> '("." ".."))))))
+ (tlpkg-src (string-append tl-extra-root "/" tl-extra-dir
+ "/tlpkg"))
+ (config.guess (string-append (assoc-ref inputs "config")
+ "/bin/config.guess")))
(substitute* (string-append share "/texmf-dist/web2c/texmf.cnf")
;; Don't truncate lines.
(("^error_line = .*$") "error_line = 254\n")
@@ -409,18 +438,19 @@ files from LOCATIONS with expected checksum HASH. CODE
is not currently in use.
'("latex" "pdflatex" "xelatex" "lualatex")))
(with-directory-excursion (string-append share "/man/man1/")
(symlink "luatex.1" "lualatex.1"))
- ;; Unpack texlive-extra and install tlpkg.
- (mkdir "texlive-extra")
- (with-directory-excursion "texlive-extra"
- (apply unpack (list #:source texlive-extra))
- (apply patch-source-shebangs (list #:source texlive-extra))
- (invoke "mv" "tlpkg" share))
- (let ((scripts (string-append share
"/texmf-dist/scripts/texlive/")))
- (mkdir-p scripts)
- (copy-recursively (assoc-ref inputs "texlive-scripts")
scripts)
- ;; Make sure that fmtutil can find its Perl modules.
- (substitute* (string-append scripts "fmtutil.pl")
- (("\\$TEXMFROOT/") (string-append share "/"))))
+
+ ;; Install tlpkg.
+ (copy-recursively tlpkg-src (string-append share "/tlpkg"))
+
+ ;; Install texlive-scripts.
+ (copy-recursively (string-append
+ source "/texlive-scripts/source/")
+ scripts)
+
+ ;; Make sure that fmtutil can find its Perl modules.
+ (substitute* (string-append scripts "/fmtutil.pl")
+ (("\\$TEXMFROOT/")
+ (string-append share "/")))
;; texlua shebangs are not patched by the patch-source-shebangs
;; phase because the texlua executable does not exist at that
- 15/31: gnu: texlive-psnfss: Improve description., (continued)
- 15/31: gnu: texlive-psnfss: Improve description., guix-commits, 2021/01/14
- 16/31: gnu: Add texlive-jknappen., guix-commits, 2021/01/14
- 22/31: gnu: Add texlive-xmltex., guix-commits, 2021/01/14
- 23/31: gnu: Add texlive-jadetex., guix-commits, 2021/01/14
- 30/31: gnu: texlive-bin: Fix the tlmgr utility., guix-commits, 2021/01/14
- 31/31: gnu: texlive-bin: Patch shell commands in scripts., guix-commits, 2021/01/14
- 25/31: gnu: texlive-texmf: Replace python-2 by python., guix-commits, 2021/01/14
- 26/31: build-system/texlive: Allow specifying SVN references with a single component., guix-commits, 2021/01/14
- 28/31: gnu: texlive-bin: Fix indentation., guix-commits, 2021/01/14
- 27/31: gnu: texlive-bin: Replace python-2 by python., guix-commits, 2021/01/14
- 29/31: gnu: texlive-bin: Unpack the texlive-scripts and texlive-extra inputs early.,
guix-commits <=