guix-commits
[Top][All Lists]
Advanced

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

34/69: gnu: Add texlive-psutils-bin.


From: guix-commits
Subject: 34/69: gnu: Add texlive-psutils-bin.
Date: Fri, 31 May 2024 19:04:47 -0400 (EDT)

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

commit c59a2fef2800841d3c5b023eba0def8707136cbb
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Tue May 28 00:05:17 2024 +0200

    gnu: Add texlive-psutils-bin.
    
    * gnu/packages/tex.scm (texlive-psutils-bin): New variable.
    (texlive-psutils)[arguments]<#:link-scripts>: Remove as those are now 
provided
    by TEXLIVE-PSUTILS-BIN.
    [inputs]: Remove PERL.
    [propagated-inputs]: Add TEXLIVE-PSUTILS-BIN.
    
    Change-Id: I9435ed4216237893e503487f94c42ad9cc8c268f
---
 gnu/packages/tex.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 65 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index d3fa7d4400..db9e9c0801 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -42639,9 +42639,7 @@ documents generated that use Type 1 fonts.")
               "0ba514lz3pc03ll0kb9apdx62mi2yiyd7bnargkp2bbf62dq79cc")))
     (outputs '("out" "doc"))
     (build-system texlive-build-system)
-    (arguments
-     (list #:link-scripts #~(list "extractres.pl" "includeres.pl" 
"psjoin.pl")))
-    (inputs (list perl))
+    (propagated-inputs (list texlive-psutils-bin))
     (home-page "https://ctan.org/pkg/psutils";)
     (synopsis "PostScript utilities")
     (description
@@ -42655,6 +42653,70 @@ printing.  Utilities include @command{psbook}, 
@command{psselect},
            (license:fsf-free
             
"https://tug.org/svn/texlive/trunk/Build/source/texk/psutils/psutils-src/LICENSE?revision=57915&view=markup";)))))
 
+(define-public texlive-psutils-bin
+  (package
+    (inherit texlive-bin)
+    (name "texlive-psutils-bin")
+    (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" '("psutils"))))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texlive-bin)
+       ((#:configure-flags flags)
+        #~(cons "--enable-psutils" (delete "--enable-web2c" #$flags)))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'patch-psutils-tests
+              (lambda _
+                ;; This test fails due to a rounding difference with libpaper
+                ;; 1.2: <https://github.com/rrthomas/libpaper/issues/23>.
+                ;;
+                ;; Adjust the expected outcome to account for the minute
+                ;; difference.
+                (substitute* "texk/psutils/tests/playres.ps"
+                  (("844\\.647799") "844.647797"))
+                ;; Test suite also fails because it expects to find
+                ;; "texmf.cnf" in "../kpathsea/" directory, but we removed it
+                ;; in a snippet.  Point to the real "texmf.cnf".
+                (let ((kpathsea #$(this-package-input "texlive-libkpathsea")))
+                  (substitute* "texk/psutils/psutils.test"
+                    (("(TEXMFCNF=).+?;" _ var)
+                     (string-append var
+                                    kpathsea
+                                    "/share/texmf-dist/web2c;"))))))
+            (replace 'check
+              (lambda* (#:key tests? #:allow-other-keys)
+                (when tests?
+                  (with-directory-excursion "texk/psutils"
+                    (invoke "make" "check")))))
+            (replace 'install
+              (lambda _
+                (with-directory-excursion "texk/psutils"
+                  (invoke "make" "install"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list libpaper perl texlive-libkpathsea))
+    (propagated-inputs '())
+    (synopsis "Binaries for @code{texlive-psutils}")
+    (description
+     "This package provides the binaries for @code{texlive-psutils}.")
+    (license (package-license texlive-psutils))))
+
 (define-public texlive-ptolemaicastronomy
   (package
     (name "texlive-ptolemaicastronomy")



reply via email to

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