summaryrefslogtreecommitdiff
path: root/sys-apps/util-linux/util-linux-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
commitf65628136faa35d0c4d3b5e7332275c7b35fcd96 (patch)
tree021998302365c5652e37824b6c26d4d969a62055 /sys-apps/util-linux/util-linux-9999.ebuild
parent70b82ae359a5538711e103b0e8dfb92654296644 (diff)
gentoo resync : 03.11.2018
Diffstat (limited to 'sys-apps/util-linux/util-linux-9999.ebuild')
-rw-r--r--sys-apps/util-linux/util-linux-9999.ebuild70
1 files 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 b0e8d25cd4ca..cdfc75a44ba2 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
}