guix-commits
[Top][All Lists]
Advanced

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

33/53: gnu: texlive-xdvi: Build executables.


From: guix-commits
Subject: 33/53: gnu: texlive-xdvi: Build executables.
Date: Mon, 13 May 2024 04:50:11 -0400 (EDT)

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

commit e6162948a6479fd6cbc7edc6bafcfa0d4f69e234
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sun May 12 13:16:09 2024 +0200

    gnu: texlive-xdvi: Build executables.
    
    * gnu/packages/tex.scm (texlive-xdvi-bin): New variable.
    (texlive-xdvi)[arguments]<#:phases>: Include executables.
    [native-inputs]: Add TEXLIVE-XDVI-BIN.
    
    * gnu/packages/tex.scm (texlive-bin): Do not build "xdvik".
    
    Change-Id: I455730bb3029b5b990479cfc9e7d77348230b3d7
---
 gnu/packages/tex.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e312f4b9e0..f090fcd4a2 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -786,6 +786,7 @@ and should be preferred to it whenever a package would 
otherwise depend on
                           "tpic2pdftex"
                           "upmendex"
                           "vlna"
+                          "xdvik"
                           "xindy"
                           "xml2pmx"
                           "xpdfopen"))))
@@ -74552,6 +74553,48 @@ reporting the number of the last page, as does 
@code{lastpage}).  The counter
 itself may be shipped out to the DVI file.")
     (license license:lppl)))
 
+(define texlive-xdvi-bin
+  (package
+    (inherit texlive-bin)
+    (name "texlive-xdvi-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" '("xdvik"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons* "--disable-all-pkgs"
+                 "--enable-xdvik"
+                 (delete "--disable-xdvik" #$flags)))
+       ((#:phases _)
+        #~(modify-phases %standard-phases
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/xdvik"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                (mkdir-p (string-append #$output "/bin"))
+                (with-directory-excursion "texk/xdvik"
+                  (invoke "make" "install"))))))))
+    (inputs (list freetype ghostscript libxaw))))
+
 (define-public texlive-xdvi
   (package
     (name "texlive-xdvi")
@@ -74565,6 +74608,16 @@ itself may be shipped out to the DVI file.")
               "1iidl3876vyi9k2dyfwd73q5kb53kwckivfyvvxh953n4axbqmi4")))
     (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-xdvi-bin")))
+                     (copy-recursively (string-append source "/bin")
+                                       (string-append #$output "/bin"))))))))
+    (native-inputs (list texlive-xdvi-bin))
     (home-page "https://ctan.org/pkg/xdvi";)
     (synopsis "DVI previewer for the X Window System")
     (description



reply via email to

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