diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2024-05-11 17:01:21 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2024-05-18 16:25:08 +0200 |
commit | e5ae1639178c6d9b1884179ea57d6b7ab0b39a3a (patch) | |
tree | 9b4b7aa7cb51e13a968b50cfab470368f5ca361f | |
parent | 7c700843f5829fd676f41a1d0ed2dfc5c50425ed (diff) |
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
-rw-r--r-- | gnu/packages/tex.scm | 52 |
1 files 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 |