guix-commits
[Top][All Lists]
Advanced

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

456/458: gnu: Simplify texlive-default-updmap.cfg.


From: guix-commits
Subject: 456/458: gnu: Simplify texlive-default-updmap.cfg.
Date: Wed, 14 Jun 2023 05:23:31 -0400 (EDT)

ngz pushed a commit to branch tex-team-next
in repository guix.

commit 7ab82a47be3ed6222580c3c9761bf71d055ccb98
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Mon Jun 12 10:30:11 2023 +0200

    gnu: Simplify texlive-default-updmap.cfg.
    
    * gnu/packages/tex.scm (texlive-default-updmap.cfg): Use TEXLIVE-ORIGIN.
    (texlive-updmap.cfg):
    * guix/profiles.scm (texlive-font-maps): Update accordingly.
---
 gnu/packages/tex.scm | 73 +++++++++++++++++++++-------------------------------
 guix/profiles.scm    |  3 +--
 2 files changed, 31 insertions(+), 45 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index cec0ca02f1..4ebc54c024 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -4136,16 +4136,11 @@ part of the LaTeX required set of packages.")
 (define-deprecated-package texlive-latex-psnfss texlive-psnfss)
 
 (define-public texlive-default-updmap.cfg
-  (origin
-    (method url-fetch)
-    (uri (string-append "https://tug.org/svn/texlive/tags/";
-                        %texlive-tag "/Master/texmf-dist/web2c/updmap.cfg"
-                        "?revision=" (number->string %texlive-revision)))
-    (file-name (string-append "updmap.cfg-"
-                              (number->string %texlive-revision)))
-    (sha256
-     (base32
-      "0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c"))))
+  (texlive-origin
+   "updmap.cfg" (number->string %texlive-revision)
+   (list "web2c/updmap.cfg")
+   (base32
+    "1bb9nmvr14f3lam627mq030hh08h7wsy8i6884q2kvppbpf2a3mf")))
 
 (define-public texlive-updmap.cfg
   (lambda* (#:optional (packages '()))
@@ -4172,16 +4167,7 @@ configuration of a base set of packages plus PACKAGES."
                   texlive-tools)))
       (package
         (version (number->string %texlive-revision))
-        (source (origin
-                  (method url-fetch)
-                  (uri (string-append "https://tug.org/svn/texlive/tags/";
-                                      %texlive-tag
-                                      "/Master/texmf-dist/web2c/updmap.cfg"
-                                      "?revision=" version))
-                  (file-name "updmap.cfg")
-                  (sha256
-                   (base32
-                    "0zhpyld702im6352fwp41f2hgfkpj2b4j1kfsjqbkijlcmvb6w2c"))))
+        (source texlive-default-updmap.cfg)
         (name "texlive-updmap.cfg")
         (build-system copy-build-system)
         (arguments
@@ -4189,33 +4175,34 @@ configuration of a base set of packages plus PACKAGES."
                       (guix build utils)
                       (ice-9 popen)
                       (ice-9 textual-ports))
-           #:install-plan '(("updmap.cfg" "share/texmf-config/web2c/")
-                            ("map" "share/texmf-dist/fonts/map"))
+           #:install-plan '(("web2c/updmap.cfg" "share/texmf-config/web2c/")
+                            ("web2c/map" "share/texmf-dist/fonts/map"))
            #:phases
            (modify-phases %standard-phases
              (add-before 'install 'regenerate-updmap.cfg
                (lambda _
-                 (make-file-writable "updmap.cfg")
-
-                 ;; Disable unavailable map files.
-                 (let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
-                                          "--syncwithtrees"
-                                          "--nohash"
-                                          "--cnffile" "updmap.cfg")))
-                   (display "Y\n" port)
-                   (when (not (zero? (status:exit-val (close-pipe port))))
-                     (error "failed to filter updmap.cfg")))
-
-                 ;; Set TEXMFSYSVAR to a sane and writable value; updmap fails
-                 ;; if it cannot create its log file there.
-                 (setenv "TEXMFSYSVAR" (getcwd))
-
-                 ;; Generate maps.
-                 (invoke "updmap-sys"
-                         "--cnffile"           "updmap.cfg"
-                         "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/"
-                         "--dvipsoutputdir"    "map/dvips/updmap/"
-                         "--pdftexoutputdir"   "map/pdftex/updmap/"))))))
+                 (with-directory-excursion "web2c"
+                   (make-file-writable "updmap.cfg")
+
+                   ;; Disable unavailable map files.
+                   (let* ((port (open-pipe* OPEN_WRITE "updmap-sys"
+                                            "--syncwithtrees"
+                                            "--nohash"
+                                            "--cnffile" "updmap.cfg")))
+                     (display "Y\n" port)
+                     (when (not (zero? (status:exit-val (close-pipe port))))
+                       (error "failed to filter updmap.cfg")))
+
+                   ;; Set TEXMFSYSVAR to a sane and writable value; updmap 
fails
+                   ;; if it cannot create its log file there.
+                   (setenv "TEXMFSYSVAR" (getcwd))
+
+                   ;; Generate maps.
+                   (invoke "updmap-sys"
+                           "--cnffile"           "updmap.cfg"
+                           "--dvipdfmxoutputdir" "map/dvipdfmx/updmap/"
+                           "--dvipsoutputdir"    "map/dvips/updmap/"
+                           "--pdftexoutputdir"   "map/pdftex/updmap/")))))))
         (propagated-inputs (map (lambda (package)
                                   (list (package-name package) package))
                                 (append default-packages packages)))
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 05fa5fa862..30ac0d52e4 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1831,8 +1831,7 @@ MANIFEST."
           (let* ((web2c (string-append #$output "/share/texmf-dist/web2c/"))
                  (maproot (string-append #$output 
"/share/texmf-dist/fonts/map/"))
                  (updmap.cfg (string-append web2c "updmap.cfg")))
-            (mkdir-p web2c)
-            (copy-file #$updmap.cfg updmap.cfg)
+            (install-file #$(file-append updmap.cfg "/web2c/updmap.cfg") web2c)
             (make-file-writable updmap.cfg)
             (let* ((port (open-pipe* OPEN_WRITE
                                      #$(file-append texlive-bin 
"/bin/updmap-sys")



reply via email to

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