[packages/libraptor] Rel 8; fixes from FC
arekm
arekm at pld-linux.org
Fri Aug 8 11:30:57 CEST 2025
commit 65d039bbcb4bb6b3427b49e29f00d03d3b443ccf
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Aug 8 11:30:48 2025 +0200
Rel 8; fixes from FC
libraptor.spec | 14 +-
raptor-1.4.21-CVE-2012-0037.patch | 393 +++++++++++++++++++++++++++++++++++++
raptor-1.4.21-CVE-2017-18926.patch | 17 ++
raptor-1.4.21-curl.patch | 11 ++
raptor-1.4.21-gcc-14-fix.patch | 49 +++++
raptor-config-multilib.patch | 18 ++
raptor-configure-c99.patch | 36 ++++
7 files changed, 537 insertions(+), 1 deletion(-)
---
diff --git a/libraptor.spec b/libraptor.spec
index 3ca65e1..3bfa8ab 100644
--- a/libraptor.spec
+++ b/libraptor.spec
@@ -4,11 +4,17 @@ Name: libraptor
# the real name is raptor, but it conflicts with already existing raptor game
%define rname raptor
Version: 1.4.21
-Release: 7
+Release: 8
License: LGPL v2.1+ or GPL v2+ or Apache v2.0+
Group: Libraries
Source0: http://download.librdf.org/source/%{rname}-%{version}.tar.gz
# Source0-md5: 992061488af7a9e2d933df6b694bb876
+Patch0: raptor-config-multilib.patch
+Patch1: raptor-1.4.21-CVE-2012-0037.patch
+Patch2: raptor-1.4.21-curl.patch
+Patch3: raptor-1.4.21-CVE-2017-18926.patch
+Patch4: raptor-configure-c99.patch
+Patch5: raptor-1.4.21-gcc-14-fix.patch
URL: http://librdf.org/raptor/
BuildRequires: autoconf >= 2.62
BuildRequires: automake >= 1:1.7
@@ -92,6 +98,12 @@ Testowy program parsera Raptor RDF.
%prep
%setup -q -n %{rname}-%{version}
+%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
%build
%{__libtoolize}
diff --git a/raptor-1.4.21-CVE-2012-0037.patch b/raptor-1.4.21-CVE-2012-0037.patch
new file mode 100644
index 0000000..bcc0edf
--- /dev/null
+++ b/raptor-1.4.21-CVE-2012-0037.patch
@@ -0,0 +1,393 @@
+diff --git a/src/raptor.h b/src/raptor.h
+index f3c1409..f586f44 100644
+--- a/src/raptor.h
++++ b/src/raptor.h
+@@ -407,6 +407,7 @@ typedef struct {
+ * @RAPTOR_FEATURE_RSS_TRIPLES: Atom/RSS serializer writes extra RDF triples it finds (none, rdf-xml, atom-triples)
+ * @RAPTOR_FEATURE_ATOM_ENTRY_URI: Atom entry URI. If given, generate an Atom Entry Document with the item having the given URI, otherwise generate an Atom Feed Document with any items found.
+ * @RAPTOR_FEATURE_PREFIX_ELEMENTS: Integer. If set, generate Atom/RSS1.0 documents with prefixed elements, otherwise unprefixed.
++ * @RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES: When reading XML, load external entities.
+ * @RAPTOR_FEATURE_LAST: Internal
+ *
+ * Raptor parser, serializer or XML writer features.
+@@ -448,7 +449,8 @@ typedef enum {
+ RAPTOR_FEATURE_RSS_TRIPLES,
+ RAPTOR_FEATURE_ATOM_ENTRY_URI,
+ RAPTOR_FEATURE_PREFIX_ELEMENTS,
+- RAPTOR_FEATURE_LAST = RAPTOR_FEATURE_PREFIX_ELEMENTS
++ RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES,
++ RAPTOR_FEATURE_LAST = RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES
+ } raptor_feature;
+
+
+diff --git a/src/raptor_feature.c b/src/raptor_feature.c
+index d674ffb..2ff135a 100644
+--- a/src/raptor_feature.c
++++ b/src/raptor_feature.c
+@@ -93,7 +93,8 @@ static const struct
+ { RAPTOR_FEATURE_JSON_EXTRA_DATA , 6, "jsonExtraData", "JSON serializer extra data" },
+ { RAPTOR_FEATURE_RSS_TRIPLES , 6, "rssTriples", "Atom/RSS serializer writes extra RDF triples" },
+ { RAPTOR_FEATURE_ATOM_ENTRY_URI , 6, "atomEntryUri", "Atom serializer Entry URI" },
+- { RAPTOR_FEATURE_PREFIX_ELEMENTS , 2, "prefixElements", "Atom/RSS serializers write namespace-prefixed elements" }
++ { RAPTOR_FEATURE_PREFIX_ELEMENTS , 2, "prefixElements", "Atom/RSS serializers write namespace-prefixed elements" },
++ { RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES, 1, "loadExternalEntities", "Load external XML entities." }
+ };
+
+
+diff --git a/src/raptor_internal.h b/src/raptor_internal.h
+index f7944db..282becc 100644
+--- a/src/raptor_internal.h
++++ b/src/raptor_internal.h
+@@ -1058,6 +1058,14 @@ struct raptor_sax2_s {
+ /* base URI for resolving relative URIs or xml:base URIs */
+ raptor_uri* base_uri;
+
++ /* call SAX2 handlers if non-0 */
++ int enabled;
++
++ /* FEATURE:
++ * non 0 if XML entities should be loaded
++ */
++ int feature_load_external_entities;
++
+ /* sax2 init failed - do not try to do anything with it */
+ int failed;
+ };
+diff --git a/src/raptor_libxml.c b/src/raptor_libxml.c
+index 427e16d..9f2e9b0 100644
+--- a/src/raptor_libxml.c
++++ b/src/raptor_libxml.c
+@@ -142,18 +142,115 @@ raptor_libxml_hasExternalSubset (void* user_data)
+
+ static xmlParserInputPtr
+ raptor_libxml_resolveEntity(void* user_data,
+- const xmlChar *publicId, const xmlChar *systemId) {
+- raptor_sax2* sax2=(raptor_sax2*)user_data;
+- return libxml2_resolveEntity(sax2->xc, publicId, systemId);
++ const xmlChar *publicId, const xmlChar *systemId)
++{
++ raptor_sax2* sax2 = (raptor_sax2*)user_data;
++ xmlParserCtxtPtr ctxt = sax2->xc;
++ const unsigned char *uri_string = NULL;
++ xmlParserInputPtr entity_input;
++ int load_entity = 0;
++
++ if(ctxt->input)
++ uri_string = (const unsigned char *)ctxt->input->filename;
++
++ if(!uri_string)
++ uri_string = (const unsigned char *)ctxt->directory;
++
++ load_entity = sax2->feature_load_external_entities;
++
++ if(load_entity) {
++ entity_input = xmlLoadExternalEntity((const char*)uri_string,
++ (const char*)publicId,
++ ctxt);
++ } else {
++ RAPTOR_DEBUG4("Not loading entity URI %s by policy for publicId '%s' systemId '%s'\n", uri_string, publicId, systemId);
++ }
++
++ return entity_input;
+ }
+
+
+ static xmlEntityPtr
+-raptor_libxml_getEntity(void* user_data, const xmlChar *name) {
+- raptor_sax2* sax2=(raptor_sax2*)user_data;
+- return libxml2_getEntity(sax2->xc, name);
+-}
++raptor_libxml_getEntity(void* user_data, const xmlChar *name)
++{
++ raptor_sax2* sax2 = (raptor_sax2*)user_data;
++ xmlParserCtxtPtr xc = sax2->xc;
++ xmlEntityPtr ret = NULL;
+
++ if(!xc)
++ return NULL;
++
++ if(!xc->inSubset) {
++ /* looks for hardcoded set of entity names - lt, gt etc. */
++ ret = xmlGetPredefinedEntity(name);
++ if(ret) {
++ RAPTOR_DEBUG2("Entity '%s' found in predefined set\n", name);
++ return ret;
++ }
++ }
++
++ /* This section uses xmlGetDocEntity which looks for entities in
++ * memory only, never from a file or URI
++ */
++ if(xc->myDoc && (xc->myDoc->standalone == 1)) {
++ RAPTOR_DEBUG2("Entity '%s' document is standalone\n", name);
++ /* Document is standalone: no entities are required to interpret doc */
++ if(xc->inSubset == 2) {
++ xc->myDoc->standalone = 0;
++ ret = xmlGetDocEntity(xc->myDoc, name);
++ xc->myDoc->standalone = 1;
++ } else {
++ ret = xmlGetDocEntity(xc->myDoc, name);
++ if(!ret) {
++ xc->myDoc->standalone = 0;
++ ret = xmlGetDocEntity(xc->myDoc, name);
++ xc->myDoc->standalone = 1;
++ }
++ }
++ } else {
++ ret = xmlGetDocEntity(xc->myDoc, name);
++ }
++
++ if(ret && !ret->children &&
++ (ret->etype == XML_EXTERNAL_GENERAL_PARSED_ENTITY)) {
++ /* Entity is an external general parsed entity. It may be in a
++ * catalog file, user file or user URI
++ */
++ int val = 0;
++ xmlNodePtr children;
++ int load_entity = 0;
++
++ load_entity = sax2->feature_load_external_entities;
++
++ if(!load_entity) {
++ RAPTOR_DEBUG2("Not getting entity URI %s by policy\n", ret->URI);
++ children = xmlNewText((const xmlChar*)"");
++ } else {
++ /* Disable SAX2 handlers so that the SAX2 events do not all get
++ * sent to callbacks during dealing with the entity parsing.
++ */
++ sax2->enabled = 0;
++ val = xmlParseCtxtExternalEntity(xc, ret->URI, ret->ExternalID, &children);
++ sax2->enabled = 1;
++ }
++
++ if(!val) {
++ xmlAddChildList((xmlNodePtr)ret, children);
++ } else {
++ xc->validate = 0;
++ return NULL;
++ }
++
++ ret->owner = 1;
++
++ /* Mark this entity as having been checked - never do this again */
++ if(!ret->checked)
++ ret->checked = 1;
++ }
++
++ return ret;
++}
++
+
+ static xmlEntityPtr
+ raptor_libxml_getParameterEntity(void* user_data, const xmlChar *name) {
+diff --git a/src/raptor_parse.c b/src/raptor_parse.c
+index cfee110..e30758f 100644
+--- a/src/raptor_parse.c
++++ b/src/raptor_parse.c
+@@ -1443,6 +1443,7 @@ raptor_set_feature(raptor_parser *parser, raptor_feature feature, int value)
+ case RAPTOR_FEATURE_MICROFORMATS:
+ case RAPTOR_FEATURE_HTML_LINK:
+ case RAPTOR_FEATURE_WWW_TIMEOUT:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+ parser->features[(int)feature]=value;
+ break;
+
+@@ -1564,6 +1565,7 @@ raptor_get_feature(raptor_parser *parser, raptor_feature feature)
+ case RAPTOR_FEATURE_MICROFORMATS:
+ case RAPTOR_FEATURE_HTML_LINK:
+ case RAPTOR_FEATURE_WWW_TIMEOUT:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+ result = parser->features[(int)feature];
+ break;
+
+diff --git a/src/raptor_rdfxml.c b/src/raptor_rdfxml.c
+index b2e225b..89f831e 100644
+--- a/src/raptor_rdfxml.c
++++ b/src/raptor_rdfxml.c
+@@ -1130,6 +1130,9 @@ raptor_rdfxml_parse_start(raptor_parser* rdf_parser)
+ raptor_sax2_set_feature(rdf_xml_parser->sax2,
+ RAPTOR_FEATURE_NO_NET,
+ rdf_parser->features[RAPTOR_FEATURE_NO_NET]);
++ raptor_sax2_set_feature(rdf_xml_parser->sax2,
++ RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES,
++ rdf_parser->features[RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES]);
+
+ raptor_sax2_parse_start(rdf_xml_parser->sax2, uri);
+
+diff --git a/src/raptor_rss.c b/src/raptor_rss.c
+index cc42c10..1d0b6e3 100644
+--- a/src/raptor_rss.c
++++ b/src/raptor_rss.c
+@@ -247,6 +247,9 @@ raptor_rss_parse_start(raptor_parser *rdf_parser)
+ raptor_sax2_set_feature(rss_parser->sax2,
+ RAPTOR_FEATURE_NO_NET,
+ rdf_parser->features[RAPTOR_FEATURE_NO_NET]);
++ raptor_sax2_set_feature(rss_parser->sax2,
++ RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES,
++ rdf_parser->features[RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES]);
+
+ raptor_sax2_parse_start(rss_parser->sax2, uri);
+
+diff --git a/src/raptor_sax2.c b/src/raptor_sax2.c
+index 250cbce..9fa0da1 100644
+--- a/src/raptor_sax2.c
++++ b/src/raptor_sax2.c
+@@ -106,6 +106,8 @@ raptor_new_sax2(void* user_data, raptor_error_handlers* error_handlers)
+
+ sax2->user_data=user_data;
+
++ sax2->enabled = 1;
++
+ sax2->locator=error_handlers->locator;
+
+ sax2->error_handlers=error_handlers;
+@@ -721,6 +723,10 @@ raptor_sax2_set_feature(raptor_sax2 *sax2, raptor_feature feature, int value)
+ sax2->feature_no_net=value;
+ break;
+
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
++ sax2->feature_load_external_entities=value;
++ break;
++
+ case RAPTOR_FEATURE_SCANNING:
+ case RAPTOR_FEATURE_ASSUME_IS_RDF:
+ case RAPTOR_FEATURE_ALLOW_NON_NS_ATTRIBUTES:
+@@ -802,7 +808,7 @@ raptor_sax2_start_element(void* user_data, const unsigned char *name,
+ unsigned char *xml_language=NULL;
+ raptor_uri *xml_base=NULL;
+
+- if(sax2->failed)
++ if(!sax2->enabled || sax2->failed)
+ return;
+
+ #ifdef RAPTOR_XML_EXPAT
+@@ -1031,7 +1037,7 @@ raptor_sax2_end_element(void* user_data, const unsigned char *name)
+ raptor_sax2* sax2=(raptor_sax2*)user_data;
+ raptor_xml_element* xml_element;
+
+- if(sax2->failed)
++ if(!sax2->enabled || sax2->failed)
+ return;
+
+ #ifdef RAPTOR_XML_EXPAT
+@@ -1069,7 +1075,7 @@ void
+ raptor_sax2_characters(void* user_data, const unsigned char *s, int len)
+ {
+ raptor_sax2* sax2=(raptor_sax2*)user_data;
+- if(!sax2->failed && sax2->characters_handler)
++ if(sax2->enabled && !sax2->failed && sax2->characters_handler)
+ sax2->characters_handler(sax2->user_data, sax2->current_element, s, len);
+ }
+
+@@ -1085,7 +1091,7 @@ raptor_sax2_cdata(void* user_data, const unsigned char *s, int len)
+ #endif
+ #endif
+
+- if(!sax2->failed && sax2->cdata_handler)
++ if(sax2->enabled && !sax2->failed && sax2->cdata_handler)
+ sax2->cdata_handler(sax2->user_data, sax2->current_element, s, len);
+ }
+
+@@ -1095,7 +1101,7 @@ void
+ raptor_sax2_comment(void* user_data, const unsigned char *s)
+ {
+ raptor_sax2* sax2=(raptor_sax2*)user_data;
+- if(!sax2->failed && sax2->comment_handler)
++ if(sax2->enabled && !sax2->failed && sax2->comment_handler)
+ sax2->comment_handler(sax2->user_data, sax2->current_element, s);
+ }
+
+@@ -1110,7 +1116,7 @@ raptor_sax2_unparsed_entity_decl(void* user_data,
+ const unsigned char* notationName)
+ {
+ raptor_sax2* sax2=(raptor_sax2*)user_data;
+- if(!sax2->failed && sax2->unparsed_entity_decl_handler)
++ if(sax2->enabled && !sax2->failed && sax2->unparsed_entity_decl_handler)
+ sax2->unparsed_entity_decl_handler(sax2->user_data,
+ entityName, base, systemId,
+ publicId, notationName);
+@@ -1127,7 +1133,7 @@ raptor_sax2_external_entity_ref(void* user_data,
+ {
+ raptor_sax2* sax2=(raptor_sax2*)user_data;
+
+- if(sax2->failed)
++ if(!sax2->enabled || sax2->failed)
+ return 0;
+
+ if(sax2->external_entity_ref_handler)
+diff --git a/src/raptor_serialize.c b/src/raptor_serialize.c
+index 8e040ae..3724ef4 100644
+--- a/src/raptor_serialize.c
++++ b/src/raptor_serialize.c
+@@ -974,6 +974,7 @@ raptor_serializer_set_feature(raptor_serializer *serializer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
+@@ -1081,6 +1082,7 @@ raptor_serializer_set_feature_string(raptor_serializer *serializer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
+@@ -1222,6 +1224,7 @@ raptor_serializer_get_feature(raptor_serializer *serializer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
+@@ -1324,6 +1327,7 @@ raptor_serializer_get_feature_string(raptor_serializer *serializer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_WRITER_AUTO_INDENT:
+diff --git a/src/raptor_turtle_writer.c b/src/raptor_turtle_writer.c
+index 93f57cf..3a5eb0b 100644
+--- a/src/raptor_turtle_writer.c
++++ b/src/raptor_turtle_writer.c
+@@ -740,6 +740,7 @@ raptor_turtle_writer_set_feature(raptor_turtle_writer *turtle_writer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_RELATIVE_URIS:
+@@ -854,6 +855,7 @@ raptor_turtle_writer_get_feature(raptor_turtle_writer *turtle_writer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_RELATIVE_URIS:
+diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
+index 051f3b3..3468795 100644
+--- a/src/raptor_xml_writer.c
++++ b/src/raptor_xml_writer.c
+@@ -973,6 +973,7 @@ raptor_xml_writer_set_feature(raptor_xml_writer *xml_writer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_RELATIVE_URIS:
+@@ -1094,6 +1095,7 @@ raptor_xml_writer_get_feature(raptor_xml_writer *xml_writer,
+
+ /* Shared */
+ case RAPTOR_FEATURE_NO_NET:
++ case RAPTOR_FEATURE_LOAD_EXTERNAL_ENTITIES:
+
+ /* XML writer features */
+ case RAPTOR_FEATURE_RELATIVE_URIS:
diff --git a/raptor-1.4.21-CVE-2017-18926.patch b/raptor-1.4.21-CVE-2017-18926.patch
new file mode 100644
index 0000000..8467796
--- /dev/null
+++ b/raptor-1.4.21-CVE-2017-18926.patch
@@ -0,0 +1,17 @@
+diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
+index 3468795..8019948 100644
+--- a/src/raptor_xml_writer.c
++++ b/src/raptor_xml_writer.c
+@@ -209,9 +209,10 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
+ size_t nspace_declarations_count=0;
+ unsigned int i;
+
+- /* max is 1 per element and 1 for each attribute + size of declared */
+ if(nstack) {
+- int nspace_max_count=element->attribute_count+1;
++ int nspace_max_count = element->attribute_count * 2; /* attr and value */
++ if(element->name->nspace)
++ nspace_max_count++;
+ if(element->declared_nspaces)
+ nspace_max_count += raptor_sequence_size(element->declared_nspaces);
+
diff --git a/raptor-1.4.21-curl.patch b/raptor-1.4.21-curl.patch
new file mode 100644
index 0000000..5901405
--- /dev/null
+++ b/raptor-1.4.21-curl.patch
@@ -0,0 +1,11 @@
+diff -up raptor-1.4.21/src/raptor_internal.h.curl raptor-1.4.21/src/raptor_internal.h
+--- raptor-1.4.21/src/raptor_internal.h.curl 2010-01-29 17:54:42.000000000 -0600
++++ raptor-1.4.21/src/raptor_internal.h 2011-07-31 11:02:44.182465296 -0500
+@@ -852,7 +852,6 @@ int raptor_utf8_is_nfc(const unsigned ch
+
+ #ifdef RAPTOR_WWW_LIBCURL
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+ #endif
+
diff --git a/raptor-1.4.21-gcc-14-fix.patch b/raptor-1.4.21-gcc-14-fix.patch
new file mode 100644
index 0000000..27a1077
--- /dev/null
+++ b/raptor-1.4.21-gcc-14-fix.patch
@@ -0,0 +1,49 @@
+diff --git a/src/raptor_internal.h b/src/raptor_internal.h
+index b291e18..5bcd914 100644
+--- a/src/raptor_internal.h
++++ b/src/raptor_internal.h
+@@ -209,7 +209,7 @@ extern void raptor_libxml_generic_error(void* user_data, const char *msg, ...) R
+ extern void raptor_libxml_validation_error(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3);
+ extern void raptor_libxml_validation_warning(void *context, const char *msg, ...) RAPTOR_PRINTF_FORMAT(2, 3);
+ void raptor_libxml_free(xmlParserCtxtPtr xc);
+-void raptor_libxml_xmlStructuredErrorFunc(void *user_data, xmlErrorPtr err);
++void raptor_libxml_xmlStructuredErrorFunc(void *user_data, const xmlError *err);
+
+ /* raptor_parse.c - exported to libxml part */
+ extern void raptor_libxml_update_document_locator(raptor_sax2* sax2, raptor_locator* locator);
+diff --git a/src/raptor_libxml.c b/src/raptor_libxml.c
+index 9f2e9b0..d1a2f76 100644
+--- a/src/raptor_libxml.c
++++ b/src/raptor_libxml.c
+@@ -242,10 +242,6 @@ raptor_libxml_getEntity(void* user_data, const xmlChar *name)
+ }
+
+ ret->owner = 1;
+-
+- /* Mark this entity as having been checked - never do this again */
+- if(!ret->checked)
+- ret->checked = 1;
+ }
+
+ return ret;
+@@ -686,7 +682,7 @@ static const char* const raptor_libxml_domain_labels[XML_LAST_DL+2]= {
+
+
+ void
+-raptor_libxml_xmlStructuredErrorFunc(void *user_data, xmlErrorPtr err)
++raptor_libxml_xmlStructuredErrorFunc(void *user_data, const xmlError *err)
+ {
+ raptor_error_handlers* error_handlers = NULL;
+ raptor_stringbuffer* sb;
+@@ -718,11 +714,6 @@ raptor_libxml_xmlStructuredErrorFunc(void *user_data, xmlErrorPtr err)
+ if(err->level == XML_ERR_WARNING && !err->file)
+ return;
+
+- /* XML fatal errors never cause an abort */
+- if(err->level == XML_ERR_FATAL)
+- err->level= XML_ERR_ERROR;
+-
+-
+ sb=raptor_new_stringbuffer();
+ if(err->domain != XML_FROM_HTML)
+ raptor_stringbuffer_append_counted_string(sb, (const unsigned char*)"XML ",
diff --git a/raptor-config-multilib.patch b/raptor-config-multilib.patch
new file mode 100644
index 0000000..a2cbec9
--- /dev/null
+++ b/raptor-config-multilib.patch
@@ -0,0 +1,18 @@
+diff -rupN raptor-1.4.18.old/src/raptor-config.in raptor-1.4.18/src/raptor-config.in
+--- raptor-1.4.18.old/src/raptor-config.in 2007-01-05 23:02:00.000000000 -0500
++++ raptor-1.4.18/src/raptor-config.in 2009-10-29 01:47:57.000000000 -0400
+@@ -130,11 +130,11 @@ if test "$echo_options" = "yes"; then
+ done
+ fi
+ if test "$echo_libs" = "yes"; then
+- echo -L at libdir@ -lraptor
++ pkg-config --libs raptor
+ fi
+ if test "$echo_libtool_libs" = "yes"; then
+- echo @libdir@/@RAPTOR_LIBTOOLLIBS@
++ echo
+ fi
+ if test "$echo_private_libs" = "yes"; then
+- echo @LIBS@
++ pkg-config --libs --static raptor
+ fi
diff --git a/raptor-configure-c99.patch b/raptor-configure-c99.patch
new file mode 100644
index 0000000..2efa0ed
--- /dev/null
+++ b/raptor-configure-c99.patch
@@ -0,0 +1,36 @@
+Avoid implicit declaration of vsnprintf in configure check. Fixed
+upstream via:
+
+commit a7da6f35813e30124765d995d9053cb7f8529ca4
+Author: Dave Beckett <dave at dajobe.org>
+Date: Wed Jun 6 10:16:19 2012 -0700
+
+ Make configure vsnprintf() check more comprehensive
+
+ - Test program also needs <stdio.h> and (now) <stdlib.h>
+ - Declare is_c99() function as static to avoid "no previous
+ declaration" warning from GCC's -Wmissing-declarations
+ - Improved test to invoke vsnprintf(NULL, 0, ...) because on Solaris
+ 8, the function returns -1 in this case but works normally otherwise
+ - Declare main(void) instead of main(int argc, char* argv) to avoid
+ "unused parameter" warnings
+ - Make test program return 0 if the test is successful,
+ as otherwise a false-positive result is possible (note that
+ AC_TRY_RUN() interprets failure to compile/link the program, etc.
+ the same as a non-zero program exit status)
+ - Make the test program return an exit status indicative of the
+ failure mode: 1 = non-NULL case fails, 10 = NULL case fails, 11 = both fail
+ - Use proper m4 quoting in modified code
+
+diff --git a/configure.ac b/configure.ac
+index a5fa9fee18a7bc59..181431fcd6745c2b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -281,6 +281,7 @@ AC_TRY_LINK([#ifdef HAVE_GETOPT_H
+ if test $ac_cv_func_vsnprintf = yes; then
+ AC_MSG_CHECKING(vsnprintf has C99 compatible return value)
+ AC_TRY_RUN([#include <stdarg.h>
++#include <stdio.h>
+ int is_c99(char *s, ...) {
+ char buffer[32];
+ va_list args;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libraptor.git/commitdiff/65d039bbcb4bb6b3427b49e29f00d03d3b443ccf
More information about the pld-cvs-commit
mailing list