diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-09-22 10:23:23 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-09-22 10:23:23 +0000 |
commit | b4c77de62442d257fdbbfb4e35d94f4984a731de (patch) | |
tree | 9d71a7b008c82a90447a1ad23c63b4cf9cedd531 /dev-libs/libxml2 | |
parent | Version bump, drop old. (diff) | |
download | gentoo-2-b4c77de62442d257fdbbfb4e35d94f4984a731de.tar.gz gentoo-2-b4c77de62442d257fdbbfb4e35d94f4984a731de.tar.bz2 gentoo-2-b4c77de62442d257fdbbfb4e35d94f4984a731de.zip |
Drop old.
(Portage version: 2.1.11.19/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libxml2')
-rw-r--r-- | dev-libs/libxml2/ChangeLog | 7 | ||||
-rw-r--r-- | dev-libs/libxml2/files/libxml2-2.8.0_rc1-randomization-threads.patch | 210 | ||||
-rw-r--r-- | dev-libs/libxml2/libxml2-2.8.0-r1.ebuild | 220 | ||||
-rw-r--r-- | dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild | 221 |
4 files changed, 6 insertions, 652 deletions
diff --git a/dev-libs/libxml2/ChangeLog b/dev-libs/libxml2/ChangeLog index 8cd868d98948..fa54d1641e07 100644 --- a/dev-libs/libxml2/ChangeLog +++ b/dev-libs/libxml2/ChangeLog @@ -1,6 +1,11 @@ # 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.360 2012/09/18 01:31:33 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.361 2012/09/22 10:23:23 pacho Exp $ + + 22 Sep 2012; Pacho Ramos <pacho@gentoo.org> + -files/libxml2-2.8.0_rc1-randomization-threads.patch, + -libxml2-2.8.0-r1.ebuild, -libxml2-2.8.0_rc1.ebuild: + Drop old. 18 Sep 2012; Anthony G. Basile <blueness@gentoo.org> libxml2-2.8.0-r2.ebuild: stable ppc, bug #434344 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 deleted file mode 100644 index d51801d42953..000000000000 --- a/dev-libs/libxml2/files/libxml2-2.8.0_rc1-randomization-threads.patch +++ /dev/null @@ -1,210 +0,0 @@ -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/libxml2-2.8.0-r1.ebuild b/dev-libs/libxml2/libxml2-2.8.0-r1.ebuild deleted file mode 100644 index 0771bb42efa5..000000000000 --- a/dev-libs/libxml2/libxml2-2.8.0-r1.ebuild +++ /dev/null @@ -1,220 +0,0 @@ -# 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.8.0-r1.ebuild,v 1.4 2012/06/04 04:36:32 tetromino Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" -PYTHON_USE_WITH="xml" -PYTHON_USE_WITH_OPT="python" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" - -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 ~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" -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}/${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() { - 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/_rc/-rc}.tar.gz - cd "${S}" - - if use test; then - cp "${DISTDIR}/${XSTS_TARBALL_1}" \ - "${DISTDIR}/${XSTS_TARBALL_2}" \ - "${S}"/xstc/ \ - || die "Failed to install test tarballs" - fi -} - -src_prepare() { - # Patches needed for prefix support - epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch - epatch "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch - - eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c - - epunt_cxx - - epatch "${FILESDIR}/${PN}-2.7.8-disable_static_modules.patch" - - # Prevent liking to out-of-build-tree libxml2, bug #417539 - epatch "${FILESDIR}/${PN}-2.8.0-icu-linking.patch" - - # Please do not remove, as else we get references to PORTAGE_TMPDIR - # in /usr/lib/python?.?/site-packages/libxml2mod.la among things. - # We now need to run eautoreconf at the end to prevent maintainer mode. -# elibtoolize - - # Python bindings are built/tested/installed manually. - 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 -} - -src_configure() { - # USE zlib support breaks gnome2 - # (libgnomeprint for instance fails to compile with - # fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002). - - # The meaning of the 'debug' USE flag does not apply to the --with-debug - # switch (enabling the libxml2 debug module). See bug #100898. - - # --with-mem-debug causes unusual segmentation faults (bug #105120). - - 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) ) - - # filter seemingly problematic CFLAGS (#26320) - filter-flags -fprefetch-loop-arrays -funroll-loops - - econf "${myconf[@]}" -} - -src_compile() { - default - - if use python; then - python_copy_sources python - building() { - emake PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \ - PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" - } - python_execute_function -s --source-dir python building - fi -} - -src_test() { - default - - if use python; then - testing() { - emake test - } - python_execute_function -s --source-dir python testing - fi -} - -src_install() { - emake DESTDIR="${D}" \ - 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="${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 - - python_clean_installation_image - fi - - rm -rf "${ED}"/usr/share/doc/${P} - dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* - - if ! use python; then - rm -rf "${ED}"/usr/share/doc/${PF}/python - rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV} - fi - - if ! use doc; then - rm -rf "${ED}"/usr/share/gtk-doc - rm -rf "${ED}"/usr/share/doc/${PF}/html - fi - - if ! use examples; then - rm -rf "${ED}/usr/share/doc/${PF}/examples" - rm -rf "${ED}/usr/share/doc/${PF}/python/examples" - fi - - # Always remove useless .la files - find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" -} - -pkg_postinst() { - if use python; then - python_mod_optimize drv_libxml2.py libxml2.py - fi - - # 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 [ "${ROOT}" != "/" ] - then - elog "Skipping XML catalog creation for stage building (bug #208887)." - else - # need an XML catalog, so no-one writes to a non-existent one - CATALOG="${EROOT}etc/xml/catalog" - - # we dont want to clobber an existing catalog though, - # only ensure that one is there - # <obz@gentoo.org> - if [ ! -e ${CATALOG} ]; then - [ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml" - "${EPREFIX}"/usr/bin/xmlcatalog --create > ${CATALOG} - einfo "Created XML catalog in ${CATALOG}" - fi - fi -} - -pkg_postrm() { - if use python; then - python_mod_cleanup drv_libxml2.py libxml2.py - fi -} diff --git a/dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild b/dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild deleted file mode 100644 index e93d3d33a259..000000000000 --- a/dev-libs/libxml2/libxml2-2.8.0_rc1.ebuild +++ /dev/null @@ -1,221 +0,0 @@ -# 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.8.0_rc1.ebuild,v 1.10 2012/05/29 15:31:24 ranger Exp $ - -EAPI="4" -PYTHON_DEPEND="python? 2" -PYTHON_USE_WITH="xml" -PYTHON_USE_WITH_OPT="python" -SUPPORT_PYTHON_ABIS="1" -RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" - -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 ~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" -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}/${PN}-${PV/_rc/-rc}.tar.gz -SRC_URI="mirror://gentoo/${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() { - 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/_rc/-rc}.tar.gz - cd "${S}" - - if use test; then - cp "${DISTDIR}/${XSTS_TARBALL_1}" \ - "${DISTDIR}/${XSTS_TARBALL_2}" \ - "${S}"/xstc/ \ - || die "Failed to install test tarballs" - fi -} - -src_prepare() { - # Patches needed for prefix support - epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch - epatch "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch - - eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c - - epunt_cxx - - # In next release - epatch "${FILESDIR}/${P}-randomization-threads.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. - # We now need to run eautoreconf at the end to prevent maintainer mode. -# elibtoolize - - # Python bindings are built/tested/installed manually. - 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 -} - -src_configure() { - # USE zlib support breaks gnome2 - # (libgnomeprint for instance fails to compile with - # fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002). - - # The meaning of the 'debug' USE flag does not apply to the --with-debug - # switch (enabling the libxml2 debug module). See bug #100898. - - # --with-mem-debug causes unusual segmentation faults (bug #105120). - - 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) ) - - # filter seemingly problematic CFLAGS (#26320) - filter-flags -fprefetch-loop-arrays -funroll-loops - - econf "${myconf[@]}" -} - -src_compile() { - default - - if use python; then - python_copy_sources python - building() { - emake PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \ - PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" - } - python_execute_function -s --source-dir python building - fi -} - -src_test() { - default - - if use python; then - testing() { - emake test - } - python_execute_function -s --source-dir python testing - fi -} - -src_install() { - emake DESTDIR="${D}" \ - 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="${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 - - python_clean_installation_image - fi - - rm -rf "${ED}"/usr/share/doc/${P} - dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* - - if ! use python; then - rm -rf "${ED}"/usr/share/doc/${PF}/python - rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV} - fi - - if ! use doc; then - rm -rf "${ED}"/usr/share/gtk-doc - rm -rf "${ED}"/usr/share/doc/${PF}/html - fi - - if ! use examples; then - rm -rf "${ED}/usr/share/doc/${PF}/examples" - rm -rf "${ED}/usr/share/doc/${PF}/python/examples" - fi - - # Always remove useless .la files - find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" -} - -pkg_postinst() { - if use python; then - python_mod_optimize drv_libxml2.py libxml2.py - fi - - # 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 [ "${ROOT}" != "/" ] - then - elog "Skipping XML catalog creation for stage building (bug #208887)." - else - # need an XML catalog, so no-one writes to a non-existent one - CATALOG="${EROOT}etc/xml/catalog" - - # we dont want to clobber an existing catalog though, - # only ensure that one is there - # <obz@gentoo.org> - if [ ! -e ${CATALOG} ]; then - [ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml" - "${EPREFIX}"/usr/bin/xmlcatalog --create > ${CATALOG} - einfo "Created XML catalog in ${CATALOG}" - fi - fi -} - -pkg_postrm() { - if use python; then - python_mod_cleanup drv_libxml2.py libxml2.py - fi -} |