guix-commits
[Top][All Lists]
Advanced

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

01/05: gnu: Replace texlive-fonts-knuth-lib with texlive-knuth-lib.


From: guix-commits
Subject: 01/05: gnu: Replace texlive-fonts-knuth-lib with texlive-knuth-lib.
Date: Tue, 27 Oct 2020 18:24:12 -0400 (EDT)

rekado pushed a commit to branch wip-texlive
in repository guix.

commit c203d4da89851d22dd57c2fe27c819ff9bc1fba0
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Oct 27 20:11:25 2020 +0100

    gnu: Replace texlive-fonts-knuth-lib with texlive-knuth-lib.
    
    * gnu/packages/tex.scm (texlive-fonts-knuth-lib): Deprecate in favor of...
    (texlive-knuth-lib): ...this new variable.
---
 gnu/packages/tex.scm | 126 +++++++++++++++++++++++++--------------------------
 1 file changed, 61 insertions(+), 65 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 83739dd..7a8f7b4 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -858,73 +858,69 @@ Computers & Typesetting series.")
 (define-public texlive-fonts-lm
   (deprecated-package "texlive-fonts-lm" texlive-lm))
 
-(define-public texlive-fonts-knuth-lib
-  (package
-    (name "texlive-fonts-knuth-lib")
-    (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/"
-                                        "/fonts/source/public/knuth-lib"))
-                    (revision %texlive-revision)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (srfi srfi-26))
-       #:tests? #f ; no tests
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (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) ":"
-                                      mf "/share/texmf-dist/metafont/base")))
-             (mkdir "build")
-             (for-each (lambda (font)
-                         (format #t "building font ~a\n" font)
-                         (invoke "mf" "-progname=mf"
-                                 "-output-directory=build"
-                                 (string-append "\\"
-                                                "mode:=ljfour; "
-                                                "mag:=1; "
-                                                "batchmode; "
-                                                "input " font)))
-                       (find-files "." "(manfnt|logo.+)\\.mf$"))
-             #t))
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (tfm (string-append
-                          out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
-                    (mf  (string-append
-                          out 
"/share/texmf-dist/fonts/source/public/knuth-lib")))
-               (for-each (cut install-file <> tfm)
-                         (find-files "build" "\\.*"))
-               (for-each (cut install-file <> mf)
-                         (find-files "." "\\.mf"))
-               #t))))))
-    (native-inputs
-     `(("texlive-bin" ,texlive-bin)
-       ("texlive-metafont" ,texlive-metafont)))
-    (home-page "https://www.ctan.org/pkg/knuth-lib";)
-    (synopsis "Small library of METAFONT sources")
-    (description "This is a collection of core TeX and METAFONT macro files
+(define-public texlive-knuth-lib
+  (let ((template (simple-texlive-package
+                   "texlive-knuth-lib"
+                   (list "/fonts/source/public/knuth-lib/"
+                         "/tex/generic/knuth-lib/"
+                         "/tex/plain/knuth-lib/")
+                   (base32
+                    "0lizrhdr4pirhh4ry44znddksd7akkxli2i6sddm5rzqljiqdy3v")
+                   #:trivial? #t)))
+    (package
+      (inherit template)
+      (arguments
+       (substitute-keyword-arguments (package-arguments template)
+         ((#: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)
+                 (with-directory-excursion "fonts/source/public/knuth-lib"
+                   (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) ":"
+                                            mf 
"/share/texmf-dist/metafont/base")))
+                   (mkdir "build")
+                   (for-each (lambda (font)
+                               (format #t "building font ~a\n" font)
+                               (invoke "mf" "-progname=mf"
+                                       "-output-directory=build"
+                                       (string-append "\\"
+                                                      "mode:=ljfour; "
+                                                      "mag:=1; "
+                                                      "batchmode; "
+                                                      "input " font)))
+                             (find-files "." "(manfnt|logo.+)\\.mf$")))
+                 #t))
+             (add-after 'install 'install-fonts
+               (lambda* (#:key outputs #:allow-other-keys)
+                 (with-directory-excursion "fonts/source/public/knuth-lib"
+                   (let* ((out (assoc-ref outputs "out"))
+                          (tfm (string-append
+                                out 
"/share/texmf-dist/fonts/tfm/public/knuth-lib")))
+                     (for-each (cut install-file <> tfm)
+                               (find-files "build" "\\.tfm"))
+                     #t))))))))
+      (native-inputs
+       `(("texlive-bin" ,texlive-bin)
+         ("texlive-metafont" ,texlive-metafont)))
+      (home-page "https://www.ctan.org/pkg/knuth-lib";)
+      (synopsis "Small library of METAFONT sources")
+      (description "This is a collection of core TeX and METAFONT macro files
 from Donald Knuth, including the plain format, plain base, and the MF logo
 fonts.")
-    (license license:knuth)))
+      (license license:knuth))))
+
+(define-public texlive-fonts-knuth-lib
+  (deprecated-package "texlive-fonts-knuth-lib" texlive-knuth-lib))
 
 (define-public texlive-fonts-latex
   (package



reply via email to

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