diff options
author | 2015-11-01 15:28:51 +0000 | |
---|---|---|
committer | 2015-11-05 17:37:27 +0000 | |
commit | 14959dc161f3b48858db8b221bfd60326d60305a (patch) | |
tree | bfb54d9c936533a9e0c58bb353acceee429eed13 | |
parent | 2417d6394385efdc6ad80e310c81f05e9c8c0e6f (diff) | |
download | paludis-14959dc161f3b48858db8b221bfd60326d60305a.tar.gz paludis-14959dc161f3b48858db8b221bfd60326d60305a.tar.xz |
Generalise econf_extra_options{,_help_dependent}
-rw-r--r-- | paludis/repositories/e/ebuild/0/build_functions.bash | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/paludis/repositories/e/ebuild/0/build_functions.bash b/paludis/repositories/e/ebuild/0/build_functions.bash index 2218809e4..9e4457b4f 100644 --- a/paludis/repositories/e/ebuild/0/build_functions.bash +++ b/paludis/repositories/e/ebuild/0/build_functions.bash @@ -22,6 +22,8 @@ econf() { + local i + local phase has src_configure ${PALUDIS_EBUILD_FUNCTIONS} && phase=configure if [[ "${!PALUDIS_EBUILD_PHASE_VAR}" != "${phase:-compile}" ]]; then @@ -45,10 +47,12 @@ econf() [[ -z "${CBUILD}" ]] || LOCAL_EXTRA_ECONF="--build=${CBUILD} ${LOCAL_EXTRA_ECONF}" [[ -z "${CTARGET}" ]] || LOCAL_EXTRA_ECONF="--target=${CTARGET} ${LOCAL_EXTRA_ECONF}" - local extra_options_help="" - for i in ${PALUDIS_ECONF_EXTRA_OPTIONS_HELP_DEPENDENT}; do + local -a extra_options extra_options_help + eval "extra_options=( ${PALUDIS_ECONF_EXTRA_OPTIONS} )" + eval "extra_options_help=( ${PALUDIS_ECONF_EXTRA_OPTIONS_HELP_DEPENDENT} )" + for i in "${extra_options_help[@]}"; do "${ECONF_SOURCE}/configure" --help 2>/dev/null | grep -q -e "${i%%::*}" \ - && extra_options_help+=" ${i#*::}" + && extra_options+=( "${i#*::}" ) done # If the ebuild passed in --prefix, use that to set --libdir. KDE at least needs this. @@ -78,8 +82,7 @@ econf() --datadir=/usr/share \ --sysconfdir=/etc \ --localstatedir=/var/lib \ - ${PALUDIS_ECONF_EXTRA_OPTIONS} \ - ${extra_options_help} \ + "${extra_options[@]}" \ ${libcmd} "$@" ${LOCAL_EXTRA_ECONF} 1>&2 ${LOCAL_ECONF_WRAPPER} "${ECONF_SOURCE}"/configure \ @@ -90,8 +93,7 @@ econf() --datadir=/usr/share \ --sysconfdir=/etc \ --localstatedir=/var/lib \ - ${PALUDIS_ECONF_EXTRA_OPTIONS} \ - ${extra_options_help} \ + "${extra_options[@]}" \ ${libcmd} "$@" ${LOCAL_EXTRA_ECONF} || die "econf failed" else |