aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2024-05-28 00:05:17 +0200
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:45:24 +0200
commit309ca0e77291f8a3589ecd7fcc7d417778928ca1 (patch)
tree61e5b26c2f748230c3d6acb1f0dd57355cb93cfd /gnu/packages
parentaf95f69cbefa34a951302ab6ef7030b101fde100 (diff)
downloadguix-309ca0e77291f8a3589ecd7fcc7d417778928ca1.tar
guix-309ca0e77291f8a3589ecd7fcc7d417778928ca1.tar.gz
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
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/tex.scm68
1 files changed, 65 insertions, 3 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index b8a70a3f1e..1b7bfe5d22 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -42659,9 +42659,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
@@ -42675,6 +42673,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")