diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-03-04 17:05:56 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-03-04 17:06:15 +0000 |
commit | c2b6ae3fe67aa84f1de91f0d0d4779d9e836713f (patch) | |
tree | 8a17a86f1478cf76dcd9e2bf08e0189c6fc95ea9 | |
parent | makeedit.eclass: delete unused eclass (diff) | |
download | gentoo-c2b6ae3fe67aa84f1de91f0d0d4779d9e836713f.tar.gz gentoo-c2b6ae3fe67aa84f1de91f0d0d4779d9e836713f.tar.bz2 gentoo-c2b6ae3fe67aa84f1de91f0d0d4779d9e836713f.zip |
dev-lang/nim: add custome command logging, use makeopts
Package-Manager: Portage-2.3.24, Repoman-2.3.6
-rw-r--r-- | dev-lang/nim/nim-0.18.0.ebuild | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/dev-lang/nim/nim-0.18.0.ebuild b/dev-lang/nim/nim-0.18.0.ebuild index 72b78f95f1c2..0f55aec38568 100644 --- a/dev-lang/nim/nim-0.18.0.ebuild +++ b/dev-lang/nim/nim-0.18.0.ebuild @@ -3,7 +3,7 @@ EAPI=6 -inherit bash-completion-r1 +inherit bash-completion-r1 multiprocessing DESCRIPTION="compiled, garbage-collected systems programming language" HOMEPAGE="https://nim-lang.org/" @@ -22,30 +22,35 @@ DEPEND=" test? ( net-libs/nodejs ) " +_run() { + echo "$@" + "$@" || die "'$*' failed" +} + nim_use_enable() { [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>" use $1 && echo "-d:$2" } src_compile() { - ./build.sh || die "build.sh failed" + _run ./build.sh - ./bin/nim c koch || die "csources nim failed" - ./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed" + _run ./bin/nim --parallelBuild:$(makeopts_jobs) c koch + _run ./koch boot --parallelBuild:$(makeopts_jobs) -d:release $(nim_use_enable readline useGnuReadline) # build nimble and friends - PATH="./bin:$PATH" ./koch tools || die "koch tools failed" + PATH="./bin:$PATH" _run ./koch tools if use doc; then - PATH="./bin:$PATH" ./koch web || die "koch web failed" + PATH="./bin:$PATH" _run ./koch web fi } src_test() { - PATH="./bin:$PATH" ./koch test || die "test suite failed" + PATH="./bin:$PATH" _run ./koch test } src_install() { - PATH="./bin:$PATH" ./koch install "${ED}/usr" || die "koch install failed" + PATH="./bin:$PATH" _run ./koch install "${ED}/usr" rm -r "${ED}/usr/nim/doc" || die "failed to remove 'doc'" dodir /usr/bin |