gnu: Add perl-xml-libxslt.
[jackhill/guix/guix.git] / gnu / packages / xml.scm
index 5ef27d0..80534d6 100644 (file)
@@ -4,10 +4,16 @@
 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015, 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
+;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 (define-public expat
   (package
     (name "expat")
-    (replacement expat/fixed)
-    (version "2.1.0")
+    (version "2.2.0")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/expat/expat/"
-                                 version "/expat-" version ".tar.gz"))
+                                 version "/expat-" version ".tar.bz2"))
+             (patches
+               (search-patches "expat-CVE-2016-0718-fix-regression.patch"))
              (sha256
               (base32
-               "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2"))
-             (patches (search-patches "expat-CVE-2015-1283.patch"))))
+               "1zq4lnwjlw8s9mmachwfvfjf2x3lk24jm41746ykhdcvs7r0zrfr"))))
     (build-system gnu-build-system)
     (home-page "http://www.libexpat.org/")
     (synopsis "Stream-oriented XML parser library written in C")
@@ -65,28 +71,17 @@ stream-oriented parser in which an application registers handlers for
 things the parser might find in the XML document (like start tags).")
     (license license:expat)))
 
-(define expat/fixed
-  (package
-    (inherit expat)
-    (source (origin
-              (inherit (package-source expat))
-              (patches (search-patches "expat-CVE-2012-6702-and-CVE-2016-5300.patch"
-                                       "expat-CVE-2015-1283.patch"
-                                       "expat-CVE-2015-1283-refix.patch"
-                                       "expat-CVE-2016-0718.patch"))))))
-
 (define-public libxml2
   (package
     (name "libxml2")
-    (version "2.9.3")
-    (replacement libxml2/fixed)                   ;multiple CVEs
+    (version "2.9.4")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "0bd17g6znn2r98gzpjppsqjg33iraky4px923j3k8kdl8qgy7sad"))))
+               "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz"))))
     (build-system gnu-build-system)
     (home-page "http://www.xmlsoft.org/")
     (synopsis "C parser for XML")
@@ -106,20 +101,6 @@ things the parser might find in the XML document (like start tags).")
 project (but it is usable outside of the Gnome platform).")
     (license license:x11)))
 
-(define libxml2/fixed
-  (package
-    (inherit libxml2)
-    (source
-     (let ((name "libxml2")
-           (version "2.9.4"))
-       (origin
-         (method url-fetch)
-         (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
-                             version ".tar.gz"))
-         (sha256
-          (base32
-           "0g336cr0bw6dax1q48bblphmchgihx9p1pjmxdnrd6sh3qci3fgz")))))))
-
 (define-public python-libxml2
   (package (inherit libxml2)
     (name "python-libxml2")
@@ -153,15 +134,16 @@ project (but it is usable outside of the Gnome platform).")
 (define-public libxslt
   (package
     (name "libxslt")
-    (version "1.1.28")
+    (replacement libxslt/fixed)
+    (version "1.1.29")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "13029baw9kkyjgr7q3jccw2mz38amq7mmpr5p3bh775qawd1bisz"))
-             (patches (search-patches "libxslt-CVE-2015-7995.patch"))))
+               "1klh81xbm9ppzgqk339097i39b7fnpmlj8lzn8bpczl3aww6x5xm"))
+             (patches (search-patches "libxslt-generated-ids.patch"))))
     (build-system gnu-build-system)
     (home-page "http://xmlsoft.org/XSLT/index.html")
     (synopsis "C library for applying XSLT stylesheets to XML documents")
@@ -174,6 +156,78 @@ project (but it is usable outside of the Gnome platform).")
 based on libxml for XML parsing, tree manipulation and XPath support.")
     (license license:x11)))
 
+(define libxslt/fixed
+  (package
+    (inherit libxslt)
+    (name "libxslt")
+    (source (origin
+              (inherit (package-source libxslt))
+              (patches (search-patches "libxslt-CVE-2016-4738.patch"))))))
+
+(define-public perl-graph-readwrite
+  (package
+    (name "perl-graph-readwrite")
+    (version "2.08")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1wjni212nfz9irp19nx9if1lj3w9cybpdbzhii4g8macpryjj7ci"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-graph" ,perl-graph)
+       ("perl-parse-yapp" ,perl-parse-yapp)
+       ("perl-xml-parser" ,perl-xml-parser)
+       ("perl-xml-writer" ,perl-xml-writer)))
+    (home-page "http://search.cpan.org/dist/Graph-ReadWrite")
+    (synopsis "Modules for reading and writing directed graphs")
+    (description "This is a collection of perl classes for reading and writing
+directed graphs in a variety of file formats.  The graphs are represented in
+Perl using Jarkko Hietaniemi's @code{Graph} classes.
+
+There are two base classes. @code{Graph::Reader} is the base class for classes
+which read a graph file and create an instance of the Graph class.
+@code{Graph::Writer} is the base class for classes which take an instance of
+the @code{Graph} class and write it out in a specific file format.")
+    (license (package-license perl))))
+
+(define-public perl-xml-atom
+  (package
+    (name "perl-xml-atom")
+    (version "0.41")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
+                                  "XML-Atom-" version ".tar.gz"))
+              (sha256
+               (base32
+                "17lnkb9ymrhk2z642bhj5i2bv3q1da3kpp2lvsl0yhqshk3wdjj8"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-datetime" ,perl-datetime)
+       ;; TODO package: perl-datetime-format-atom
+       ("perl-xml-xpath" ,perl-xml-xpath)))
+    (inputs
+     `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
+       ("perl-datetime" ,perl-datetime)
+       ("perl-datetime-timezone" ,perl-datetime-timezone)
+       ("perl-digest-sha1" ,perl-digest-sha1)
+       ("perl-libwww" ,perl-libwww)
+       ("perl-uri" ,perl-uri)
+       ("perl-xml-libxml" ,perl-xml-libxml)
+       ("perl-xml-xpath" ,perl-xml-xpath)))
+    (home-page "http://search.cpan.org/dist/XML-Atom")
+    (synopsis "Atom feed and API implementation")
+    (description
+     "Atom is a syndication, API, and archiving format for weblogs and other data.
+@code{XML::Atom} implements the feed format as well as a client for the API.")
+    (license (package-license perl))))
+
 (define-public perl-xml-parser
   (package
     (name "perl-xml-parser")
@@ -230,7 +284,7 @@ module.")
 (define-public perl-xml-libxml
   (package
     (name "perl-xml-libxml")
-    (version "2.0118")
+    (version "2.0128")
     (source
      (origin
        (method url-fetch)
@@ -238,7 +292,7 @@ module.")
                            "XML-LibXML-" version ".tar.gz"))
        (sha256
         (base32
-         "170c8dbk4p6jw9is0cria73021yp3hpmhb19p9j0zg2yxwkawr6c"))))
+         "0awgd2gjzy7kn38bqblsigikzl81xsi561phkz9f9b9v3x2vmrr6"))))
     (build-system perl-build-system)
     (propagated-inputs
      `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
@@ -248,7 +302,7 @@ module.")
     (home-page "http://search.cpan.org/dist/XML-LibXML")
     (synopsis "Perl interface to libxml2")
     (description "This module implements a Perl interface to the libxml2
-library which provides interfaces for parsing and manipulating XML files. This
+library which provides interfaces for parsing and manipulating XML files.  This
 module allows Perl programmers to make use of the highly capable validating
 XML parser and the high performance DOM implementation.")
     (license (package-license perl))))
@@ -275,6 +329,29 @@ XML parser and the high performance DOM implementation.")
 @code{XML::LibXML}.")
     (license (package-license perl))))
 
+(define-public perl-xml-libxslt
+  (package
+    (name "perl-xml-libxslt")
+    (version "1.95")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
+                           "XML-LibXSLT-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0dggycql18kfxzkb1kw3yc7gslxlrrgyyn2r2ygsylycb89j3jpi"))))
+    (build-system perl-build-system)
+    (inputs
+     `(("libxslt" ,libxslt)))
+    (propagated-inputs
+     `(("perl-xml-libxml" ,perl-xml-libxml)))
+    (home-page "http://search.cpan.org/dist/XML-LibXSLT")
+    (synopsis "Perl bindings to GNOME libxslt library")
+    (description "This Perl module is an interface to the GNOME project's
+libxslt library.")
+    (license (package-license perl))))
+
 (define-public perl-xml-namespacesupport
   (package
     (name "perl-xml-namespacesupport")
@@ -296,6 +373,41 @@ maintain a prefix to namespace URI map, and provides a number of basic
 checks.")
     (license (package-license perl))))
 
+(define-public perl-xml-rss
+  (package
+    (name "perl-xml-rss")
+    (version "1.59")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
+                                  "XML-RSS-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0v6vfizn2psy6av057kp7fv3z3y73s6b3w56jm3zr6hlq48llsx2"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-module-build" ,perl-module-build)
+       ("perl-test-manifest" ,perl-test-manifest)
+       ("perl-test-differences" ,perl-test-differences)
+       ("perl-test-pod" ,perl-test-pod)
+       ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
+    ;; XXX: The test which uses this modules does not run, even when it is included
+    ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
+    (inputs
+     `(("perl-datetime" ,perl-datetime)
+       ("perl-datetime-format-mail" ,perl-datetime-format-mail)
+       ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
+       ("perl-html-parser" ,perl-html-parser)
+       ("perl-xml-parser" ,perl-xml-parser)))
+    (home-page "http://search.cpan.org/dist/XML-RSS")
+    (synopsis "Creates and updates RSS files")
+    (description
+     "This module provides a basic framework for creating and maintaining
+RDF Site Summary (RSS) files.  This distribution also contains many examples
+that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
+1.0 version, and more.")
+    (license (package-license perl))))
+
 (define-public perl-xml-sax
   (package
     (name "perl-xml-sax")
@@ -552,19 +664,81 @@ encoding of the message to be send into XML, sending the message to the
 server, collect the answer, and finally decoding the XML to Perl.")
     (license (package-license perl))))
 
+(define-public perl-xml-feed
+  (package
+    (name "perl-xml-feed")
+    (version "0.53")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
+                                  "XML-Feed-" version ".tar.gz"))
+              (sha256
+               (base32
+                "07b165g6wk8kqwpl49r3n0kag6p2nrkyp3ch0h8qyxb6nrnkkq7c"))))
+    (build-system perl-build-system)
+    (arguments
+     `(#:tests? #f)) ; Tests require internet connection
+    (native-inputs
+     `(("perl-module-build" ,perl-module-build)
+       ("perl-uri" ,perl-uri)
+       ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
+    (inputs
+     `(("perl-class-errorhandler" ,perl-class-errorhandler)
+       ("perl-datetime" ,perl-datetime)
+       ("perl-datetime-format-mail" ,perl-datetime-format-mail)
+       ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
+       ("perl-feed-find" ,perl-feed-find)
+       ("perl-html-parser" ,perl-html-parser)
+       ("perl-libwww-perl" ,perl-libwww)
+       ("perl-module-pluggable" ,perl-module-pluggable)
+       ("perl-uri-fetch" ,perl-uri-fetch)
+       ("perl-xml-atom" ,perl-xml-atom)
+       ("perl-xml-libxml" ,perl-xml-libxml)
+       ("perl-xml-rss" ,perl-xml-rss)))
+    (home-page "http://search.cpan.org/dist/XML-Feed")
+    (synopsis "XML Syndication Feed Support")
+    (description "@code{XML::Feed} is a syndication feed parser for both RSS and
+Atom feeds.  It also implements feed auto-discovery for finding feeds, given a URI.
+@code{XML::Feed} supports the following syndication feed formats:
+RSS 0.91, RSS 1.0, RSS 2.0, Atom")
+    (license (package-license perl))))
+
+(define-public perl-xml-xpath
+  (package
+    (name "perl-xml-xpath")
+    (version "1.37")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
+                                  "XML-XPath-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0997l8vjgq8p7d1irvp6amqyrv24x7f8hybjm4l4ayag32b13bmq"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-path-tiny" ,perl-path-tiny)))
+    (inputs
+     `(("perl-xml-parser" ,perl-xml-parser)))
+    (home-page "http://search.cpan.org/dist/XML-XPath")
+    (synopsis "Parse and evaluate XPath statements")
+    (description
+     "This module aims to comply exactly to the @url{XPath specification,
+https://www.w3.org/TR/xpath} and yet allow extensions to be added in
+the form of functions.")
+    (license (package-license perl))))
+
 (define-public pugixml
   (package
     (name "pugixml")
-    (version "1.6")
+    (version "1.7")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://github.com/zeux/pugixml/archive/v"
-                          version ".tar.gz"))
-      (file-name (string-append name "-" version ".tar.gz"))
+      (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
+                          version "/pugixml-" version ".tar.gz"))
       (sha256
        (base32
-        "0czbcv9aqf2rw3s9cljz2wb1f4zbhd07wnj7ykklklccl0ipfnwi"))))
+        "1jpml475kbhs1aqwa48g2cbfxlrb9qp115m2j9yryxhxyr30vqgv"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f
@@ -587,6 +761,30 @@ different Unicode encodings which happen automatically during
 parsing/saving.")
     (license license:expat)))
 
+(define-public python-pyxb
+  (package
+    (name "python-pyxb")
+    (version "1.2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "PyXB" version))
+              (sha256
+               (base32
+                "0rzzwibfqa28gxgcxx4cybx1qcg0g6fand06ykj3gz7z5kp653sf"))))
+    (build-system python-build-system)
+    (home-page "http://pyxb.sourceforge.net/")
+    (synopsis "Python XML Schema Bindings")
+    (description
+     "PyXB (\"pixbee\") is a pure Python package that generates Python source
+code for classes that correspond to data structures defined by XMLSchema.")
+    (license (list license:asl2.0    ; Most files.
+                   license:expat     ; pyxb/utils/six.py
+                   license:gpl2      ; bundled jquery in doc is dual MIT/GPL2
+                   license:psfl))))  ; pyxb/utils/activestate.py
+
+(define-public python2-pyxb
+  (package-with-python2 python-pyxb))
+
 (define-public xmlto
   (package
     (name "xmlto")
@@ -680,7 +878,8 @@ UTF-8 and UTF-16 encoding.")
     (version "2.6.2")
     (source (origin
               (method url-fetch)
-              (uri (string-append "mirror://sourceforge/tinyxml/tinyxml_"
+              (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
+                                  version "/tinyxml_"
                                   (string-join (string-split version #\.) "_")
                                   ".tar.gz"))
               (sha256
@@ -737,10 +936,31 @@ Cflags: -I${includedir}
                #t))))))
     (synopsis "Small XML parser for C++")
     (description "TinyXML is a small and simple XML parsing library for the
-C++ programming langauge.")
+C++ programming language.")
     (home-page "http://www.grinninglizard.com/tinyxml/index.html")
     (license license:zlib)))
 
+(define-public tinyxml2
+  (package
+    (name "tinyxml2")
+    (version "4.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/leethomason/tinyxml2/archive/"
+                           version ".tar.gz"))
+       (sha256
+       (base32
+        "083z4r4khcndxi9k840lcr48sqxvar4gpsnf749xfdn1bkr8xcql"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))    ; no tests
+    (synopsis "Small XML parser for C++")
+    (description "TinyXML2 is a small and simple XML parsing library for the
+C++ programming language.")
+    (home-page "http://www.grinninglizard.com/tinyxml2/")
+    (license license:zlib)))
+
 (define-public xmlstarlet
  (package
    (name "xmlstarlet")
@@ -764,3 +984,35 @@ used to transform, query, validate, and edit XML documents.  XPath is used to
 match and extract data, and elements can be added, deleted or modified using
 XSLT and EXSLT.")
    (license license:x11)))
+
+(define-public xlsx2csv
+  (package
+    (name "xlsx2csv")
+    (version "0.7.2")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "https://github.com/dilshod/"
+                   name "/archive/release/" version ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2 ; Use python-2 for the test script.
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (substitute* "test/run"
+               ;; Run tests with `python' only
+               (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
+             (zero? (system* "test/run")))))))
+    (home-page "https://github.com/dilshod/xlsx2csv")
+    (synopsis "XLSX to CSV converter")
+    (description
+     "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
+XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
+files.  It is designed to be fast and to handle large input files.")
+    (license license:gpl2+)))