guix-commits
[Top][All Lists]
Advanced

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

342/435: gnu: texlive-cm: Refresh package definition.


From: guix-commits
Subject: 342/435: gnu: texlive-cm: Refresh package definition.
Date: Tue, 6 Jun 2023 11:40:22 -0400 (EDT)

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

commit 5abce6e96b69558510ac31e95785b3be747d07b3
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Wed May 17 00:24:37 2023 +0200

    gnu: texlive-cm: Refresh package definition.
    
    * gnu/packages/tex.scm (texlive-cm): Remove SIMPLE-TEXLIVE-PACKAGE
    call.
    [native-inputs]: Remove TEXLIVE-BIN.
---
 gnu/packages/tex.scm | 128 ++++++++++++++++++++++++---------------------------
 1 file changed, 60 insertions(+), 68 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 9e9df685f9..34132936a8 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -1176,77 +1176,69 @@ cite bundle of the author's citation-related packages.")
               "/share/texmf-dist/doc/latex/cite/README"))))
 
 (define-public texlive-cm
-  (let ((template (simple-texlive-package
-                   "texlive-cm"
-                   (list "/fonts/source/public/cm/"
-                         "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map"
-                         "/doc/fonts/cm/")
-                   (base32
-                    "0mfslqs9saqkb3z3xdhsqnklxk858nmipgj1y93by2791jzkma1d")
-                   #:trivial? #t)))
-    (package
-      (inherit template)
-      (arguments
-       (substitute-keyword-arguments (package-arguments template)
-         ((#:modules modules '())
-          '((guix build gnu-build-system)
-            (guix build utils)
-            (srfi srfi-26)))
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((mf (assoc-ref inputs "texlive-metafont")))
-                   ;; Tell mf where to find mf.base
-                   (setenv "MFBASES" (string-append mf 
"/share/texmf-dist/web2c"))
-                   ;; Tell mf where to look for source files
-                   (setenv "MFINPUTS"
-                           (string-append (getcwd) "/fonts/source/public/cm/:"
-                                          mf 
"/share/texmf-dist/metafont/base")))
-                 (for-each make-file-writable
-                           (cons "fonts/source/public/cm/"
-                                 (find-files "fonts/source/public/cm/" ".*")))
-                 (let ((build (string-append (getcwd) "/build"))
-                       (pkdir (string-append (getcwd) 
"/pk/ljfour/public/cm/dpi600")))
-                   (mkdir-p pkdir)
-                   (mkdir-p build)
-                   (with-directory-excursion "fonts/source/public/cm/"
-                     (for-each (lambda (font)
-                                 (format #t "building font ~a\n" font)
-                                 (invoke "mf" "-progname=mf"
-                                         (string-append "-output-directory=" 
build)
-                                         (string-append "\\"
-                                                        "mode:=ljfour; "
-                                                        "mag:=1+0/600; "
-                                                        "scrollmode; "
-                                                        "input "
-                                                        (basename font ".mf")))
-                                 (invoke "gftopk"
-                                         (string-append build "/"
-                                                        (basename font ".mf") 
".600gf")
-                                         (string-append pkdir "/"
-                                                        (basename font ".mf") 
".pk")))
-                               (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))
-                 #t))
-             (add-after 'install 'install-generated-fonts
-               (lambda* (#:key inputs outputs #:allow-other-keys)
-                 (let* ((out    (assoc-ref outputs "out"))
-                        (fonts  (string-append out "/share/texmf-dist/fonts/"))
-                        (pk     (string-append fonts "pk"))
-                        (tfm    (string-append fonts "tfm/public/cm")))
-                   (for-each (cut install-file <> tfm)
-                             (find-files "build" "\\.*"))
-                   (copy-recursively "pk" pk)
-                   #t)))))))
-      (native-inputs
-       (list texlive-bin texlive-metafont))
-      (home-page "https://www.ctan.org/pkg/cm";)
-      (synopsis "Computer Modern fonts for TeX")
-      (description "This package provides the Computer Modern fonts by Donald
+  (package
+    (name "texlive-cm")
+    (version (number->string %texlive-revision))
+    (source (texlive-origin
+             name version
+             (list "doc/fonts/cm/" "fonts/map/dvips/cm/"
+                   "fonts/pk/ljfour/public/cm/dpi600/"
+                   "fonts/source/public/cm/"
+                   "fonts/tfm/public/cm/")
+             (base32
+              "10adgjc3lkj2z50jp1f9n83bdrx8bqxd76rl605d0d5pb435k97m")))
+    (outputs '("out" "doc"))
+    (build-system texlive-build-system)
+    (arguments
+     (list
+      #:texlive-latex-base #f
+      #:modules
+      '((guix build texlive-build-system)
+        (guix build utils)
+        (srfi srfi-26))
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((mf (assoc-ref inputs "texlive-metafont")))
+                ;; Tell mf where to find mf.base
+                (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
+                ;; Tell mf where to look for source files
+                (setenv "MFINPUTS"
+                        (string-append (getcwd) "/fonts/source/public/cm/:"
+                                       mf "/share/texmf-dist/metafont/base")))
+              (for-each make-file-writable
+                        (cons "fonts/source/public/cm/"
+                              (find-files "fonts/source/public/cm/" ".*")))
+              (let ((build (string-append (getcwd) "/build"))
+                    (pkdir (string-append (getcwd) 
"/pk/ljfour/public/cm/dpi600")))
+                (mkdir-p pkdir)
+                (mkdir-p build)
+                (with-directory-excursion "fonts/source/public/cm/"
+                  (for-each (lambda (font)
+                              (format #t "building font ~a\n" font)
+                              (invoke "mf" "-progname=mf"
+                                      (string-append "-output-directory=" 
build)
+                                      (string-append "\\"
+                                                     "mode:=ljfour; "
+                                                     "mag:=1+0/600; "
+                                                     "scrollmode; "
+                                                     "input "
+                                                     (basename font ".mf")))
+                              (invoke "gftopk"
+                                      (string-append build "/"
+                                                     (basename font ".mf") 
".600gf")
+                                      (string-append pkdir "/"
+                                                     (basename font ".mf") 
".pk")))
+                            (find-files "." 
"cm(.*[0-9]+.*|inch)\\.mf$")))))))))
+    (native-inputs (list texlive-metafont))
+    (home-page "https://ctan.org/pkg/cm";)
+    (synopsis "Computer Modern fonts for TeX")
+    (description "This package provides the Computer Modern fonts by Donald
 Knuth.  The Computer Modern font family is a large collection of text,
 display, and mathematical fonts in a range of styles, based on Monotype Modern
 8A.")
-      (license license:knuth))))
+    (license license:knuth)))
 
 (define-deprecated-package texlive-fonts-cm texlive-cm)
 



reply via email to

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