From f70a1bfc721336d4fc7dfb711c2f518a6b18cf16 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 30 Sep 2020 17:27:54 +0100 Subject: gentoo resync : 30.09.2020 --- dev-libs/libxml2/Manifest | 6 +- dev-libs/libxml2/libxml2-2.9.10-r1.ebuild | 224 ----------------------------- dev-libs/libxml2/libxml2-2.9.10-r2.ebuild | 224 +++++++++++++++++++++++++++++ dev-libs/libxml2/libxml2-2.9.10-r3.ebuild | 224 +++++++++++++++++++++++++++++ dev-libs/libxml2/libxml2-2.9.10.ebuild | 224 ----------------------------- dev-libs/libxml2/libxml2-2.9.9-r3.ebuild | 227 ------------------------------ dev-libs/libxml2/libxml2-2.9.9-r4.ebuild | 227 ++++++++++++++++++++++++++++++ 7 files changed, 678 insertions(+), 678 deletions(-) delete mode 100644 dev-libs/libxml2/libxml2-2.9.10-r1.ebuild create mode 100644 dev-libs/libxml2/libxml2-2.9.10-r2.ebuild create mode 100644 dev-libs/libxml2/libxml2-2.9.10-r3.ebuild delete mode 100644 dev-libs/libxml2/libxml2-2.9.10.ebuild delete mode 100644 dev-libs/libxml2/libxml2-2.9.9-r3.ebuild create mode 100644 dev-libs/libxml2/libxml2-2.9.9-r4.ebuild (limited to 'dev-libs/libxml2') diff --git a/dev-libs/libxml2/Manifest b/dev-libs/libxml2/Manifest index c559b54615f6..46f232f217ec 100644 --- a/dev-libs/libxml2/Manifest +++ b/dev-libs/libxml2/Manifest @@ -10,7 +10,7 @@ DIST libxml2-2.9.9.tar.gz 5476717 BLAKE2B 00a67c38084f2effd5d68d7d3e68f0c96cf4f5 DIST xmlts20080827.tar.gz 638940 BLAKE2B c5aab959c6e0698acd5b9be82b48a8ac26f4d01cc03f9acfff20d344f97f4711fc6d4a524ae70457147e8e30c72e27b6726829e1dd21896286aa974ed60774e7 SHA512 7325d0977c4427fc4944b291ccf896a665f654cc24399e5565c12a849c2bc3aef4fa3ee42a09ac115abcb6570c51a8fbd052c38d64d164279ecdecad5a4e884d DIST xsts-2002-01-16.tar.gz 6894439 BLAKE2B 1e9ec63d2c104655e64249e07440a04d862fcbcd4d4e19745d81b34994319b510a531c9d6df1491fae1e90b5d0764f0f1a827251ca8df5d613178b0eab01ef25 SHA512 43300af6d39c1e2221b0ed7318fe14c7464eeb6eb030ed1e22eb29b4ab17f014e2a4c8887c3a46ae5d243e3072da27f00f4e285498ae6f1288177d38d1108288 DIST xsts-2004-01-14.tar.gz 2761085 BLAKE2B 41545995fb3a65d053257c376c07d45ffd1041a433bfbdb46d4dd87a5afb60c18c8629a3d988323f9e7a1d709775b5a7e5930276a7121c0725a22705c0976e36 SHA512 32854388d7e720ad67156baf50bf2bae7bd878ca3e35fd7e44e57cad3f434f69d56bbbedd61509f8a1faf01c9eae74a078df8fe130780b182c05c05cb1c39ebe -EBUILD libxml2-2.9.10-r1.ebuild 6815 BLAKE2B 1c4619b182be59bc8448deca9af64fcd8aed9b23120b4dcb25bf592b9f7957f5902d7bc24fda73874abb8b0f71f6d16662941d1b1096810ade59a46a995b4e88 SHA512 71af1ea794074a405e5e5e046263d1d3510e157b25cbe84cfb7c0463d0a71f5845ac54333905eb6ec4ace24f57b77f5acf97acb53cefc991a85c90ab710e7fa2 -EBUILD libxml2-2.9.10.ebuild 6816 BLAKE2B 7d1574df705961e96f314c4e64a05fff9930c01164ef006e28466ea57327558db7ab1bf698798a0182d0bd3c45e15314ad78515c1651b3dd53d14209162be6e5 SHA512 517edfdc130d70de52b825c37d3ca36ecc0a4b04ceca5e7bde251d823dcf53b43ce08fced4bf06a940395fcdefe2f9ff93d6c67ad813c9ad9a6228232df316cb -EBUILD libxml2-2.9.9-r3.ebuild 6943 BLAKE2B cfc351f4626fb77dec2032e57385fe0800d8ea79c5a776efb31549b7d7a1af9822762ae463bf08982988d740e693eeb4139c117e4a8dcb0b71bdb7dd1d8c3574 SHA512 be36f698c42bffd8d153806bef4e2820e5f8f0245abe4c5547986fab64067d3282227dccf16d7d1e475572abb952b1f57f16a4a311e18071a31a1bf4d7fbd7b4 +EBUILD libxml2-2.9.10-r2.ebuild 6806 BLAKE2B 3b71125772ee4351c1c6870796cf204456f1f3d9b1d532e7f8625d6b77ca9e0f159d4d90907b08a33a9dba24eeabeb5843784d77d682360d66469bb2d0640e99 SHA512 ddd6ec3ccf0c0b6744b71e7c2906c86d05b721c7ad6c57266bfb9717bb96f612690b3270be675d684e60a6d12450040748bdfecb4b15c44e268726ab407eff2c +EBUILD libxml2-2.9.10-r3.ebuild 6809 BLAKE2B 35bc0c4630c0f9ebd3c8da1b90b26eb33ab7388c62b95a7c2f4975d3d4932e654c6fca345cd79fb06acd347938bb4bdf1c9338bf4d0bd057f09022bc380fb3bb SHA512 509a4df958b37b040d4fc674311523f9c74dd310377a066ff9d094fa443b2c6ea6d318c77b674e9854f3c4661c5fbad6a01a38be3db82f36ee873bd4353b7083 +EBUILD libxml2-2.9.9-r4.ebuild 6933 BLAKE2B 49187c14be3109743739465ec89ca0bb01e6982d1dffcb8f68de2d55286c41262552abee8d01c774351f518f1eb723a84bcbc8a34e9eb76a70690b8153a83003 SHA512 5249bfd2def69de21b7b94b3134a7fd4102be75ede637c1df35d22b99dd362e83f7709e7adeb68b6009f7ad23e45a30143132e4af3f28047aaca7b549aa74b0b MISC metadata.xml 347 BLAKE2B 0593bb4362c2ed60dbe07c41872832992f9b993a4c155cddf82ce362f1ddd4c8eb9fa00e5b4457e9a24b22b697d92ef55dde231918fa0e6bdac0a736fce37f66 SHA512 6a094316da6ea1fb160b539788923a2dc01d7ef6304f924f628a438714663a51c8d1adaa97800516a64055a8adf6999ae2899b5a976db680967dcc298e22444d diff --git a/dev-libs/libxml2/libxml2-2.9.10-r1.ebuild b/dev-libs/libxml2/libxml2-2.9.10-r1.ebuild deleted file mode 100644 index a7e1eb4a9918..000000000000 --- a/dev-libs/libxml2/libxml2-2.9.10-r1.ebuild +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} ) -PYTHON_REQ_USE="xml" - -inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal - -DESCRIPTION="XML C parser and toolkit" -HOMEPAGE="http://www.xmlsoft.org/" - -LICENSE="MIT" -SLOT="2" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="debug examples icu ipv6 lzma +python readline static-libs test" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!test? ( 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" -XMLCONF_TARBALL="xmlts20080827.tar.gz" - -SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PF}-patchset.tar.xz - test? ( - ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} - ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} - http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )" - -RDEPEND=" - >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] - icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-util/gtk-doc-am - virtual/pkgconfig -" - -S="${WORKDIR}/${PN}-${PV%_rc*}" - -MULTILIB_CHOST_TOOLS=( - /usr/bin/xml2-config -) - -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 - unpack ${PF}-patchset.tar.xz - cd "${S}" || die - - if use test; then - cp "${DISTDIR}/${XSTS_TARBALL_1}" \ - "${DISTDIR}/${XSTS_TARBALL_2}" \ - "${S}"/xstc/ \ - || die "Failed to install test tarballs" - unpack ${XMLCONF_TARBALL} - fi -} - -src_prepare() { - default - - DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) - - # Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5) - eapply "${WORKDIR}"/patches - - # Patches needed for prefix support - eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch - - eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c - - # Fix build for Windows platform - # https://bugzilla.gnome.org/show_bug.cgi?id=760456 - # eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch - - # Fix python detection, bug #567066 - # https://bugzilla.gnome.org/show_bug.cgi?id=760458 - eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch - - # Fix python tests when building out of tree #565576 - eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch - - if [[ ${CHOST} == *-darwin* ]] ; then - # Avoid final linking arguments for python modules - sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die - # gcc-apple doesn't grok -Wno-array-bounds - sed -i -e 's/-Wno-array-bounds//' configure.ac || die - fi - - # 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 -# epunt_cxx # if we don't eautoreconf - - eautoreconf -} - -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) - (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). - - libxml2_configure() { - ECONF_SOURCE="${S}" econf \ - --with-html-subdir=${PF}/html \ - $(use_with debug run-debug) \ - $(use_with icu) \ - $(use_with lzma) \ - $(use_enable ipv6) \ - $(use_enable static-libs static) \ - $(multilib_native_use_with readline) \ - $(multilib_native_use_with readline history) \ - "$@" - } - - libxml2_py_configure() { - mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist - run_in_build_dir libxml2_configure \ - "--with-python=${EPYTHON}" \ - "--with-python-install-dir=$(python_get_sitedir)" - # odd build system, also see bug #582130 - } - - libxml2_configure --without-python # build python bindings separately - - if multilib_is_native_abi && use python; then - python_foreach_impl libxml2_py_configure - fi -} - -multilib_src_compile() { - default - if multilib_is_native_abi && use python; then - local native_builddir=${BUILD_DIR} - python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all - fi -} - -multilib_src_test() { - ln -s "${S}"/xmlconf || die - emake check - multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test -} - -multilib_src_install() { - emake DESTDIR="${D}" \ - EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install - - if multilib_is_native_abi && 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 -} - -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 - # 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 - - rm -rf "${ED}"/usr/share/doc/${P} - einstalldocs - - if ! use examples; then - rm -rf "${ED}"/usr/share/doc/${PF}/examples - rm -rf "${ED}"/usr/share/doc/${PF}/python/examples - fi - - find "${D}" -name '*.la' -delete || die -} - -pkg_postinst() { - # 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 - # - 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 -} - -libxml2_py_emake() { - pushd "${BUILD_DIR}/python" > /dev/null || die - emake "$@" - popd > /dev/null -} diff --git a/dev-libs/libxml2/libxml2-2.9.10-r2.ebuild b/dev-libs/libxml2/libxml2-2.9.10-r2.ebuild new file mode 100644 index 000000000000..2993851ec4a0 --- /dev/null +++ b/dev-libs/libxml2/libxml2-2.9.10-r2.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8,9} ) +PYTHON_REQ_USE="xml" + +inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal + +DESCRIPTION="XML C parser and toolkit" +HOMEPAGE="http://www.xmlsoft.org/" + +LICENSE="MIT" +SLOT="2" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug examples icu ipv6 lzma +python readline static-libs test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( 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" +XMLCONF_TARBALL="xmlts20080827.tar.gz" + +SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patchset.tar.xz + test? ( + ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} + ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} + http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )" + +RDEPEND=" + >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] + icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-util/gtk-doc-am + virtual/pkgconfig +" + +S="${WORKDIR}/${PN}-${PV%_rc*}" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/xml2-config +) + +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 + unpack ${P}-patchset.tar.xz + cd "${S}" || die + + if use test; then + cp "${DISTDIR}/${XSTS_TARBALL_1}" \ + "${DISTDIR}/${XSTS_TARBALL_2}" \ + "${S}"/xstc/ \ + || die "Failed to install test tarballs" + unpack ${XMLCONF_TARBALL} + fi +} + +src_prepare() { + default + + DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) + + # Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5) + eapply "${WORKDIR}"/patches + + # Patches needed for prefix support + eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch + + eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c + + # Fix build for Windows platform + # https://bugzilla.gnome.org/show_bug.cgi?id=760456 + # eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch + + # Fix python detection, bug #567066 + # https://bugzilla.gnome.org/show_bug.cgi?id=760458 + eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch + + # Fix python tests when building out of tree #565576 + eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch + + if [[ ${CHOST} == *-darwin* ]] ; then + # Avoid final linking arguments for python modules + sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die + # gcc-apple doesn't grok -Wno-array-bounds + sed -i -e 's/-Wno-array-bounds//' configure.ac || die + fi + + # 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 +# epunt_cxx # if we don't eautoreconf + + eautoreconf +} + +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) - (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). + + libxml2_configure() { + ECONF_SOURCE="${S}" econf \ + --with-html-subdir=${PF}/html \ + $(use_with debug run-debug) \ + $(use_with icu) \ + $(use_with lzma) \ + $(use_enable ipv6) \ + $(use_enable static-libs static) \ + $(multilib_native_use_with readline) \ + $(multilib_native_use_with readline history) \ + "$@" + } + + libxml2_py_configure() { + mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist + run_in_build_dir libxml2_configure \ + "--with-python=${EPYTHON}" \ + "--with-python-install-dir=$(python_get_sitedir)" + # odd build system, also see bug #582130 + } + + libxml2_configure --without-python # build python bindings separately + + if multilib_is_native_abi && use python; then + python_foreach_impl libxml2_py_configure + fi +} + +multilib_src_compile() { + default + if multilib_is_native_abi && use python; then + local native_builddir=${BUILD_DIR} + python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all + fi +} + +multilib_src_test() { + ln -s "${S}"/xmlconf || die + emake check + multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test +} + +multilib_src_install() { + emake DESTDIR="${D}" \ + EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install + + if multilib_is_native_abi && 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 +} + +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 + # 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 + + rm -rf "${ED}"/usr/share/doc/${P} + einstalldocs + + if ! use examples; then + rm -rf "${ED}"/usr/share/doc/${PF}/examples + rm -rf "${ED}"/usr/share/doc/${PF}/python/examples + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + # 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 + # + 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 +} + +libxml2_py_emake() { + pushd "${BUILD_DIR}/python" > /dev/null || die + emake "$@" + popd > /dev/null +} diff --git a/dev-libs/libxml2/libxml2-2.9.10-r3.ebuild b/dev-libs/libxml2/libxml2-2.9.10-r3.ebuild new file mode 100644 index 000000000000..360bcffb2024 --- /dev/null +++ b/dev-libs/libxml2/libxml2-2.9.10-r3.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8,9} ) +PYTHON_REQ_USE="xml" + +inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal + +DESCRIPTION="XML C parser and toolkit" +HOMEPAGE="http://www.xmlsoft.org/" + +LICENSE="MIT" +SLOT="2" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug examples icu ipv6 lzma +python readline static-libs test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( 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" +XMLCONF_TARBALL="xmlts20080827.tar.gz" + +SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-r1-patchset.tar.xz + test? ( + ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} + ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} + http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )" + +RDEPEND=" + >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] + icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-util/gtk-doc-am + virtual/pkgconfig +" + +S="${WORKDIR}/${PN}-${PV%_rc*}" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/xml2-config +) + +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 + unpack ${P}-r1-patchset.tar.xz + cd "${S}" || die + + if use test; then + cp "${DISTDIR}/${XSTS_TARBALL_1}" \ + "${DISTDIR}/${XSTS_TARBALL_2}" \ + "${S}"/xstc/ \ + || die "Failed to install test tarballs" + unpack ${XMLCONF_TARBALL} + fi +} + +src_prepare() { + default + + DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) + + # Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5) + eapply "${WORKDIR}"/patches + + # Patches needed for prefix support + eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch + + eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c + + # Fix build for Windows platform + # https://bugzilla.gnome.org/show_bug.cgi?id=760456 + # eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch + + # Fix python detection, bug #567066 + # https://bugzilla.gnome.org/show_bug.cgi?id=760458 + eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch + + # Fix python tests when building out of tree #565576 + eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch + + if [[ ${CHOST} == *-darwin* ]] ; then + # Avoid final linking arguments for python modules + sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die + # gcc-apple doesn't grok -Wno-array-bounds + sed -i -e 's/-Wno-array-bounds//' configure.ac || die + fi + + # 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 +# epunt_cxx # if we don't eautoreconf + + eautoreconf +} + +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) - (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). + + libxml2_configure() { + ECONF_SOURCE="${S}" econf \ + --with-html-subdir=${PF}/html \ + $(use_with debug run-debug) \ + $(use_with icu) \ + $(use_with lzma) \ + $(use_enable ipv6) \ + $(use_enable static-libs static) \ + $(multilib_native_use_with readline) \ + $(multilib_native_use_with readline history) \ + "$@" + } + + libxml2_py_configure() { + mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist + run_in_build_dir libxml2_configure \ + "--with-python=${EPYTHON}" \ + "--with-python-install-dir=$(python_get_sitedir)" + # odd build system, also see bug #582130 + } + + libxml2_configure --without-python # build python bindings separately + + if multilib_is_native_abi && use python; then + python_foreach_impl libxml2_py_configure + fi +} + +multilib_src_compile() { + default + if multilib_is_native_abi && use python; then + local native_builddir=${BUILD_DIR} + python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all + fi +} + +multilib_src_test() { + ln -s "${S}"/xmlconf || die + emake check + multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test +} + +multilib_src_install() { + emake DESTDIR="${D}" \ + EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install + + if multilib_is_native_abi && 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 +} + +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 + # 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 + + rm -rf "${ED}"/usr/share/doc/${P} + einstalldocs + + if ! use examples; then + rm -rf "${ED}"/usr/share/doc/${PF}/examples + rm -rf "${ED}"/usr/share/doc/${PF}/python/examples + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + # 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 + # + 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 +} + +libxml2_py_emake() { + pushd "${BUILD_DIR}/python" > /dev/null || die + emake "$@" + popd > /dev/null +} diff --git a/dev-libs/libxml2/libxml2-2.9.10.ebuild b/dev-libs/libxml2/libxml2-2.9.10.ebuild deleted file mode 100644 index d0bf6aa7bf9d..000000000000 --- a/dev-libs/libxml2/libxml2-2.9.10.ebuild +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} ) -PYTHON_REQ_USE="xml" - -inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal - -DESCRIPTION="XML C parser and toolkit" -HOMEPAGE="http://www.xmlsoft.org/" - -LICENSE="MIT" -SLOT="2" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="debug examples icu ipv6 lzma +python readline static-libs test" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!test? ( 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" -XMLCONF_TARBALL="xmlts20080827.tar.gz" - -SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz - https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patchset.tar.xz - test? ( - ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} - ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} - http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )" - -RDEPEND=" - >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] - icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:= ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-util/gtk-doc-am - virtual/pkgconfig -" - -S="${WORKDIR}/${PN}-${PV%_rc*}" - -MULTILIB_CHOST_TOOLS=( - /usr/bin/xml2-config -) - -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 - unpack ${P}-patchset.tar.xz - cd "${S}" || die - - if use test; then - cp "${DISTDIR}/${XSTS_TARBALL_1}" \ - "${DISTDIR}/${XSTS_TARBALL_2}" \ - "${S}"/xstc/ \ - || die "Failed to install test tarballs" - unpack ${XMLCONF_TARBALL} - fi -} - -src_prepare() { - default - - DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) - - # Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5) - eapply "${WORKDIR}"/patches - - # Patches needed for prefix support - eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch - - eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c - - # Fix build for Windows platform - # https://bugzilla.gnome.org/show_bug.cgi?id=760456 - # eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch - - # Fix python detection, bug #567066 - # https://bugzilla.gnome.org/show_bug.cgi?id=760458 - eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch - - # Fix python tests when building out of tree #565576 - eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch - - if [[ ${CHOST} == *-darwin* ]] ; then - # Avoid final linking arguments for python modules - sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die - # gcc-apple doesn't grok -Wno-array-bounds - sed -i -e 's/-Wno-array-bounds//' configure.ac || die - fi - - # 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 -# epunt_cxx # if we don't eautoreconf - - eautoreconf -} - -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) - (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). - - libxml2_configure() { - ECONF_SOURCE="${S}" econf \ - --with-html-subdir=${PF}/html \ - $(use_with debug run-debug) \ - $(use_with icu) \ - $(use_with lzma) \ - $(use_enable ipv6) \ - $(use_enable static-libs static) \ - $(multilib_native_use_with readline) \ - $(multilib_native_use_with readline history) \ - "$@" - } - - libxml2_py_configure() { - mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist - run_in_build_dir libxml2_configure \ - "--with-python=${EPYTHON}" \ - "--with-python-install-dir=$(python_get_sitedir)" - # odd build system, also see bug #582130 - } - - libxml2_configure --without-python # build python bindings separately - - if multilib_is_native_abi && use python; then - python_foreach_impl libxml2_py_configure - fi -} - -multilib_src_compile() { - default - if multilib_is_native_abi && use python; then - local native_builddir=${BUILD_DIR} - python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all - fi -} - -multilib_src_test() { - ln -s "${S}"/xmlconf || die - emake check - multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test -} - -multilib_src_install() { - emake DESTDIR="${D}" \ - EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install - - if multilib_is_native_abi && 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 -} - -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 - # 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 - - rm -rf "${ED}"/usr/share/doc/${P} - einstalldocs - - if ! use examples; then - rm -rf "${ED}"/usr/share/doc/${PF}/examples - rm -rf "${ED}"/usr/share/doc/${PF}/python/examples - fi - - find "${D}" -name '*.la' -delete || die -} - -pkg_postinst() { - # 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 - # - 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 -} - -libxml2_py_emake() { - pushd "${BUILD_DIR}/python" > /dev/null || die - emake "$@" - popd > /dev/null -} diff --git a/dev-libs/libxml2/libxml2-2.9.9-r3.ebuild b/dev-libs/libxml2/libxml2-2.9.9-r3.ebuild deleted file mode 100644 index b226aa06cb99..000000000000 --- a/dev-libs/libxml2/libxml2-2.9.9-r3.ebuild +++ /dev/null @@ -1,227 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 python3_{6,7,8} ) -PYTHON_REQ_USE="xml" - -inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal - -DESCRIPTION="XML C parser and toolkit" -HOMEPAGE="http://www.xmlsoft.org/" - -LICENSE="MIT" -SLOT="2" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="debug examples icu ipv6 lzma +python readline static-libs test" -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" -RESTRICT="!test? ( 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" -XMLCONF_TARBALL="xmlts20080827.tar.gz" - -SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz - https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz - test? ( - ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} - ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} - http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )" - -RDEPEND=" - >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] - icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) - python? ( ${PYTHON_DEPS} ) - readline? ( sys-libs/readline:= ) -" -DEPEND="${RDEPEND} - dev-util/gtk-doc-am - virtual/pkgconfig - hppa? ( >=sys-devel/binutils-2.15.92.0.2 ) -" - -S="${WORKDIR}/${PN}-${PV%_rc*}" - -MULTILIB_CHOST_TOOLS=( - /usr/bin/xml2-config -) - -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 - unpack ${P}-patchset.tar.xz - cd "${S}" || die - - if use test; then - cp "${DISTDIR}/${XSTS_TARBALL_1}" \ - "${DISTDIR}/${XSTS_TARBALL_2}" \ - "${S}"/xstc/ \ - || die "Failed to install test tarballs" - unpack ${XMLCONF_TARBALL} - fi -} - -src_prepare() { - default - - DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) - - # Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5) - eapply "${WORKDIR}"/patches - - # Patches needed for prefix support - eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch - - eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c - - # Fix build for Windows platform - # https://bugzilla.gnome.org/show_bug.cgi?id=760456 - # eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch - - # Fix python detection, bug #567066 - # https://bugzilla.gnome.org/show_bug.cgi?id=760458 - eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch - - # Fix python tests when building out of tree #565576 - eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch - - # Workaround python3 itstool potential problems, bug 701020 - eapply "${FILESDIR}"/${PV}-python3-unicode-errors.patch - - if [[ ${CHOST} == *-darwin* ]] ; then - # Avoid final linking arguments for python modules - sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die - # gcc-apple doesn't grok -Wno-array-bounds - sed -i -e 's/-Wno-array-bounds//' configure.ac || die - fi - - # 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 -# epunt_cxx # if we don't eautoreconf - - eautoreconf -} - -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) - (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). - - libxml2_configure() { - ECONF_SOURCE="${S}" econf \ - --with-html-subdir=${PF}/html \ - $(use_with debug run-debug) \ - $(use_with icu) \ - $(use_with lzma) \ - $(use_enable ipv6) \ - $(use_enable static-libs static) \ - $(multilib_native_use_with readline) \ - $(multilib_native_use_with readline history) \ - "$@" - } - - libxml2_py_configure() { - mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist - run_in_build_dir libxml2_configure \ - "--with-python=${EPYTHON}" \ - "--with-python-install-dir=$(python_get_sitedir)" - # odd build system, also see bug #582130 - } - - libxml2_configure --without-python # build python bindings separately - - if multilib_is_native_abi && use python; then - python_foreach_impl libxml2_py_configure - fi -} - -multilib_src_compile() { - default - if multilib_is_native_abi && use python; then - local native_builddir=${BUILD_DIR} - python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all - fi -} - -multilib_src_test() { - ln -s "${S}"/xmlconf || die - emake check - multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test -} - -multilib_src_install() { - emake DESTDIR="${D}" \ - EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install - - if multilib_is_native_abi && 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 -} - -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 - # 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 - - rm -rf "${ED}"/usr/share/doc/${P} - einstalldocs - - if ! use examples; then - rm -rf "${ED}"/usr/share/doc/${PF}/examples - rm -rf "${ED}"/usr/share/doc/${PF}/python/examples - fi - - find "${D}" -name '*.la' -delete || die -} - -pkg_postinst() { - # 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 - # - 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 -} - -libxml2_py_emake() { - pushd "${BUILD_DIR}/python" > /dev/null || die - emake "$@" - popd > /dev/null -} diff --git a/dev-libs/libxml2/libxml2-2.9.9-r4.ebuild b/dev-libs/libxml2/libxml2-2.9.9-r4.ebuild new file mode 100644 index 000000000000..6e250aac8ffe --- /dev/null +++ b/dev-libs/libxml2/libxml2-2.9.9-r4.ebuild @@ -0,0 +1,227 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{6,7,8} ) +PYTHON_REQ_USE="xml" + +inherit libtool flag-o-matic python-r1 autotools prefix multilib-minimal + +DESCRIPTION="XML C parser and toolkit" +HOMEPAGE="http://www.xmlsoft.org/" + +LICENSE="MIT" +SLOT="2" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug examples icu ipv6 lzma +python readline static-libs test" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="!test? ( 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" +XMLCONF_TARBALL="xmlts20080827.tar.gz" + +SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz + https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz + test? ( + ${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} + ${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} + http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )" + +RDEPEND=" + >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] + icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) + python? ( ${PYTHON_DEPS} ) + readline? ( sys-libs/readline:= ) +" +DEPEND="${RDEPEND} + dev-util/gtk-doc-am + virtual/pkgconfig + hppa? ( >=sys-devel/binutils-2.15.92.0.2 ) +" + +S="${WORKDIR}/${PN}-${PV%_rc*}" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/xml2-config +) + +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 + unpack ${P}-patchset.tar.xz + cd "${S}" || die + + if use test; then + cp "${DISTDIR}/${XSTS_TARBALL_1}" \ + "${DISTDIR}/${XSTS_TARBALL_2}" \ + "${S}"/xstc/ \ + || die "Failed to install test tarballs" + unpack ${XMLCONF_TARBALL} + fi +} + +src_prepare() { + default + + DOCS=( AUTHORS ChangeLog NEWS README* TODO* ) + + # Selective cherry-picks from master up to 2019-02-28 (commit 8161b463f5) + eapply "${WORKDIR}"/patches + + # Patches needed for prefix support + eapply "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch + + eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c + + # Fix build for Windows platform + # https://bugzilla.gnome.org/show_bug.cgi?id=760456 + # eapply "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch + + # Fix python detection, bug #567066 + # https://bugzilla.gnome.org/show_bug.cgi?id=760458 + eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch + + # Fix python tests when building out of tree #565576 + eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch + + # Workaround python3 itstool potential problems, bug 701020 + eapply "${FILESDIR}"/${PV}-python3-unicode-errors.patch + + if [[ ${CHOST} == *-darwin* ]] ; then + # Avoid final linking arguments for python modules + sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die + # gcc-apple doesn't grok -Wno-array-bounds + sed -i -e 's/-Wno-array-bounds//' configure.ac || die + fi + + # 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 +# epunt_cxx # if we don't eautoreconf + + eautoreconf +} + +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) - (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). + + libxml2_configure() { + ECONF_SOURCE="${S}" econf \ + --with-html-subdir=${PF}/html \ + $(use_with debug run-debug) \ + $(use_with icu) \ + $(use_with lzma) \ + $(use_enable ipv6) \ + $(use_enable static-libs static) \ + $(multilib_native_use_with readline) \ + $(multilib_native_use_with readline history) \ + "$@" + } + + libxml2_py_configure() { + mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist + run_in_build_dir libxml2_configure \ + "--with-python=${EPYTHON}" \ + "--with-python-install-dir=$(python_get_sitedir)" + # odd build system, also see bug #582130 + } + + libxml2_configure --without-python # build python bindings separately + + if multilib_is_native_abi && use python; then + python_foreach_impl libxml2_py_configure + fi +} + +multilib_src_compile() { + default + if multilib_is_native_abi && use python; then + local native_builddir=${BUILD_DIR} + python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all + fi +} + +multilib_src_test() { + ln -s "${S}"/xmlconf || die + emake check + multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test +} + +multilib_src_install() { + emake DESTDIR="${D}" \ + EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install + + if multilib_is_native_abi && 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 +} + +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 + # 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 + + rm -rf "${ED}"/usr/share/doc/${P} + einstalldocs + + if ! use examples; then + rm -rf "${ED}"/usr/share/doc/${PF}/examples + rm -rf "${ED}"/usr/share/doc/${PF}/python/examples + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + # 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 + # + 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 +} + +libxml2_py_emake() { + pushd "${BUILD_DIR}/python" > /dev/null || die + emake "$@" + popd > /dev/null +} -- cgit v1.2.3