summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-05-21 02:24:56 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-05-21 02:24:56 +0000
commit252da6a2498a88833d042b79a5db2f5cb2f7722e (patch)
tree5629e0d34308b331ab284da272c353c788fe4af1
parentTweak the last commit; drop NEWS from the patch since it won't apply cleanly. (diff)
downloadhistorical-252da6a2498a88833d042b79a5db2f5cb2f7722e.tar.gz
historical-252da6a2498a88833d042b79a5db2f5cb2f7722e.tar.bz2
historical-252da6a2498a88833d042b79a5db2f5cb2f7722e.zip
Version bump with numerous bugfixes, including for bug #416209 (out-of-bounds write, CVE-2011-3102, thanks to Paweł Hajdan, Jr.). Drop old.
Package-Manager: portage-2.2.0_alpha107/cvs/Linux x86_64
-rw-r--r--dev-libs/libxml2/ChangeLog11
-rw-r--r--dev-libs/libxml2/Manifest17
-rw-r--r--dev-libs/libxml2/files/libxml2-2.8.0_rc1-randomization-threads.patch210
-rw-r--r--dev-libs/libxml2/files/libxml2-2.8.0_rc1-winnt.patch91
-rw-r--r--dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild (renamed from dev-libs/libxml2/libxml2-2.7.8-r4.ebuild)71
5 files changed, 352 insertions, 48 deletions
diff --git a/dev-libs/libxml2/ChangeLog b/dev-libs/libxml2/ChangeLog
index f198ca785e0b..03659b9607ff 100644
--- a/dev-libs/libxml2/ChangeLog
+++ b/dev-libs/libxml2/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-libs/libxml2
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.338 2012/04/26 13:24:49 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.339 2012/05/21 02:24:53 tetromino Exp $
+
+*libxml2-2.8.0_rc1 (21 May 2012)
+
+ 21 May 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ -libxml2-2.7.8-r4.ebuild, +libxml2-2.8.0_rc1.ebuild,
+ +files/libxml2-2.8.0_rc1-randomization-threads.patch,
+ +files/libxml2-2.8.0_rc1-winnt.patch:
+ Version bump with numerous bugfixes, including for bug #416209 (out-of-bounds
+ write, CVE-2011-3102, thanks to Paweł Hajdan, Jr.). Drop old.
26 Apr 2012; Alexis Ballier <aballier@gentoo.org> libxml2-2.7.8-r5.ebuild:
keyword ~amd64-fbsd
diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest
index 7aae161b490a..4f8d2ec9ce3b 100644
--- a/dev-libs/libxml2/Manifest
+++ b/dev-libs/libxml2/Manifest
@@ -14,17 +14,24 @@ AUX libxml2-2.7.8-windows-thread_t.patch 921 RMD160 497a4ba51f1717ff543d59874a2f
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
AUX libxml2-2.7.8-xpath-memory.patch 889 RMD160 bff2a0a59e7d8f82a915d65b084a93902bfdaf99 SHA1 17adc8c2fb6ded205c2eb746ed9506cf696e412e SHA256 919a7dd27fd22cd30d8301d3ca8a8f8a8f971d4494c9914f7f8e6531216be5a1
+AUX libxml2-2.8.0_rc1-randomization-threads.patch 5429 RMD160 cd817b17afc4d751701cc58df23f1339f2719ca4 SHA1 3478d5411417d67f154b2ddf2d25f5f22af94c32 SHA256 3a1999ef238e7956c5c78f21e633f68e7c649c6d0e7c6e2181feee0a6551bc25
+AUX libxml2-2.8.0_rc1-winnt.patch 2392 RMD160 ba4bfeda6caac6ea249aa127fbb27820130486a1 SHA1 2d80ac6817c79e83284f081548609ac47678b99a SHA256 c18b2c15550b3ff4709a85cd18d16368928319b1b7fd8875dc34acd67076b134
DIST libxml2-2.7.8.tar.gz 4881808 RMD160 30709622cfe3e2175e73d6701b7e19a25ab5ac47 SHA1 859dd535edbb851cc15b64740ee06551a7a17d40 SHA256 cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec
+DIST libxml2-2.8.0-rc1.tar.gz 4909461 RMD160 e3c55e8904c1c7e3bbb8360d4819bb8a1966d2f4 SHA1 50c9ebef591d021d1b08522fc1d65e361a7165f7 SHA256 ba65b84a884fb7f4d8ab11ae47e323e531c8f75b8f2a2dad93f68937463433ff
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.8-r4.ebuild 6805 RMD160 d2932ca6955a2f3e4dab9707f0b8883530ef8c1d SHA1 70bb58899896dd4b7d2f71e78ba9603c99a8e8d1 SHA256 faa2f431e5ffa037c3e6240621e1cf821b1a78264f6f1a747033c6fe9afa9786
EBUILD libxml2-2.7.8-r5.ebuild 7030 RMD160 278f229d6d8ee5268b5d64f2e77f285833fedff6 SHA1 19a761243e4bae7f5bc07ad656a69cdb4ea9ab5d SHA256 adc08150d10f03633ab3f00d63f6ba2774c40b521a448f6e6eb1eaeec9adf726
-MISC ChangeLog 46332 RMD160 4401fc51272223e407f3d2b52069cb7edb35f9f3 SHA1 2d2e27cdf72e950d40bc2d0fcac411e3fbf3cd96 SHA256 4bb27f8eb1b0f84ffe4e150a849d3c78d5f8fcdaebf6cfd6b764a095a7784657
+EBUILD libxml2-2.8.0_rc1.ebuild 6462 RMD160 f2f28b28fb1ddd1c5ac4cb9a35ee042104a5e465 SHA1 738f458ebac62689cf3ad3961d4feba18721e6a7 SHA256 97b1a2e0d43f738eb4e472a1f5cf663822c19f0bca7d7e7f5aa92f6778626ab0
+MISC ChangeLog 46723 RMD160 07fc620e12524c26fae7b33777dcc485e26be4c8 SHA1 f8216a5d6c54e54ac0fd686aea7f1d888834056e SHA256 2d644a6457ad88c08daa509e48a8b1da0a514587c55a9d15d0700a42b2137c0a
MISC metadata.xml 158 RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e SHA1 38f78e9790bcd4382b4a49aa226aa6dda1d3a3d7 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEARECAAYFAk+ZTKcACgkQvFcC4BYPU0oeYwCfX0XDLzmCp5hVF6ieNDM5jWB3
-zOsAoKIacZcjNjoufhhv5Q0GC8KEbG3O
-=k5px
+iQEcBAEBAgAGBQJPuad6AAoJEJ0WA1zPCt1hqwoH/1y9GQdNzRmmCVMm/9QLUOwf
+Zzv1nK4EM9+5ISfw8m82qhSZTwjW6nfXVytJa7tfhNmyLzKMYsZtv9GT840af6RJ
+W3xSRJXQj1D0UYl5+Q1pcZLFkw4quDMjguKHdJnw+f7TycPzBhJpAUiDzliXBfsH
+ms4DXhnll+GqPQP8fEknOLVeaMhzNtZRIRo6+n0U8fRgkv3ZwT/AquZzp9eCUyxl
+1rLPAJohzDaSfbp0REdjBPJDGPJluQzZqxc7dppayZoQRvFJ0hvLMamYgWUAYacv
+lONVHBs3a+1azchcNSlC0hCLjfka29GpmauLUwqwqMfBGeqRTwRNVX1KPgelTec=
+=n52K
-----END PGP SIGNATURE-----
diff --git a/dev-libs/libxml2/files/libxml2-2.8.0_rc1-randomization-threads.patch b/dev-libs/libxml2/files/libxml2-2.8.0_rc1-randomization-threads.patch
new file mode 100644
index 000000000000..d51801d42953
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.8.0_rc1-randomization-threads.patch
@@ -0,0 +1,210 @@
+From 379ebc1d774865fa92f2a8d80cc4da65cbe19998 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard@redhat.com>
+Date: Fri, 18 May 2012 15:41:31 +0800
+Subject: [PATCH] Cleanup on randomization
+
+tsan reported that rand() is not thread safe, so create
+a thread safe wrapper, use rand_r() if available.
+Consolidate the function, initialization and cleanup in
+dict.c and make sure it is initialized in xmlInitParser()
+---
+ dict.c | 41 ++++++++++++++++++++++++++++++++++++++---
+ hash.c | 10 +---------
+ include/libxml/dict.h | 15 ++++++++++-----
+ libxml.h | 7 +++++++
+ parser.c | 1 +
+ 5 files changed, 57 insertions(+), 17 deletions(-)
+
+diff --git a/dict.c b/dict.c
+index ae4966b..3579f64 100644
+--- a/dict.c
++++ b/dict.c
+@@ -135,6 +135,15 @@ static xmlRMutexPtr xmlDictMutex = NULL;
+ */
+ static int xmlDictInitialized = 0;
+
++#ifdef DICT_RANDOMIZATION
++#ifdef HAVE_RAND_R
++/*
++ * Internal data for random function, protected by xmlDictMutex
++ */
++unsigned int rand_seed = 0;
++#endif
++#endif
++
+ /**
+ * xmlInitializeDict:
+ *
+@@ -142,24 +151,50 @@ static int xmlDictInitialized = 0;
+ * this function is not thread safe, initialization should
+ * preferably be done once at startup
+ */
+-static int xmlInitializeDict(void) {
++int xmlInitializeDict(void) {
+ if (xmlDictInitialized)
+ return(1);
+
+ if ((xmlDictMutex = xmlNewRMutex()) == NULL)
+ return(0);
++ xmlRMutexLock(xmlDictMutex);
+
+ #ifdef DICT_RANDOMIZATION
++#ifdef HAVE_RAND_R
++ rand_seed = time(NULL);
++ rand_r(& rand_seed);
++#else
+ srand(time(NULL));
+ #endif
++#endif
+ xmlDictInitialized = 1;
++ xmlRMutexUnlock(xmlDictMutex);
+ return(1);
+ }
+
++#ifdef DICT_RANDOMIZATION
++int __xmlRandom(void) {
++ int ret;
++
++ if (xmlDictInitialized == 0)
++ xmlInitializeDict();
++
++ xmlRMutexLock(xmlDictMutex);
++#ifdef HAVE_RAND_R
++ ret = rand_r(& rand_seed);
++#else
++ ret = rand();
++#endif
++ xmlRMutexUnlock(xmlDictMutex);
++ return(ret);
++}
++#endif
++
+ /**
+ * xmlDictCleanup:
+ *
+- * Free the dictionary mutex.
++ * Free the dictionary mutex. Do not call unless sure the library
++ * is not in use anymore !
+ */
+ void
+ xmlDictCleanup(void) {
+@@ -488,7 +523,7 @@ xmlDictCreate(void) {
+ if (dict->dict) {
+ memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry));
+ #ifdef DICT_RANDOMIZATION
+- dict->seed = rand();
++ dict->seed = __xmlRandom();
+ #else
+ dict->seed = 0;
+ #endif
+diff --git a/hash.c b/hash.c
+index fe1424f..15e1efe 100644
+--- a/hash.c
++++ b/hash.c
+@@ -47,10 +47,6 @@
+
+ /* #define DEBUG_GROW */
+
+-#ifdef HASH_RANDOMIZATION
+-static int hash_initialized = 0;
+-#endif
+-
+ /*
+ * A single entry in the hash table
+ */
+@@ -186,11 +182,7 @@ xmlHashCreate(int size) {
+ if (table->table) {
+ memset(table->table, 0, size * sizeof(xmlHashEntry));
+ #ifdef HASH_RANDOMIZATION
+- if (!hash_initialized) {
+- srand(time(NULL));
+- hash_initialized = 1;
+- }
+- table->random_seed = rand();
++ table->random_seed = __xmlRandom();
+ #endif
+ return(table);
+ }
+diff --git a/include/libxml/dict.h b/include/libxml/dict.h
+index abb8339..5994868 100644
+--- a/include/libxml/dict.h
++++ b/include/libxml/dict.h
+@@ -25,6 +25,11 @@ typedef struct _xmlDict xmlDict;
+ typedef xmlDict *xmlDictPtr;
+
+ /*
++ * Initializer
++ */
++XMLPUBFUN int XMLCALL xmlInitializeDict(void);
++
++/*
+ * Constructor and destructor.
+ */
+ XMLPUBFUN xmlDictPtr XMLCALL
+@@ -33,28 +38,28 @@ XMLPUBFUN xmlDictPtr XMLCALL
+ xmlDictCreateSub(xmlDictPtr sub);
+ XMLPUBFUN int XMLCALL
+ xmlDictReference(xmlDictPtr dict);
+-XMLPUBFUN void XMLCALL
++XMLPUBFUN void XMLCALL
+ xmlDictFree (xmlDictPtr dict);
+
+ /*
+ * Lookup of entry in the dictionnary.
+ */
+-XMLPUBFUN const xmlChar * XMLCALL
++XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictLookup (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+-XMLPUBFUN const xmlChar * XMLCALL
++XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictExists (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+-XMLPUBFUN const xmlChar * XMLCALL
++XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictQLookup (xmlDictPtr dict,
+ const xmlChar *prefix,
+ const xmlChar *name);
+ XMLPUBFUN int XMLCALL
+ xmlDictOwns (xmlDictPtr dict,
+ const xmlChar *str);
+-XMLPUBFUN int XMLCALL
++XMLPUBFUN int XMLCALL
+ xmlDictSize (xmlDictPtr dict);
+
+ /*
+diff --git a/libxml.h b/libxml.h
+index dfc6c64..fa3aea4 100644
+--- a/libxml.h
++++ b/libxml.h
+@@ -79,6 +79,13 @@ void __xmlGlobalInitMutexLock(void);
+ void __xmlGlobalInitMutexUnlock(void);
+ void __xmlGlobalInitMutexDestroy(void);
+
++#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME)
++/*
++ * internal thread safe random function
++ */
++int __xmlRandom(void);
++#endif
++
+ #ifdef IN_LIBXML
+ #ifdef __GNUC__
+ #ifdef PIC
+diff --git a/parser.c b/parser.c
+index 1b80a8c..2c38fae 100644
+--- a/parser.c
++++ b/parser.c
+@@ -14178,6 +14178,7 @@ xmlInitParser(void) {
+ (xmlGenericError == NULL))
+ initGenericErrorDefaultFunc(NULL);
+ xmlInitMemory();
++ xmlInitializeDict();
+ xmlInitCharEncodingHandlers();
+ xmlDefaultSAXHandlerInit();
+ xmlRegisterDefaultInputCallbacks();
+--
+1.7.8.6
+
diff --git a/dev-libs/libxml2/files/libxml2-2.8.0_rc1-winnt.patch b/dev-libs/libxml2/files/libxml2-2.8.0_rc1-winnt.patch
new file mode 100644
index 000000000000..cce3ecb058ae
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.8.0_rc1-winnt.patch
@@ -0,0 +1,91 @@
+From 168e20836fe9614dd2dd4b42006c17a783f11c48 Mon Sep 17 00:00:00 2001
+From: Markus Duft <mduft@gentoo.org>
+Date: Thu, 20 Nov 2008 11:04:33 -0500
+Subject: [PATCH] Fix for ~x86-winnt
+
+[Alexandre Rostovtsev <tetromino@gentoo.org>: port to 2.8.0-rc1]
+---
+ dict.c | 2 +-
+ include/wsockcompat.h | 2 +-
+ nanohttp.c | 2 +-
+ xmlIO.c | 4 ++++
+ 4 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/dict.c b/dict.c
+index 3579f64..71e7bc6 100644
+--- a/dict.c
++++ b/dict.c
+@@ -47,7 +47,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 --git a/include/wsockcompat.h b/include/wsockcompat.h
+index c762a64..1ed822b 100644
+--- a/include/wsockcompat.h
++++ b/include/wsockcompat.h
+@@ -27,7 +27,7 @@
+ #endif
+ #endif
+
+-#if defined( __MINGW32__ ) || defined( _MSC_VER )
++#if defined( __MINGW32__ ) || defined( _MSC_VER ) || 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 --git a/nanohttp.c b/nanohttp.c
+index 2437fed..dbe97a7 100644
+--- a/nanohttp.c
++++ b/nanohttp.c
+@@ -74,7 +74,7 @@
+ #define XML_SOCKLEN_T unsigned int
+ #endif
+
+-#if defined(__MINGW32__) || defined(_WIN32_WCE)
++#if defined(__MINGW32__) || defined(_WIN32_WCE) || defined(__PARITY__)
+ #ifndef _WINSOCKAPI_
+ #define _WINSOCKAPI_
+ #endif
+diff --git a/xmlIO.c b/xmlIO.c
+index 73a995d..99562f6 100644
+--- a/xmlIO.c
++++ b/xmlIO.c
+@@ -47,6 +47,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
+@@ -82,6 +83,7 @@
+ # endif
+ # endif
+ #endif
++#endif /* __PARITY__ */
+
+ #include <libxml/xmlmemory.h>
+ #include <libxml/parser.h>
+@@ -657,6 +659,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info)
+ {
+ #ifdef HAVE_STAT
+ int retval = -1;
++#ifndef __PARITY__
+ wchar_t *wPath;
+
+ wPath = __xmlIOWin32UTF8ToWChar(path);
+@@ -665,6 +668,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info)
+ retval = _wstat(wPath,info);
+ xmlFree(wPath);
+ }
++#endif
+ /* maybe path in native encoding */
+ if(retval < 0)
+ retval = stat(path,info);
+--
+1.7.8.6
+
diff --git a/dev-libs/libxml2/libxml2-2.7.8-r4.ebuild b/dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild
index 0ad51873e63f..ca9b256f89e7 100644
--- a/dev-libs/libxml2/libxml2-2.7.8-r4.ebuild
+++ b/dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2012 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-r4.ebuild,v 1.7 2012/02/20 09:08:18 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild,v 1.1 2012/05/21 02:24:56 tetromino Exp $
-EAPI="3"
+EAPI="4"
PYTHON_DEPEND="python? 2"
PYTHON_USE_WITH="xml"
PYTHON_USE_WITH_OPT="python"
@@ -16,8 +16,8 @@ HOMEPAGE="http://www.xmlsoft.org/"
LICENSE="MIT"
SLOT="2"
-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 static-libs test"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~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 lzma python readline static-libs test"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16"
@@ -25,28 +25,29 @@ XSTS_NAME_2="xmlschema2004-01-14"
XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
-SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz
+SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
test? (
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} )"
RDEPEND="sys-libs/zlib
icu? ( dev-libs/icu )
+ lzma? ( app-arch/xz-utils )
readline? ( sys-libs/readline )"
DEPEND="${RDEPEND}
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )"
+S="${WORKDIR}/${PN}-${PV%_rc*}"
+
pkg_setup() {
- if use python; then
- python_pkg_setup
- fi
+ use python && python_pkg_setup
}
src_unpack() {
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
# as they are needed as tarballs in ${S}/xstc instead and not unpacked
- unpack ${P}.tar.gz
+ unpack ${P/_rc/-rc}.tar.gz
cd "${S}"
if use test; then
@@ -60,35 +61,16 @@ 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
+ epatch "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch
eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c
epunt_cxx
- # Reactivate the shared library versionning script
- epatch "${FILESDIR}/${P}-reactivate-script.patch"
-
- # Fix a potential memory access error
- epatch "${FILESDIR}/${P}-xpath-memory.patch"
-
- # Fix a potential freeing error in XPath
- epatch "${FILESDIR}/${P}-xpath-freeing.patch"
- epatch "${FILESDIR}/${P}-xpath-freeing2.patch"
-
- # Fix some potential problems on reallocation failures
- epatch "${FILESDIR}/${P}-reallocation-failures.patch"
+ # In next release
+ epatch "${FILESDIR}/${P}-randomization-threads.patch"
- epatch "${FILESDIR}/${P}-disable_static_modules.patch"
-
- # Hardening of XPath evaluation
- epatch "${FILESDIR}/${P}-hardening-xpath.patch"
-
- # Fix missing error status in XPath evaluation
- epatch "${FILESDIR}/${P}-error-xpath.patch"
-
- # Heap-based overflow in parsing long entity references
- epatch "${FILESDIR}/${P}-allocation-error-copying-entities.patch"
+ epatch "${FILESDIR}/${PN}-2.7.8-disable_static_modules.patch"
# Please do not remove, as else we get references to PORTAGE_TMPDIR
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
@@ -96,7 +78,11 @@ src_prepare() {
# elibtoolize
# Python bindings are built/tested/installed manually.
- sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed failed"
+ sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed 1 failed"
+
+ # Use Gentoo's python-config naming scheme
+ sed -e 's/python$PYTHON_VERSION-config/python-config-$PYTHON_VERSION/' \
+ -i configure.in || die "sed 2 failed"
eautoreconf
}
@@ -111,20 +97,23 @@ src_configure() {
# --with-mem-debug causes unusual segmentation faults (bug #105120).
- local myconf="--with-html-subdir=${PF}/html
- --docdir=${EPREFIX}/usr/share/doc/${PF}
+ local myconf=(
+ --with-html-subdir=${PF}/html
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
$(use_with debug run-debug)
$(use_with icu)
+ $(use_with lzma)
$(use_with python)
$(use_with readline)
$(use_with readline history)
$(use_enable ipv6)
- $(use_enable static-libs static)"
+ $(use_enable static-libs static) )
+ use python && myconf=( "${myconf[@]}" "PYTHON=$(PYTHON -2 -a)" )
# filter seemingly problematic CFLAGS (#26320)
filter-flags -fprefetch-loop-arrays -funroll-loops
- econf ${myconf}
+ econf "${myconf[@]}"
}
src_compile() {
@@ -179,7 +168,7 @@ src_install() {
fi
rm -rf "${ED}"/usr/share/doc/${P}
- dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* || die "dodoc failed"
+ dodoc AUTHORS ChangeLog Copyright NEWS README* TODO*
if ! use python; then
rm -rf "${ED}"/usr/share/doc/${PF}/python
@@ -196,10 +185,8 @@ src_install() {
rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
fi
- if ! use static-libs; then
- # Remove useless .la files
- find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
- fi
+ # Always remove useless .la files
+ find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
}
pkg_postinst() {