commit: c48d5cbb505936d6b93e6f6c40589d1ac6f6c635
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 17 17:48:41 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Sep 11 23:44:25 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c48d5cbb
econf: Add EAPI-conditional arguments via array
Use a dedicated array variable to add EAPI-conditional arguments to
the configure script instead of prepending them to the command
parameters.
---
bin/phase-helpers.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index f0e298f..ca28ce9 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -521,18 +521,19 @@ econf() {
done
fi
+ local conf_args=()
if ___eapi_econf_passes_--disable-dependency-tracking ||
___eapi_econf_passes_--disable-silent-rules; then
local conf_help=$("${ECONF_SOURCE}/configure" --help
2>/dev/null)
if ___eapi_econf_passes_--disable-dependency-tracking;
then
if [[ ${conf_help} ==
*--disable-dependency-tracking* ]]; then
- set -- --disable-dependency-tracking
"$@"
+ conf_args+=(
--disable-dependency-tracking )
fi
fi
if ___eapi_econf_passes_--disable-silent-rules; then
if [[ ${conf_help} == *--disable-silent-rules*
]]; then
- set -- --disable-silent-rules "$@"
+ conf_args+=( --disable-silent-rules )
fi
fi
fi
@@ -550,7 +551,9 @@ econf() {
CONF_PREFIX=${CONF_PREFIX#*=}
[[ ${CONF_PREFIX} != /* ]] &&
CONF_PREFIX="/${CONF_PREFIX}"
[[ ${CONF_LIBDIR} != /* ]] &&
CONF_LIBDIR="/${CONF_LIBDIR}"
- set -- --libdir="$(__strip_duplicate_slashes
"${CONF_PREFIX}${CONF_LIBDIR}")" "$@"
+ conf_args+=(
+ --libdir="$(__strip_duplicate_slashes
"${CONF_PREFIX}${CONF_LIBDIR}")"
+ )
fi
# Handle arguments containing quoted whitespace (see bug
#457136).
@@ -566,6 +569,7 @@ econf() {
--datadir="${EPREFIX}"/usr/share \
--sysconfdir="${EPREFIX}"/etc \
--localstatedir="${EPREFIX}"/var/lib \
+ "${conf_args[@]}" \
"$@" \
"${EXTRA_ECONF[@]}"
__vecho "${ECONF_SOURCE}/configure" "$@"