commit: d51ca86a44fd10b13db749a7945bba1573b76ff5
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 28 22:11:17 2017 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue May 1 08:28:43 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d51ca86a
econf: Pass --with-sysroot="${ESYSROOT:-/}" under EAPI 7
Bug: https://bugs.gentoo.org/317337
bin/eapi.sh | 4 ++++
bin/phase-helpers.sh | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/bin/eapi.sh b/bin/eapi.sh
index 3f4c9691b..3b6a5c1a9 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -178,6 +178,10 @@ ___eapi_econf_passes_--docdir_and_--htmldir() {
[[ ! ${1-${EAPI-0}} =~
^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
}
+___eapi_econf_passes_--with-sysroot() {
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$
]]
+}
+
___eapi_use_enable_and_use_with_support_empty_third_argument() {
[[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3)$ ]]
}
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 556d089b5..f6c9ef6fc 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -640,7 +640,7 @@ econf() {
fi
local conf_args=()
- if ___eapi_econf_passes_--disable-dependency-tracking ||
___eapi_econf_passes_--disable-silent-rules ||
___eapi_econf_passes_--docdir_and_--htmldir; then
+ if ___eapi_econf_passes_--disable-dependency-tracking ||
___eapi_econf_passes_--disable-silent-rules ||
___eapi_econf_passes_--docdir_and_--htmldir ||
___eapi_econf_passes_--with-sysroot; then
local conf_help=$("${ECONF_SOURCE}/configure" --help
2>/dev/null)
if ___eapi_econf_passes_--disable-dependency-tracking;
then
@@ -664,6 +664,12 @@ econf() {
conf_args+=(
--htmldir="${EPREFIX}"/usr/share/doc/${PF}/html )
fi
fi
+
+ if ___eapi_econf_passes_--with-sysroot; then
+ if [[ ${conf_help} == *--with-sysroot* ]]; then
+ conf_args+=(
--with-sysroot="${ESYSROOT:-/}" )
+ fi
+ fi
fi
# if the profile defines a location to install libs to aside
from default, pass it on.