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
commitbae50288e99b583e28e7c7f35b9ffd1e97d73942 (patch)
treed8ca572ab82e14628c4b51e8bc87730843271776
parentStable on amd64 wrt bug #354237 (diff)
downloadhistorical-bae50288e99b583e28e7c7f35b9ffd1e97d73942.tar.gz
historical-bae50288e99b583e28e7c7f35b9ffd1e97d73942.tar.bz2
historical-bae50288e99b583e28e7c7f35b9ffd1e97d73942.zip
Apply fixes for PREFIX support (bug #317891), thanks a lot to Fabian Groffen for the patch.
Package-Manager: portage-2.1.9.39/cvs/Linux x86_64
-rw-r--r--dev-libs/libxml2/ChangeLog8
-rw-r--r--dev-libs/libxml2/Manifest12
-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
-rw-r--r--dev-libs/libxml2/libxml2-2.7.8.ebuild41
5 files changed, 180 insertions, 19 deletions
diff --git a/dev-libs/libxml2/ChangeLog b/dev-libs/libxml2/ChangeLog
index a453920012e3..b60da09cabc5 100644
--- a/dev-libs/libxml2/ChangeLog
+++ b/dev-libs/libxml2/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/libxml2
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.296 2011/02/11 17:30:19 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.297 2011/02/12 11:27:21 pacho Exp $
+
+ 12 Feb 2011; Pacho Ramos <pacho@gentoo.org>
+ +files/libxml2-2.7.1-catalog_path.patch, +files/libxml2-2.7.2-winnt.patch,
+ libxml2-2.7.8.ebuild:
+ Apply fixes for PREFIX support (bug #317891), thanks a lot to Fabian Groffen
+ for the patch.
*libxml2-2.7.8 (11 Feb 2011)
diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest
index 9b4bceeaa78b..83e4f039dcb5 100644
--- a/dev-libs/libxml2/Manifest
+++ b/dev-libs/libxml2/Manifest
@@ -1,6 +1,8 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+AUX libxml2-2.7.1-catalog_path.patch 2209 RMD160 0306a8611cde6a7b78f5fd43c93ebbfddc6607e7 SHA1 bec0ee91757e2fa093c89d6eba1821f40878f002 SHA256 b3343f0611f9cb6e55bf62047a988653e3e9cc50f194b18adbc330b455236290
+AUX libxml2-2.7.2-winnt.patch 2120 RMD160 943293107d0c8313a525c2516f06861c013d9777 SHA1 4e68c44fe1b932c7d61b06bffb4d634701e29e0a SHA256 63cb134dbef1b7be1b9dc400da8aef1816436a193a2f97db0028cdd70e3e4cf0
AUX libxml2-2.7.8-reactivate-script.patch 628 RMD160 7c0da0a849af6f98e176acd595b8cf8fcc3e41e8 SHA1 90cd59c02e8043a66eb37b06c261a49c08f907cf SHA256 379102cf7547c47fdcc94daecb310e55b80bd157ea5280d72194eedf9ad371de
AUX libxml2-2.7.8-xpath-freeing.patch 1042 RMD160 ecd781d93ba067cea9448ef02e408c2002ce019c SHA1 87eff7814372ef5dd224c7079106cf1fcb35bf3f SHA256 655a1cd96df3bcbd02e3a7fe9b812ee7e116dea036a9a5bfb529be714f288e87
AUX libxml2-2.7.8-xpath-freeing2.patch 885 RMD160 d2c0c1e1b55ddc7ba5ccae8d7795b07887937cbd SHA1 fc67cc2c8e7a703f5cf01460dca5f828d42f5ab0 SHA256 112e93fb8c4f76e74b705d709ae741f33228cad82ba3bd2f55524af2fd863bfd
@@ -10,13 +12,13 @@ DIST libxml2-2.7.8.tar.gz 4881808 RMD160 30709622cfe3e2175e73d6701b7e19a25ab5ac4
DIST xsts-2002-01-16.tar.gz 6894439 RMD160 e8905fe1451a1c367b0104af24edca73bad1db08 SHA1 ca6344e6c47f8c28231f5b213d0c8deb0311a409 SHA256 55e5c08db29946a91ea8e70e8f2418d3fd30d8b6777941dfba7f54726ffd9914
DIST xsts-2004-01-14.tar.gz 2761085 RMD160 faff2d7826e47ae9968564bc83dab1b54c5e4bf6 SHA1 5896c2aa2cda464246306c5cf0577ed506eefaab SHA256 09bdf9f81f381ebf9bc158a9472e498e896f7a02eb7461146e9abe1b9493ca17
EBUILD libxml2-2.7.7.ebuild 4785 RMD160 fcf805c5d56e0a56d629c198f969a9e10350ec73 SHA1 50a99e7e34c910047a051e13b01357a59492feaf SHA256 71cc475f1e52df3d5b1c2436078133451c1307ecee3356b895825eb27e2ca801
-EBUILD libxml2-2.7.8.ebuild 5275 RMD160 ba32dab54927509db099f300c143a91f41ef9ec0 SHA1 512ef62edd094c45a2431e5f7644a309f89fd462 SHA256 a1f3c34e76dc765dfc742b212a682efc32dab4e312f07022f8c6b445c2011656
-MISC ChangeLog 40176 RMD160 c1c13a9b90de9f410669dfc83fa6fa76c5905fe0 SHA1 5c96c0e2f37b50001c1724ebbf8cbe9fb4edce30 SHA256 930dad2303b2c790a0cb6a1b293aba7ed607199f726d63e09c9fede38f7cd072
+EBUILD libxml2-2.7.8.ebuild 6181 RMD160 f06ab60a390f88b8f35e4eef0085ea660d8c3a93 SHA1 3b28e61e03bbd9f50a19a09c8bbfcccea3485807 SHA256 211b1b0b2b0ecf231692ea00f3b82341d9190b370ff379583ee1540acad9f2f4
+MISC ChangeLog 40420 RMD160 a862a3311e3930734e425986618764c23569a7bb SHA1 936ff652a6aff43367e4adb63cedf22785f7d7fb SHA256 c286b20d37e8463f5fcd8b9976dad667cdb19f70c3bdf48d5081227fa97d0ea3
MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
-iEYEARECAAYFAk1VcjEACgkQCaWpQKGI+9RlTgCfaNWee7Qe9GXgDWDux7w2EzdJ
-tRIAn1quNfTy8Vckue4hdkF7+Jy8jzEn
-=jJHl
+iEYEARECAAYFAk1Wbp8ACgkQCaWpQKGI+9S2ugCfYw0rnthTbh6S+FagWP/W9mEx
+BYMAn37uYJHI4vhfcm1/gfEF6Fbnh9q8
+=luFL
-----END PGP SIGNATURE-----
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);
diff --git a/dev-libs/libxml2/libxml2-2.7.8.ebuild b/dev-libs/libxml2/libxml2-2.7.8.ebuild
index df3402309614..8decb1cb0935 100644
--- a/dev-libs/libxml2/libxml2-2.7.8.ebuild
+++ b/dev-libs/libxml2/libxml2-2.7.8.ebuild
@@ -1,19 +1,19 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8.ebuild,v 1.1 2011/02/11 17:30:19 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8.ebuild,v 1.2 2011/02/12 11:27:21 pacho Exp $
EAPI="3"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython"
-inherit libtool flag-o-matic eutils python autotools
+inherit libtool flag-o-matic eutils python autotools prefix
DESCRIPTION="Version 2 of the library to manipulate XML files"
HOMEPAGE="http://www.xmlsoft.org/"
LICENSE="MIT"
SLOT="2"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="debug doc examples icu ipv6 python readline test"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
@@ -56,6 +56,12 @@ src_unpack() {
}
src_prepare() {
+ # Patches needed for prefix support
+ epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
+ epatch "${FILESDIR}"/${PN}-2.7.2-winnt.patch
+
+ eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
+
epunt_cxx
# Reactivate the shared library versionning script
@@ -89,9 +95,9 @@ src_configure() {
# --with-mem-debug causes unusual segmentation faults (bug #105120).
- local myconf="--with-zlib
+ local myconf="--with-zlib=${EPREFIX}/usr
--with-html-subdir=${PF}/html
- --docdir=/usr/share/doc/${PF}
+ --docdir=${EPREFIX}/usr/share/doc/${PF}
$(use_with debug run-debug)
$(use_with icu)
$(use_with python)
@@ -111,8 +117,8 @@ src_compile() {
if use python; then
python_copy_sources python
building() {
- emake PYTHON_INCLUDES="$(python_get_includedir)" \
- PYTHON_SITE_PACKAGES="$(python_get_sitedir)"
+ emake PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \
+ PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)"
}
python_execute_function -s --source-dir python building
fi
@@ -131,15 +137,24 @@ src_test() {
src_install() {
emake DESTDIR="${D}" \
- EXAMPLES_DIR=/usr/share/doc/${PF}/examples \
+ EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples \
install || die "Installation failed"
+ # on windows, xmllint is installed by interix libxml2 in parent prefix.
+ # this is the version to use. the native winnt version does not support
+ # symlinks, which makes repoman fail if the portage tree is linked in
+ # from another location (which is my default). -- mduft
+ if [[ ${CHOST} == *-winnt* ]]; then
+ rm -rf "${ED}"/usr/bin/xmllint
+ rm -rf "${ED}"/usr/bin/xmlcatalog
+ fi
+
if use python; then
installation() {
emake DESTDIR="${D}" \
- PYTHON_SITE_PACKAGES="$(python_get_sitedir)" \
- docsdir=/usr/share/doc/${PF}/python \
- exampledir=/usr/share/doc/${PF}/python/examples \
+ PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" \
+ docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
+ exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
install
}
python_execute_function -s --source-dir python installation
@@ -173,7 +188,7 @@ pkg_postinst() {
# We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
# be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
- if [ "${EROOT}" != "/" ]
+ if [ "${ROOT}" != "/" ]
then
elog "Skipping XML catalog creation for stage building (bug #208887)."
else
@@ -185,7 +200,7 @@ pkg_postinst() {
# <obz@gentoo.org>
if [ ! -e ${CATALOG} ]; then
[ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml"
- /usr/bin/xmlcatalog --create > ${CATALOG}
+ "${EPREFIX}"/usr/bin/xmlcatalog --create > ${CATALOG}
einfo "Created XML catalog in ${CATALOG}"
fi
fi