1 |
commit: 81ba9585fad2491563c2c44a96d2eb96a915ff19 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 3 05:17:22 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 3 05:18:19 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81ba9585 |
7 |
|
8 |
dev-libs/libxslt: restore Python bindings to 9999 |
9 |
|
10 |
They're now Python 3 compatible upstream in git & the |
11 |
cross issues have been fixed (much like for libxml2) |
12 |
by soap. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/582130 |
15 |
Thanks-to: David Seifert <soap <AT> gentoo.org> |
16 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
dev-libs/libxslt/libxslt-9999.ebuild | 72 +++++++++++++++++++++++++++++------- |
19 |
1 file changed, 59 insertions(+), 13 deletions(-) |
20 |
|
21 |
diff --git a/dev-libs/libxslt/libxslt-9999.ebuild b/dev-libs/libxslt/libxslt-9999.ebuild |
22 |
index c3ea46adc4e8..9ae87bff0559 100644 |
23 |
--- a/dev-libs/libxslt/libxslt-9999.ebuild |
24 |
+++ b/dev-libs/libxslt/libxslt-9999.ebuild |
25 |
@@ -3,9 +3,11 @@ |
26 |
|
27 |
EAPI=7 |
28 |
|
29 |
-inherit libtool multilib-minimal |
30 |
- |
31 |
# Note: Please bump this in sync with dev-libs/libxml2. |
32 |
+ |
33 |
+PYTHON_COMPAT=( python3_{8..10} ) |
34 |
+inherit libtool python-r1 multilib-minimal |
35 |
+ |
36 |
DESCRIPTION="XSLT libraries and tools" |
37 |
HOMEPAGE="https://gitlab.gnome.org/GNOME/libxslt" |
38 |
if [[ ${PV} == 9999 ]] ; then |
39 |
@@ -18,12 +20,14 @@ fi |
40 |
|
41 |
LICENSE="MIT" |
42 |
SLOT="0" |
43 |
-IUSE="crypt debug examples static-libs" |
44 |
+IUSE="crypt debug examples python static-libs" |
45 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
46 |
|
47 |
BDEPEND=">=virtual/pkgconfig-1" |
48 |
RDEPEND=" |
49 |
>=dev-libs/libxml2-2.9.11:2[${MULTILIB_USEDEP}] |
50 |
crypt? ( >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] ) |
51 |
+ python? ( ${PYTHON_DEPS} ) |
52 |
" |
53 |
DEPEND="${RDEPEND}" |
54 |
|
55 |
@@ -49,25 +53,67 @@ src_prepare() { |
56 |
} |
57 |
|
58 |
multilib_src_configure() { |
59 |
- # Python bindings were dropped as they were Python 2 only at the time |
60 |
- # Work in 1.1.35+ is occurring to add prelim. Python 3 support, so could |
61 |
- # restore if something needs them. |
62 |
- ECONF_SOURCE="${S}" econf \ |
63 |
- --without-python \ |
64 |
- $(use_with crypt crypto) \ |
65 |
- $(use_with debug) \ |
66 |
- $(use_with debug mem-debug) \ |
67 |
- $(use_enable static-libs static) \ |
68 |
- "$@" |
69 |
+ libxslt_configure() { |
70 |
+ ECONF_SOURCE="${S}" econf \ |
71 |
+ --without-python \ |
72 |
+ $(use_with crypt crypto) \ |
73 |
+ $(use_with debug) \ |
74 |
+ $(use_with debug mem-debug) \ |
75 |
+ $(use_enable static-libs static) \ |
76 |
+ "$@" |
77 |
+ } |
78 |
+ |
79 |
+ # Build Python bindings separately |
80 |
+ libxslt_configure --without-python |
81 |
+ |
82 |
+ if multilib_is_native_abi && use python ; then |
83 |
+ NATIVE_BUILD_DIR="${BUILD_DIR}" |
84 |
+ python_foreach_impl run_in_build_dir libxslt_configure --with-python |
85 |
+ fi |
86 |
+} |
87 |
+ |
88 |
+libxslt_py_emake() { |
89 |
+ pushd "${BUILD_DIR}"/python >/dev/null || die |
90 |
+ |
91 |
+ emake top_builddir="${NATIVE_BUILD_DIR}" "$@" |
92 |
+ |
93 |
+ popd >/dev/null || die |
94 |
+} |
95 |
+ |
96 |
+multilib_src_compile() { |
97 |
+ default |
98 |
+ |
99 |
+ if multilib_is_native_abi && use python ; then |
100 |
+ python_foreach_impl run_in_build_dir libxslt_py_emake all |
101 |
+ fi |
102 |
+} |
103 |
+ |
104 |
+multilib_src_test() { |
105 |
+ default |
106 |
+ |
107 |
+ if multilib_is_native_abi && use python ; then |
108 |
+ python_foreach_impl run_in_build_dir libxslt_py_emake test |
109 |
+ fi |
110 |
} |
111 |
|
112 |
multilib_src_install() { |
113 |
# "default" does not work here - docs are installed by multilib_src_install_all |
114 |
emake DESTDIR="${D}" install |
115 |
+ |
116 |
+ if multilib_is_native_abi && use python; then |
117 |
+ python_foreach_impl run_in_build_dir libxslt_py_emake \ |
118 |
+ DESTDIR="${D}" \ |
119 |
+ install |
120 |
+ fi |
121 |
} |
122 |
|
123 |
multilib_src_install_all() { |
124 |
einstalldocs |
125 |
|
126 |
+ if ! use examples ; then |
127 |
+ rm -rf "${ED}"/usr/share/doc/${PF}/tutorial{,2} || die |
128 |
+ rm -rf "${ED}"/usr/share/doc/${PF}/python/examples || die |
129 |
+ fi |
130 |
+ |
131 |
find "${ED}" -type f -name "*.la" -delete || die |
132 |
} |