ngz pushed a commit to branch tex-team
in repository guix.
commit 96f051fc3190004c8193ab3412284801d1874567
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Sat May 11 18:13:46 2024 +0200
gnu: texlive-tpic2pdftex: Build executable.
* gnu/packages/tex.scm (texlive-tpic2pdftex-bin): New variable.
(texlive-tpic2pdftex)[arguments]<#:phases>: Include executable.
[native-inputs]: Add TEXLIVE-TPIC2PDFTEX-BIN.
* gnu/packages/tex.scm (texlive-bin): Do not build tpic2pdftex.
Change-Id: I0a3555dbc88edb6fa862e96c379519251015c428
---
gnu/packages/tex.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index ce858c27c2..4d0e3c1652 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -774,6 +774,7 @@ and should be preferred to it whenever a package would
otherwise depend on
"psutils"
"t1utils"
"texdoctk"
+ "tpic2pdftex"
"upmendex"
"xindy"
"xml2pmx"
@@ -45270,6 +45271,48 @@ tone values. Currently, unt's model is implemented.
Support for more models
is planned.")
(license license:asl2.0)))
+(define texlive-tpic2pdftex-bin
+ (package
+ (inherit texlive-bin)
+ (name "texlive-tpic2pdftex-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" '("tpic2pdftex"))
+ (delete-other-directories "texk" '())))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+ ((#:configure-flags flags)
+ #~(cons* "--disable-all-pkgs"
+ "--enable-tpic2pdftex"
+ (delete "--disable-tpic2pdftex" #$flags)))
+ ((#:phases _)
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "utils/tpic2pdftex"
+ (invoke "make" "check")))))
+ (replace 'install
+ (lambda _
+ (with-directory-excursion "utils/tpic2pdftex"
+ (invoke "make" "install"))))))))
+ (native-inputs '())
+ (inputs '())))
+
(define-public texlive-tpic2pdftex
(package
(name "texlive-tpic2pdftex")
@@ -45283,6 +45326,16 @@ is planned.")
"02nf2fg4xzh8lbbddvm44qyvcvfn5b7kzcyg729a58l29gd88pbs")))
(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-tpic2pdftex-bin")))
+ (copy-recursively (string-append source "/bin")
+ (string-append #$output "/bin"))))))))
+ (native-inputs (list texlive-tpic2pdftex-bin))
(home-page "https://ctan.org/pkg/tpic2pdftex")
(synopsis "Use @code{tpic} commands in pdfTeX")
(description