summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/xml-security-c/files')
-rw-r--r--dev-libs/xml-security-c/files/1.5.1-xalan-c-1.11-compat.patch122
1 files changed, 122 insertions, 0 deletions
diff --git a/dev-libs/xml-security-c/files/1.5.1-xalan-c-1.11-compat.patch b/dev-libs/xml-security-c/files/1.5.1-xalan-c-1.11-compat.patch
new file mode 100644
index 000000000000..b5d142415845
--- /dev/null
+++ b/dev-libs/xml-security-c/files/1.5.1-xalan-c-1.11-compat.patch
@@ -0,0 +1,122 @@
+diff -Naur xml-security-c-1.5.1.orig/src/canon/XSECC14n20010315.cpp xml-security-c-1.5.1/src/canon/XSECC14n20010315.cpp
+--- xml-security-c-1.5.1.orig/src/canon/XSECC14n20010315.cpp 2009-07-27 09:23:51.228693118 +0200
++++ xml-security-c-1.5.1/src/canon/XSECC14n20010315.cpp 2009-07-27 11:37:12.697101082 +0200
+@@ -36,6 +36,7 @@
+ // Xerces includes
+ #include <xercesc/dom/DOMNamedNodeMap.hpp>
+ #include <xercesc/util/XMLUniDefs.hpp>
++#include <xercesc/dom/DOMElement.hpp>
+
+ XERCES_CPP_NAMESPACE_USE
+
+@@ -61,7 +62,7 @@
+ XALAN_USING_XALAN(NodeRefList)
+ XALAN_USING_XALAN(XercesDocumentWrapper)
+ XALAN_USING_XALAN(XercesWrapperNavigator)
+-
++XALAN_USING_XALAN(c_wstr)
+
+ #endif
+
+@@ -450,21 +451,27 @@
+
+ // We use Xalan to process the Xerces DOM tree and get the XPath nodes
+
++#if XALAN_VERSION_MAJOR == 1 && XALAN_VERSION_MINOR > 10
++ XercesParserLiaison theParserLiaison;
++ XercesDOMSupport theDOMSupport(theParserLiaison);
++#else
+ XercesDOMSupport theDOMSupport;
+ #if defined XSEC_XERCESPARSERLIAISON_REQS_DOMSUPPORT
+ XercesParserLiaison theParserLiaison(theDOMSupport);
+ #else
+ XercesParserLiaison theParserLiaison;
+ #endif
++#endif // XALAN_VERSION_MAJOR == 1 && XALAN_VERSION_MINOR > 10
+
+ if (mp_doc == 0) {
+ throw XSECException(XSECException::UnsupportedFunction,
+ "XPath selection only supported in C14n for full documents");
+ }
+- XalanDocument* theDoc = theParserLiaison.createDocument(mp_doc);
+
+- XalanElement * xe = theDoc->createElement(XalanDOMString("ns"));
+- xe->setAttribute(/*XalanDOMString(""), */XalanDOMString("xmlns:ietf"), XalanDOMString("http://www.ietf.org"));
++ DOMElement* theXercesNode = mp_doc->createElement(c_wstr(XalanDOMString("ns")));
++ theXercesNode->setAttribute(c_wstr(XalanDOMString("xmlns:ietf")), c_wstr(XalanDOMString("http://www.ietf.org")));
++
++ XalanDocument* theDoc = theParserLiaison.createDocument(mp_doc);
+
+ // Set up the XPath evaluator
+
+@@ -505,7 +512,7 @@
+ theDOMSupport,
+ theContextNode,
+ expr,
+- xe));
++ theDoc->getElementById(XalanDOMString("ns"))));
+
+ #else
+
+@@ -514,7 +521,7 @@
+ theDOMSupport,
+ theContextNode,
+ expr,
+- xe));
++ theDoc->getElementById(XalanDOMString("ns"))));
+ //theDoc->getDocumentElement()));
+ #endif
+
+diff -Naur xml-security-c-1.5.1.orig/src/transformers/TXFMXPath.cpp xml-security-c-1.5.1/src/transformers/TXFMXPath.cpp
+--- xml-security-c-1.5.1.orig/src/transformers/TXFMXPath.cpp 2009-07-27 09:23:51.254551633 +0200
++++ xml-security-c-1.5.1/src/transformers/TXFMXPath.cpp 2009-07-27 11:40:30.923733630 +0200
+@@ -283,8 +283,12 @@
+ setXPathNS(document, XPathAtts, addedNodes, formatter, mp_nse);
+
+ XPathProcessorImpl xppi; // The processor
+- XercesDOMSupport xds;
+ XercesParserLiaison xpl;
++#if XALAN_VERSION_MAJOR == 1 && XALAN_VERSION_MINOR > 10
++ XercesDOMSupport xds(xpl);
++#else
++ XercesDOMSupport xds;
++#endif
+ XPathEvaluator xpe;
+ XPathFactoryDefault xpf;
+ XPathConstructionContextDefault xpcc;
+diff -Naur xml-security-c-1.5.1.orig/src/transformers/TXFMXPathFilter.cpp xml-security-c-1.5.1/src/transformers/TXFMXPathFilter.cpp
+--- xml-security-c-1.5.1.orig/src/transformers/TXFMXPathFilter.cpp 2009-07-27 09:23:51.254551633 +0200
++++ xml-security-c-1.5.1/src/transformers/TXFMXPathFilter.cpp 2009-07-27 11:39:11.073713584 +0200
+@@ -183,8 +183,12 @@
+ setXPathNS(document, expr->mp_NSMap, addedNodes, mp_formatter, mp_nse);
+
+ XPathProcessorImpl xppi; // The processor
+- XercesDOMSupport xds;
+ XercesParserLiaison xpl;
++#if XALAN_VERSION_MAJOR == 1 && XALAN_VERSION_MINOR > 10
++ XercesDOMSupport xds(xpl);
++#else
++ XercesDOMSupport xds;
++#endif
+ XPathEvaluator xpe;
+ XPathFactoryDefault xpf;
+ XPathConstructionContextDefault xpcc;
+diff -Naur xml-security-c-1.5.1.orig/src/transformers/TXFMXSL.cpp xml-security-c-1.5.1/src/transformers/TXFMXSL.cpp
+--- xml-security-c-1.5.1.orig/src/transformers/TXFMXSL.cpp 2009-07-27 09:23:51.257885228 +0200
++++ xml-security-c-1.5.1/src/transformers/TXFMXSL.cpp 2009-07-27 11:42:31.867031516 +0200
+@@ -102,11 +102,15 @@
+
+ TXFMXSL::TXFMXSL(DOMDocument *doc) :
+ TXFMBase(doc),
++#if XALAN_VERSION_MAJOR == 1 && XALAN_VERSION_MINOR > 10
++xds(xpl)
++#else
+ #if defined XSEC_XERCESPARSERLIAISON_REQS_DOMSUPPORT
+ xpl(xds)
+ #else
+ xpl()
+ #endif
++#endif
+ {
+
+ // Zeroise all the pointers