ngz pushed a commit to branch tex-team
in repository guix.
commit e5ae1639178c6d9b1884179ea57d6b7ab0b39a3a
Author: Nicolas Goaziou <[email protected]>
AuthorDate: Sat May 11 17:01:21 2024 +0200
gnu: texlive-xpdfopen: Build executables.
* gnu/packages/tex.scm (texlive-xpdfopen): Inherit from TEXLIVE-BIN.
[source]: Build from a trimmed TEXLIVE-SOURCE.
[arguments]: Build `xpdfopen' as a single package.
[native-inputs]: Add PKG-CONFIG.
[inputs]: Add LIBXT.
* gnu/packages/tex.scm (texlive-bin): Do not build xpdfopen.
Change-Id: Iffcdbec4cd1ed720b9557acabe9276fb7e95e90b
---
gnu/packages/tex.scm | 52 ++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 40 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index c6dae667f0..f044a867fa 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -778,7 +778,8 @@ and should be preferred to it whenever a package would
otherwise depend on
"psutils"
"t1utils"
"upmendex"
- "xindy"))))
+ "xindy"
+ "xpdfopen"))))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'locate-external-kpathsea
@@ -45820,18 +45821,45 @@ integer (given as a string) as a Cistercian numeral.")
(define-public texlive-xpdfopen
(package
+ (inherit texlive-bin)
(name "texlive-xpdfopen")
- (version (number->string %texlive-revision))
- (source (texlive-origin
- name version
- (list "doc/man/man1/pdfclose.1"
- "doc/man/man1/pdfclose.man1.pdf"
- "doc/man/man1/pdfopen.1"
- "doc/man/man1/pdfopen.man1.pdf")
- (base32
- "130wvaypfrg9sav0pdcdy1g10fll8pqcsqsy70fxlzzr937glsh1")))
- (outputs '("out" "doc"))
- (build-system texlive-build-system)
+ (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" '("xpdfopen"))
+ (delete-other-directories "texk" '())))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments texlive-bin)
+ ((#:configure-flags flags)
+ #~(cons* "--disable-all-pkgs"
+ "--enable-xpdfopen"
+ (delete "--disable-xpdfopen" #$flags)))
+ ((#:phases _)
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "utils/xpdfopen"
+ (invoke "make" "check")))))
+ (replace 'install
+ (lambda _
+ (with-directory-excursion "utils/xpdfopen"
+ (invoke "make" "install"))))))))
+ (native-inputs (list pkg-config))
+ (inputs (list libxt))
(home-page "https://ctan.org/pkg/xpdfopen")
(synopsis "Commands to control PDF readers, under X11")
(description