Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/
Date: Wed, 31 Oct 2018 21:58:34
Message-Id: 1541023084.c3517916d940cebd8ae58994a6c799ec8e34fcc3.chutzpah@gentoo
1 commit: c3517916d940cebd8ae58994a6c799ec8e34fcc3
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 31 21:57:47 2018 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 31 21:58:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3517916
7
8 sys-apps/util-linux: Support multiple python versions in 9999
9
10 This will build the libmount python bindings for all python versions in
11 PYTHON_TARGETS rather than just what is in PYTHON_SINGLE_TARGET.
12
13 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
14 Package-Manager: Portage-2.3.51, Repoman-2.3.11
15
16 sys-apps/util-linux/util-linux-9999.ebuild | 70 ++++++++++++++++++++++++++----
17 1 file changed, 62 insertions(+), 8 deletions(-)
18
19 diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild
20 index b0e8d25cd4c..cdfc75a44ba 100644
21 --- a/sys-apps/util-linux/util-linux-9999.ebuild
22 +++ b/sys-apps/util-linux/util-linux-9999.ebuild
23 @@ -1,4 +1,5 @@
24 -# Copyright 1999-2018 Gentoo Foundation
25 +# Copyright 1999-2018 Gentoo Authors
26 +# Copyright 2018 Sony Interactive Entertainment Inc.
27 # Distributed under the terms of the GNU General Public License v2
28
29 EAPI=6
30 @@ -6,7 +7,7 @@ EAPI=6
31 PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
32
33 inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \
34 - pam python-single-r1 multilib-minimal multiprocessing systemd
35 + pam python-r1 multilib-minimal multiprocessing systemd
36
37 MY_PV="${PV/_/-}"
38 MY_P="${PN}-${MY_PV}"
39 @@ -62,10 +63,6 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
40
41 S="${WORKDIR}/${MY_P}"
42
43 -pkg_setup() {
44 - use python && python-single-r1_pkg_setup
45 -}
46 -
47 src_prepare() {
48 default
49
50 @@ -108,6 +105,26 @@ lfs_fallocate_test() {
51 rm -f "${T}"/fallocate.${ABI}.c
52 }
53
54 +python_configure() {
55 + local myeconfargs=(
56 + --disable-all-programs
57 + --disable-bash-completion
58 + --without-systemdsystemunitdir
59 + --with-python
60 + )
61 + if use userland_GNU; then
62 + myeconfargs+=(
63 + --enable-libblkid
64 + --enable-libmount
65 + --enable-pylibmount
66 + )
67 + fi
68 + mkdir "${BUILD_DIR}" || die
69 + pushd "${BUILD_DIR}" >/dev/null || die
70 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
71 + popd >/dev/null || die
72 +}
73 +
74 multilib_src_configure() {
75 lfs_fallocate_test
76 # The scanf test in a run-time test which fails while cross-compiling.
77 @@ -120,9 +137,9 @@ multilib_src_configure() {
78 local myeconfargs=(
79 --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
80 --with-bashcompletiondir="$(get_bashcompdir)"
81 + --without-python
82 $(multilib_native_use_enable suid makeinstall-chown)
83 $(multilib_native_use_enable suid makeinstall-setuid)
84 - $(multilib_native_use_with python)
85 $(multilib_native_use_with readline)
86 $(multilib_native_use_with slang)
87 $(multilib_native_use_with systemd)
88 @@ -142,6 +159,7 @@ multilib_src_configure() {
89 --disable-chfn-chsh
90 --disable-login
91 --disable-nologin
92 + --disable-pylibmount
93 --disable-su
94 --enable-agetty
95 --enable-bash-completion
96 @@ -179,10 +197,44 @@ multilib_src_configure() {
97 fi
98 fi
99 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
100 +
101 + if multilib_is_native_abi && use python; then
102 + python_foreach_impl python_configure
103 + fi
104 +}
105 +
106 +python_compile() {
107 + pushd "${BUILD_DIR}" >/dev/null || die
108 + emake all
109 + popd >/dev/null || die
110 +}
111 +
112 +multilib_src_compile() {
113 + emake all
114 +
115 + if multilib_is_native_abi && use python; then
116 + python_foreach_impl python_compile
117 + fi
118 +}
119 +
120 +python_test() {
121 + pushd "${BUILD_DIR}" >/dev/null || die
122 + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
123 + popd >/dev/null || die
124 }
125
126 multilib_src_test() {
127 emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
128 + if multilib_is_native_abi && use python; then
129 + python_foreach_impl python_test
130 + fi
131 +}
132 +
133 +python_install() {
134 + pushd "${BUILD_DIR}" >/dev/null || die
135 + emake DESTDIR="${D}" install
136 + python_optimize
137 + popd >/dev/null || die
138 }
139
140 multilib_src_install() {
141 @@ -191,8 +243,10 @@ multilib_src_install() {
142 if multilib_is_native_abi && use userland_GNU; then
143 # need the libs in /
144 gen_usr_ldscript -a blkid fdisk mount smartcols uuid
145 + fi
146
147 - use python && python_optimize
148 + if multilib_is_native_abi && use python; then
149 + python_foreach_impl python_install
150 fi
151 }