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.
This commit is contained in:
Ricardo Wurmus 2020-10-27 20:11:25 +01:00
parent 2c578eb612
commit a2276f625a
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

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