diff options
Diffstat (limited to 'gnu/packages/xml.scm')
-rw-r--r-- | gnu/packages/xml.scm | 127 |
1 files changed, 56 insertions, 71 deletions
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index c3213b8f36..f1ad67f916 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is> ;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org> +;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com> ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net> ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> @@ -121,8 +121,7 @@ the entire document.") (define-public expat (package (name "expat") - (version "2.4.1") - (replacement expat/fixed) + (version "2.4.8") (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c)))) (origin (method url-fetch) @@ -134,7 +133,7 @@ the entire document.") "/expat-" version ".tar.xz"))) (sha256 (base32 - "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg"))))) + "09dgviwz939pms4v1syl68p5pia9hb7xxsmg406kx7kl9f88z6zp"))))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -158,23 +157,6 @@ 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) - (version "2.4.7") - (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c)))) - (origin - (method url-fetch) - (uri (list (string-append "mirror://sourceforge/expat/expat/" - version "/expat-" version ".tar.xz") - (string-append - "https://github.com/libexpat/libexpat/releases/download/R_" - (string-map dot->underscore version) - "/expat-" version ".tar.xz"))) - (sha256 - (base32 - "0zbss0dssn17mjmvk17qfi5cmvm0lcyzs62cwvqr219hhl864xcq"))))))) - (define-public libebml (package (name "libebml") @@ -199,20 +181,19 @@ binary extension of XML for the purpose of storing and manipulating data in a hierarchical form with variable field lengths.") (license license:lgpl2.1))) +;; Note: Remember to check python-libxml2 when updating this package. (define-public libxml2 (package (name "libxml2") - (version "2.9.12") + (version "2.9.14") (source (origin (method url-fetch) - (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-" - version ".tar.gz")) + (uri (string-append "https://download.gnome.org/sources/libxml2/" + (version-major+minor version)"/libxml2-" + version ".tar.xz")) (sha256 (base32 - "14hxwzmf5xqppx77z7i0ni9lpzg1a84dqpf8j8l1fvy570g6imn8")) - (patches (search-patches "libxml2-parent-pointers.patch" - "libxml2-terminating-newline.patch" - "libxml2-xpath-recursion-limit.patch")))) + "1vnzk33wfms348lgz9pvkq9li7jm44pvm73lbr3w1khwgljlmmv0")))) (build-system gnu-build-system) (outputs '("out" "static" "doc")) (arguments @@ -228,7 +209,7 @@ hierarchical form with variable field lengths.") (for-each (lambda (dir) (rename-file (string-append src "/share/" dir) (string-append doc "/" dir))) - '("doc" "gtk-doc")) + '("gtk-doc")) (for-each (lambda (ar) (rename-file ar (string-append dst "/" (basename ar)))) @@ -271,6 +252,35 @@ project (but it is usable outside of the Gnome platform).") provides an @code{--xpath0} option to @command{xmllint} that enables it to output XPath results with a null delimiter."))) +(define-public python-libxml2 + (package/inherit libxml2 + (name "python-libxml2") + (source (origin + (inherit (package-source libxml2)) + (patches + (append (search-patches "python-libxml2-utf8.patch") + (origin-patches (package-source libxml2)))))) + (build-system python-build-system) + (outputs '("out")) + (arguments + (list + ;; 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 ((libxml2-headers (search-input-directory + inputs "include/libxml2"))) + (substitute* "setup.py" + ;; The build system ignores C_INCLUDE_PATH & co, so + ;; provide the absolute directory name. + (("/opt/include") + (dirname libxml2-headers))))))))) + (inputs (list libxml2)) + (synopsis "Python bindings for the libxml2 library"))) + (define-public libxlsxwriter (package (name "libxlsxwriter") @@ -313,49 +323,18 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.") (license (list license:bsd-2 license:public-domain)))) ; third_party/md5 -(define-public python-libxml2 - (package/inherit libxml2 - (name "python-libxml2") - (source (origin - (inherit (package-source libxml2)) - (patches - (append (search-patches "python-libxml2-utf8.patch") - (origin-patches (package-source libxml2)))))) - (build-system python-build-system) - (outputs '("out")) - (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 libxslt (package (name "libxslt") - (version "1.1.34") + (version "1.1.35") (source (origin (method url-fetch) - (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-" - version ".tar.gz")) + (uri (string-append "https://download.gnome.org/sources" + "/libxslt/" (version-major+minor version) + "/libxslt-" version ".tar.xz")) (sha256 (base32 - "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq")) + "0yfx6hgwx4qcq7mrxb7ywabhpl64qj5h2idab746lb47k8zg6iw2")) (patches (search-patches "libxslt-generated-ids.patch")))) (build-system gnu-build-system) (arguments @@ -367,14 +346,20 @@ formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.") (substitute* "tests/Makefile" (("exslt plugins fuzz") "exslt plugins")) - #t))))) + ;; Also disable Python tests since they require + ;; python-libxml2 which would introduce a + ;; circular dependency. + (substitute* "python/Makefile" + (("cd tests && \\$\\(MAKE\\) tests") + "$(info Python tests are disabled by Guix.)"))))))) (home-page "http://xmlsoft.org/XSLT/index.html") (synopsis "C library for applying XSLT stylesheets to XML documents") - (inputs `(("libgcrypt" ,libgcrypt) - ("libxml2" ,libxml2) - ("python" ,python-minimal-wrapper) - ("zlib" ,zlib) - ("xz" ,xz))) + (inputs + (list libgcrypt + libxml2 + python-minimal-wrapper + zlib + xz)) (native-inputs (list pkg-config)) (description |