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 CAD88158021 for ; Sat, 26 Nov 2022 13:51:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 23004E0996; Sat, 26 Nov 2022 13:51:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 0C6F7E0996 for ; Sat, 26 Nov 2022 13:51: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 D7682341480 for ; Sat, 26 Nov 2022 13:51:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D8E9763 for ; Sat, 26 Nov 2022 13:51:23 +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: <1669465644.cae492830d1fab28d9df55d6786d5ec0ff87b011.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: cae492830d1fab28d9df55d6786d5ec0ff87b011 X-VCS-Branch: dev Date: Sat, 26 Nov 2022 13:51:23 +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: 4c000c96-7d3b-41db-9c32-14136b0bd063 X-Archives-Hash: 5d6d5742217504d5026a4d4617e42597 commit: cae492830d1fab28d9df55d6786d5ec0ff87b011 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sat Nov 26 12:08:43 2022 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Sat Nov 26 12:27:24 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cae49283 nim-utils.eclass: use "edo" Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/nim-utils.eclass | 58 ++++++++++++++++++++----------------------------- 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass index 61f25905b..e72eb1bb5 100644 --- a/eclass/nim-utils.eclass +++ b/eclass/nim-utils.eclass @@ -44,7 +44,7 @@ if [[ ! ${_NIM_UTILS_ECLASS} ]]; then # Specifies an array of test files to be deselected via testament's --skipFrom # parameter, when calling etestament. -inherit multiprocessing toolchain-funcs xdg-utils +inherit edo multiprocessing toolchain-funcs xdg-utils # @FUNCTION: enim # @USAGE: [...] @@ -56,9 +56,7 @@ inherit multiprocessing toolchain-funcs xdg-utils enim() { debug-print-function ${FUNCNAME} "${@}" - set -- nim "${@}" ${NIMFLAGS} - echo "$@" >&2 - "$@" || die -n "${*} failed" + edo nim "${@}" ${NIMFLAGS} } # @FUNCTION: ekoch @@ -80,9 +78,7 @@ ekoch() { eerror "${FUNCNAME} is not implemented for ${CATEGORY}/${PN}" ;; esac - set -- ${koch} "${@}" - echo "$@" >&2 - "$@" || die -n "${*} failed" + edo ${koch} "${@}" } # @FUNCTION: etestament @@ -110,17 +106,12 @@ etestament() { testament_args+=( --skipFrom:"${skipfile}" ) fi - set -- testament "${testament_args[@]}" "${@}" - echo "$@" >&2 - "$@" || die -n "${*} failed" + edo testament "${testament_args[@]}" "${@}" } # @FUNCTION: nim_get_buildtype -# @USAGE: # @RETURN: build type (debug or release) based on USE flags nim_get_buildtype() { - debug-print-function ${FUNCNAME} "${@}" - if has debug ${IUSE}; then echo $(usex debug "debug" "release") else @@ -129,11 +120,8 @@ nim_get_buildtype() { } # @FUNCTION: nim_get_colors -# @USAGE: # @RETURN: "off" if colors should be disabled, "on" otherwise nim_get_colors() { - debug-print-function ${FUNCNAME} "${@}" - case ${NOCOLOR} in true|yes) echo "off" ;; *) echo "on" ;; @@ -154,25 +142,25 @@ nim_gen_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)" - gcc.cpp.exe:"$(tc-getCXX)" - gcc.cpp.linkerexe:"$(tc-getCXX)" - gcc.options.speed:"${CFLAGS}" - gcc.options.size:"${CFLAGS}" - gcc.options.debug:"${CFLAGS}" - gcc.options.always:"${CPPFLAGS}" - gcc.options.linker:"${LDFLAGS}" - gcc.cpp.options.speed:"${CXXFLAGS}" - gcc.cpp.options.size:"${CXXFLAGS}" - gcc.cpp.options.debug:"${CXXFLAGS}" - gcc.cpp.options.always:"${CPPFLAGS}" - gcc.cpp.options.linker:"${LDFLAGS}" - - -d:"$(nim_get_buildtype)" - --colors:"$(nim_get_colors)" - --parallelBuild:"$(makeopts_jobs)" + cc:"gcc" + gcc.exe:"$(tc-getCC)" + gcc.linkerexe:"$(tc-getCC)" + gcc.cpp.exe:"$(tc-getCXX)" + gcc.cpp.linkerexe:"$(tc-getCXX)" + gcc.options.speed:"${CFLAGS}" + gcc.options.size:"${CFLAGS}" + gcc.options.debug:"${CFLAGS}" + gcc.options.always:"${CPPFLAGS}" + gcc.options.linker:"${LDFLAGS}" + gcc.cpp.options.speed:"${CXXFLAGS}" + gcc.cpp.options.size:"${CXXFLAGS}" + gcc.cpp.options.debug:"${CXXFLAGS}" + gcc.cpp.options.always:"${CPPFLAGS}" + gcc.cpp.options.linker:"${LDFLAGS}" + + -d:"$(nim_get_buildtype)" + --colors:"$(nim_get_colors)" + --parallelBuild:"$(makeopts_jobs)" EOF }