summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-08-29 02:02:32 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-08-29 02:52:42 -0400
commit5ffe0bed23563853d69d5b782167d1740efd1391 (patch)
treef8722e22ec198e8b5d869ca8425fad991ba3c4dd /dev-util/mingw64-toolchain
parentdev-ruby/twitter: fix http_parser_rb dep (diff)
downloadgentoo-5ffe0bed23563853d69d5b782167d1740efd1391.tar.gz
gentoo-5ffe0bed23563853d69d5b782167d1740efd1391.tar.bz2
gentoo-5ffe0bed23563853d69d5b782167d1740efd1391.zip
dev-util/mingw64-toolchain: use namerefs rather than eval
Also simplified extra econf handling a bit. Still looks ugly, but well. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-util/mingw64-toolchain')
-rw-r--r--dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild14
-rw-r--r--dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1.ebuild14
2 files changed, 16 insertions, 12 deletions
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild
index 2ae2ce9b80cb..0bfc818d9698 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild
@@ -199,12 +199,14 @@ src_compile() {
# econf is not allowed in src_compile and its defaults are
# mostly unused here, so use configure directly
- eval '
- local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
- [[ ${conf_'${id}'@a} =~ a ]] && conf+=( "${conf_'${id}'[@]}" )
- [[ ${2} && ${conf_'${id}_${2}'@a} =~ a ]] && conf+=( "${conf_'${id}_${2}'[@]}" )
- conf+=( ${EXTRA_ECONF} ${MWT_'${id^^}'_CONF} )
- [[ ${2} ]] && conf+=( ${MWT_'${1^^}_${2^^}'_CONF} )'
+ local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
+
+ local -n conf_id=conf_${id} conf_id2=conf_${id}_${2}
+ [[ ${conf_id@a} == *a* ]] && conf+=( "${conf_id[@]}" )
+ [[ ${2} && ${conf_id2@a} == *a* ]] && conf+=( "${conf_id2[@]}" )
+
+ local -n extra_id=MWT_${id^^}_CONF extra_id2=MWT_${id^^}_${2^^}_CONF
+ conf+=( ${EXTRA_ECONF} ${extra_id} ${2+${extra_id2}} )
einfo "Building ${id}${2+ ${2}} in ${build_dir} ..."
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1.ebuild
index 2f07f8f08e07..b7092f3a3fac 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1.ebuild
@@ -200,12 +200,14 @@ src_compile() {
# econf is not allowed in src_compile and its defaults are
# mostly unused here, so use configure directly
- eval '
- local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
- [[ ${conf_'${id}'@a} =~ a ]] && conf+=( "${conf_'${id}'[@]}" )
- [[ ${2} && ${conf_'${id}_${2}'@a} =~ a ]] && conf+=( "${conf_'${id}_${2}'[@]}" )
- conf+=( ${EXTRA_ECONF} ${MWT_'${id^^}'_CONF} )
- [[ ${2} ]] && conf+=( ${MWT_'${1^^}_${2^^}'_CONF} )'
+ local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
+
+ local -n conf_id=conf_${id} conf_id2=conf_${id}_${2}
+ [[ ${conf_id@a} == *a* ]] && conf+=( "${conf_id[@]}" )
+ [[ ${2} && ${conf_id2@a} == *a* ]] && conf+=( "${conf_id2[@]}" )
+
+ local -n extra_id=MWT_${id^^}_CONF extra_id2=MWT_${id^^}_${2^^}_CONF
+ conf+=( ${EXTRA_ECONF} ${extra_id} ${2+${extra_id2}} )
einfo "Building ${id}${2+ ${2}} in ${build_dir} ..."