From ca43b5ea940478e0d7a37cebff98f8ef23f3ea7b Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Sun, 3 Mar 2019 19:32:35 +0100 Subject: xmlstarlet: convert old patch series with git-ptx-patches When using git-ptx-patches, it adds additional headers inserted by default by git-format-patch. Get rid of this diff for future changes in the patch series while still staying compatible with the quilt instead of git-ptx-patches workflow. The date headers were reverse-engineered from Git history, the Applied-Upstream tags were added based on the patch tracking information of the patches. No functional changes. Signed-off-by: Roland Hieber Signed-off-by: Michael Olbrich --- ...use-debug-functions-only-if-libxml2-has-d.patch | 94 +++++++++++++++++++++ ...2-xmlstarlet-fix-semicolon-in-wrong-place.patch | 32 ++++++++ ...bail-out-if-no-dtd-parsing-support-in-lib.patch | 33 ++++++++ .../0004-xmlstarlet-fix-linking.patch | 91 +++++++++++++++++++++ patches/xmlstarlet-1.0.1/series | 11 ++- .../xmlstarlet-1.0.1-fix-linking.diff | 90 -------------------- .../xmlstarlet-1.0.1-missing-semicolon.diff | 34 -------- .../xmlstarlet-1.0.1-test-libxml-debug.diff | 95 ---------------------- .../xmlstarlet-1.0.1-test-validation.diff | 35 -------- 9 files changed, 257 insertions(+), 258 deletions(-) create mode 100644 patches/xmlstarlet-1.0.1/0001-xmlstarlet-use-debug-functions-only-if-libxml2-has-d.patch create mode 100644 patches/xmlstarlet-1.0.1/0002-xmlstarlet-fix-semicolon-in-wrong-place.patch create mode 100644 patches/xmlstarlet-1.0.1/0003-xmlstarlet-bail-out-if-no-dtd-parsing-support-in-lib.patch create mode 100644 patches/xmlstarlet-1.0.1/0004-xmlstarlet-fix-linking.patch delete mode 100644 patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-fix-linking.diff delete mode 100644 patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-missing-semicolon.diff delete mode 100644 patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-libxml-debug.diff delete mode 100644 patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-validation.diff diff --git a/patches/xmlstarlet-1.0.1/0001-xmlstarlet-use-debug-functions-only-if-libxml2-has-d.patch b/patches/xmlstarlet-1.0.1/0001-xmlstarlet-use-debug-functions-only-if-libxml2-has-d.patch new file mode 100644 index 000000000..81c108f17 --- /dev/null +++ b/patches/xmlstarlet-1.0.1/0001-xmlstarlet-use-debug-functions-only-if-libxml2-has-d.patch @@ -0,0 +1,94 @@ +From: Robert Schwebel +Date: Sun, 29 Nov 2009 00:00:00 +0100 +Subject: [PATCH] xmlstarlet: use debug functions only if libxml2 has debug + support + +We use xmlXPathDebugDumpCompExpr without testing if libxml2 has support +for it enabled. This can result in the following linker error: + +xml_edit.o: In function `edUpdate': +xmlstarlet-1.0.1/src/xml_edit.c:327: +undefined reference to `xmlXPathDebugDumpCompExpr' + +Signed-off-by: Robert Schwebel +Applied-Upstream: 1.0.2, commit:1cb3f329c92ee9aa9e1dc15c1f1e46a9fc31d4b8 +--- + src/xml_edit.c | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/src/xml_edit.c b/src/xml_edit.c +index 8e195304302a..42391a9bd569 100644 +--- a/src/xml_edit.c ++++ b/src/xml_edit.c +@@ -323,9 +323,10 @@ edUpdate(xmlDocPtr doc, const char *loc, const char *val, XmlNodeType type) + comp = xmlXPathCompile(BAD_CAST loc); + if (comp != NULL) + { ++#if defined(LIBXML_DEBUG_ENABLED) + if (tree) + xmlXPathDebugDumpCompExpr(stdout, comp, 0); +- ++#endif + res = xmlXPathCompiledEval(comp, ctxt); + xmlXPathFreeCompExpr(comp); + } +@@ -406,9 +407,10 @@ edInsert(xmlDocPtr doc, const char *loc, const char *val, const char *name, + comp = xmlXPathCompile(BAD_CAST loc); + if (comp != NULL) + { ++#if defined(LIBXML_DEBUG_ENABLED) + if (tree) + xmlXPathDebugDumpCompExpr(stdout, comp, 0); +- ++#endif + res = xmlXPathCompiledEval(comp, ctxt); + xmlXPathFreeCompExpr(comp); + } +@@ -508,9 +510,10 @@ edRename(xmlDocPtr doc, char *loc, char *val, XmlNodeType type) + comp = xmlXPathCompile(BAD_CAST loc); + if (comp != NULL) + { ++#if defined(LIBXML_DEBUG_ENABLED) + if (tree) + xmlXPathDebugDumpCompExpr(stdout, comp, 0); +- ++#endif + res = xmlXPathCompiledEval(comp, ctxt); + xmlXPathFreeCompExpr(comp); + } +@@ -599,9 +602,10 @@ edDelete(xmlDocPtr doc, char *str) + comp = xmlXPathCompile(BAD_CAST str); + if (comp != NULL) + { ++#if defined(LIBXML_DEBUG_ENABLED) + if (tree) + xmlXPathDebugDumpCompExpr(stdout, comp, 0); +- ++#endif + res = xmlXPathCompiledEval(comp, ctxt); + xmlXPathFreeCompExpr(comp); + } +@@ -691,9 +695,10 @@ edMove(xmlDocPtr doc, char *from, char *to) + comp = xmlXPathCompile(BAD_CAST from); + if (comp != NULL) + { ++#if defined(LIBXML_DEBUG_ENABLED) + if (tree) + xmlXPathDebugDumpCompExpr(stdout, comp, 0); +- ++#endif + res = xmlXPathCompiledEval(comp, ctxt); + xmlXPathFreeCompExpr(comp); + } +@@ -738,9 +743,10 @@ edMove(xmlDocPtr doc, char *from, char *to) + comp = xmlXPathCompile(BAD_CAST to); + if (comp != NULL) + { ++#if defined(LIBXML_DEBUG_ENABLED) + if (tree) + xmlXPathDebugDumpCompExpr(stdout, comp, 0); +- ++#endif + res_to = xmlXPathCompiledEval(comp, ctxt); + xmlXPathFreeCompExpr(comp); + } diff --git a/patches/xmlstarlet-1.0.1/0002-xmlstarlet-fix-semicolon-in-wrong-place.patch b/patches/xmlstarlet-1.0.1/0002-xmlstarlet-fix-semicolon-in-wrong-place.patch new file mode 100644 index 000000000..ef72a286a --- /dev/null +++ b/patches/xmlstarlet-1.0.1/0002-xmlstarlet-fix-semicolon-in-wrong-place.patch @@ -0,0 +1,32 @@ +From: Robert Schwebel +Date: Sun, 29 Nov 2009 00:00:00 +0100 +Subject: [PATCH] xmlstarlet: fix semicolon in wrong place + +We define a semicolon in the wrong place: + +xml_trans.c:84: error: expected ',' or ';' before 'void' + +This does not fail only by accident, if the right defines have been set +in libxml2. + +Signed-off-by: Robert Schwebel +Applied-Upstream: 1.0.2, commit:5cfe8480b3029311a3bcaf0471c023d5175fa58d +--- + src/xml_trans.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/xml_trans.c b/src/xml_trans.c +index 38ddcf84b5cd..c967f0b19762 100644 +--- a/src/xml_trans.c ++++ b/src/xml_trans.c +@@ -75,8 +75,9 @@ static const char trans_usage_str_3[] = + #ifdef LIBXML_CATALOG_ENABLED + " --catalogs - use SGML catalogs from $SGML_CATALOG_FILES\n" + " otherwise XML catalogs starting from\n" +-" file:///etc/xml/catalog are activated by default\n\n"; ++" file:///etc/xml/catalog are activated by default\n\n" + #endif ++; + + /** + * Display usage syntax diff --git a/patches/xmlstarlet-1.0.1/0003-xmlstarlet-bail-out-if-no-dtd-parsing-support-in-lib.patch b/patches/xmlstarlet-1.0.1/0003-xmlstarlet-bail-out-if-no-dtd-parsing-support-in-lib.patch new file mode 100644 index 000000000..d61682c5e --- /dev/null +++ b/patches/xmlstarlet-1.0.1/0003-xmlstarlet-bail-out-if-no-dtd-parsing-support-in-lib.patch @@ -0,0 +1,33 @@ +From: Robert Schwebel +Date: Sun, 29 Nov 2009 00:00:00 +0100 +Subject: [PATCH] xmlstarlet: bail out if no dtd parsing support in libxml2 + +We use xmlParseDTD without testing if libxml2 has support +for it enabled. This can result in the following linker error: + +xml_validate.o: In function `valAgainstDtd': +xmlstarlet-1.0.1/src/xml_validate.c:229: +undefined reference to `xmlParseDTD' + +Signed-off-by: Robert Schwebel +Applied-Upstream: 1.0.2, commit:5f2a71f57c1500b98ee2d1f9f6757854349e0072 +--- + src/xml_validate.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/xml_validate.c b/src/xml_validate.c +index 911bb16d1d5f..a7f55b8da864 100644 +--- a/src/xml_validate.c ++++ b/src/xml_validate.c +@@ -226,6 +226,11 @@ valAgainstDtd(valOptionsPtr ops, char* dtdvalid, xmlDocPtr doc, char* filename) + { + xmlDtdPtr dtd; + ++#if !defined(LIBXML_VALID_ENABLED) ++ xmlGenericError(xmlGenericErrorContext, ++ "libxml2 has no validation support"); ++ return 2; ++#endif + dtd = xmlParseDTD(NULL, (const xmlChar *)dtdvalid); + if (dtd == NULL) + { diff --git a/patches/xmlstarlet-1.0.1/0004-xmlstarlet-fix-linking.patch b/patches/xmlstarlet-1.0.1/0004-xmlstarlet-fix-linking.patch new file mode 100644 index 000000000..90aa47567 --- /dev/null +++ b/patches/xmlstarlet-1.0.1/0004-xmlstarlet-fix-linking.patch @@ -0,0 +1,91 @@ +From: Michael Olbrich +Date: Mon, 11 Jan 2010 16:03:22 +0100 +Subject: [PATCH] xmlstarlet: fix linking + +xmlstarlet links libexslt statically. The configure script does not check for +the dependencies. This fails if libexslt links agains libgcrypt. + +This patch changes the configure script, so that all libs are linked +dynamically. The linker does the rest. + +For ptxdist this is ok. We install the libs already. +Not for upstream. + +Signed-off-by: Michael Olbrich +Forwarded: not-needed +--- + configure.in | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/configure.in b/configure.in +index 856a451cac7f..713d2b34dd32 100644 +--- a/configure.in ++++ b/configure.in +@@ -31,7 +31,7 @@ AC_ARG_WITH(libxml-prefix, + [ --with-libxml-prefix=[PFX] Specify location of libxml], + LIBXML_PREFIX=$withval + LIBXML_CFLAGS="-I$withval/include/libxml2 -I$withval/include/libxml" +- LIBXML_LIBS="$withval/lib/libxml2.a -lz -lm -lpthread -ldl" ++ LIBXML_LIBS="$withval/lib/libxml2.so -lz -lm -lpthread -ldl" + ) + + AC_ARG_WITH(libxml-include-prefix, +@@ -41,13 +41,13 @@ AC_ARG_WITH(libxml-include-prefix, + + AC_ARG_WITH(libxml-libs-prefix, + [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs], +- LIBXML_LIBS="$withval/libxml2.a -lz -lm -lpthread -ldl" ++ LIBXML_LIBS="$withval/libxml2.so -lz -lm -lpthread -ldl" + ) + + AC_ARG_WITH(libxml-src, + [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)], + LIBXML_SRC="$withval" +- LIBXML_LIBS="$withval/.libs/libxml2.a -lz -lm -lpthread" ++ LIBXML_LIBS="$withval/.libs/libxml2.so -lz -lm -lpthread" + LIBXML_CFLAGS="-I$withval/include/libxml2 -I$withval/include/libxml -I$withval/include" + ) + +@@ -74,7 +74,7 @@ AC_ARG_WITH(libxslt-prefix, + [ --with-libxslt-prefix=[PFX] Specify location of libxslt], + LIBXSLT_PREFIX=$withval + LIBXSLT_CFLAGS="-I$withval/include/libxslt -I$withval/include/libexslt" +- LIBXSLT_LIBS="$withval/lib/libxslt.a $withval/lib/libexslt.a -lz -lm -lpthread" ++ LIBXSLT_LIBS="$withval/lib/libxslt.so $withval/lib/libexslt.so -lz -lm -lpthread" + ) + + AC_ARG_WITH(libxslt-include-prefix, +@@ -84,13 +84,13 @@ AC_ARG_WITH(libxslt-include-prefix, + + AC_ARG_WITH(libxslt-libs-prefix, + [ --with-libxslt-libs-prefix=[PFX] Specify location of libxslt libs], +- LIBXSLT_LIBS="$withval/libxslt.a $withval/libexslt.a -lz -lm -lpthread" ++ LIBXSLT_LIBS="$withval/libxslt.so $withval/libexslt.so -lz -lm -lpthread" + ) + + AC_ARG_WITH(libxslt-src, + [ --with-libxslt-src=[DIR] For libxslt thats not installed yet (sets all three above)], + LIBXSLT_SRC="$withval" +- LIBXSLT_LIBS="$withval/libxslt/.libs/libxslt.a $withval/libexslt/.libs/libexslt.a -lz -lm -lpthread" ++ LIBXSLT_LIBS="$withval/libxslt/.libs/libxslt.so $withval/libexslt/.libs/libexslt.so -lz -lm -lpthread" + LIBXSLT_CFLAGS="-I$withval/libxslt -I$withval/libexslt -I$withval" + ) + +@@ -236,7 +236,7 @@ dnl Set LIBXML libraries location + dnl + if test "x$LIBXML_LIBS" = "x" + then +- LIBXML_LIBS="${LIBXML_PREFIX}/lib/libxml2.a -lz -lm -lpthread -ldl" ++ LIBXML_LIBS="${LIBXML_PREFIX}/lib/libxml2.so -lz -lm -lpthread -ldl" + fi + + dnl +@@ -252,7 +252,7 @@ dnl Set LIBXSLT libraries location + dnl + if test "x$LIBXSLT_LIBS" = "x" + then +- LIBXSLT_LIBS="${LIBXSLT_PREFIX}/lib/libxslt.a ${LIBXSLT_PREFIX}/lib/libexslt.a -lz -lm -lpthread" ++ LIBXSLT_LIBS="${LIBXSLT_PREFIX}/lib/libxslt.so ${LIBXSLT_PREFIX}/lib/libexslt.so -lz -lm -lpthread" + fi + + dnl diff --git a/patches/xmlstarlet-1.0.1/series b/patches/xmlstarlet-1.0.1/series index 7e4590629..c6360809b 100644 --- a/patches/xmlstarlet-1.0.1/series +++ b/patches/xmlstarlet-1.0.1/series @@ -1,4 +1,7 @@ -xmlstarlet-1.0.1-test-libxml-debug.diff -xmlstarlet-1.0.1-missing-semicolon.diff -xmlstarlet-1.0.1-test-validation.diff -xmlstarlet-1.0.1-fix-linking.diff +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-xmlstarlet-use-debug-functions-only-if-libxml2-has-d.patch +0002-xmlstarlet-fix-semicolon-in-wrong-place.patch +0003-xmlstarlet-bail-out-if-no-dtd-parsing-support-in-lib.patch +0004-xmlstarlet-fix-linking.patch +# 5ce4c70ec2f7f73bf4105b9adcc9682e - git-ptx-patches magic diff --git a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-fix-linking.diff b/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-fix-linking.diff deleted file mode 100644 index b8e89a0fc..000000000 --- a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-fix-linking.diff +++ /dev/null @@ -1,90 +0,0 @@ -Subject: xmlstarlet: fix linking -From: Michael Olbrich - -xmlstarlet links libexslt statically. The configure script does not check for -the dependencies. This fails if libexslt links agains libgcrypt. - -This patch changes the configure script, so that all libs are linked -dynamically. The linker does the rest. - -For ptxdist this is ok. We install the libs already. -Not for upstream. - -Signed-off-by: Michael Olbrich - ---- - configure.in | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -Index: b/configure.in -=================================================================== ---- a/configure.in -+++ b/configure.in -@@ -31,7 +31,7 @@ AC_ARG_WITH(libxml-prefix, - [ --with-libxml-prefix=[PFX] Specify location of libxml], - LIBXML_PREFIX=$withval - LIBXML_CFLAGS="-I$withval/include/libxml2 -I$withval/include/libxml" -- LIBXML_LIBS="$withval/lib/libxml2.a -lz -lm -lpthread -ldl" -+ LIBXML_LIBS="$withval/lib/libxml2.so -lz -lm -lpthread -ldl" - ) - - AC_ARG_WITH(libxml-include-prefix, -@@ -41,13 +41,13 @@ AC_ARG_WITH(libxml-include-prefix, - - AC_ARG_WITH(libxml-libs-prefix, - [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs], -- LIBXML_LIBS="$withval/libxml2.a -lz -lm -lpthread -ldl" -+ LIBXML_LIBS="$withval/libxml2.so -lz -lm -lpthread -ldl" - ) - - AC_ARG_WITH(libxml-src, - [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)], - LIBXML_SRC="$withval" -- LIBXML_LIBS="$withval/.libs/libxml2.a -lz -lm -lpthread" -+ LIBXML_LIBS="$withval/.libs/libxml2.so -lz -lm -lpthread" - LIBXML_CFLAGS="-I$withval/include/libxml2 -I$withval/include/libxml -I$withval/include" - ) - -@@ -74,7 +74,7 @@ AC_ARG_WITH(libxslt-prefix, - [ --with-libxslt-prefix=[PFX] Specify location of libxslt], - LIBXSLT_PREFIX=$withval - LIBXSLT_CFLAGS="-I$withval/include/libxslt -I$withval/include/libexslt" -- LIBXSLT_LIBS="$withval/lib/libxslt.a $withval/lib/libexslt.a -lz -lm -lpthread" -+ LIBXSLT_LIBS="$withval/lib/libxslt.so $withval/lib/libexslt.so -lz -lm -lpthread" - ) - - AC_ARG_WITH(libxslt-include-prefix, -@@ -84,13 +84,13 @@ AC_ARG_WITH(libxslt-include-prefix, - - AC_ARG_WITH(libxslt-libs-prefix, - [ --with-libxslt-libs-prefix=[PFX] Specify location of libxslt libs], -- LIBXSLT_LIBS="$withval/libxslt.a $withval/libexslt.a -lz -lm -lpthread" -+ LIBXSLT_LIBS="$withval/libxslt.so $withval/libexslt.so -lz -lm -lpthread" - ) - - AC_ARG_WITH(libxslt-src, - [ --with-libxslt-src=[DIR] For libxslt thats not installed yet (sets all three above)], - LIBXSLT_SRC="$withval" -- LIBXSLT_LIBS="$withval/libxslt/.libs/libxslt.a $withval/libexslt/.libs/libexslt.a -lz -lm -lpthread" -+ LIBXSLT_LIBS="$withval/libxslt/.libs/libxslt.so $withval/libexslt/.libs/libexslt.so -lz -lm -lpthread" - LIBXSLT_CFLAGS="-I$withval/libxslt -I$withval/libexslt -I$withval" - ) - -@@ -236,7 +236,7 @@ dnl Set LIBXML libraries location - dnl - if test "x$LIBXML_LIBS" = "x" - then -- LIBXML_LIBS="${LIBXML_PREFIX}/lib/libxml2.a -lz -lm -lpthread -ldl" -+ LIBXML_LIBS="${LIBXML_PREFIX}/lib/libxml2.so -lz -lm -lpthread -ldl" - fi - - dnl -@@ -252,7 +252,7 @@ dnl Set LIBXSLT libraries location - dnl - if test "x$LIBXSLT_LIBS" = "x" - then -- LIBXSLT_LIBS="${LIBXSLT_PREFIX}/lib/libxslt.a ${LIBXSLT_PREFIX}/lib/libexslt.a -lz -lm -lpthread" -+ LIBXSLT_LIBS="${LIBXSLT_PREFIX}/lib/libxslt.so ${LIBXSLT_PREFIX}/lib/libexslt.so -lz -lm -lpthread" - fi - - dnl diff --git a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-missing-semicolon.diff b/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-missing-semicolon.diff deleted file mode 100644 index 74702863e..000000000 --- a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-missing-semicolon.diff +++ /dev/null @@ -1,34 +0,0 @@ -Subject: xmlstarlet: fix semicolon in wrong place -From: Robert Schwebel - -We define a semicolon in the wrong place: - -xml_trans.c:84: error: expected ',' or ';' before 'void' - -This does not fail only by accident, if the right defines have been set -in libxml2. - -Signed-off-by: Robert Schwebel - ---- -#20091129: rsc: submitted to upstream: -# https://sourceforge.net/tracker/?func=detail&aid=2905712&group_id=66612&atid=515108 - - src/xml_trans.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: xmlstarlet-1.0.1/src/xml_trans.c -=================================================================== ---- xmlstarlet-1.0.1.orig/src/xml_trans.c -+++ xmlstarlet-1.0.1/src/xml_trans.c -@@ -75,8 +75,9 @@ static const char trans_usage_str_3[] = - #ifdef LIBXML_CATALOG_ENABLED - " --catalogs - use SGML catalogs from $SGML_CATALOG_FILES\n" - " otherwise XML catalogs starting from\n" --" file:///etc/xml/catalog are activated by default\n\n"; -+" file:///etc/xml/catalog are activated by default\n\n" - #endif -+; - - /** - * Display usage syntax diff --git a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-libxml-debug.diff b/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-libxml-debug.diff deleted file mode 100644 index d073f4f04..000000000 --- a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-libxml-debug.diff +++ /dev/null @@ -1,95 +0,0 @@ -Subject: xmlstarlet: use debug functions only if libxml2 has debug support -From: Robert Schwebel - -We use xmlXPathDebugDumpCompExpr without testing if libxml2 has support -for it enabled. This can result in the following linker error: - -xml_edit.o: In function `edUpdate': -xmlstarlet-1.0.1/src/xml_edit.c:327: -undefined reference to `xmlXPathDebugDumpCompExpr' - -Signed-off-by: Robert Schwebel - ---- -#20091129: rsc: submitted to upstream: -# https://sourceforge.net/tracker/?func=detail&aid=2905668&group_id=66612&atid=515108 - - src/xml_edit.c | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -Index: xmlstarlet-1.0.1/src/xml_edit.c -=================================================================== ---- xmlstarlet-1.0.1.orig/src/xml_edit.c -+++ xmlstarlet-1.0.1/src/xml_edit.c -@@ -323,9 +323,10 @@ edUpdate(xmlDocPtr doc, const char *loc, - comp = xmlXPathCompile(BAD_CAST loc); - if (comp != NULL) - { -+#if defined(LIBXML_DEBUG_ENABLED) - if (tree) - xmlXPathDebugDumpCompExpr(stdout, comp, 0); -- -+#endif - res = xmlXPathCompiledEval(comp, ctxt); - xmlXPathFreeCompExpr(comp); - } -@@ -406,9 +407,10 @@ edInsert(xmlDocPtr doc, const char *loc, - comp = xmlXPathCompile(BAD_CAST loc); - if (comp != NULL) - { -+#if defined(LIBXML_DEBUG_ENABLED) - if (tree) - xmlXPathDebugDumpCompExpr(stdout, comp, 0); -- -+#endif - res = xmlXPathCompiledEval(comp, ctxt); - xmlXPathFreeCompExpr(comp); - } -@@ -508,9 +510,10 @@ edRename(xmlDocPtr doc, char *loc, char - comp = xmlXPathCompile(BAD_CAST loc); - if (comp != NULL) - { -+#if defined(LIBXML_DEBUG_ENABLED) - if (tree) - xmlXPathDebugDumpCompExpr(stdout, comp, 0); -- -+#endif - res = xmlXPathCompiledEval(comp, ctxt); - xmlXPathFreeCompExpr(comp); - } -@@ -599,9 +602,10 @@ edDelete(xmlDocPtr doc, char *str) - comp = xmlXPathCompile(BAD_CAST str); - if (comp != NULL) - { -+#if defined(LIBXML_DEBUG_ENABLED) - if (tree) - xmlXPathDebugDumpCompExpr(stdout, comp, 0); -- -+#endif - res = xmlXPathCompiledEval(comp, ctxt); - xmlXPathFreeCompExpr(comp); - } -@@ -691,9 +695,10 @@ edMove(xmlDocPtr doc, char *from, char * - comp = xmlXPathCompile(BAD_CAST from); - if (comp != NULL) - { -+#if defined(LIBXML_DEBUG_ENABLED) - if (tree) - xmlXPathDebugDumpCompExpr(stdout, comp, 0); -- -+#endif - res = xmlXPathCompiledEval(comp, ctxt); - xmlXPathFreeCompExpr(comp); - } -@@ -738,9 +743,10 @@ edMove(xmlDocPtr doc, char *from, char * - comp = xmlXPathCompile(BAD_CAST to); - if (comp != NULL) - { -+#if defined(LIBXML_DEBUG_ENABLED) - if (tree) - xmlXPathDebugDumpCompExpr(stdout, comp, 0); -- -+#endif - res_to = xmlXPathCompiledEval(comp, ctxt); - xmlXPathFreeCompExpr(comp); - } diff --git a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-validation.diff b/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-validation.diff deleted file mode 100644 index 1e5813f22..000000000 --- a/patches/xmlstarlet-1.0.1/xmlstarlet-1.0.1-test-validation.diff +++ /dev/null @@ -1,35 +0,0 @@ -Subject: xmlstarlet: bail out if no dtd parsing support in libxml2 -From: Robert Schwebel - -We use xmlParseDTD without testing if libxml2 has support -for it enabled. This can result in the following linker error: - -xml_validate.o: In function `valAgainstDtd': -xmlstarlet-1.0.1/src/xml_validate.c:229: -undefined reference to `xmlParseDTD' - -Signed-off-by: Robert Schwebel - ---- -#20091129: rsc: submitted to upstream: -# https://sourceforge.net/tracker/?func=detail&aid=2905714&group_id=66612&atid=515108 - - src/xml_validate.c | 5 +++++ - 1 file changed, 5 insertions(+) - -Index: xmlstarlet-1.0.1/src/xml_validate.c -=================================================================== ---- xmlstarlet-1.0.1.orig/src/xml_validate.c -+++ xmlstarlet-1.0.1/src/xml_validate.c -@@ -226,6 +226,11 @@ valAgainstDtd(valOptionsPtr ops, char* d - { - xmlDtdPtr dtd; - -+#if !defined(LIBXML_VALID_ENABLED) -+ xmlGenericError(xmlGenericErrorContext, -+ "libxml2 has no validation support"); -+ return 2; -+#endif - dtd = xmlParseDTD(NULL, (const xmlChar *)dtdvalid); - if (dtd == NULL) - { -- cgit v1.2.3