From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C46A6158094 for ; Mon, 29 Aug 2022 06:55:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01006E0876; Mon, 29 Aug 2022 06:55:48 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DCA97E0876 for ; Mon, 29 Aug 2022 06:55:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C6593407AF for ; Mon, 29 Aug 2022 06:55:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9EA61568 for ; Mon, 29 Aug 2022 06:55:45 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1661755962.5ffe0bed23563853d69d5b782167d1740efd1391.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1.ebuild X-VCS-Directories: dev-util/mingw64-toolchain/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 5ffe0bed23563853d69d5b782167d1740efd1391 X-VCS-Branch: master Date: Mon, 29 Aug 2022 06:55:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9f7e69db-e15f-4737-9e95-ffcdb32ce8b4 X-Archives-Hash: 1168f6847227f126e1d28c6913fc6436 commit: 5ffe0bed23563853d69d5b782167d1740efd1391 Author: Ionen Wolkens gentoo org> AuthorDate: Mon Aug 29 06:02:32 2022 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Mon Aug 29 06:52:42 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ffe0bed 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 gentoo.org> .../mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild | 14 ++++++++------ .../mingw64-toolchain/mingw64-toolchain-10.0.0_p1.ebuild | 14 ++++++++------ 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} ..."