gnu: gnupg: Upgrade support libraries.
[jackhill/guix/guix.git] / gnu / packages / xml.scm
index 642caf0..6edff47 100644 (file)
 
 (define-module (gnu packages xml)
   #:use-module (gnu packages)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages gnupg)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module ((guix licenses)
                 #:renamer (symbol-prefix-proc 'license:))
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl))
 
 (define-public expat
   (package
@@ -62,8 +65,76 @@ things the parser might find in the XML document (like start tags).")
     (home-page "http://www.xmlsoft.org/")
     (synopsis "libxml2, a C parser for XML")
     (inputs `(("perl" ,perl)
-              ("python" ,python)))
+              ("python" ,python)
+              ("zlib" ,zlib)))
+    (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 "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 libxslt
+  (package
+    (name "libxslt")
+    (version "1.1.28")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))))
+    (build-system gnu-build-system)
+    (home-page "http://xmlsoft.org/XSLT/index.html")
+    (synopsis "libxslt, a C library for applying XSLT stylesheets to XML documents")
+    (inputs `(("libgcrypt" ,libgcrypt)
+              ("libxml2" ,libxml2)
+              ("python" ,python)
+              ("zlib" ,zlib)))
+    (description
+     "Libxslt is an XSLT C library developed for the GNOME project. It is
+based on libxml for XML parsing, tree manipulation and XPath support.")
+    (license license:x11)))
+
+(define-public perl-xml-parser
+  (package
+    (name "perl-xml-parser")
+    (version "2.41")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
+                   version ".tar.gz"))
+             (sha256
+              (base32
+               "1sadi505g5qmxr36lgcbrcrqh3a5gcdg32b405gnr8k54b6rg0dl"))))
+    (build-system perl-build-system)
+    (arguments `(#:make-maker-flags
+                 (let ((expat (assoc-ref %build-inputs "expat")))
+                   (list (string-append "EXPATLIBPATH=" expat "/lib")
+                         (string-append "EXPATINCPATH=" expat "/include")))))
+    (inputs `(("expat" ,expat)))
+    (license (package-license perl))
+    (synopsis "Perl bindings to the Expat XML parsing library")
+    (description
+     "This module provides ways to parse XML documents.  It is built on top of
+XML::Parser::Expat, which is a lower level interface to James Clark's expat
+library.  Each call to one of the parsing methods creates a new instance of
+XML::Parser::Expat which is then used to parse the document.  Expat options
+may be provided when the XML::Parser object is created.  These options are
+then passed on to the Expat object on each parse call.  They can also be given
+as extra arguments to the parse methods, in which case they override options
+given at XML::Parser creation time.")
+    (home-page "http://search.cpan.org/~toddr/XML-Parser-2.41/Parser.pm")))