ngz pushed a commit to branch tex-team in repository guix. commit 13cc805ab49887a891dbaa79fbe2f96dc5c9fef3 Author: Nicolas Goaziou <m...@nicolasgoaziou.fr> AuthorDate: Sun May 12 13:23:33 2024 +0200
gnu: texlive-ttfutils: Build executables. * gnu/packages/tex.scm (texlive-ttfutils-bin): New variable. (texlive-ttfutils)[arguments]<#:phases>: Include executables. [native-inputs]: Add TEXLIVE-TTFUTILS-BIN. * gnu/packages/tex.scm (texlive-bin): Do not build "ttf2pk2" and "ttfdump". Change-Id: I4bea827f14ea8298d825663699eb34ce9e916870 --- gnu/packages/tex.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index f090fcd4a2..291fe88f38 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -784,6 +784,8 @@ and should be preferred to it whenever a package would otherwise depend on "t1utils" "texdoctk" "tpic2pdftex" + "ttf2pk2" + "ttfdump" "upmendex" "vlna" "xdvik" @@ -45576,6 +45578,53 @@ which produced lines at an arbitrary orientation. The present package emulates the macro, using TikZ.") (license license:public-domain))) +(define texlive-ttfutils-bin + (package + (inherit texlive-bin) + (name "texlive-ttfutils-bin") + (source + (origin + (inherit texlive-source) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + #~(let ((delete-other-directories + (lambda (root dirs) + (with-directory-excursion root + (for-each + delete-file-recursively + (scandir "." + (lambda (file) + (and (not (member file (append '("." "..") dirs))) + (eq? 'directory (stat:type (stat file))))))))))) + (delete-other-directories "libs" '()) + (delete-other-directories "utils" '()) + (delete-other-directories "texk" '("ttfdump" "ttf2pk2")))))) + (arguments + (substitute-keyword-arguments (package-arguments texlive-bin) + ((#:configure-flags flags) + #~(cons* "--disable-all-pkgs" + "--enable-ttfdump" + "--enable-ttf2pk2" + (delete "--disable-ttfdump" + (delete "--disable-ttf2pk2" #$flags)))) + ((#:phases _) + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "texk/ttfdump" + (invoke "make" "check")) + (with-directory-excursion "texk/ttf2pk2" + (invoke "make" "check"))))) + (replace 'install + (lambda _ + (with-directory-excursion "texk/ttfdump" + (invoke "make" "install")) + (with-directory-excursion "texk/ttf2pk2" + (invoke "make" "install")))))))) + (inputs (list freetype)))) + (define-public texlive-ttfutils (package (name "texlive-ttfutils") @@ -45598,8 +45647,19 @@ emulates the macro, using TikZ.") "1yfr3yic0bx73imxhmxhnhjc1mpwy9f55sh3p430p2f2yvxwm0cs"))) (outputs '("out" "doc")) (build-system texlive-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-bin + (lambda _ + (let ((source + #$(this-package-native-input "texlive-ttfutils-bin"))) + (copy-recursively (string-append source "/bin") + (string-append #$output "/bin")))))))) + (native-inputs (list texlive-ttfutils-bin)) (home-page "https://ctan.org/pkg/ttfutils") (synopsis "Convert TrueType to TFM and PK fonts") + ;; XXX: "ttf2afm" is actually provided by PDFTeX, through "texlive-bin". (description "This package provides utilities to convert TrueType to TFM and PK fonts: @command{ttf2afm}, @command{ttf2pk}, @command{ttf2tfm}, and