[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: gnu: texlive-psutils: Build binary from TeX Live source
From: |
guix-commits |
Subject: |
03/07: gnu: texlive-psutils: Build binary from TeX Live source |
Date: |
Wed, 8 May 2024 13:22:13 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit 71657f2dcd55b1a65f89dd9314044005d685de07
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Wed May 8 16:55:25 2024 +0200
gnu: texlive-psutils: Build binary from TeX Live source
* gnu/packages/tex.scm (texlive-psutils): Use TEXLIVE-SOURCE to build
binary.
[outputs]: Only provide "out".
[arguments]<#:phases>: Fix tests.
[native-inputs]: Add LIBPAPER PKG-CONFIG and TEXLIVE-LIBKPATHSEA.
Change-Id: If6e71586bef3d60b105c2bdf3a7719313ba38b82
---
gnu/packages/tex.scm | 84 +++++++++++++++++++++++++++++++++-------------------
1 file changed, 54 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 67c3ecdbdb..ca89a8ce2e 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -41801,37 +41801,61 @@ documents generated that use Type 1 fonts.")
(package
(name "texlive-psutils")
(version (number->string %texlive-revision))
- (source (texlive-origin
- name version
- (list "doc/man/man1/epsffit.1"
- "doc/man/man1/epsffit.man1.pdf"
- "doc/man/man1/extractres.1"
- "doc/man/man1/extractres.man1.pdf"
- "doc/man/man1/includeres.1"
- "doc/man/man1/includeres.man1.pdf"
- "doc/man/man1/psbook.1"
- "doc/man/man1/psbook.man1.pdf"
- "doc/man/man1/psjoin.1"
- "doc/man/man1/psjoin.man1.pdf"
- "doc/man/man1/psnup.1"
- "doc/man/man1/psnup.man1.pdf"
- "doc/man/man1/psresize.1"
- "doc/man/man1/psresize.man1.pdf"
- "doc/man/man1/psselect.1"
- "doc/man/man1/psselect.man1.pdf"
- "doc/man/man1/pstops.1"
- "doc/man/man1/pstops.man1.pdf"
- "doc/man/man1/psutils.1"
- "doc/man/man1/psutils.man1.pdf"
- "dvips/getafm/"
- "psutils/"
- "scripts/psutils/")
- (base32
- "0ba514lz3pc03ll0kb9apdx62mi2yiyd7bnargkp2bbf62dq79cc")))
- (outputs '("out" "doc"))
- (build-system texlive-build-system)
+ (source
+ (origin
+ (inherit texlive-source)
+ (modules '((guix build utils)
+ (ice-9 ftw)))
+ (snippet
+ #~(begin
+ (with-directory-excursion "libs"
+ (for-each
+ delete-file-recursively
+ (scandir "."
+ (lambda (file)
+ (and (not (member file '("." "..")))
+ (eq? 'directory (stat:type (stat file))))))))
+ (with-directory-excursion "texk"
+ (let ((preserved-directories '("." ".." "psutils")))
+ (for-each
+ delete-file-recursively
+ (scandir "."
+ (lambda (file)
+ (and (not (member file preserved-directories))
+ (eq? 'directory
+ (stat:type (stat file)))))))))))))
+ (build-system gnu-build-system)
(arguments
- (list #:link-scripts #~(list "extractres.pl" "includeres.pl"
"psjoin.pl")))
+ (list
+ #:out-of-source? #true
+ #:configure-flags
+ #~(list "--disable-native-texlive-build"
+ "--disable-all-pkgs"
+ "--enable-psutils"
+ "--with-system-libpaper")
+ #:phases
+ #~(modify-phases %standard-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-native-input "texlive-libkpathsea")))
+ (substitute* "texk/psutils/psutils.test"
+ (("(TEXMFCNF=).+?;" _ var)
+ (string-append var
+ kpathsea
+ "/share/texmf-dist/web2c;")))))))))
+ (native-inputs (list libpaper pkg-config texlive-libkpathsea))
(inputs (list perl))
(home-page "https://ctan.org/pkg/psutils")
(synopsis "PostScript utilities")
- branch tex-team created (now c8f03f1fb4), guix-commits, 2024/05/08
- 01/07: gnu: texlive-libkpathsea: Fix TEXMFCACHE location., guix-commits, 2024/05/08
- 02/07: gnu: texlive-chktex: Fix runtime error., guix-commits, 2024/05/08
- 04/07: gnu: texlive-bin, texlive-kpathsea: Refer to TEXLIVE-SOURCE., guix-commits, 2024/05/08
- 05/07: gnu: texlive-bin: Remove unnecessary phases., guix-commits, 2024/05/08
- 07/07: gnu: Updated commentary in "tex.scm"., guix-commits, 2024/05/08
- 06/07: gnu: texlive-bin: Remove conditional tests on some architectures., guix-commits, 2024/05/08
- 03/07: gnu: texlive-psutils: Build binary from TeX Live source,
guix-commits <=