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 5D0A4158095 for ; Wed, 13 Jul 2022 21:19:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BC62BE0EBE; Wed, 13 Jul 2022 21:19:37 +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 8AC80E0EBD for ; Wed, 13 Jul 2022 21:19:37 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1F42D340E85 for ; Wed, 13 Jul 2022 21:19:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 725F252B for ; Wed, 13 Jul 2022 21:19:34 +0000 (UTC) From: "Maciej Barć" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Maciej Barć" Message-ID: <1657744830.04f9f72582c8aa0e532fec8378e4ee0933ffc99c.xgqt@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/nim/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/nim/nim-1.6.6-r1.ebuild X-VCS-Directories: dev-lang/nim/ X-VCS-Committer: xgqt X-VCS-Committer-Name: Maciej Barć X-VCS-Revision: 04f9f72582c8aa0e532fec8378e4ee0933ffc99c X-VCS-Branch: master Date: Wed, 13 Jul 2022 21:19:34 +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: c4fbce4e-d493-4931-a9c3-009c850903a0 X-Archives-Hash: 0cc0a398b36d0c9c3ec2bf67d9224b51 commit: 04f9f72582c8aa0e532fec8378e4ee0933ffc99c Author: Anna Vyalkova sysrq in> AuthorDate: Wed Jul 13 20:02:11 2022 +0000 Commit: Maciej Barć gentoo org> CommitDate: Wed Jul 13 20:40:30 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04f9f725 dev-lang/nim: respect flags Signed-off-by: Anna Vyalkova sysrq.in> Closes: https://github.com/gentoo/gentoo/pull/26387 Signed-off-by: Maciej Barć gentoo.org> dev-lang/nim/nim-1.6.6-r1.ebuild | 64 +++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/dev-lang/nim/nim-1.6.6-r1.ebuild b/dev-lang/nim/nim-1.6.6-r1.ebuild index 0ab7dd480dca..9d4da4f7a23b 100644 --- a/dev-lang/nim/nim-1.6.6-r1.ebuild +++ b/dev-lang/nim/nim-1.6.6-r1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit bash-completion-r1 multiprocessing toolchain-funcs +inherit bash-completion-r1 multiprocessing toolchain-funcs xdg-utils DESCRIPTION="compiled, garbage-collected systems programming language" HOMEPAGE="https://nim-lang.org/" @@ -24,20 +24,8 @@ DEPEND="${RDEPEND}" PATCHES=( "${FILESDIR}"/${PN}-0.20.0-paths.patch ) -# Generated by nim -QA_FLAGS_IGNORED=" -usr/bin/atlas -usr/bin/nim -usr/bin/nim_dbg -usr/bin/nimble -usr/bin/nimgrep -usr/bin/nimpretty -usr/bin/nimsuggest -usr/bin/testament -" - _run() { - echo "Running: ${@}" + einfo "Running: ${@}" PATH="${S}/bin:${PATH}" "${@}" || die "Failed: \"${*}\"" } @@ -46,6 +34,31 @@ nim_use_enable() { use "${1}" && echo "-d:${2}" } +# Borrowed from nim-utils.eclass (guru overlay). +nim_gen_config() { + cat > 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}" + + $([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"') + -d:"$(usex debug debug release)" + --parallelBuild:"$(makeopts_jobs)" + EOF +} + src_prepare() { default @@ -55,31 +68,20 @@ src_prepare() { } src_configure() { - export XDG_CACHE_HOME="${T}/cache" # 667182 + xdg_environment_reset # bug 667182 + unset NIMBLE_DIR tc-export CC CXX LD - local build_type - if use debug ; then - build_type="debug" - else - build_type="release" - fi - export NIM_OPTS=( --parallelBuild:$(makeopts_jobs) -d:${build_type} ) - - # Override defaults - echo "gcc.exe = \"$(tc-getCC)\"" >> config/nim.cfg || die - echo "gcc.linkerexe = \"$(tc-getCC)\"" >> config/nim.cfg || die - echo "gcc.cpp.exe = \"$(tc-getCXX)\"" >> config/nim.cfg || die - echo "gcc.cpp.linkerexe = \"$(tc-getCXX)\"" >> config/nim.cfg || die + nim_gen_config } src_compile() { _run bash ./build.sh - _run ./bin/nim ${NIM_OPTS[@]} compile koch - _run ./koch boot ${NIM_OPTS[@]} $(nim_use_enable readline useGnuReadline) - _run ./koch tools ${NIM_OPTS[@]} + _run ./bin/nim compile koch + _run ./koch boot $(nim_use_enable readline useGnuReadline) + _run ./koch tools } src_test() {