forked from pool/libxml2
Updating link to change in openSUSE:Factory/libxml2 revision 31.0
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxml2?expand=0&rev=9a3202d62ca076111a62e7c4f5465882
This commit is contained in:
committed by
Git OBS Bridge
parent
da4e202608
commit
c971c5f25c
14
libxml2-largefile64.patch
Normal file
14
libxml2-largefile64.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
Index: libxml2-2.7.7/libxml.h
|
||||
===================================================================
|
||||
--- libxml2-2.7.7.orig/libxml.h
|
||||
+++ libxml2-2.7.7/libxml.h
|
||||
@@ -13,6 +13,9 @@
|
||||
#ifndef _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE_SOURCE
|
||||
#endif
|
||||
+#ifndef _LARGEFILE64_SOURCE
|
||||
+#define _LARGEFILE64_SOURCE
|
||||
+#endif
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@ Group: Development/Libraries/Python
|
||||
AutoReqProv: on
|
||||
Summary: Python Bindings for libxml2
|
||||
Version: 2.7.7
|
||||
Release: 3
|
||||
Release: 6
|
||||
Source: libxml2-%{version}.tar.bz2
|
||||
Source1: libxml2-python-rpmlintrc
|
||||
%py_requires
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 17 16:28:46 UTC 2010 - puzel@novell.com
|
||||
|
||||
- add libxml2-largefile64.patch (fixes build)
|
||||
- debian bug#439843
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 14 20:05:00 UTC 2010 - jw@novell.com
|
||||
|
||||
- added noxref.patch,
|
||||
this implements a new --noxref option, which turns
|
||||
validation errors about missing xrefs into warnings.
|
||||
Upstreamed as https://bugzilla.gnome.org/show_bug.cgi?id=624386
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 24 09:50:01 UTC 2010 - coolo@novell.com
|
||||
|
||||
|
||||
@@ -25,9 +25,11 @@ Group: System/Libraries
|
||||
Summary: A Library to Manipulate XML Files
|
||||
Url: http://xmlsoft.org
|
||||
Version: 2.7.7
|
||||
Release: 3
|
||||
Release: 6
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source2: baselibs.conf
|
||||
Patch1: noxref.patch
|
||||
Patch2: libxml2-largefile64.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
@@ -99,6 +101,8 @@ progress.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
|
||||
81
noxref.patch
Normal file
81
noxref.patch
Normal file
@@ -0,0 +1,81 @@
|
||||
--- libxml2-2.7.7/valid.c.orig 2010-07-14 20:53:09.000000000 +0200
|
||||
+++ libxml2-2.7.7/valid.c 2010-07-14 21:59:41.708128513 +0200
|
||||
@@ -6469,10 +6469,16 @@ xmlValidateRef(xmlRefPtr ref, xmlValidCt
|
||||
} else if (attr->atype == XML_ATTRIBUTE_IDREF) {
|
||||
id = xmlGetID(ctxt->doc, name);
|
||||
if (id == NULL) {
|
||||
- xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
|
||||
- "IDREF attribute %s references an unknown ID \"%s\"\n",
|
||||
- attr->name, name, NULL);
|
||||
- ctxt->valid = 0;
|
||||
+ if (ctxt->doc->parseFlags & XML_PARSE_NOXREF) {
|
||||
+ xmlErrValidWarning(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
|
||||
+ "IDREF attribute %s references an unknown ID \"%s\"\n",
|
||||
+ attr->name, name, NULL);
|
||||
+ } else {
|
||||
+ xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
|
||||
+ "IDREF attribute %s references an unknown ID \"%s\"\n",
|
||||
+ attr->name, name, NULL);
|
||||
+ ctxt->valid = 0;
|
||||
+ }
|
||||
}
|
||||
} else if (attr->atype == XML_ATTRIBUTE_IDREFS) {
|
||||
xmlChar *dup, *str = NULL, *cur, save;
|
||||
--- libxml2-2.7.7/parser.c.orig 2010-03-15 10:11:40.000000000 +0100
|
||||
+++ libxml2-2.7.7/parser.c 2010-07-14 21:53:25.903128498 +0200
|
||||
@@ -14381,6 +14381,12 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtP
|
||||
ctxt->sax->fatalError = NULL;
|
||||
options -= XML_PARSE_NOERROR;
|
||||
}
|
||||
+#ifdef LIBXML_VALID_ENABLED
|
||||
+ if (options & XML_PARSE_NOXREF) {
|
||||
+ options -= XML_PARSE_NOXREF;
|
||||
+ ctxt->options |= XML_PARSE_NOXREF;
|
||||
+ }
|
||||
+#endif /* LIBXML_VALID_ENABLED */
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
if (options & XML_PARSE_SAX1) {
|
||||
ctxt->sax->startElement = xmlSAX2StartElement;
|
||||
--- libxml2-2.7.7/include/libxml/parser.h.orig 2010-03-15 11:40:03.000000000 +0100
|
||||
+++ libxml2-2.7.7/include/libxml/parser.h 2010-07-14 20:39:57.161550835 +0200
|
||||
@@ -1106,7 +1106,8 @@ typedef enum {
|
||||
XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
|
||||
XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
|
||||
XML_PARSE_HUGE = 1<<19, /* relax any hardcoded limit from the parser */
|
||||
- XML_PARSE_OLDSAX = 1<<20 /* parse using SAX2 interface from before 2.7.0 */
|
||||
+ XML_PARSE_OLDSAX = 1<<20, /* parse using SAX2 interface from before 2.7.0 */
|
||||
+ XML_PARSE_NOXREF = 1<<21 /* turn idref errors into warnings */
|
||||
} xmlParserOption;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
--- libxml2-2.7.7/xmllint.c.orig 2010-07-14 20:31:34.000000000 +0200
|
||||
+++ libxml2-2.7.7/xmllint.c 2010-07-14 20:44:16.940128662 +0200
|
||||
@@ -141,6 +141,7 @@ static int oldout = 0;
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
static int valid = 0;
|
||||
+static int noxref = 0;
|
||||
static int postvalid = 0;
|
||||
static char * dtdvalid = NULL;
|
||||
static char * dtdvalidfpi = NULL;
|
||||
@@ -2979,6 +2980,7 @@ static void usage(const char *name) {
|
||||
printf("\t--nowrap : do not put HTML doc wrapper\n");
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
printf("\t--valid : validate the document in addition to std well-formed check\n");
|
||||
+ printf("\t--noxref : turn IDREF linkend errors into warnings\n");
|
||||
printf("\t--postvalid : do a posteriori validation, i.e after parsing\n");
|
||||
printf("\t--dtdvalid URL : do a posteriori validation against a given DTD\n");
|
||||
printf("\t--dtdvalidfpi FPI : same but name the DTD with a Public Identifier\n");
|
||||
@@ -3179,6 +3181,12 @@ main(int argc, char **argv) {
|
||||
postvalid++;
|
||||
loaddtd++;
|
||||
options |= XML_PARSE_DTDLOAD;
|
||||
+ } else if ((!strcmp(argv[i], "-noxref")) ||
|
||||
+ (!strcmp(argv[i], "--noxref")) ||
|
||||
+ (!strcmp(argv[i], "-noidref")) ||
|
||||
+ (!strcmp(argv[i], "--noidref"))) {
|
||||
+ noxref++;
|
||||
+ options |= XML_PARSE_NOXREF;
|
||||
} else if ((!strcmp(argv[i], "-dtdvalid")) ||
|
||||
(!strcmp(argv[i], "--dtdvalid"))) {
|
||||
i++;
|
||||
Reference in New Issue
Block a user