guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

37/53: gnu: texlive-ps2pk: Build executables.


From: guix-commits
Subject: 37/53: gnu: texlive-ps2pk: Build executables.
Date: Mon, 13 May 2024 10:02:26 -0400 (EDT)

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

commit d53d8107662ba49cfc39342187ca271d130fbdbd
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun May 12 15:21:19 2024 +0200

    gnu: texlive-ps2pk: Build executables.
    
    * gnu/packages/tex.scm (texlive-ps2pk): Inherit from TEXLIVE-BIN.
    [source]: Build from a trimmed TEXLIVE-SOURCE.
    [arguments]: Build `ps2pk' as a single package.
    
    Change-Id: I8ec9e6eb3a5fb194a533d89c4a1ab254d77a617e
---
 gnu/packages/tex.scm | 52 +++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 37 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index d105efc4ce..caab4b1974 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -42312,22 +42312,44 @@ produce bounding box values for Rawppm or Rawpbm 
format files.")
 
 (define-public texlive-ps2pk
   (package
+    (inherit texlive-bin)
     (name "texlive-ps2pk")
-    (version (number->string %texlive-revision))
-    (source (texlive-origin
-             name version
-             (list "doc/man/man1/mag.1"
-                   "doc/man/man1/mag.man1.pdf"
-                   "doc/man/man1/pfb2pfa.1"
-                   "doc/man/man1/pfb2pfa.man1.pdf"
-                   "doc/man/man1/pk2bm.1"
-                   "doc/man/man1/pk2bm.man1.pdf"
-                   "doc/man/man1/ps2pk.1"
-                   "doc/man/man1/ps2pk.man1.pdf")
-             (base32
-              "14xq9x5rf15ibzr41cm5rm4v3rpmj50rfsqp4zzvyhmpmyw4dsx3")))
-    (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" '("ps2pk"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons* "--disable-all-pkgs"
+                 "--enable-ps2pk"
+                 (delete "--disable-ps2pk" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/ps2pk"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "texk/ps2pk"
+                  (invoke "make" "install"))))))))
+    (inputs '())
     (home-page "https://ctan.org/pkg/ps2pk";)
     (synopsis "Generate a PK font from an Adobe Type 1 font")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]