ngz pushed a commit to branch tex-team
in repository guix.

commit 7f4d5da19cf4aa8659d8f4f10865e0f0af995b50
Author: Nicolas Goaziou <m...@nicolasgoaziou.fr>
AuthorDate: Tue May 28 00:49:34 2024 +0200

    gnu: Add texlive-gsftopk-bin.
    
    * gnu/packages/tex.scm (texlive-gsftopk-bin): New variable.
    (texlive-gsftopk)[propagated-inputs]: Add TEXLIVE-GSFTOPK-BIN.
    
    Change-Id: I91c459392b4fb4b433b4abd47d09170e3927fefc
---
 gnu/packages/tex.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c89b0aab1d..d27ffac5cb 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -47721,6 +47721,7 @@ definition files for Greek text font encodings for use 
with @code{fontenc}.")
               "1qlac704qbm7kq762z0b887wfncprpcm8zj2lb4nag0wzdrrjdq5")))
     (outputs '("out" "doc"))
     (build-system texlive-build-system)
+    (propagated-inputs (list texlive-gsftopk-bin))
     (home-page "https://ctan.org/pkg/gsftopk";)
     (synopsis "Convert Ghostscript fonts to PK files")
     (description
@@ -47730,6 +47731,52 @@ much used nowadays, since both its target applications 
are now capable of
 dealing with Type 1 fonts, direct.")
     (license license:gpl3+)))
 
+(define-public texlive-gsftopk-bin
+  (package
+    (inherit texlive-bin)
+    (name "texlive-gsftopk-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" '("gsftopk"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons "--enable-gsftopk" (delete "--enable-web2c" #$flags)))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/gsftopk"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "texk/gsftopk"
+                  (invoke "make" "install"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list texlive-libkpathsea))
+    (propagated-inputs '())
+    (home-page (package-home-page texlive-gsftopk))
+    (synopsis "Binary for @code{texlive-gsftopk}")
+    (description
+     "This package provides the binary for @code{texlive-gsftopk}.")
+    (license (package-license texlive-gsftopk))))
+
 (define-public texlive-hycolor
   (package
     (name "texlive-hycolor")

Reply via email to