guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: Add texlive-capt-of.


From: guix-commits
Subject: branch master updated: gnu: Add texlive-capt-of.
Date: Fri, 28 Jan 2022 07:58:39 -0500

This is an automated email from the git hooks/post-receive script.

ngz pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 32e3e924cf gnu: Add texlive-capt-of.
32e3e924cf is described below

commit 32e3e924cf1b2882b457ed2e67380060696b7603
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Fri Jan 28 13:58:04 2022 +0100

    gnu: Add texlive-capt-of.
    
    * gnu/packages/tex.scm (texlive-capt-of): New variable.
    (texlive-latex-capt-of): Deprecate variabe.
---
 gnu/packages/tex.scm | 69 +++++++++++++++++++++++++++++-----------------------
 1 file changed, 38 insertions(+), 31 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 7da1f2277a..aadcb20296 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -5015,38 +5015,45 @@ both); or to remove surrounding spaces within a macro 
definition, or to define
 space-stripped macros.")
     (license license:lppl)))
 
-(define-public texlive-latex-capt-of
-  (package
-    (name "texlive-latex-capt-of")
-    (version (number->string %texlive-revision))
-    (source (origin
-              (method svn-fetch)
-              (uri (svn-reference
-                    (url (string-append "svn://www.tug.org/texlive/tags/"
-                                        %texlive-tag "/Master/texmf-dist/"
-                                        "/tex/latex/capt-of"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "1y2s50f6lz0jx2748lj3iy56hrpcczgnbzmvphxv7aqndyyamd4x"))))
-    (build-system trivial-build-system)
-    (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils))
-         (let ((target (string-append (assoc-ref %outputs "out")
-                                      "/share/texmf-dist/tex/latex/capt-of")))
-           (mkdir-p target)
-           (copy-recursively (assoc-ref %build-inputs "source") target)
-           #t))))
-    (home-page "https://www.ctan.org/pkg/capt-of";)
-    (synopsis "Captions on more than floats")
-    (description
-     "This package defines a command @code{\\captionof} for putting a caption
+(define-public texlive-capt-of
+  (let ((template
+         (simple-texlive-package
+          "texlive-capt-of"
+          (list "doc/latex/capt-of/"
+                "source/latex/capt-of/"
+                "tex/latex/capt-of/")
+          (base32 "0bf0cdd9ca3kkqxqqkq6jalh5ybs60l80l5gfkl2whk2v4bnzfvz"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ '())
+          "latex/capt-of")
+         ((#:build-targets _ '())
+          '(list "capt-of.ins"))
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'unpack 'chdir
+               (lambda _
+                 (chdir "source/latex/capt-of")))
+             (replace 'copy-files
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                 (let ((origin (assoc-ref inputs "source"))
+                       (source (string-append (assoc-ref outputs "out")
+                                              "/share/texmf-dist/source"))
+                       (doc (string-append (assoc-ref outputs "doc")
+                                           "/share/texmf-dist/doc")))
+                   (copy-recursively (string-append origin "/source") source)
+                   (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://www.ctan.org/pkg/capt-of";)
+      (synopsis "Captions on more than floats")
+      (description
+       "This package defines a command @code{\\captionof} for putting a caption
 to something that's not a float.")
-    (license license:lppl)))
+      (license license:lppl))))
+
+(define-deprecated-package texlive-latex-capt-of texlive-capt-of)
 
 (define-public texlive-doi
   (package



reply via email to

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