aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory M. Tuner <gmt@be-evil.net>2013-12-23 04:36:56 -0800
committerGregory M. Tuner <gmt@be-evil.net>2013-12-23 04:36:56 -0800
commit728e3c729685369fd0fd223e1e59181548164251 (patch)
treef8a5f5f0a1962548cf171fe06aea79a3abd02db8 /dev-libs/libxml2
parentdev-libs/libxml2: upstream clone (diff)
downloadgmt-728e3c729685369fd0fd223e1e59181548164251.tar.gz
gmt-728e3c729685369fd0fd223e1e59181548164251.tar.bz2
gmt-728e3c729685369fd0fd223e1e59181548164251.zip
dev-libs/libxml2: multilib-utize
Complicated by the fact that this one has two layers of multi-ness. This depends on multi-abi python, a feature which I have not yet gotten into the overlay but have a proof-of-concept implementation for. Be advised that, without header wrapping or a multilib pyconfig.h, you won't be able to sneak by with what's in app-emulation/emul-linux-x86-baselibs, like you can for most other things -- you'll need the real McCoy, in other words: namely, something the gmt overlay doesn't yet have in-tree, and is nontrivial to create. Put another way, this doesn't exactly work yet, without some secret sauce that I have yet to share the recipe for. I guess it's time for me to start addressing that, now. Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'dev-libs/libxml2')
-rw-r--r--dev-libs/libxml2/Manifest2
-rw-r--r--dev-libs/libxml2/libxml2-2.9.1-r2.ebuild134
2 files changed, 97 insertions, 39 deletions
diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest
index 1a66eed..bd41230 100644
--- a/dev-libs/libxml2/Manifest
+++ b/dev-libs/libxml2/Manifest
@@ -12,6 +12,6 @@ DIST libxml2-2.9.1.tar.gz 5172503 SHA256 fd3c64cb66f2c4ea27e934d275904d92cec494a
DIST xmlts20080827.tar.gz 638940 SHA256 96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7 SHA512 7325d0977c4427fc4944b291ccf896a665f654cc24399e5565c12a849c2bc3aef4fa3ee42a09ac115abcb6570c51a8fbd052c38d64d164279ecdecad5a4e884d WHIRLPOOL 50835380c3ea208df0bf9ce032ed2df69c4c6cb5a53ffdd39a08fb4f1d166f311b2ef2fe0d9911ae1ebff92aeb42f6ea55e727dfe0b7a3b95e6c7240315b3eda
DIST xsts-2002-01-16.tar.gz 6894439 SHA256 55e5c08db29946a91ea8e70e8f2418d3fd30d8b6777941dfba7f54726ffd9914 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288 WHIRLPOOL 84dd51959460a4f8aa582d57ad39229c546ca7fe155012c57c368b59f5d31400d8b940a343a7320058330ca611303139cacdffed514783f96406ac5366026b11
DIST xsts-2004-01-14.tar.gz 2761085 SHA256 09bdf9f81f381ebf9bc158a9472e498e896f7a02eb7461146e9abe1b9493ca17 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe WHIRLPOOL c46a3bf7d6dd771757f4304995cc177cf51c6cdd0e9778851fc13d3809c7b984690b4f273b3e075abe018110968eb7fc78f5b83170d3e18bacf00a4ed64b213d
-EBUILD libxml2-2.9.1-r2.ebuild 5932 SHA256 b3b8e3511b558b47b8f5cc9c38321261bcfb8dee4efb964f4ecf02aaf53add64 SHA512 d4af2de50f7a906acf2664a8235cf7d148633d52ba9e1ce3f7c24366e66cf3f858ca9fc2f841244d3d5ec3d82317f66130057a470b7e4022e711c3afcb572cf7 WHIRLPOOL 0cef3ecb108c77ff9b34ff4d34123b656fe41e527b246c01fb6c34bc83b432d9d139e67c2e22ac53b2c007211defcb49e59b136eb3858e4f56598d3c65354673
+EBUILD libxml2-2.9.1-r2.ebuild 7789 SHA256 26927b66817d5e928e0d9bd830549626aa4fdaedbf3f57b2c94b3d42ce08ff02 SHA512 eebcd0942626d86822cc9ac9c157ee3afa321c2dbde2c63594c5016998e529a5e26c5baef2146f00588f626fba72fd53c7b8cef8bc88e1364ad488c175084991 WHIRLPOOL 5364e6aad1d84f3b3cfc6ce777563f46ec35f0dc6ca29b432021d7d7212df9663862f46044274b4dd27f5dc566350215909bc3369f0a27dfe71cd24ba395e664
MISC ChangeLog 57621 SHA256 f35d97b8094ff914d50257f43fceb6b4503de96e3dc745db15a97391681d4b4b SHA512 41156c8c6e7c340b5b4bf9311536bbba78eefde4b69238f1a244e960a506305028d377d7b18d0f549beb1e296c845d5265b32fd8d258c5e6c2dfcef1a2d06bb5 WHIRLPOOL 706080ef45dc3c804f1266bb0b596ce530a76a15790ef7da50497cdc5c8883b1442471963824388eb443df06efb01a51f525f79608a97853bfb0872d0a9769d6
MISC metadata.xml 240 SHA256 5dcdc1a8fd86d82f00a60bb322fb4f8a579d75ec7be2398164435197ab3903df SHA512 d673fbe248c2fcdf401f91f8d0e15587fd9f94c604d62f7864931f379b35a3ffc20264ae9668661a0d09693cd42db30c7f74fcb606da812312e394272acfeec8 WHIRLPOOL 4d2cc2b44bc446377dc659162e9f638650e82564a3328b0b23c1e6f197e88b9ae545d8778c69829a6f268e8b5f7d0db1b0aee1e3d8aedd909d1d756dc4aa94c3
diff --git a/dev-libs/libxml2/libxml2-2.9.1-r2.ebuild b/dev-libs/libxml2/libxml2-2.9.1-r2.ebuild
index 4dae2ed..a836622 100644
--- a/dev-libs/libxml2/libxml2-2.9.1-r2.ebuild
+++ b/dev-libs/libxml2/libxml2-2.9.1-r2.ebuild
@@ -3,17 +3,20 @@
# $Header: $
EAPI="5"
+# need multilib-build here for MULTILIB_USEDEP
+inherit libtool flag-o-matic eutils prefix multilib-build
+
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
-PYTHON_REQ_USE="xml"
+PYTHON_REQ_USE="xml,${MULTILIB_USEDEP}"
-inherit libtool flag-o-matic eutils python-r1 autotools prefix
+inherit python-r1 autotools-multilib
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 ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+KEYWORDS="~amd64"
IUSE="debug examples icu ipv6 lzma python readline static-libs test"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
@@ -29,11 +32,15 @@ SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )"
-RDEPEND="sys-libs/zlib:=
- icu? ( dev-libs/icu:= )
- lzma? ( app-arch/xz-utils:= )
+RDEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+ lzma? ( app-arch/xz-utils:=[${MULTILIB_USEDEP}] )
python? ( ${PYTHON_DEPS} )
- readline? ( sys-libs/readline:= )"
+ readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r4
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
DEPEND="${RDEPEND}
dev-util/gtk-doc-am
@@ -41,6 +48,24 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${PN}-${PV%_rc*}"
+pkg_setup() {
+ abis=( $(multilib_get_enabled_abis) )
+ if [[ ${#abis[@]} -gt 1 ]] ; then
+ ewarn
+ ewarn "Note: you have more than one multilib ABI enabled."
+ ewarn "Although this works, unless you have made some"
+ ewarn "provision to deal with the issue that multilib pyconfig.h"
+ ewarn "headers are not provided, this ebuild will fail, attempting"
+ ewarn "to compile the non-native ABI's. A proof-of-concept"
+ ewarn "solution to this problem exists and will hopefully be included in"
+ ewarn "the gmt overlay soon; as of yet, however, it's not in."
+ ewarn
+ ewarn "Best wishes & happy holidays,"
+ ewarn " -gmt"
+ ewarn
+ fi
+}
+
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
@@ -66,28 +91,32 @@ src_prepare() {
# epunt_cxx # if we don't eautoreconf
# Important patches from 2.9.2
- epatch "${FILESDIR}/${P}-missing-break.patch" \
- "${FILESDIR}/${P}-python-2.6.patch" \
- "${FILESDIR}/${P}-compression-detection.patch" \
- "${FILESDIR}/${P}-non-ascii-cr-lf.patch" \
- "${FILESDIR}/${PN}-2.9.1-python3.patch" \
+ PATCHES=(
+ "${FILESDIR}/${P}-missing-break.patch"
+ "${FILESDIR}/${P}-python-2.6.patch"
+ "${FILESDIR}/${P}-compression-detection.patch"
+ "${FILESDIR}/${P}-non-ascii-cr-lf.patch"
+ "${FILESDIR}/${PN}-2.9.1-python3.patch"
"${FILESDIR}/${PN}-2.9.1-python3a.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.
- epatch "${FILESDIR}/${PN}-2.9.0-manual-python.patch"
+ PATHCHES+=("${FILESDIR}/${PN}-2.9.0-manual-python.patch")
+
+ # Please do not remove, lest we get references to PORTAGE_TMPDIR in
+ # /usr/lib/python?.?/site-packages/libxml2mod.la, among other things.
+ AUTOTOOLS_AUTORECONF=yes
- eautoreconf
+ autotools-multilib_src_prepare
}
src_configure() {
# filter seemingly problematic CFLAGS (#26320)
filter-flags -fprefetch-loop-arrays -funroll-loops
+ echo "pre configure: PYTHON_TARGETS==\"${PYTHON_TARGETS}\"."
+
# USE zlib support breaks gnome2
# (libgnomeprint for instance fails to compile with
# fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002).
@@ -96,7 +125,7 @@ src_configure() {
# switch (enabling the libxml2 debug module). See bug #100898.
# --with-mem-debug causes unusual segmentation faults (bug #105120).
- econf \
+ autotools-multilib_src_configure \
-with-html-subdir=${PF}/html \
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
$(use_with debug run-debug) \
@@ -109,22 +138,48 @@ src_configure() {
$(use_enable static-libs static)
}
-src_compile() {
- default
+ehook autotools-multilib-per-abi-post_src_configure multilib_abi_post_configure
+multilib_abi_post_configure() {
if use python; then
+ local BUILD_DIR="${BUILD_DIR}"/python
python_copy_sources
- python_foreach_impl libxml2_py_emake
+ # this results in confusingly-named python-python-foo dirs
+ # (i.e.: for the foo PYTHON_ABI). rename them like:
+ # gentoo-python-foo for aesthetic purposes
+ for d in python-python* ; do
+ [[ -d "${d}" ]] && \
+ { mv ${d} gentoo${d#python} || die ; }
+ done
+ einfo "disabling non-python-abi-specific building"
+ sed -e 's/^\(PYTHON_SUBDIR = \).*$/\1/' \
+ -i Makefile || die
fi
+ return 0
}
-src_test() {
- default
- use python && python_foreach_impl libxml2_py_emake test
+ehook autotools-multilib-per-abi-post_src_compile multilib_abi_post_compile
+multilib_abi_post_compile() {
+ if use python; then
+ local BUILD_DIR="${BUILD_DIR}"/gentoo
+ python_foreach_impl python_abi_emake
+ fi
+ return 0
+}
+
+# NOTE: only the best multilib ABI can run the python tests
+# (but it can run them for all the python ABI's). There is
+# no non-best-multilib-abi python interpreter on which to run them!
+ehook autotools-multilib-best-abi-post_src_test multilib_abi_post_test
+multilib_abi_post_test() {
+ local BUILD_DIR="${BUILD_DIR}"/gentoo
+ use python && python_foreach_impl python_abi_emake test
+ return 0
}
src_install() {
- emake DESTDIR="${D}" \
- EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install
+ AUTOTOOLS_PRUNE_LIBTOOL_FILES=modules
+ autotools-multilib_src_install \
+ EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples
# on windows, xmllint is installed by interix libxml2 in parent prefix.
# this is the version to use. the native winnt version does not support
@@ -135,14 +190,6 @@ src_install() {
rm -rf "${ED}"/usr/bin/xmlcatalog
fi
- if use python; then
- python_foreach_impl libxml2_py_emake DESTDIR="${D}" \
- docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
- exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
- install
- python_foreach_impl python_optimize
- fi
-
rm -rf "${ED}"/usr/share/doc/${P}
dodoc AUTHORS ChangeLog Copyright NEWS README* TODO*
@@ -155,8 +202,19 @@ src_install() {
rm -rf "${ED}/usr/share/doc/${PF}/examples"
rm -rf "${ED}/usr/share/doc/${PF}/python/examples"
fi
+}
- prune_libtool_files --modules
+ehook autotools-multilib-per-abi-post_src_install multilib_abi_post_install
+multilib_abi_post_install() {
+ if use python; then
+ local BUILD_DIR="${BUILD_DIR}"/gentoo
+ python_foreach_impl python_abi_emake DESTDIR="${D}" \
+ docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \
+ exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
+ install
+ python_foreach_impl python_optimize
+ fi
+ return 0
}
pkg_postinst() {
@@ -179,8 +237,8 @@ pkg_postinst() {
fi
}
-libxml2_py_emake() {
- pushd "${BUILD_DIR}/python" > /dev/null || die
+python_abi_emake() {
+ pushd "${BUILD_DIR}" > /dev/null || die
emake \
PYTHON="${PYTHON}" \
PYTHON_INCLUDES="${EPREFIX}/usr/include/${EPYTHON}" \