public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/
Date: Sun,  3 Apr 2022 05:18:33 +0000 (UTC)	[thread overview]
Message-ID: <1648963099.81ba9585fad2491563c2c44a96d2eb96a915ff19.sam@gentoo> (raw)

commit:     81ba9585fad2491563c2c44a96d2eb96a915ff19
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  3 05:17:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <soap <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> 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
 }


             reply	other threads:[~2022-04-03  5:18 UTC|newest]

Thread overview: 139+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-03  5:18 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-06 15:54 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxslt/ Michał Górny
2024-06-24  0:13 Sam James
2024-01-30 13:46 Sam James
2023-12-28  3:43 Sam James
2023-12-21 10:39 Arthur Zamarin
2023-12-21  7:27 Arthur Zamarin
2023-11-17 12:07 Sam James
2023-08-15  3:17 Sam James
2023-07-09 11:03 Arthur Zamarin
2023-07-09 11:03 Arthur Zamarin
2023-07-09  9:01 Sam James
2023-07-09  9:01 Sam James
2023-07-09  9:01 Sam James
2023-07-09  9:01 Sam James
2023-05-25  4:32 Sam James
2023-05-25  4:32 Sam James
2023-05-10  1:31 Sam James
2023-05-10  1:31 Sam James
2023-05-10  1:31 Sam James
2023-03-10  7:45 Sam James
2022-12-07 17:51 Sam James
2022-10-29 21:32 Sam James
2022-10-09  8:53 Agostino Sarubbo
2022-10-09  8:52 Agostino Sarubbo
2022-10-09  8:50 Agostino Sarubbo
2022-10-09  8:49 Agostino Sarubbo
2022-10-09  5:22 Arthur Zamarin
2022-10-09  5:22 Arthur Zamarin
2022-10-08 23:10 Sam James
2022-10-08 23:10 Sam James
2022-08-29 19:06 Sam James
2022-08-29 19:06 Sam James
2022-08-18  3:10 Sam James
2022-05-31  9:37 Sam James
2022-04-29  7:59 WANG Xuerui
2022-04-02  3:44 Sam James
2022-03-13  1:19 Sam James
2022-03-07  0:01 Sam James
2022-03-06  8:00 Sam James
2022-03-02  9:07 Agostino Sarubbo
2022-03-02  9:06 Agostino Sarubbo
2022-03-02  9:05 Agostino Sarubbo
2022-03-02  6:52 Agostino Sarubbo
2022-03-02  6:49 Agostino Sarubbo
2022-02-18  2:14 Sam James
2022-02-17 22:52 Sam James
2022-01-03 23:26 David Seifert
2022-01-01  9:38 Sam James
2021-10-31 18:03 Sam James
2021-10-30 22:55 Sam James
2021-10-29 19:20 Sam James
2021-10-29 19:20 Sam James
2021-10-29 18:59 Sam James
2021-10-29 18:59 Sam James
2021-10-29 18:54 Sam James
2021-10-29 18:32 Sam James
2021-07-31 13:40 Michał Górny
2021-05-13 22:19 Sam James
2021-03-11 17:47 Sam James
2021-03-11 17:47 Sam James
2021-02-05 10:37 Sam James
2020-12-27 14:21 Fabian Groffen
2020-12-10 10:43 Lars Wendler
2020-11-14  9:19 Mikle Kolyada
2020-11-06 15:19 Sam James
2020-11-05 16:16 Sam James
2020-10-29 22:06 Sergei Trofimovich
2020-09-11 16:57 Sergei Trofimovich
2020-09-06 16:17 Sam James
2020-08-31  4:03 Sam James
2020-08-17  1:10 Sam James
2020-08-15  7:26 Sergei Trofimovich
2020-08-14 17:19 Sam James
2020-08-14 16:03 Sam James
2020-08-12 10:50 Sam James
2020-08-12  4:02 Sam James
2020-08-12  4:02 Sam James
2020-08-06 19:44 Sam James
2020-08-06 17:42 Sam James
2019-07-07 18:58 Thomas Deutschmann
2019-07-07 18:58 Thomas Deutschmann
2019-07-07 18:58 Thomas Deutschmann
2019-06-13  4:28 Markus Meier
2019-06-04 18:51 Agostino Sarubbo
2019-06-04  7:53 Tobias Klausmann
2019-05-22  7:36 Sergei Trofimovich
2019-05-20 11:47 Mikle Kolyada
2019-05-17 19:08 Sergei Trofimovich
2019-05-14 18:36 Aaron Bauman
2019-05-14  5:21 Robin H. Johnson
2019-05-04 18:38 Andreas K. Hüttel
2018-09-16 18:17 Mikle Kolyada
2018-05-08 22:29 Matt Turner
2018-05-08 19:13 Sergei Trofimovich
2018-05-01 20:18 Mikle Kolyada
2018-04-28 11:32 Mikle Kolyada
2018-04-26  6:41 Sergei Trofimovich
2018-04-26  5:03 Matt Turner
2018-04-26  5:03 Matt Turner
2018-04-25 10:05 Mart Raudsepp
2018-04-25  6:08 Sergei Trofimovich
2018-04-24 19:58 Mikle Kolyada
2018-03-05 18:09 Mike Frysinger
2018-03-02 17:07 Mart Raudsepp
2017-12-27 19:53 Fabian Groffen
2017-12-13  9:47 Mart Raudsepp
2017-12-12 18:41 Markus Meier
2017-12-04 14:41 Agostino Sarubbo
2017-12-02 10:41 Sergei Trofimovich
2017-11-23 20:47 Sergei Trofimovich
2017-11-18 13:20 Sergei Trofimovich
2017-11-06 20:49 Tobias Klausmann
2017-11-04 13:04 Sergei Trofimovich
2017-04-14 16:28 Michał Górny
2017-04-12 19:30 Mike Frysinger
2017-03-29  0:02 Michael Weber
2017-03-28 23:22 Mart Raudsepp
2017-03-16 13:24 Jeroen Roovers
2017-02-24 21:29 Michael Weber
2017-02-21  9:16 Tobias Klausmann
2017-02-18 14:44 Agostino Sarubbo
2017-01-29 16:19 Fabian Groffen
2016-07-30 10:27 Jeroen Roovers
2016-06-08 19:53 Markus Meier
2016-06-07  7:03 Tobias Klausmann
2016-05-31  3:23 Mike Frysinger
2016-02-29  8:46 Stephen Klimaszewski
2016-01-09  7:10 Agostino Sarubbo
2015-12-07 11:40 Agostino Sarubbo
2015-11-21 14:35 Markus Meier
2015-11-18 11:00 Agostino Sarubbo
2015-11-18  8:57 Agostino Sarubbo
2015-11-15 18:26 Matt Turner
2015-11-13  9:59 Agostino Sarubbo
2015-11-13  6:59 Jeroen Roovers
2015-11-13  6:33 Jeroen Roovers
2015-10-01  2:17 Mike Frysinger
2015-09-25  7:11 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1648963099.81ba9585fad2491563c2c44a96d2eb96a915ff19.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox