summaryrefslogtreecommitdiffstats
path: root/patches/xmlstarlet-1.0.1
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2008-09-24 04:48:53 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2008-09-24 04:48:53 +0000
commitf8d24db70be87773a80f6cf6f9be7db5d207b5e7 (patch)
treef2705907651b2a217ef52ce4fbf32fbe160844eb /patches/xmlstarlet-1.0.1
parent0c7a778ab219e59a598a233376ab9facc6fc33e5 (diff)
downloadptxdist-f8d24db70be87773a80f6cf6f9be7db5d207b5e7.tar.gz
ptxdist-f8d24db70be87773a80f6cf6f9be7db5d207b5e7.tar.xz
* xmlstarlet: add patch to handle missing libxml2 features
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8882 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'patches/xmlstarlet-1.0.1')
-rw-r--r--patches/xmlstarlet-1.0.1/generic/series3
-rw-r--r--patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-missing-semicolon.diff31
-rw-r--r--patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-test-libxml-debug.diff92
-rw-r--r--patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-test-validation.diff32
4 files changed, 158 insertions, 0 deletions
diff --git a/patches/xmlstarlet-1.0.1/generic/series b/patches/xmlstarlet-1.0.1/generic/series
new file mode 100644
index 000000000..101e97aea
--- /dev/null
+++ b/patches/xmlstarlet-1.0.1/generic/series
@@ -0,0 +1,3 @@
+xmlstarlet-1.0.1-test-libxml-debug.diff
+xmlstarlet-1.0.1-missing-semicolon.diff
+xmlstarlet-1.0.1-test-validation.diff
diff --git a/patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-missing-semicolon.diff b/patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-missing-semicolon.diff
new file mode 100644
index 000000000..b2328c35c
--- /dev/null
+++ b/patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-missing-semicolon.diff
@@ -0,0 +1,31 @@
+Subject: xmlstarlet: fix semicolon in wrong place
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+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 <r.schwebel@pengutronix.de>
+
+---
+ 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/generic/xmlstarlet-1.0.1-test-libxml-debug.diff b/patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-test-libxml-debug.diff
new file mode 100644
index 000000000..679492984
--- /dev/null
+++ b/patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-test-libxml-debug.diff
@@ -0,0 +1,92 @@
+Subject: xmlstarlet: use debug functions only if libxml2 has debug support
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+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 <r.schwebel@pengutronix.de>
+
+---
+ 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/generic/xmlstarlet-1.0.1-test-validation.diff b/patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-test-validation.diff
new file mode 100644
index 000000000..4df44fa38
--- /dev/null
+++ b/patches/xmlstarlet-1.0.1/generic/xmlstarlet-1.0.1-test-validation.diff
@@ -0,0 +1,32 @@
+Subject: xmlstarlet: bail out if no dtd parsing support in libxml2
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+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 <r.schwebel@pengutronix.de>
+
+---
+ 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)
+ {