[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/53: gnu: texlive-psutils: Build executables.
From: |
guix-commits |
Subject: |
03/53: gnu: texlive-psutils: Build executables. |
Date: |
Mon, 13 May 2024 04:49:55 -0400 (EDT) |
ngz pushed a commit to branch tex-team
in repository guix.
commit 1f5e983b2e4bc1cc5b37b1bea8c1c68a72321114
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Wed May 8 16:55:25 2024 +0200
gnu: texlive-psutils: Build executables.
* gnu/packages/tex.scm (texlive-psutils-bin): New variable.
(texlive-psutils)[arguments]<#:phases>: Include executables.
[native-inputs]: Add TEXLIVE-PSUTILS-BIN.
* gnu/packages/tex.scm (texlive-bin): Do not build psutils.
Change-Id: Ifa61a088a5b0fd846b91478bab03037d152bea7d
---
gnu/packages/tex.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 295a4099c2..b529e2ec4f 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -41795,6 +41795,69 @@ produce bounding box values for Rawppm or Rawpbm
format files.")
documents generated that use Type 1 fonts.")
(license license:isc)))
+(define 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* "--disable-all-pkgs"
+ "--enable-psutils"
+ "--with-system-libpaper"
+ (delete "--disable-psutils" #$flags)))
+ ((#: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;"))))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "texk/psutils"
+ (invoke "make" "check")))))
+ (replace 'install
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (with-directory-excursion "texk/psutils"
+ (invoke "make" "install"))))))))
+ (native-inputs (list libpaper pkg-config texlive-libkpathsea))
+ (inputs '())))
+
(define-public texlive-psutils
(package
(name "texlive-psutils")
@@ -41829,7 +41892,21 @@ documents generated that use Type 1 fonts.")
(outputs '("out" "doc"))
(build-system texlive-build-system)
(arguments
- (list #:link-scripts #~(list "extractres.pl" "includeres.pl"
"psjoin.pl")))
+ (list
+ #:link-scripts #~(list "extractres.pl" "includeres.pl" "psjoin.pl")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'link-scripts 'install-bin
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let ((source #$(this-package-native-input
"texlive-psutils-bin")))
+ (with-directory-excursion (string-append #$output "/bin")
+ ;; Install non-scripts, already taken care of with
+ ;; `link-scripts' phase.
+ (for-each (lambda (f) (install-file f "."))
+ (find-files (string-append source "/bin")
+ (lambda (_ s)
+ (eq? 'regular (stat:type
s))))))))))))
+ (native-inputs (list texlive-psutils-bin))
(inputs (list perl))
(home-page "https://ctan.org/pkg/psutils")
(synopsis "PostScript utilities")
- branch tex-team created (now b8f3014d9c), guix-commits, 2024/05/13
- 01/53: gnu: texlive-libkpathsea: Fix TEXMFCACHE location., guix-commits, 2024/05/13
- 06/53: gnu: texlive-bin: Remove conditional tests on some architectures., guix-commits, 2024/05/13
- 02/53: gnu: texlive-chktex: Fix runtime error., guix-commits, 2024/05/13
- 05/53: gnu: texlive-bin: Remove unnecessary phases., guix-commits, 2024/05/13
- 03/53: gnu: texlive-psutils: Build executables.,
guix-commits <=
- 09/53: gnu: texlive-upmendex: Build executable., guix-commits, 2024/05/13
- 07/53: gnu: texlive-libkpathsea: Set sane values in "texmf.cnf"., guix-commits, 2024/05/13
- 10/53: gnu: texlive-xindy: Refactor package., guix-commits, 2024/05/13
- 11/53: gnu: texlive-bin: Do not build Xindy., guix-commits, 2024/05/13
- 15/53: gnu: texlive-lcdftypetools: Build executables., guix-commits, 2024/05/13
- 17/53: gnu: texlive-dvipng: Build executables., guix-commits, 2024/05/13
- 04/53: gnu: texlive-bin, texlive-kpathsea: Refer to TEXLIVE-SOURCE., guix-commits, 2024/05/13
- 08/53: gnu: texlive-dvisvgm: Build executables., guix-commits, 2024/05/13
- 13/53: gnu: texlive-cjkutils: Build executables., guix-commits, 2024/05/13
- 14/53: gnu: texlive-lacheck: Build executable., guix-commits, 2024/05/13