Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/libxml2/files: libxml2-2.7.1-catalog_path.patch libxml2-2.7.2-winnt.patch
Date: Sat, 12 Feb 2011 11:27:31
Message-Id: 20110212112722.3FBEE20057@flycatcher.gentoo.org
1 pacho 11/02/12 11:27:22
2
3 Added: libxml2-2.7.1-catalog_path.patch
4 libxml2-2.7.2-winnt.patch
5 Log:
6 Apply fixes for PREFIX support (bug #317891), thanks a lot to Fabian Groffen for the patch.
7
8 (Portage version: 2.1.9.39/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 dev-libs/libxml2/files/libxml2-2.7.1-catalog_path.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/files/libxml2-2.7.1-catalog_path.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/files/libxml2-2.7.1-catalog_path.patch?rev=1.1&content-type=text/plain
15
16 Index: libxml2-2.7.1-catalog_path.patch
17 ===================================================================
18 --- catalog.c
19 +++ catalog.c
20 @@ -68,10 +68,10 @@
21 #define XML_URN_PUBID "urn:publicid:"
22 #define XML_CATAL_BREAK ((xmlChar *) -1)
23 #ifndef XML_XML_DEFAULT_CATALOG
24 -#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
25 +#define XML_XML_DEFAULT_CATALOG "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog"
26 #endif
27 #ifndef XML_SGML_DEFAULT_CATALOG
28 -#define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
29 +#define XML_SGML_DEFAULT_CATALOG "file://@GENTOO_PORTAGE_EPREFIX@/etc/sgml/catalog"
30 #endif
31
32 #if defined(_WIN32) && defined(_MSC_VER)
33 @@ -76,7 +76,7 @@
34
35 #if defined(_WIN32) && defined(_MSC_VER)
36 #undef XML_XML_DEFAULT_CATALOG
37 -static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
38 +static char XML_XML_DEFAULT_CATALOG[256] = "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog";
39 #if defined(_WIN32_WCE)
40 /* Windows CE don't have a A variant */
41 #define GetModuleHandleA GetModuleHandle
42 --- xmlcatalog.c
43 +++ xmlcatalog.c
44 @@ -43,7 +43,7 @@
45
46
47 #ifndef XML_SGML_DEFAULT_CATALOG
48 -#define XML_SGML_DEFAULT_CATALOG "/etc/sgml/catalog"
49 +#define XML_SGML_DEFAULT_CATALOG "@GENTOO_PORTAGE_EPREFIX@/etc/sgml/catalog"
50 #endif
51
52 /************************************************************************
53 --- runtest.c
54 +++ runtest.c
55 @@ -2747,7 +2747,7 @@
56 */
57 static int
58 uripMatch(const char * URI) {
59 - if ((URI == NULL) || (!strcmp(URI, "file:///etc/xml/catalog")))
60 + if ((URI == NULL) || (!strcmp(URI, "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog")))
61 return(0);
62 /* Verify we received the escaped URL */
63 if (strcmp(urip_rcvsURLs[urip_current], URI))
64 @@ -2766,7 +2766,7 @@
65 */
66 static void *
67 uripOpen(const char * URI) {
68 - if ((URI == NULL) || (!strcmp(URI, "file:///etc/xml/catalog")))
69 + if ((URI == NULL) || (!strcmp(URI, "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog")))
70 return(NULL);
71 /* Verify we received the escaped URL */
72 if (strcmp(urip_rcvsURLs[urip_current], URI))
73 --- xmllint.c
74 +++ xmllint.c
75 @@ -103,7 +103,7 @@
76 #endif
77
78 #ifndef XML_XML_DEFAULT_CATALOG
79 -#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
80 +#define XML_XML_DEFAULT_CATALOG "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog"
81 #endif
82
83 typedef enum {
84
85
86
87 1.1 dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch
88
89 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch?rev=1.1&view=markup
90 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch?rev=1.1&content-type=text/plain
91
92 Index: libxml2-2.7.2-winnt.patch
93 ===================================================================
94 diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/dict.c libxml2-2.7.2/dict.c
95 --- libxml2-2.7.2.orig/dict.c 2008-11-20 11:16:34 +0100
96 +++ libxml2-2.7.2/dict.c 2008-11-20 09:50:19 +0100
97 @@ -25,7 +25,7 @@
98 #else
99 #ifdef HAVE_INTTYPES_H
100 #include <inttypes.h>
101 -#elif defined(WIN32)
102 +#elif defined(WIN32) || defined (__PARITY__)
103 typedef unsigned __int32 uint32_t;
104 #endif
105 #endif
106 diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/include/wsockcompat.h libxml2-2.7.2/include/wsockcompat.h
107 --- libxml2-2.7.2.orig/include/wsockcompat.h 2008-11-20 11:16:34 +0100
108 +++ libxml2-2.7.2/include/wsockcompat.h 2008-11-20 09:50:19 +0100
109 @@ -26,7 +26,7 @@
110 #endif
111 #endif
112
113 -#ifdef __MINGW32__
114 +#if defined(__MINGW32__) || defined(__PARITY__)
115 /* Include <errno.h> here to ensure that it doesn't get included later
116 * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
117 #include <errno.h>
118 diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/nanohttp.c libxml2-2.7.2/nanohttp.c
119 --- libxml2-2.7.2.orig/nanohttp.c 2008-11-20 11:16:34 +0100
120 +++ libxml2-2.7.2/nanohttp.c 2008-11-20 09:50:19 +0100
121 @@ -82,6 +82,9 @@
122 #define XML_SOCKLEN_T unsigned int
123 #endif
124
125 +#ifdef __PARITY__
126 +# include <wsockcompat.h>
127 +#endif
128
129 #include <libxml/globals.h>
130 #include <libxml/xmlerror.h>
131 diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/xmlIO.c libxml2-2.7.2/xmlIO.c
132 --- libxml2-2.7.2.orig/xmlIO.c 2008-11-20 10:11:21 +0100
133 +++ libxml2-2.7.2/xmlIO.c 2008-11-20 10:54:34 +0100
134 @@ -44,6 +44,7 @@
135 #include <winnls.h> /* for CP_UTF8 */
136 #endif
137
138 +#ifndef __PARITY__
139 /* Figure a portable way to know if a file is a directory. */
140 #ifndef HAVE_STAT
141 # ifdef HAVE__STAT
142 @@ -79,6 +80,7 @@
143 # endif
144 # endif
145 #endif
146 +#endif /* __PARITY__ */
147
148 #include <libxml/xmlmemory.h>
149 #include <libxml/parser.h>
150 @@ -626,6 +628,7 @@
151 {
152 #ifdef HAVE_STAT
153 int retval = -1;
154 +#ifndef __PARITY__
155 wchar_t *wPath;
156
157 wPath = __xmlIOWin32UTF8ToWChar(path);
158 @@ -634,6 +637,7 @@
159 retval = _wstat(wPath,info);
160 xmlFree(wPath);
161 }
162 +#endif
163 /* maybe path in native encoding */
164 if(retval < 0)
165 retval = stat(path,info);