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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 940F9138335 for ; Wed, 31 Oct 2018 21:58:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B247E0653; Wed, 31 Oct 2018 21:58:33 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1CC59E0653 for ; Wed, 31 Oct 2018 21:58:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 68C95335C06 for ; Wed, 31 Oct 2018 21:58:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DB375452 for ; Wed, 31 Oct 2018 21:58:29 +0000 (UTC) From: "Patrick McLean" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick McLean" Message-ID: <1541023084.c3517916d940cebd8ae58994a6c799ec8e34fcc3.chutzpah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/util-linux/util-linux-9999.ebuild X-VCS-Directories: sys-apps/util-linux/ X-VCS-Committer: chutzpah X-VCS-Committer-Name: Patrick McLean X-VCS-Revision: c3517916d940cebd8ae58994a6c799ec8e34fcc3 X-VCS-Branch: master Date: Wed, 31 Oct 2018 21:58:29 +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-Archives-Salt: 3fe2cb17-9236-42cb-8f0e-05231a1fe656 X-Archives-Hash: b0f4ae308d65fe63bc2699475e7b30b2 commit: c3517916d940cebd8ae58994a6c799ec8e34fcc3 Author: Patrick McLean gentoo org> AuthorDate: Wed Oct 31 21:57:47 2018 +0000 Commit: Patrick McLean gentoo org> CommitDate: Wed Oct 31 21:58:04 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3517916 sys-apps/util-linux: Support multiple python versions in 9999 This will build the libmount python bindings for all python versions in PYTHON_TARGETS rather than just what is in PYTHON_SINGLE_TARGET. Signed-off-by: Patrick McLean gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 sys-apps/util-linux/util-linux-9999.ebuild | 70 ++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild index b0e8d25cd4c..cdfc75a44ba 100644 --- a/sys-apps/util-linux/util-linux-9999.ebuild +++ b/sys-apps/util-linux/util-linux-9999.ebuild @@ -1,4 +1,5 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors +# Copyright 2018 Sony Interactive Entertainment Inc. # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -6,7 +7,7 @@ EAPI=6 PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} ) inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \ - pam python-single-r1 multilib-minimal multiprocessing systemd + pam python-r1 multilib-minimal multiprocessing systemd MY_PV="${PV/_/-}" MY_P="${PN}-${MY_PV}" @@ -62,10 +63,6 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" S="${WORKDIR}/${MY_P}" -pkg_setup() { - use python && python-single-r1_pkg_setup -} - src_prepare() { default @@ -108,6 +105,26 @@ lfs_fallocate_test() { rm -f "${T}"/fallocate.${ABI}.c } +python_configure() { + local myeconfargs=( + --disable-all-programs + --disable-bash-completion + --without-systemdsystemunitdir + --with-python + ) + if use userland_GNU; then + myeconfargs+=( + --enable-libblkid + --enable-libmount + --enable-pylibmount + ) + fi + mkdir "${BUILD_DIR}" || die + pushd "${BUILD_DIR}" >/dev/null || die + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + popd >/dev/null || die +} + multilib_src_configure() { lfs_fallocate_test # The scanf test in a run-time test which fails while cross-compiling. @@ -120,9 +137,9 @@ multilib_src_configure() { local myeconfargs=( --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" --with-bashcompletiondir="$(get_bashcompdir)" + --without-python $(multilib_native_use_enable suid makeinstall-chown) $(multilib_native_use_enable suid makeinstall-setuid) - $(multilib_native_use_with python) $(multilib_native_use_with readline) $(multilib_native_use_with slang) $(multilib_native_use_with systemd) @@ -142,6 +159,7 @@ multilib_src_configure() { --disable-chfn-chsh --disable-login --disable-nologin + --disable-pylibmount --disable-su --enable-agetty --enable-bash-completion @@ -179,10 +197,44 @@ multilib_src_configure() { fi fi ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if multilib_is_native_abi && use python; then + python_foreach_impl python_configure + fi +} + +python_compile() { + pushd "${BUILD_DIR}" >/dev/null || die + emake all + popd >/dev/null || die +} + +multilib_src_compile() { + emake all + + if multilib_is_native_abi && use python; then + python_foreach_impl python_compile + fi +} + +python_test() { + pushd "${BUILD_DIR}" >/dev/null || die + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + popd >/dev/null || die } multilib_src_test() { emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" + if multilib_is_native_abi && use python; then + python_foreach_impl python_test + fi +} + +python_install() { + pushd "${BUILD_DIR}" >/dev/null || die + emake DESTDIR="${D}" install + python_optimize + popd >/dev/null || die } multilib_src_install() { @@ -191,8 +243,10 @@ multilib_src_install() { if multilib_is_native_abi && use userland_GNU; then # need the libs in / gen_usr_ldscript -a blkid fdisk mount smartcols uuid + fi - use python && python_optimize + if multilib_is_native_abi && use python; then + python_foreach_impl python_install fi }