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

commit 126d6383276c5e259e1057e187c4c5cb1152883e
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Sun May 12 17:43:39 2024 +0200

    gnu: texlive-gsftopk: Build executables.
    
    * gnu/packages/tex.scm (texlive-gsftopk-bin): New variable.
    (texlive-gsftopk)[arguments]<#:phases>: Include executables.
    [native-inputs]: Add TEXLIVE-GSFTOPK-BIN.
    
    Change-Id: Ie3b16ec84558cda3a3851598ac99d9d4c6a09659
---
 gnu/packages/tex.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 644ef64cb6..f96be0c63a 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -47570,6 +47570,47 @@ documents.  It comprises the packages @code{color}, 
@code{graphics},
 definition files for Greek text font encodings for use with @code{fontenc}.")
     (license license:lppl1.3+)))
 
+(define 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* "--disable-all-pkgs"
+                 "--enable-gsftopk"
+                 (delete "--disable-gsftopk" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-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"))))))))
+    (inputs '())))
+
 (define-public texlive-gsftopk
   (package
     (name "texlive-gsftopk")
@@ -47583,6 +47624,16 @@ definition files for Greek text font encodings for use 
with @code{fontenc}.")
               "1qlac704qbm7kq762z0b887wfncprpcm8zj2lb4nag0wzdrrjdq5")))
     (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-gsftopk-bin")))
+                     (copy-recursively (string-append source "/bin")
+                                       (string-append #$output "/bin"))))))))
+    (native-inputs (list texlive-gsftopk-bin))
     (home-page "https://ctan.org/pkg/gsftopk";)
     (synopsis "Convert Ghostscript fonts to PK files")
     (description

Reply via email to