diff options
Diffstat (limited to 'gnu/packages/xml.scm')
-rw-r--r-- | gnu/packages/xml.scm | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 8a4d2fbb5b..59b73d2aa5 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix build-system python) #:use-module (gnu packages linux)) (define-public expat @@ -57,22 +59,19 @@ things the parser might find in the XML document (like start tags).") (define-public libxml2 (package (name "libxml2") - (version "2.9.0") + (version "2.9.2") (source (origin (method url-fetch) (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-" version ".tar.gz")) (sha256 (base32 - "10ib8bpar2pl68aqksfinvfmqknwnk7i35ibq6yjl8dpb0cxj9dd")))) + "1g6mf03xcabmk5ing1lwqmasr803616gb2xhn7pll10x2l5w6y2i")))) (build-system gnu-build-system) (home-page "http://www.xmlsoft.org/") (synopsis "C parser for XML") (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'. - (native-inputs `(("perl" ,perl) - ("python" ,python-2))) ; incompatible with Python 3 (print syntax) - - + (native-inputs `(("perl" ,perl))) ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml' ;; sub-directory of any given package. (native-search-paths (list (search-path-specification @@ -82,29 +81,40 @@ things the parser might find in the XML document (like start tags).") (file-pattern "^catalog\\.xml$") (file-type 'regular)))) (search-paths native-search-paths) - - (arguments - `(#:phases - (alist-replace - 'install - (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) - (let ((install (assoc-ref %standard-phases 'install)) - (glibc (assoc-ref inputs ,(if (%current-target-system) - "cross-libc" "libc"))) - (out (assoc-ref outputs "out"))) - (apply install args) - (chdir "python") - (substitute* "setup.py" - (("/opt/include") - (string-append glibc "/include"))) - (system* "python" "setup.py" "install" - (string-append "--prefix=" out)))) - %standard-phases))) (description "Libxml2 is the XML C parser and toolkit developed for the Gnome project (but it is usable outside of the Gnome platform).") (license license:x11))) +(define-public python-libxml2 + (package (inherit libxml2) + (name "python-libxml2") + (build-system python-build-system) + (arguments + `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before + 'build 'configure + (lambda* (#:key inputs #:allow-other-keys) + (chdir "python") + (let ((glibc (assoc-ref inputs ,(if (%current-target-system) + "cross-libc" "libc"))) + (libxml2 (assoc-ref inputs "libxml2"))) + (substitute* "setup.py" + ;; For 'libxml2/libxml/tree.h'. + (("ROOT = r'/usr'") + (format #f "ROOT = r'~a'" libxml2)) + ;; For 'iconv.h'. + (("/opt/include") + (string-append glibc "/include"))))))))) + (inputs `(("libxml2" ,libxml2))) + (synopsis "Python bindings for the libxml2 library"))) + +(define-public python2-libxml2 + (package-with-python2 python-libxml2)) + (define-public libxslt (package (name "libxslt") |