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 356B2158094 for ; Sat, 16 Jul 2022 13:44:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 41DFFE0F2B; Sat, 16 Jul 2022 13:44:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 0F1CFE0F2B for ; Sat, 16 Jul 2022 13:44:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D53F93410B8 for ; Sat, 16 Jul 2022 13:44:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0AC67535 for ; Sat, 16 Jul 2022 13:44:24 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1657979047.b70ece6ec5263b28ef71f9881759dfc2fa7ad4e0.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/nim-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: b70ece6ec5263b28ef71f9881759dfc2fa7ad4e0 X-VCS-Branch: dev Date: Sat, 16 Jul 2022 13:44:24 +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: 28d44fd9-ba0a-4d04-a74f-66ea95e5bced X-Archives-Hash: cb2f1ed85d1f4a389f74e270037478c0 commit: b70ece6ec5263b28ef71f9881759dfc2fa7ad4e0 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sat Jul 16 07:08:16 2022 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Sat Jul 16 13:44:07 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b70ece6e nim-utils.eclass: allow generating nim.cfg in custom dir Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/nim-utils.eclass | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass index 951234d1b..0106d9dfa 100644 --- a/eclass/nim-utils.eclass +++ b/eclass/nim-utils.eclass @@ -87,15 +87,18 @@ etestament() { } # @FUNCTION: nim_gen_config -# @USAGE: +# @USAGE: [] # @DESCRIPTION: -# Generate the ${WORKDIR}/nim.cfg to respect user's toolchain and preferences. +# Generate a nim.cfg file in (default: $WORKDIR) to respect user's +# toolchain and preferences. nim_gen_config() { debug-print-function ${FUNCNAME} "${@}" xdg_environment_reset - cat > "${WORKDIR}/nim.cfg" <<- EOF || die "Failed to create Nim config" + local dir=${1:-${WORKDIR}} + + cat > "${dir}"/nim.cfg <<- EOF || die "Failed to create Nim config" cc:"gcc" gcc.exe:"$(tc-getCC)" gcc.linkerexe:"$(tc-getCC)"