summary refs log tree commit diff
path: root/gnu/packages/xml.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-07-19 14:11:12 +0200
committerMarius Bakke <marius@gnu.org>2021-07-23 17:26:46 +0200
commitabe5ffbbfec5fc7f1cb2e1ebe93a7c17df4b176c (patch)
tree7b53201cc4054bb3f3dade9151dd4dca9a426e61 /gnu/packages/xml.scm
parent11fb5f45a847f44833d56c7a733c411edc2d3a37 (diff)
downloadguix-abe5ffbbfec5fc7f1cb2e1ebe93a7c17df4b176c.tar.gz
gnu: libxml2: Update to 2.9.12.
* gnu/packages/patches/libxml2-parent-pointers.patch,
gnu/packages/patches/libxml2-terminating-newline.patch,
gnu/packages/patches/libxml2-xpath-recursion-limit.patch: New files.
* gnu/packages/patches/python-libxml2-python39-compat.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/xml.scm (libxml2): Update to 2.9.12.
(python-lxml)[source](modules, snippet): New fields.
Diffstat (limited to 'gnu/packages/xml.scm')
-rw-r--r--gnu/packages/xml.scm25
1 files changed, 16 insertions, 9 deletions
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index f07f9b91b1..092d238626 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -184,14 +184,17 @@ hierarchical form with variable field lengths.")
 (define-public libxml2
   (package
     (name "libxml2")
-    (version "2.9.10")
+    (version "2.9.12")
     (source (origin
              (method url-fetch)
              (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma"))))
+               "14hxwzmf5xqppx77z7i0ni9lpzg1a84dqpf8j8l1fvy570g6imn8"))
+             (patches (search-patches "libxml2-parent-pointers.patch"
+                                      "libxml2-terminating-newline.patch"
+                                      "libxml2-xpath-recursion-limit.patch"))))
     (build-system gnu-build-system)
     (outputs '("out" "static" "doc"))
     (arguments
@@ -217,8 +220,7 @@ hierarchical form with variable field lengths.")
                         ;; file such that Libtool does the right thing when both
                         ;; the shared and static variants are available.
                         (substitute* (string-append src "/lib/libxml2.la")
-                          (("^old_library='libxml2.a'") "old_library=''"))
-                        #t))))))
+                          (("^old_library='libxml2.a'") "old_library=''"))))))))
     (home-page "http://www.xmlsoft.org/")
     (synopsis "C parser for XML")
     (inputs `(("xz" ,xz)))
@@ -374,8 +376,7 @@ It uses libxml2 to access the XML files.")
     (source (origin
               (inherit (package-source libxml2))
               (patches
-                (append (search-patches "python-libxml2-python39-compat.patch"
-                                        "python-libxml2-utf8.patch")
+                (append (search-patches "python-libxml2-utf8.patch")
                         (origin-patches (package-source libxml2))))))
     (build-system python-build-system)
     (outputs '("out"))
@@ -397,8 +398,7 @@ It uses libxml2 to access the XML files.")
                  (format #f "ROOT = r'~a'" libxml2))
                 ;; For 'iconv.h'.
                 (("/opt/include")
-                 (string-append glibc "/include"))))
-            #t)))))
+                 (string-append glibc "/include")))))))))
     (inputs `(("libxml2" ,libxml2)))
     (synopsis "Python bindings for the libxml2 library")))
 
@@ -2603,7 +2603,14 @@ because lxml.etree already has its own implementation of XPath 1.0.")
        (method url-fetch)
        (uri (pypi-uri "lxml" version))
        (sha256
-        (base32 "0s14r1w2x9sdlcsw8mxiqgw4rz5zs5lpqpxrfyn4a1mkndqqbdrr"))))
+        (base32 "0s14r1w2x9sdlcsw8mxiqgw4rz5zs5lpqpxrfyn4a1mkndqqbdrr"))
+       ;; Adapt a test to libxml2 2.9.12, taken from this commit:
+       ;; https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047e
+       (modules '((guix build utils)))
+       (snippet
+        '(substitute* "src/lxml/tests/test_etree.py"
+             (("self\\.assertEqual\\(\\{'hha': None\\}, el\\.nsmap\\)")
+              "self.assertEqual({}, el.nsmap)")))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases