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 65DD5158094 for ; Sat, 16 Jul 2022 21:08:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D7F5E0F79; Sat, 16 Jul 2022 21:08:48 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 632BCE0F79 for ; Sat, 16 Jul 2022 21:08:48 +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 E7DF6340C58 for ; Sat, 16 Jul 2022 21:08:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 405B37F for ; Sat, 16 Jul 2022 21:08:45 +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: <1658005694.5c6cf732a610b270318ee0d9546f145d1bd48881.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: 5c6cf732a610b270318ee0d9546f145d1bd48881 X-VCS-Branch: dev Date: Sat, 16 Jul 2022 21:08: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: 574a9d41-a190-4d20-bbdd-e36465da657e X-Archives-Hash: bcfd992f3b60c1a708276db2a58036bd commit: 5c6cf732a610b270318ee0d9546f145d1bd48881 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sat Jul 16 21:08:14 2022 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Sat Jul 16 21:08:14 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c6cf732 nim-utils.eclass: add ekoch helper Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/nim-utils.eclass | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass index b5ce4d6b0..fae8bb292 100644 --- a/eclass/nim-utils.eclass +++ b/eclass/nim-utils.eclass @@ -61,6 +61,30 @@ enim() { "$@" || die -n "${*} failed" } +# @FUNCTION: ekoch +# @USAGE: [...] +# @DESCRIPTION: +# Call koch, passing the supplied arguments. Used only for building compilers +# that originate from Nim. +# This function dies if koch fails. +ekoch() { + debug-print-function ${FUNCNAME} "${@}" + + local koch + case "${CATEGORY}/${PN}" in + dev-lang/nim) + koch="./koch" + [[ -e ${koch} ]] || enim c koch + ;; + *) + eerror "${FUNCNAME} is not implemented for ${CATEGORY}/${PN}" ;; + esac + + set -- ${koch} "${@}" + echo "$@" >&2 + "$@" || die -n "${*} failed" +} + # @FUNCTION: etestament # @USAGE: [...] # @DESCRIPTION: