--- libxml2-2.7.8.ebuild 2011-02-11 18:30:19.000000000 +0100 +++ libxml2-2.7.8.ebuild 2011-02-12 11:50:36.065424000 +0100 @@ -6,14 +6,14 @@ 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="~ppc-aix ~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,11 @@ } src_prepare() { + 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 +94,9 @@ # --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 +116,8 @@ 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 +136,24 @@ 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 +190,7 @@ # 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 +202,7 @@ # 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