unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: 62570@debbugs.gnu.org
Subject: [bug#62570] [PATCH 6/6] gnu: texlive-latex-lastpage: Replace with texlive-lastpage.
Date: Fri, 31 Mar 2023 17:32:26 +0200	[thread overview]
Message-ID: <20230331153226.607420-6-mail@nicolasgoaziou.fr> (raw)
In-Reply-To: <20230331153226.607420-1-mail@nicolasgoaziou.fr>

* gnu/packages/tex.scm (texlive-lastpage): New variable.
(texlive-latex-lastpage): Deprecate variable.
---
 gnu/packages/tex.scm | 53 +++++++++++++++++++++++++++++++-------------
 1 file changed, 37 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2e31d74498..f26b62a155 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -12469,23 +12469,44 @@ (define-public texlive-latex-hyphenat
 fonts.")
     (license license:lppl1.3c+)))
 
-(define-public texlive-latex-lastpage
-  (package
-    (inherit (simple-texlive-package
-              "texlive-latex-lastpage"
-              (list "doc/latex/lastpage/"
-                    "tex/latex/lastpage/")
-              (base32 "0q6x743b8fkw9r82lrxy49f9xsg81bffynwvpnvpnp3h4mkafvdb")
-              #:trivial? #t))
-    (build-system texlive-build-system)
-    (home-page "https://ctan.org/pkg/lastpage")
-    (synopsis "Reference last page for Page N of M type footers")
-    (description
-     "This package enables referencing the number of pages in a LaTeX document
-through the introduction of a new label which can be referenced like
+(define-public texlive-lastpage
+  (let ((template  (simple-texlive-package
+                    "texlive-lastpage"
+                    (list "doc/latex/lastpage/"
+                          "source/latex/lastpage/"
+                          "tex/latex/lastpage/")
+                    (base32
+                     "1cmzl0jkid4w60bjlyxrc5bynbc3lwq5nr77rsip0q9hprxykxks"))))
+    (package
+      (inherit template)
+      (outputs '("out" "doc"))
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#:tex-directory _ #t) "latex/lastpage")
+         ((#:build-targets _ '()) '(list "lastpage.ins"))
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (add-after 'unpack 'chdir
+                (lambda _ (chdir "source/latex/lastpage/")))
+              (replace 'copy-files
+                (lambda* (#:key inputs #:allow-other-keys)
+                  (let ((origin (assoc-ref inputs "source"))
+                        (source (string-append #$output
+                                               "/share/texmf-dist/source"))
+                        (doc (string-append #$output:doc
+                                            "/share/texmf-dist/doc")))
+                    (copy-recursively (string-append origin "/source") source)
+                    (copy-recursively (string-append origin "/doc") doc))))))))
+      (home-page "https://ctan.org/pkg/lastpage")
+      (synopsis "Reference last page for Page N of M type footers")
+      (description
+       "This package enables referencing the number of pages in a LaTeX
+document through the introduction of a new label which can be referenced like
 @code{\\pageref{LastPage}} to give a reference to the last page of a document.
-It is particularly useful in the page footer that says: Page N of M.")
-    (license license:lppl1.3c+)))
+It is particularly useful in the page footer that says: @samp{Page N of M}.")
+      (license license:lppl1.3+))))
+
+(define-deprecated-package texlive-latex-lastpage texlive-lastpage)
 
 (define-public texlive-latex-tabto-ltx
   (package
-- 
2.39.2





      parent reply	other threads:[~2023-03-31 15:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 15:30 [bug#62570] [PATCH 0/6] Fix name and dependencies of a few Texlive packages Nicolas Goaziou
2023-03-31 15:32 ` [bug#62570] [PATCH 1/6] gnu: Add texlive-ncctools Nicolas Goaziou
2023-03-31 15:32   ` [bug#62570] [PATCH 2/6] gnu: Add texlive-relsize Nicolas Goaziou
2023-03-31 15:32   ` [bug#62570] [PATCH 3/6] gnu: texlive-latex-bigfoot: Replace with texlive-bigfoot Nicolas Goaziou
2023-04-07 16:48     ` Simon Tournier
2023-04-07 18:01       ` Nicolas Goaziou
2023-04-08  9:35         ` Simon Tournier
2023-04-08 13:07           ` Nicolas Goaziou
2023-04-18 13:30             ` bug#62570: " Nicolas Goaziou
2023-03-31 15:32   ` [bug#62570] [PATCH 4/6] gnu: texlive-latex-acronym: Replace with texlive-acronym Nicolas Goaziou
2023-03-31 15:32   ` [bug#62570] [PATCH 5/6] gnu: texlive-latex-totcount: Replace with texlive-totcount Nicolas Goaziou
2023-03-31 15:32   ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230331153226.607420-6-mail@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=62570@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).