summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2011-02-12 11:27:22 +0000
committerPacho Ramos <pacho@gentoo.org>2011-02-12 11:27:22 +0000
commite26d223930a259f1e8183cf3b389e422d6741f73 (patch)
tree6eefdfecaece9061f43c1b288bc86b5acfd7b454 /dev-libs/libxml2/files
parentStable on amd64 wrt bug #354237 (diff)
downloadgentoo-2-e26d223930a259f1e8183cf3b389e422d6741f73.tar.gz
gentoo-2-e26d223930a259f1e8183cf3b389e422d6741f73.tar.bz2
gentoo-2-e26d223930a259f1e8183cf3b389e422d6741f73.zip
Apply fixes for PREFIX support (bug #317891), thanks a lot to Fabian Groffen for the patch.
(Portage version: 2.1.9.39/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libxml2/files')
-rw-r--r--dev-libs/libxml2/files/libxml2-2.7.1-catalog_path.patch66
-rw-r--r--dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch72
2 files changed, 138 insertions, 0 deletions
diff --git a/dev-libs/libxml2/files/libxml2-2.7.1-catalog_path.patch b/dev-libs/libxml2/files/libxml2-2.7.1-catalog_path.patch
new file mode 100644
index 000000000000..25ea47832b0e
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.7.1-catalog_path.patch
@@ -0,0 +1,66 @@
+--- catalog.c
++++ catalog.c
+@@ -68,10 +68,10 @@
+ #define XML_URN_PUBID "urn:publicid:"
+ #define XML_CATAL_BREAK ((xmlChar *) -1)
+ #ifndef XML_XML_DEFAULT_CATALOG
+-#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
++#define XML_XML_DEFAULT_CATALOG "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog"
+ #endif
+ #ifndef XML_SGML_DEFAULT_CATALOG
+-#define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog"
++#define XML_SGML_DEFAULT_CATALOG "file://@GENTOO_PORTAGE_EPREFIX@/etc/sgml/catalog"
+ #endif
+
+ #if defined(_WIN32) && defined(_MSC_VER)
+@@ -76,7 +76,7 @@
+
+ #if defined(_WIN32) && defined(_MSC_VER)
+ #undef XML_XML_DEFAULT_CATALOG
+-static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog";
++static char XML_XML_DEFAULT_CATALOG[256] = "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog";
+ #if defined(_WIN32_WCE)
+ /* Windows CE don't have a A variant */
+ #define GetModuleHandleA GetModuleHandle
+--- xmlcatalog.c
++++ xmlcatalog.c
+@@ -43,7 +43,7 @@
+
+
+ #ifndef XML_SGML_DEFAULT_CATALOG
+-#define XML_SGML_DEFAULT_CATALOG "/etc/sgml/catalog"
++#define XML_SGML_DEFAULT_CATALOG "@GENTOO_PORTAGE_EPREFIX@/etc/sgml/catalog"
+ #endif
+
+ /************************************************************************
+--- runtest.c
++++ runtest.c
+@@ -2747,7 +2747,7 @@
+ */
+ static int
+ uripMatch(const char * URI) {
+- if ((URI == NULL) || (!strcmp(URI, "file:///etc/xml/catalog")))
++ if ((URI == NULL) || (!strcmp(URI, "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog")))
+ return(0);
+ /* Verify we received the escaped URL */
+ if (strcmp(urip_rcvsURLs[urip_current], URI))
+@@ -2766,7 +2766,7 @@
+ */
+ static void *
+ uripOpen(const char * URI) {
+- if ((URI == NULL) || (!strcmp(URI, "file:///etc/xml/catalog")))
++ if ((URI == NULL) || (!strcmp(URI, "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog")))
+ return(NULL);
+ /* Verify we received the escaped URL */
+ if (strcmp(urip_rcvsURLs[urip_current], URI))
+--- xmllint.c
++++ xmllint.c
+@@ -103,7 +103,7 @@
+ #endif
+
+ #ifndef XML_XML_DEFAULT_CATALOG
+-#define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog"
++#define XML_XML_DEFAULT_CATALOG "file://@GENTOO_PORTAGE_EPREFIX@/etc/xml/catalog"
+ #endif
+
+ typedef enum {
diff --git a/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch b/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch
new file mode 100644
index 000000000000..0121e045c9d1
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch
@@ -0,0 +1,72 @@
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/dict.c libxml2-2.7.2/dict.c
+--- libxml2-2.7.2.orig/dict.c 2008-11-20 11:16:34 +0100
++++ libxml2-2.7.2/dict.c 2008-11-20 09:50:19 +0100
+@@ -25,7 +25,7 @@
+ #else
+ #ifdef HAVE_INTTYPES_H
+ #include <inttypes.h>
+-#elif defined(WIN32)
++#elif defined(WIN32) || defined (__PARITY__)
+ typedef unsigned __int32 uint32_t;
+ #endif
+ #endif
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/include/wsockcompat.h libxml2-2.7.2/include/wsockcompat.h
+--- libxml2-2.7.2.orig/include/wsockcompat.h 2008-11-20 11:16:34 +0100
++++ libxml2-2.7.2/include/wsockcompat.h 2008-11-20 09:50:19 +0100
+@@ -26,7 +26,7 @@
+ #endif
+ #endif
+
+-#ifdef __MINGW32__
++#if defined(__MINGW32__) || defined(__PARITY__)
+ /* Include <errno.h> here to ensure that it doesn't get included later
+ * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
+ #include <errno.h>
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/nanohttp.c libxml2-2.7.2/nanohttp.c
+--- libxml2-2.7.2.orig/nanohttp.c 2008-11-20 11:16:34 +0100
++++ libxml2-2.7.2/nanohttp.c 2008-11-20 09:50:19 +0100
+@@ -82,6 +82,9 @@
+ #define XML_SOCKLEN_T unsigned int
+ #endif
+
++#ifdef __PARITY__
++# include <wsockcompat.h>
++#endif
+
+ #include <libxml/globals.h>
+ #include <libxml/xmlerror.h>
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/xmlIO.c libxml2-2.7.2/xmlIO.c
+--- libxml2-2.7.2.orig/xmlIO.c 2008-11-20 10:11:21 +0100
++++ libxml2-2.7.2/xmlIO.c 2008-11-20 10:54:34 +0100
+@@ -44,6 +44,7 @@
+ #include <winnls.h> /* for CP_UTF8 */
+ #endif
+
++#ifndef __PARITY__
+ /* Figure a portable way to know if a file is a directory. */
+ #ifndef HAVE_STAT
+ # ifdef HAVE__STAT
+@@ -79,6 +80,7 @@
+ # endif
+ # endif
+ #endif
++#endif /* __PARITY__ */
+
+ #include <libxml/xmlmemory.h>
+ #include <libxml/parser.h>
+@@ -626,6 +628,7 @@
+ {
+ #ifdef HAVE_STAT
+ int retval = -1;
++#ifndef __PARITY__
+ wchar_t *wPath;
+
+ wPath = __xmlIOWin32UTF8ToWChar(path);
+@@ -634,6 +637,7 @@
+ retval = _wstat(wPath,info);
+ xmlFree(wPath);
+ }
++#endif
+ /* maybe path in native encoding */
+ if(retval < 0)
+ retval = stat(path,info);