sys-libs/libblockdev: Use python_is_python3

to check for major python version.

Package-Manager: Portage-2.3.43, Repoman-2.3.10
This commit is contained in:
Lars Wendler
2018-07-25 12:54:41 +02:00
parent a1991a44d6
commit 3d4a2c3bc5
2 changed files with 22 additions and 4 deletions

View File

@@ -81,8 +81,17 @@ src_configure() {
$(use_with lvm lvm)
$(use_with lvm lvm-dbus)
$(use_with kbd)
$(use_with python_single_target_python2_7 python2)
$(use_with !python_single_target_python2_7 python3)
)
if python_is_python3 ; then
myeconfargs+=(
--without-python2
--with-python3
)
else
myeconfargs+=(
--with-python2
--without-python3
)
fi
econf "${myeconfargs[@]}"
}

View File

@@ -78,9 +78,18 @@ src_configure() {
$(use_with lvm lvm)
$(use_with lvm lvm-dbus)
$(use_with kbd)
$(use_with python_single_target_python2_7 python2)
$(use_with !python_single_target_python2_7 python3)
$(use_with vdo)
)
if python_is_python3 ; then
myeconfargs+=(
--without-python2
--with-python3
)
else
myeconfargs+=(
--with-python2
--without-python3
)
fi
econf "${myeconfargs[@]}"
}