guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: gnu: texlive-psnfss: Re-add phases to build "doc" output.


From: guix-commits
Subject: 01/05: gnu: texlive-psnfss: Re-add phases to build "doc" output.
Date: Wed, 22 Jun 2022 16:27:00 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit c4fd372c5868667a56709feb319c7fd6dc7311a5
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jun 22 21:49:46 2022 +0200

    gnu: texlive-psnfss: Re-add phases to build "doc" output.
    
    * gnu/packages/tex.scm (texlive-psnfss)[arguments]: Reinstate phases
    added in 08bb73749e55a8b8078062a0ab6f4f0eed53a475 and inadvertently
    removed in 8655a714457dbf1cde45979507012d9515614028.
---
 gnu/packages/tex.scm | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7fea6d3e53..5207c787e9 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -4564,14 +4564,34 @@ language that is written in a Cyrillic alphabet.")
              (add-after 'unpack 'chdir
                (lambda _
                  (chdir "source/latex/psnfss")))
-           (add-before 'copy-files 'unchdir
-             (lambda _
-               (chdir "../../..")))
-           (add-after 'copy-files 'delete-extra-files
-             (lambda* (#:key outputs #:allow-other-keys)
-               (delete-file-recursively
-                (string-append (assoc-ref outputs "out")
-                               
"/share/texmf-dist/source/latex/psnfss/build"))))))))
+             (add-after 'install 'chdir-back
+               (lambda _
+                 (chdir "../../..")))
+             (add-after 'chdir-back 'clean-installed-files
+               (lambda _
+                 ;; Remove the generated .sty files from the build area as
+                 ;; these were already copied to the default output in the
+                 ;; "install" phase.
+                 (delete-file-recursively "source/latex/psnfss/build")))
+             (add-after 'clean-installed-files 'move-doc-files
+               (lambda* (#:key outputs #:allow-other-keys)
+                 (let* ((doc (assoc-ref outputs "doc"))
+                        (doc-root (string-append doc "/share/texmf-dist"))
+                        (doc-path "doc/latex/psnfss")
+                        (source-path "source/latex/psnfss"))
+                   ;; Move the PDF documentation to the "doc" output.
+                   (let* ((file-name "psnfss2e.pdf")
+                          (source (string-append doc-path "/" file-name))
+                          (target-dir (string-append doc-root "/" doc-path)))
+                     (mkdir-p target-dir)
+                     (copy-file source
+                                (string-append target-dir "/" file-name))
+                     (delete-file source))
+
+                   ;; Keep the remaining files together with the package's
+                   ;; source, as per the installation instructions.
+                   (copy-recursively doc-path source-path)
+                   (delete-file-recursively "doc"))))))))
       (native-inputs
        (list texlive-cm))
       (home-page "https://www.ctan.org/pkg/psnfss";)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]