X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/3cc0342b45406f97d675266cc9ac7877be855122..15871b40872b9534a9dc3af9fda163601a360a51:/gnu/packages/docbook.scm diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index d0895772f7..1e5379b020 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Ludovic Courtès ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,8 +32,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system trivial) - #:use-module (guix build-system python) - #:autoload (gnu packages zip) (unzip)) + #:use-module (guix build-system python)) (define-public docbook-xml (package @@ -58,11 +58,12 @@ (dtd (string-append out "/xml/dtd/docbook"))) (mkdir-p dtd) (with-directory-excursion dtd - (system* unzip source)) + (invoke unzip source)) (substitute* (string-append out "/xml/dtd/docbook/catalog.xml") (("uri=\"") (string-append - "uri=\"file://" dtd "/"))))) + "uri=\"file://" dtd "/"))) + #t)) #:modules ((guix build utils)))) (native-inputs `(("unzip" ,unzip))) (home-page "http://docbook.org") @@ -127,31 +128,38 @@ by no means limited to these applications.) This package provides XML DTDs.") (dtd (string-append (assoc-ref %outputs "out") "/xml/dtd/docbook"))) (mkdir-p dtd) - (zero? (system* unzip source "-d" dtd)))))))) + (invoke unzip source "-d" dtd))))))) (define-public docbook-xsl (package (name "docbook-xsl") - (version "1.78.1") + (version "1.79.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/docbook/docbook-xsl/" version "/docbook-xsl-" version ".tar.bz2")) + (patches (search-patches "docbook-xsl-nonrecursive-string-subst.patch")) (sha256 (base32 - "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9")))) + "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj")) + (modules '((guix build utils))) + (snippet + '(begin + (for-each delete-file (find-files "." "\\.jar$")) + #t)))) (build-system trivial-build-system) (arguments `(#:builder (let ((name-version (string-append ,name "-" ,version))) (use-modules (guix build utils)) (let* ((bzip2 (assoc-ref %build-inputs "bzip2")) + (xz (assoc-ref %build-inputs "xz")) (tar (assoc-ref %build-inputs "tar")) (source (assoc-ref %build-inputs "source")) (out (assoc-ref %outputs "out")) (xsl (string-append out "/xml/xsl"))) - (setenv "PATH" (string-append bzip2 "/bin")) - (system* (string-append tar "/bin/tar") "xvf" source) + (setenv "PATH" (string-append bzip2 "/bin" ":" xz "/bin")) + (invoke (string-append tar "/bin/tar") "xvf" source) (mkdir-p xsl) (copy-recursively name-version @@ -160,9 +168,11 @@ by no means limited to these applications.) This package provides XML DTDs.") (substitute* (string-append xsl "/" name-version "/catalog.xml") (("rewritePrefix=\"./") (string-append "rewritePrefix=\"file://" xsl "/" - name-version "/"))))) - #:modules ((guix build utils)))) + name-version "/"))) + #t)) + #:modules ((guix build utils)))) (native-inputs `(("bzip2" ,bzip2) + ("xz" ,xz) ;needed for repacked tarballs ("tar" ,tar))) (home-page "http://docbook.org") (synopsis "DocBook XSL style sheets for document authoring") @@ -173,7 +183,7 @@ by no means limited to these applications.) This package provides XML DTDs.") (define-public dblatex (package (name "dblatex") - (version "0.3.5") + (version "0.3.10") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/dblatex/dblatex/" @@ -181,37 +191,70 @@ by no means limited to these applications.) This package provides XML DTDs.") version ".tar.bz2")) (sha256 (base32 - "0h3472n33pabrn8qwggsahkrjx8lybpwlc3zprby3w3w3x5i830f")))) + "1yicd861rqz78i2khl35j7nvc0ccv4jx4hzqrbhll17082vrdmkg")))) (build-system python-build-system) ;; TODO: Add xfig/transfig for fig2dev utility (inputs - `(("texlive" ,texlive) + `(("texlive" ,(texlive-union (list texlive-latex-amsfonts + texlive-latex-anysize + texlive-latex-appendix + texlive-latex-changebar + texlive-latex-colortbl + texlive-latex-eepic + texlive-latex-eso-pic + texlive-latex-fancybox + texlive-latex-fancyhdr + texlive-latex-fancyvrb + texlive-latex-float + texlive-latex-footmisc + texlive-latex-hyperref + texlive-latex-jknapltx + texlive-latex-listings + texlive-latex-multirow + texlive-latex-oberdiek + texlive-latex-overpic + texlive-latex-pdfpages + texlive-latex-subfigure + texlive-latex-titlesec + texlive-latex-url + texlive-latex-wasysym + + texlive-fonts-amsfonts + texlive-fonts-ec + texlive-fonts-rsfs + texlive-fonts-stmaryrd + + texlive-generic-ifxetex))) ("imagemagick" ,imagemagick) ;for convert ("inkscape" ,inkscape) ;for svg conversion ("docbook" ,docbook-xml) ("libxslt" ,libxslt))) ;for xsltproc (arguments `(#:python ,python-2 ;'print' syntax - ;; XXX: Disable usage of setuptools, even though it is supported. - ;; This causes an invalid "package_base" in out/bin/.dblatex-real - ;; due to a missing leading '/'. See this thread for details: + ;; Using setuptools causes an invalid "package_base" path in + ;; out/bin/.dblatex-real due to a missing leading '/'. This is caused + ;; by dblatex's setup.py stripping the root path when creating the + ;; script. (dblatex's setup.py still uses distutils and thus has to + ;; create the script by itself. The feature for creating scripts is one + ;; of setuptools' features.) + ;; See this thread for details: ;; https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00030.html #:use-setuptools? #f #:tests? #f ;no 'test' command #:phases - (alist-cons-after - 'wrap 'set-path - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; dblatex executes helper programs at runtime. - (wrap-program (string-append out "/bin/dblatex") - `("PATH" ":" prefix - ,(map (lambda (input) - (string-append (assoc-ref inputs input) - "/bin")) - '("libxslt" "texlive" - "imagemagick" "inkscape")))))) - %standard-phases))) + (modify-phases %standard-phases + (add-after 'wrap 'set-path + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; dblatex executes helper programs at runtime. + (wrap-program (string-append out "/bin/dblatex") + `("PATH" ":" prefix + ,(map (lambda (input) + (string-append (assoc-ref inputs input) + "/bin")) + '("libxslt" "texlive" + "imagemagick" "inkscape")))) + #t)))))) (home-page "http://dblatex.sourceforge.net") (synopsis "DocBook to LaTeX Publishing") (description