guix-commits
[Top][All Lists]
Advanced

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

45/55: gnu: texlive-dviout-util: Build executables.


From: guix-commits
Subject: 45/55: gnu: texlive-dviout-util: Build executables.
Date: Sat, 18 May 2024 10:33:39 -0400 (EDT)

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

commit eba279b321fe3380864c2e4bdef2881e789b012d
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun May 12 19:06:03 2024 +0200

    gnu: texlive-dviout-util: Build executables.
    
    * gnu/packages/tex.scm (texlive-dviout-util): Inherit from TEXLIVE-BIN.
    [source]: Build from a trimmed TEXLIVE-SOURCE.
    [arguments]: Build `dviout-util' as a single package.
    
    Change-Id: I2bd9c9ee0c159eb7fdda390307ebeb79878a5aca
---
 gnu/packages/tex.scm | 49 ++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b4bcce3b8e..b20edf8c02 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -34530,18 +34530,45 @@ file.  It also supports XeTeX XDV format.")
 
 (define-public texlive-dviout-util
   (package
+    (inherit texlive-bin)
     (name "texlive-dviout-util")
-    (version (number->string %texlive-revision))
-    (source (texlive-origin
-             name version
-             (list "doc/man/man1/chkdvifont.1"
-                   "doc/man/man1/chkdvifont.man1.pdf"
-                   "doc/man/man1/dvispc.1"
-                   "doc/man/man1/dvispc.man1.pdf")
-             (base32
-              "098pksgf2iamq96rmzg5fw7i9dlpvdksficsz1bf8k8z4djnbk8n")))
-    (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 keep)
+                   (with-directory-excursion root
+                     (for-each
+                      delete-file-recursively
+                      (scandir
+                       "."
+                       (lambda (file)
+                         (and (not (member file (append keep '("." ".."))))
+                              (eq? 'directory (stat:type (stat file)))))))))))
+            (delete-other-directories "libs" '())
+            (delete-other-directories "utils" '())
+            (delete-other-directories "texk" '("dviout-util" "tests"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons* "--disable-all-pkgs"
+                 "--enable-dviout-util"
+                 (delete "--disable-dviout-util" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/dviout-util"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "texk/dviout-util"
+                  (invoke "make" "install"))))))))
+    (inputs (list texlive-libptexenc))
     (home-page "https://www.tug.org/texlive/";)
     (synopsis "Utilities from the @code{dviout} package")
     (description



reply via email to

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