From d592ee27a814da1026bb6d742298d6bbf9cefcd3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 May 2021 22:24:52 +0300 Subject: gnu: perl-xml-compile: Remove unneeded input. * gnu/packages/xml.scm (perl-xml-compile)[propagated-inputs]: Remove perl-carp. --- gnu/packages/xml.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 931698a575..05cbb74fcf 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -962,8 +962,7 @@ This module provide functions which simplify writing tests for "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b")))) (build-system perl-build-system) (propagated-inputs - `(("perl-carp" ,perl-carp) - ("perl-log-report" ,perl-log-report) + `(("perl-log-report" ,perl-log-report) ("perl-xml-compile-tester" ,perl-xml-compile-tester) ("perl-xml-libxml" ,perl-xml-libxml) ("perl-scalar-list-utils" ,perl-scalar-list-utils) -- cgit v1.2.3 From e2fbf29e6de80b0e5f62615f8c2f9b211a6eb604 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 May 2021 22:43:57 +0300 Subject: gnu: perl-xml-atom: Update to 0.43. * gnu/packages/xml.scm (perl-xml-atom): Update to 0.43. --- gnu/packages/xml.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 05cbb74fcf..26d306f8dd 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus ;;; Copyright © 2015, 2016, 2017 Mark H Weaver -;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018, 2021 Efraim Flashner ;;; Copyright © 2015 Raimon Grau ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2016, 2017 Leo Famulari @@ -522,14 +522,14 @@ the @code{Graph} class and write it out in a specific file format.") (define-public perl-xml-atom (package (name "perl-xml-atom") - (version "0.42") + (version "0.43") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/" "XML-Atom-" version ".tar.gz")) (sha256 (base32 - "1wa8kfy1w4mg7kzxim4whyprkn48a2il6fap0b947zywknw4c6y6")))) + "0b8bpdnvz9sqwjhjkydbzy4karb7nn6i15b8g4mczrznlsb3hnaf")))) (build-system perl-build-system) (arguments `(#:phases -- cgit v1.2.3 From 1c1fbbe56fbffcfcb4a4ca6f0ac57292c81e05fe Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 May 2021 22:44:05 +0300 Subject: gnu: perl-xml-libxml-simple: Update to 1.01. * gnu/packages/xml.scm (perl-xml-libxml-simple): Update to 1.01. --- gnu/packages/xml.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 26d306f8dd..40a4ea0e82 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -696,14 +696,14 @@ XML parser and the high performance DOM implementation.") (define-public perl-xml-libxml-simple (package (name "perl-xml-libxml-simple") - (version "0.99") + (version "1.01") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/" "XML-LibXML-Simple-" version ".tar.gz")) (sha256 (base32 - "0i4ybiqdnvnbfxqslw2y392kvy7i752dl8n99bqiqv5kzk4lbzhl")))) + "19k50d80i9dipsl6ln0f4awv9wmdg0xm3d16z8mngmvh9c8ci66d")))) (build-system perl-build-system) (propagated-inputs `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny) -- cgit v1.2.3 From 5c97a5edbbba34d985d6b3447cf45f961a3f8c34 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 May 2021 22:44:06 +0300 Subject: gnu: perl-xml-rss: Update to 1.62. * gnu/packages/xml.scm (perl-xml-rss): Update to 1.62. --- gnu/packages/xml.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 40a4ea0e82..a6d54c6f65 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -762,14 +762,14 @@ checks.") (define-public perl-xml-rss (package (name "perl-xml-rss") - (version "1.61") + (version "1.62") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/" "XML-RSS-" version ".tar.gz")) (sha256 (base32 - "03f983l2dnkvcw6iyg1s0xmv5wn793d3kvqlshmhm01ibp7ffvzs")))) + "0klb8ghd405pdkmn25lp3i4j2lfydz8w581sk51p3zy788s0c9yk")))) (build-system perl-build-system) (native-inputs `(("perl-module-build" ,perl-module-build) -- cgit v1.2.3 From 7eb171ab8b2524fe272d9ded8ac6940c25770896 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 May 2021 22:44:06 +0300 Subject: gnu: perl-xml-feed: Update to 0.61. * gnu/packages/xml.scm (perl-xml-feed): Update to 0.61. --- gnu/packages/xml.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/xml.scm') diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index a6d54c6f65..fd3ea8c0ae 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -1056,14 +1056,14 @@ server, collect the answer, and finally decoding the XML to Perl.") (define-public perl-xml-feed (package (name "perl-xml-feed") - (version "0.59") + (version "0.61") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/" "XML-Feed-" version ".tar.gz")) (sha256 (base32 - "1z1a88bpy64j42bbyl8acbfl3dn9iaz47gx6clkgy5sbn4kr0kgk")))) + "1zrslg7wz15sm1k28i3gp108cszh062ac24m3ydvr59pwfqs9br6")))) (build-system perl-build-system) (native-inputs `(("perl-module-build" ,perl-module-build) -- cgit v1.2.3 From b58efbc6611550ad9234163e198ff71ace5306ea Mon Sep 17 00:00:00 2001 From: David Larsson Date: Sat, 15 May 2021 20:52:50 +0200 Subject: gnu: Add libxml2-xpath0. * gnu/packages/patches/libxml2-xpath0-Add-option-xpath0.patch: New file... * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/xml.scm (libxml2-xpath0): New variable. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + .../patches/libxml2-xpath0-Add-option-xpath0.patch | 129 +++++++++++++++++++++ gnu/packages/xml.scm | 14 +++ 3 files changed, 144 insertions(+) create mode 100644 gnu/packages/patches/libxml2-xpath0-Add-option-xpath0.patch (limited to 'gnu/packages/xml.scm') diff --git a/gnu/local.mk b/gnu/local.mk index e502a6519a..dd68bb5957 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1368,6 +1368,7 @@ dist_patch_DATA = \ %D%/packages/patches/libutils-remove-damaging-includes.patch \ %D%/packages/patches/libvdpau-va-gl-unbundle.patch \ %D%/packages/patches/libvpx-CVE-2016-2818.patch \ + %D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch \ %D%/packages/patches/libxslt-generated-ids.patch \ %D%/packages/patches/libxt-guix-search-paths.patch \ %D%/packages/patches/lierolibre-check-unaligned-access.patch \ diff --git a/gnu/packages/patches/libxml2-xpath0-Add-option-xpath0.patch b/gnu/packages/patches/libxml2-xpath0-Add-option-xpath0.patch new file mode 100644 index 0000000000..e83642eb37 --- /dev/null +++ b/gnu/packages/patches/libxml2-xpath0-Add-option-xpath0.patch @@ -0,0 +1,129 @@ +This patch adds an "--xpath0" option to xmllint so that NUL characters +can be used as separators. + +See . + +diff --git a/doc/xmllint.xml b/doc/xmllint.xml +--- a/doc/xmllint.xml ++++ b/doc/xmllint.xml +@@ -70,6 +70,7 @@ + + + ++ + + + +@@ -537,6 +538,21 @@ + node set is serialized in full in the output. In case + of an empty node set the "XPath set is empty" result + will be shown and an error exit code will be returned. ++ Results are separated by the newline character. ++ ++ ++ ++ ++ ++ ++ ++ ++ Run an XPath expression given as argument and print the ++ result. In case of a nodeset result, each node in the ++ node set is serialized in full in the output. In case ++ of an empty node set the "XPath set is empty" result ++ will be shown and an error exit code will be returned. ++ Results are separated by the null character. + + + +diff --git a/xmllint.c b/xmllint.c +--- a/xmllint.c ++++ b/xmllint.c +@@ -194,6 +194,7 @@ static int sax1 = 0; + #endif /* LIBXML_SAX1_ENABLED */ + #ifdef LIBXML_XPATH_ENABLED + static const char *xpathquery = NULL; ++static const char *xpathsep = "\n"; + #endif + static int options = XML_PARSE_COMPACT | XML_PARSE_BIG_LINES; + static int sax = 0; +@@ -2095,7 +2096,7 @@ static void doXPathDump(xmlXPathObjectPtr cur) { + for (i = 0;i < cur->nodesetval->nodeNr;i++) { + node = cur->nodesetval->nodeTab[i]; + xmlNodeDumpOutput(buf, NULL, node, 0, 0, NULL); +- xmlOutputBufferWrite(buf, 1, "\n"); ++ xmlOutputBufferWrite(buf, 1, xpathsep); + } + xmlOutputBufferClose(buf); + #else +@@ -2104,27 +2105,27 @@ static void doXPathDump(xmlXPathObjectPtr cur) { + break; + } + case XPATH_BOOLEAN: +- if (cur->boolval) printf("true\n"); +- else printf("false\n"); ++ if (cur->boolval) printf("true%s", xpathsep); ++ else printf("false%s", xpathsep); + break; + case XPATH_NUMBER: + switch (xmlXPathIsInf(cur->floatval)) { + case 1: +- printf("Infinity\n"); ++ printf("Infinity%s", xpathsep); + break; + case -1: +- printf("-Infinity\n"); ++ printf("-Infinity%s", xpathsep); + break; + default: + if (xmlXPathIsNaN(cur->floatval)) { +- printf("NaN\n"); ++ printf("NaN%s", xpathsep); + } else { +- printf("%0g\n", cur->floatval); ++ printf("%0g%s", cur->floatval, xpathsep); + } + } + break; + case XPATH_STRING: +- printf("%s\n", (const char *) cur->stringval); ++ printf("%s%s", (const char *) cur->stringval, xpathsep); + break; + case XPATH_UNDEFINED: + fprintf(stderr, "XPath Object is uninitialized\n"); +@@ -3098,7 +3099,8 @@ static void usage(FILE *f, const char *name) { + fprintf(f, "\t--sax: do not build a tree but work just at the SAX level\n"); + fprintf(f, "\t--oldxml10: use XML-1.0 parsing rules before the 5th edition\n"); + #ifdef LIBXML_XPATH_ENABLED +- fprintf(f, "\t--xpath expr: evaluate the XPath expression, imply --noout\n"); ++ fprintf(f, "\t--xpath expr: evaluate the XPath expression, results are separated by \\n, imply --noout\n"); ++ fprintf(f, "\t--xpath0 expr: evaluate the XPath expression, results are separated by \\0, imply --noout\n"); + #endif + + fprintf(f, "\nLibxml project home page: http://xmlsoft.org/\n"); +@@ -3480,6 +3482,13 @@ main(int argc, char **argv) { + i++; + noout++; + xpathquery = argv[i]; ++ xpathsep = "\n"; ++ } else if ((!strcmp(argv[i], "-xpath0")) || ++ (!strcmp(argv[i], "--xpath0"))) { ++ i++; ++ noout++; ++ xpathquery = argv[i]; ++ xpathsep = "\0"; + #endif + } else if ((!strcmp(argv[i], "-oldxml10")) || + (!strcmp(argv[i], "--oldxml10"))) { +@@ -3712,6 +3721,11 @@ main(int argc, char **argv) { + i++; + continue; + } ++ if ((!strcmp(argv[i], "-xpath0")) || ++ (!strcmp(argv[i], "--xpath0"))) { ++ i++; ++ continue; ++ } + #endif + if ((timing) && (repeat)) + startTimer(); diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index fd3ea8c0ae..ad2e3ec6c9 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -31,6 +31,7 @@ ;;; Copyright © 2021 Julien Lepiller ;;; Copyright © 2021 Felix Gruber ;;; Copyright © 2021 Guillaume Le Vaillant +;;; Copyright © 2021 David Larsson ;;; ;;; This file is part of GNU Guix. ;;; @@ -218,6 +219,19 @@ hierarchical form with variable field lengths.") project (but it is usable outside of the Gnome platform).") (license license:x11))) +(define-public libxml2-xpath0 + (package/inherit libxml2 + (name "libxml2-xpath0") + (source (origin + (inherit (package-source libxml2)) + (patches (append (search-patches + "libxml2-xpath0-Add-option-xpath0.patch") + (origin-patches (package-source libxml2)))))) + (description + "Libxml2-xpath0 is like libxml2 but with a patch applied that +provides an @code{--xpath0} option to @command{xmllint} that enables it +to output XPath results with a null delimiter."))) + (define-public libxlsxwriter (package (name "libxlsxwriter") -- cgit v1.2.3