From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2A86F15808B for ; Sun, 3 Apr 2022 05:18:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22F78E07DB; Sun, 3 Apr 2022 05:18:41 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7CA8CE07DB for ; Sun, 3 Apr 2022 05:18:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 374F8341814 for ; Sun, 3 Apr 2022 05:18:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AB1D6D0 for ; Sun, 3 Apr 2022 05:18:33 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1648963099.81ba9585fad2491563c2c44a96d2eb96a915ff19.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libxslt/libxslt-9999.ebuild X-VCS-Directories: dev-libs/libxslt/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 81ba9585fad2491563c2c44a96d2eb96a915ff19 X-VCS-Branch: master Date: Sun, 3 Apr 2022 05:18:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 37bd96bf-073e-4935-abf9-1437b001d825 X-Archives-Hash: c05d5125038164e372289eef5c34ef6e commit: 81ba9585fad2491563c2c44a96d2eb96a915ff19 Author: Sam James gentoo org> AuthorDate: Sun Apr 3 05:17:22 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sun Apr 3 05:18:19 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81ba9585 dev-libs/libxslt: restore Python bindings to 9999 They're now Python 3 compatible upstream in git & the cross issues have been fixed (much like for libxml2) by soap. Bug: https://bugs.gentoo.org/582130 Thanks-to: David Seifert gentoo.org> Signed-off-by: Sam James gentoo.org> dev-libs/libxslt/libxslt-9999.ebuild | 72 +++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 13 deletions(-) diff --git a/dev-libs/libxslt/libxslt-9999.ebuild b/dev-libs/libxslt/libxslt-9999.ebuild index c3ea46adc4e8..9ae87bff0559 100644 --- a/dev-libs/libxslt/libxslt-9999.ebuild +++ b/dev-libs/libxslt/libxslt-9999.ebuild @@ -3,9 +3,11 @@ EAPI=7 -inherit libtool multilib-minimal - # Note: Please bump this in sync with dev-libs/libxml2. + +PYTHON_COMPAT=( python3_{8..10} ) +inherit libtool python-r1 multilib-minimal + DESCRIPTION="XSLT libraries and tools" HOMEPAGE="https://gitlab.gnome.org/GNOME/libxslt" if [[ ${PV} == 9999 ]] ; then @@ -18,12 +20,14 @@ fi LICENSE="MIT" SLOT="0" -IUSE="crypt debug examples static-libs" +IUSE="crypt debug examples python static-libs" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" BDEPEND=">=virtual/pkgconfig-1" RDEPEND=" >=dev-libs/libxml2-2.9.11:2[${MULTILIB_USEDEP}] crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] ) + python? ( ${PYTHON_DEPS} ) " DEPEND="${RDEPEND}" @@ -49,25 +53,67 @@ src_prepare() { } multilib_src_configure() { - # Python bindings were dropped as they were Python 2 only at the time - # Work in 1.1.35+ is occurring to add prelim. Python 3 support, so could - # restore if something needs them. - ECONF_SOURCE="${S}" econf \ - --without-python \ - $(use_with crypt crypto) \ - $(use_with debug) \ - $(use_with debug mem-debug) \ - $(use_enable static-libs static) \ - "$@" + libxslt_configure() { + ECONF_SOURCE="${S}" econf \ + --without-python \ + $(use_with crypt crypto) \ + $(use_with debug) \ + $(use_with debug mem-debug) \ + $(use_enable static-libs static) \ + "$@" + } + + # Build Python bindings separately + libxslt_configure --without-python + + if multilib_is_native_abi && use python ; then + NATIVE_BUILD_DIR="${BUILD_DIR}" + python_foreach_impl run_in_build_dir libxslt_configure --with-python + fi +} + +libxslt_py_emake() { + pushd "${BUILD_DIR}"/python >/dev/null || die + + emake top_builddir="${NATIVE_BUILD_DIR}" "$@" + + popd >/dev/null || die +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use python ; then + python_foreach_impl run_in_build_dir libxslt_py_emake all + fi +} + +multilib_src_test() { + default + + if multilib_is_native_abi && use python ; then + python_foreach_impl run_in_build_dir libxslt_py_emake test + fi } multilib_src_install() { # "default" does not work here - docs are installed by multilib_src_install_all emake DESTDIR="${D}" install + + if multilib_is_native_abi && use python; then + python_foreach_impl run_in_build_dir libxslt_py_emake \ + DESTDIR="${D}" \ + install + fi } multilib_src_install_all() { einstalldocs + if ! use examples ; then + rm -rf "${ED}"/usr/share/doc/${PF}/tutorial{,2} || die + rm -rf "${ED}"/usr/share/doc/${PF}/python/examples || die + fi + find "${ED}" -type f -name "*.la" -delete || die }