aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2017-09-28 23:11:17 +0100
committerZac Medico <zmedico@gentoo.org>2018-05-01 01:28:43 -0700
commitd51ca86a44fd10b13db749a7945bba1573b76ff5 (patch)
tree17c7e7ff574c775dabc51034d8c566ae6fd4ee8d
parentExport BROOT to ebuild env in EAPI 7 (diff)
downloadportage-d51ca86a.tar.gz
portage-d51ca86a.tar.bz2
portage-d51ca86a.zip
econf: Pass --with-sysroot="${ESYSROOT:-/}" under EAPI 7
Bug: https://bugs.gentoo.org/317337
-rw-r--r--bin/eapi.sh4
-rw-r--r--bin/phase-helpers.sh8
2 files changed, 11 insertions, 1 deletions
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.