[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
31/31: gnu: texlive-bin: Patch shell commands in scripts.
From: |
guix-commits |
Subject: |
31/31: gnu: texlive-bin: Patch shell commands in scripts. |
Date: |
Thu, 14 Jan 2021 10:13:01 -0500 (EST) |
apteryx pushed a commit to branch core-updates
in repository guix.
commit 92fd8975a1c0b680f8ee1477b8f3b132cf3870dc
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Jan 5 22:15:09 2021 -0500
gnu: texlive-bin: Patch shell commands in scripts.
* gnu/packages/tex.scm (texlive-bin)[phases]{patch-scripts}: New phase.
---
gnu/packages/tex.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 4a4184c..67fec8b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -406,6 +406,30 @@ files from LOCATIONS with expected checksum HASH. CODE is
not currently in use.
(with-directory-excursion "texlive-scripts"
(apply (assoc-ref %standard-phases 'unpack)
(list #:source (assoc-ref inputs "texlive-scripts"))))))
+ (add-after 'unpack-texlive-scripts 'patch-scripts
+ (lambda _
+ (let* ((scripts (append (find-files "texk/kpathsea" "^mktex")
+ (find-files "texlive-scripts" "\\.sh$")))
+ (commands '("awk" "basename" "cat" "grep" "mkdir" "rm"
+ "sed" "sort" "uname"))
+ (command-regexp (format #f "\\b(~a)\\b"
+ (string-join commands "|")))
+ (iso-8859-1-encoded-scripts
+ '("texlive-scripts/source/rubibtex.sh"
+ "texlive-scripts/source/rumakeindex.sh")))
+
+ (define (substitute-commands scripts)
+ (substitute* scripts
+ ((command-regexp dummy command)
+ (which command))))
+
+ (substitute-commands (lset-difference string= scripts
+
iso-8859-1-encoded-scripts))
+
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
+ (substitute-commands iso-8859-1-encoded-scripts))
+
+ #t)))
(add-after 'install 'postint
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
(let* ((out (assoc-ref outputs "out"))
- 18/31: gnu: Add texlive-helvetic., (continued)
- 18/31: gnu: Add texlive-helvetic., guix-commits, 2021/01/14
- 24/31: gnu: Add docbook-utils., guix-commits, 2021/01/14
- 08/31: gnu: Add docbook-sgml-3.1., guix-commits, 2021/01/14
- 09/31: gnu: Add texlive-marvosym., guix-commits, 2021/01/14
- 11/31: gnu: Add texlive-tipa., guix-commits, 2021/01/14
- 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 <=
- 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, 2021/01/14