From a9fda571c3e702ccd6b40f7ee320e55fd2e83d19 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 10 Apr 2018 12:54:09 +0530 Subject: gnu: texlive-bin: Use ghostscript executable "gs" in ps2eps. * gnu/packages/tex.scm (texlive-bin)[arguments]: Add fix-unix-detection phase. Replace system* with invoke in postint phase. --- gnu/packages/tex.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gnu/packages/tex.scm') diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index db1f120ce6..2b35250dd0 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2018 Danny Milosavljevic +;;; Copyright © 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -175,6 +176,15 @@ (string-prefix? "mips64" s)))) #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-unix-detection + ;; ps2eps.pl uses the "gswin32c" ghostscript executable on Windows, + ;; and the "gs" ghostscript executable on Unix. It detects Unix by + ;; checking for the existence of the /usr/bin directory. Since + ;; GuixSD does not have /usr/bin, it is also detected as Windows. + (lambda _ + (substitute* "utils/ps2eps/ps2eps-src/bin/ps2eps.pl" + (("gswin32c") "gs")) + #t)) (add-after 'install 'postint (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) (let* ((out (assoc-ref outputs "out")) @@ -196,7 +206,7 @@ (with-directory-excursion "texlive-extra" (apply unpack (list #:source texlive-extra)) (apply patch-source-shebangs (list #:source texlive-extra)) - (system* "mv" "tlpkg" share)))))))) + (invoke "mv" "tlpkg" share)))))))) (synopsis "TeX Live, a package of the TeX typesetting system") (description "TeX Live provides a comprehensive TeX document production system. -- cgit 1.4.1 From b02b6f32a56a259873e8368ac0be2aed9eca76aa Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 11 Apr 2018 10:34:23 +0530 Subject: gnu: texlive-bin: Patch texlua shebangs. * gnu/packages/tex.scm (texlive-bin)[arguments]: Patch texlua shebangs in postint phase. --- gnu/packages/tex.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/packages/tex.scm') diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 2b35250dd0..35b6b3f8d4 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -206,7 +206,13 @@ (with-directory-excursion "texlive-extra" (apply unpack (list #:source texlive-extra)) (apply patch-source-shebangs (list #:source texlive-extra)) - (invoke "mv" "tlpkg" share)))))))) + (invoke "mv" "tlpkg" share)) + ;; texlua shebangs are not patched by the patch-source-shebangs + ;; phase because the texlua executable does not exist at that + ;; time. + (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin")) + (with-directory-excursion out + (patch-source-shebangs)))))))) (synopsis "TeX Live, a package of the TeX typesetting system") (description "TeX Live provides a comprehensive TeX document production system. -- cgit 1.4.1