aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/tex.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-07-14 21:58:03 +0200
committerRicardo Wurmus <rekado@elephly.net>2019-07-24 09:46:47 +0200
commite9816fcbb4edf621b3ec22000f8d048c5c92153b (patch)
tree747487092be2b6ed9a2f485c420c83aa30842199 /gnu/packages/tex.scm
parent7a9b737a8b07a9bef580296f280c9d8fe666a42d (diff)
downloadguix-e9816fcbb4edf621b3ec22000f8d048c5c92153b.tar
guix-e9816fcbb4edf621b3ec22000f8d048c5c92153b.tar.gz
gnu: Add texlive-fontinst.
* gnu/packages/tex.scm (texlive-fontinst): New variable. (texlive-tex-fontinst-base): Deprecate package.
Diffstat (limited to 'gnu/packages/tex.scm')
-rw-r--r--gnu/packages/tex.scm117
1 files changed, 87 insertions, 30 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 85e458b919..fcf5bee536 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -570,41 +570,98 @@ 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
- (base32
- "12gnb8hc45p47pqn31msvi4mpr3wxbbbf2k4xhmshjqykwzlx508"))))
- (build-system trivial-build-system)
- (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))))
- (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
+(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
+ "09drlb0krhnizw92xlm5wxzzpgn3shcxd684xlg0zc5p16l47w6h")
+ #:trivial? #t)))
+ (package
+ (inherit template)
+ (arguments
+ (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
Metric files to TeX metric and virtual font format. Fontinst helps mainly
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