gnu: Add texlive-fontinst.

* gnu/packages/tex.scm (texlive-fontinst): New variable.
(texlive-tex-fontinst-base): Deprecate package.
This commit is contained in:
Ricardo Wurmus 2019-07-14 21:58:03 +02:00
parent 7a9b737a8b
commit e9816fcbb4
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC

View File

@ -570,32 +570,86 @@ to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
build fonts using the Metafont system.")
(license license:knuth)))
(define-public texlive-tex-fontinst-base
(package
(name "texlive-tex-fontinst-base")
(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/"
"/tex/fontinst/base"))
(revision %texlive-revision)))
(file-name (string-append name "-" version "-checkout"))
(sha256
(define-public texlive-fontinst
(let ((template (simple-texlive-package
"texlive-fontinst"
(list "/doc/fonts/fontinst/"
"/doc/man/man1/fontinst.1"
"/doc/man/man1/fontinst.man1.pdf"
;; This is used to build parts of
;; /tex/fontinst/{base,misc}/ and
;; /tex/latex/fontinst/fontdoc.sty.
"/source/fontinst/base/"
;; These are not generated.
"/tex/fontinst/base/bbox.sty"
"/tex/fontinst/base/multislot.sty"
"/tex/fontinst/misc/glyphbox.mtx"
"/tex/fontinst/misc/glyphoff.mtx"
"/tex/fontinst/misc/glyphon.mtx"
"/tex/fontinst/misc/kernoff.mtx"
"/tex/fontinst/misc/kernon.mtx"
"/tex/fontinst/latinetx/"
"/tex/fontinst/latinmtx/"
"/tex/fontinst/mathmtx/"
"/tex/fontinst/smblmtx/"
"/scripts/texlive/fontinst.sh")
(base32
"12gnb8hc45p47pqn31msvi4mpr3wxbbbf2k4xhmshjqykwzlx508"))))
(build-system trivial-build-system)
"09drlb0krhnizw92xlm5wxzzpgn3shcxd684xlg0zc5p16l47w6h")
#:trivial? #t)))
(package
(inherit template)
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((target (string-append (assoc-ref %outputs "out")
"/share/texmf-dist/tex/fontinst/base")))
(mkdir-p target)
(copy-recursively (assoc-ref %build-inputs "source") target)
#t))))
(substitute-keyword-arguments (package-arguments template)
((#:modules _ '())
'((guix build gnu-build-system)
(guix build utils)
(ice-9 match)))
((#:phases phases)
`(modify-phases ,phases
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
(setenv "TEXINPUTS"
(string-append (getcwd) "//:"
(getcwd) "/source/fontinst/base//:"
(assoc-ref inputs "texlive-docstrip") "//"))
(mkdir "build")
(invoke "tex" "-ini" "-interaction=scrollmode"
"-output-directory=build"
"fontinst.ins")))
;; Since we're using docstrip without LaTeX we can't set \UseTDS
;; or \BaseDirectory, so the generated files are just dumped in
;; the "build" directory.
(add-after 'install 'install-generated-files
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(root (string-append out "/share/texmf-dist")))
(for-each (match-lambda
((dir files ...)
(for-each (lambda (file)
(install-file
(string-append "build/" file)
(string-append root dir)))
files)))
'(("/tex/fontinst/base"
"fontinst.sty"
"cfntinst.sty"
"xfntinst.sty"
"finstmsc.sty"
"fontinst.ini")
("/tex/fontinst/misc"
"csc2x.tex"
"csckrn2x.tex"
"osf2x.tex")
("/tex/latex/fontinst"
"fontdoc.sty")))
#t)))))))
(native-inputs
`(("texlive-bin" ,texlive-bin)
("texlive-docstrip" ,texlive-docstrip)))
(home-page "https://www.ctan.org/pkg/fontinst")
(synopsis "Tools for converting and installing fonts for TeX and LaTeX")
(description "This package provides TeX macros for converting Adobe Font
@ -604,7 +658,10 @@ with the number crunching and shovelling parts of font installation. This
means in practice that it creates a number of files which give the TeX
metrics (and related information) for a font family that TeX needs to do any
typesetting in these fonts.")
(license license:lppl1.1+)))
(license license:lppl1.1+))))
(define-public texlive-tex-fontinst-base
(deprecated-package "texlive-tex-fontinst-base" texlive-fontinst))
(define-public texlive-fontname
(package