ebuild Reproducible: Always
Created attachment 355518 [details] libxml2-2.9.1-r2.ebuild
Created attachment 355536 [details] libxml2-2.9.1-r2.ebuild Requires dev-libs/icu-51.2-r1 from https://bugs.gentoo.org/show_bug.cgi?id=480422
Created attachment 355538 [details, diff] Update configure.in to accept external ICU_CONFIG variable
Comment on attachment 355536 [details] libxml2-2.9.1-r2.ebuild Works with icu-config.abi
Please submit unified diffs against gentoo-x86 ebuilds.
Comment on attachment 355518 [details] libxml2-2.9.1-r2.ebuild --- libxml2-2.9.1-r1.ebuild 2013-08-07 14:41:18.848849020 +0200 +++ - 2013-08-11 14:56:51.642933444 +0200 @@ -6,7 +6,7 @@ PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) PYTHON_REQ_USE="xml" -inherit libtool flag-o-matic eutils python-r1 autotools prefix +inherit libtool flag-o-matic eutils python-r1 autotools prefix multilib-minimal DESCRIPTION="Version 2 of the library to manipulate XML files" HOMEPAGE="http://www.xmlsoft.org/" @@ -82,9 +82,11 @@ epatch "${FILESDIR}/${PN}-2.9.0-manual-python.patch" eautoreconf + + multilib_copy_sources } -src_configure() { +multilib_src_configure() { # filter seemingly problematic CFLAGS (#26320) filter-flags -fprefetch-loop-arrays -funroll-loops @@ -109,20 +111,20 @@ $(use_enable static-libs static) } -src_compile() { +multilib_src_compile() { default - if use python; then + if use python && multilib_is_native_abi; then python_copy_sources python_foreach_impl libxml2_py_emake fi } -src_test() { +multilib_src_test() { default use python && python_foreach_impl libxml2_py_emake test } -src_install() { +multilib_src_install() { emake DESTDIR="${D}" \ EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install @@ -135,7 +137,7 @@ rm -rf "${ED}"/usr/bin/xmlcatalog fi - if use python; then + if use python && multilib_is_native_abi; then python_foreach_impl libxml2_py_emake DESTDIR="${D}" \ docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \ exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
Comment on attachment 355536 [details] libxml2-2.9.1-r2.ebuild --- libxml2-2.9.1-r1.ebuild 2013-08-07 14:41:18.848849020 +0200 +++ - 2013-08-11 14:57:13.266632903 +0200 @@ -6,14 +6,16 @@ PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) PYTHON_REQ_USE="xml" -inherit libtool flag-o-matic eutils python-r1 autotools prefix +inherit libtool flag-o-matic eutils python-r1 autotools prefix multilib-minimal 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="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" IUSE="debug examples icu ipv6 lzma python readline static-libs test" XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" @@ -29,9 +31,9 @@ ${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:= )" @@ -81,10 +83,15 @@ # Python bindings are built/tested/installed manually. epatch "${FILESDIR}/${PN}-2.9.0-manual-python.patch" + # Patch configure.in so accept local icu-config + epatch "${FILESDIR}/${PN}-icu-config.patch" + eautoreconf + + multilib_copy_sources } -src_configure() { +multilib_src_configure() { # filter seemingly problematic CFLAGS (#26320) filter-flags -fprefetch-loop-arrays -funroll-loops @@ -96,6 +103,14 @@ # switch (enabling the libxml2 debug module). See bug #100898. # --with-mem-debug causes unusual segmentation faults (bug #105120). + + if multilib_is_native_abi; then + icuconfig="/usr/bin/icu-config" + else + icuconfig="/usr/bin/icu-config.${ABI}" + fi + + ICU_CONFIG=${icuconfig} \ econf \ -with-html-subdir=${PF}/html \ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ @@ -109,20 +124,20 @@ $(use_enable static-libs static) } -src_compile() { +multilib_src_compile() { default - if use python; then + if use python && multilib_is_native_abi; then python_copy_sources python_foreach_impl libxml2_py_emake fi } -src_test() { +multilib_src_test() { default use python && python_foreach_impl libxml2_py_emake test } -src_install() { +multilib_src_install() { emake DESTDIR="${D}" \ EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install @@ -135,7 +150,7 @@ rm -rf "${ED}"/usr/bin/xmlcatalog fi - if use python; then + if use python && multilib_is_native_abi; then python_foreach_impl libxml2_py_emake DESTDIR="${D}" \ docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \ exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \
Comment on attachment 355536 [details] libxml2-2.9.1-r2.ebuild > > multilib_copy_sources >} out of tree builds seem to work > >multilib_src_configure() { > # filter seemingly problematic CFLAGS (#26320) > filter-flags -fprefetch-loop-arrays -funroll-loops > this is for src_configure, not multilib_src_configure AFAIK > # 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). > > if multilib_is_native_abi; then > icuconfig="/usr/bin/icu-config" > else > icuconfig="/usr/bin/icu-config.${ABI}" > fi > > ICU_CONFIG=${icuconfig} \ better patch it to use icu's pkgconfig files rather than these hacks. does it fail if you use only the native abi icu-config ? > econf \ > -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) \ disable python for non native abis > $(use_with readline) \ > $(use_with readline history) \ disable readline for non native abis. these seem only for xmllint and you dont MULTILIB_USEDEP on readline anyway > $(use_enable ipv6) \ > $(use_enable static-libs static) >} > >multilib_src_compile() { > default > if use python && multilib_is_native_abi; then > python_copy_sources > python_foreach_impl libxml2_py_emake > fi >} > >multilib_src_test() { > default > use python && python_foreach_impl libxml2_py_emake test >} > >multilib_src_install() { > emake DESTDIR="${D}" \ > EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install what is that EXAMPLES_DIR good for ? better send it to $T for non native ABIs anyway > # 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 this is for multilib_src_install_all > if use python && multilib_is_native_abi; 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 looks ok in multilib_src_install; should be checked / fixed for out of tree builds though > rm -rf "${ED}"/usr/share/doc/${P} this is for multilib_src_install_all > dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* set DOCS=( files ) in global scope; multilib-minimal will install those for you > if ! use python; then > rm -rf "${ED}"/usr/share/doc/${PF}/python > rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV} > fi multilib_src_install_all > > if ! use examples; then > rm -rf "${ED}/usr/share/doc/${PF}/examples" > rm -rf "${ED}/usr/share/doc/${PF}/python/examples" > fi > > prune_libtool_files --modules ditto
I couldn't get rid of "multilib_copy_sources", cause: line 3454: pushd: /var/tmp/portage/dev-libs/libxml2-2.9.1-r2/work/libxml2-2.9.1-x86: No such file or directory. Also "what is that EXAMPLES_DIR good for ? better send it to $T for non native ABIs anyway" is not much clear to me. At least, when we have ICU in tree, I sending improved and tested ebuild. Anyway, could be used autotools-utils (or better autotools-multilib) ? Bonus: getting rid of 12 years old comment. Idea: In multilib_src_test python could also depend on multilib_native_abi, but not sure about it. --- /usr/portage/dev-libs/libxml2/libxml2-2.9.1-r1.ebuild 2013-09-05 20:31:09.000000000 +0200 +++ /var/lib/layman/ixit/dev-libs/libxml2/libxml2-2.9.1-r2.ebuild 2013-12-27 21:31:18.466651597 +0100 @@ -6,7 +6,7 @@ PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} ) PYTHON_REQ_USE="xml" -inherit libtool flag-o-matic eutils python-r1 autotools prefix +inherit libtool flag-o-matic eutils python-r1 autotools prefix multilib-minimal DESCRIPTION="Version 2 of the library to manipulate XML files" HOMEPAGE="http://www.xmlsoft.org/" @@ -29,9 +29,9 @@ ${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:= )" @@ -41,6 +41,8 @@ S="${WORKDIR}/${PN}-${PV%_rc*}" +DOCS=( AUTHORS ChangeLog Copyright NEWS README* TODO* ) + 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 @@ -82,50 +84,64 @@ epatch "${FILESDIR}/${PN}-2.9.0-manual-python.patch" eautoreconf + + multilib_copy_sources } -src_configure() { +multilib_src_configure() { # filter seemingly problematic CFLAGS (#26320) filter-flags -fprefetch-loop-arrays -funroll-loops - # 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). - econf \ - -with-html-subdir=${PF}/html \ + + $econf_args = -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) + + if multilib_is_native_abi; then + $native_econf += \ + $(use_with python) \ + $(use_with readline) \ + $(use_with readline history) + fi + + econf $econf_args } -src_compile() { +multilib_src_compile() { default - if use python; then + if use python && multilib_is_native_abi; then python_copy_sources python_foreach_impl libxml2_py_emake fi } -src_test() { +multilib_src_test() { default use python && python_foreach_impl libxml2_py_emake test } -src_install() { +multilib_src_install() { emake DESTDIR="${D}" \ EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install + if use python && multilib_is_native_abi; 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 +} + +multilib_src_install_all() { # 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 @@ -135,16 +151,7 @@ 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* if ! use python; then rm -rf "${ED}"/usr/share/doc/${PF}/python
David, thanks for your work on the ebuild; added it with some changes (and avoiding multilib_copy_sources). +*libxml2-2.9.1-r2 (30 Dec 2013) + + 30 Dec 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + +libxml2-2.9.1-r2.ebuild, +files/libxml2-2.9.1-icu-pkgconfig.patch: + Add multilib support (bug #480404, thanks to David Heidelberger (okias) and + Alexis Ballier). +*emul-linux-x86-baselibs-20131008-r7 (30 Dec 2013) + + 30 Dec 2013; Alexandre Rostovtsev <tetromino@gentoo.org> + emul-linux-x86-baselibs-20131008-r6.ebuild, + +emul-linux-x86-baselibs-20131008-r7.ebuild, + +files/remove-native-20131008-r6, files/remove-native: + Bump for multilib libxml2.
(In reply to Alexandre Rostovtsev from comment #10) > +*libxml2-2.9.1-r2 (30 Dec 2013) > + > + 30 Dec 2013; Alexandre Rostovtsev <tetromino@gentoo.org> > + +libxml2-2.9.1-r2.ebuild, +files/libxml2-2.9.1-icu-pkgconfig.patch: > + Add multilib support You forgot [${MULTILIB_USEDEP}] for sys-libs/readline. Also it is better to explicitly depend on 0 slot of sys-libs/zlib, dev-libs/icu, app-arch/xz-utils and sys-libs/readline. Example: sys-libs/zlib:0=[${MULTILIB_USEDEP}]
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #11) > You forgot [${MULTILIB_USEDEP}] for sys-libs/readline. No. Take a look at multilib_src_configure() : readline is explicitly disabled for non-native ABIs because it is only needed for linking /usr/bin/xmllint.
(In reply to Alexandre Rostovtsev from comment #10) > +*libxml2-2.9.1-r2 (30 Dec 2013) > + > + 30 Dec 2013; Alexandre Rostovtsev <tetromino@gentoo.org> > + +libxml2-2.9.1-r2.ebuild, +files/libxml2-2.9.1-icu-pkgconfig.patch: > + Add multilib support myconf variable (in multilib_src_configure()) should be declared as local.
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #13) > myconf variable (in multilib_src_configure()) should be declared as local. Fixed, thanks for noticing. + 03 Jan 2014; Alexandre Rostovtsev <tetromino@gentoo.org> + libxml2-2.9.1-r2.ebuild: + Stylistic fix: make locals local, thanks to Arfrever for noticing.
for the future, please remember to use the multilib_build_binaries function instead of multilib_is_native_abi since only the first one will allow overriding the restriction for users, which currently likely means multilib-portage (which failed to build a 32bit mesa because of missing libxml2 python bindings)
(In reply to Thomas Sachau from comment #15) > for the future, please remember to use the multilib_build_binaries function > instead of multilib_is_native_abi since only the first one will allow > overriding the restriction for users, which currently likely means > multilib-portage (which failed to build a 32bit mesa because of missing > libxml2 python bindings) Wait. Explain please why you need 32-bit python bindings when there is no multilib python in portage, and AFAIK there were no plans to add it, and no use case for it. Because if there *is* a plan to use 32-bit python bindings, the gnome team will need to completely revise our treatment of gobject-introspection. At the moment, per upstream decisions, gobject-introspection is architected in a way that is unfriendly to multilib (arch-specific data files installed in /usr/share)...
(In reply to Thomas Sachau from comment #15) > for the future, please remember to use the multilib_build_binaries function > instead of multilib_is_native_abi since only the first one will allow > overriding the restriction for users, which currently likely means > multilib-portage (which failed to build a 32bit mesa because of missing > libxml2 python bindings) Also, multilib_build_binaries currently results in broken dependencies. How can we specify a dependency on e.g. readline[abi_x86_32] *only* when multilib_build_binaries != multilib_is_native_abi? ${MULTILIB_USEDEP} won't work for that, and I don't want to add unnecessary dependencies for the vast majority of users (i.e. those who are not using multilib-portage).