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

commit 4ae755fab25002d705aa495be350b921c39e1252
Author: Nicolas Goaziou <m...@nicolasgoaziou.fr>
AuthorDate: Sat May 11 13:11:16 2024 +0200

    gnu: texlive-lcdftypetools: Build executables.
    
    * gnu/packages/tex.scm (texlive-lcdftypetools): Inherit from TEXLIVE-BIN.
    [source]: Build from a trimmed TEXLIVE-SOURCE.
    [arguments]: Build `lcdf-typetools' as a single package.
    
    * gnu/packages/tex.scm (texlive-bin): Do not build lcdf-typetools.
    
    Change-Id: Ifc19df9e24a5eb07f5b9f26d77072fab3a78b21c
---
 gnu/packages/tex.scm | 68 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 39 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 6949fe2a47..b83dab5f48 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -705,6 +705,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
                           "dvisvgm"
                           "kpathsea"
                           "lacheck"
+                          "lcdf-typetools"
                           "psutils"
                           "upmendex"
                           "xindy"))))
@@ -37583,36 +37584,45 @@ TeX.")
 
 (define-public texlive-lcdftypetools
   (package
+    (inherit texlive-bin)
     (name "texlive-lcdftypetools")
-    (version (number->string %texlive-revision))
-    (source (texlive-origin
-             name version
-             (list "doc/man/man1/cfftot1.1"
-                   "doc/man/man1/cfftot1.man1.pdf"
-                   "doc/man/man1/mmafm.1"
-                   "doc/man/man1/mmafm.man1.pdf"
-                   "doc/man/man1/mmpfb.1"
-                   "doc/man/man1/mmpfb.man1.pdf"
-                   "doc/man/man1/otfinfo.1"
-                   "doc/man/man1/otfinfo.man1.pdf"
-                   "doc/man/man1/otftotfm.1"
-                   "doc/man/man1/otftotfm.man1.pdf"
-                   "doc/man/man1/t1dotlessj.1"
-                   "doc/man/man1/t1dotlessj.man1.pdf"
-                   "doc/man/man1/t1lint.1"
-                   "doc/man/man1/t1lint.man1.pdf"
-                   "doc/man/man1/t1rawafm.1"
-                   "doc/man/man1/t1rawafm.man1.pdf"
-                   "doc/man/man1/t1reencode.1"
-                   "doc/man/man1/t1reencode.man1.pdf"
-                   "doc/man/man1/t1testpage.1"
-                   "doc/man/man1/t1testpage.man1.pdf"
-                   "doc/man/man1/ttftotype42.1"
-                   "doc/man/man1/ttftotype42.man1.pdf")
-             (base32
-              "0yjbc6rsf8c62qa1lyi9kjyjy2p0xlps19llnvly3xyhla08j76f")))
-    (outputs '("out" "doc"))
-    (build-system texlive-build-system)
+    (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" '("lcdf-typetools"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons* "--disable-all-pkgs"
+                 "--enable-lcdf-typetools"
+                 (delete "--disable-lcdf-typetools" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/lcdf-typetools"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "texk/lcdf-typetools"
+                  (invoke "make" "install"))))))))
+    (native-inputs (list pkg-config texlive-libkpathsea))
+    (inputs '())
     (propagated-inputs (list texlive-glyphlist))
     (home-page "https://ctan.org/pkg/lcdf-typetools";)
     (synopsis "Bundle of outline font manipulation tools")

Reply via email to