From 8c6a43f3e6666f25e66e21158f0ffcf35a3ed71c Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <gyakovlev@gentoo.org>
Date: Thu, 26 Dec 2019 18:09:48 -0800
Subject: [PATCH] cargo.eclass: move jobs configuration to generated configfile

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
---
 eclass/cargo.eclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index f050b0e81ac0..f26495fc19c8 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -139,6 +139,9 @@ cargo_gen_config() {
 
 	[net]
 	offline = true
+
+	[build]
+	jobs = $(makeopts_jobs)
 	EOF
 }
 
@@ -150,7 +153,7 @@ cargo_src_compile() {
 
 	export CARGO_HOME="${ECARGO_HOME}"
 
-	cargo build -vv -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
+	cargo build -vv $(usex debug "" --release) "$@" \
 		|| die "cargo build failed"
 }
 
@@ -160,7 +163,7 @@ cargo_src_compile() {
 cargo_src_install() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	cargo install -vv -j $(makeopts_jobs) --path ${CARGO_INSTALL_PATH} \
+	cargo install -vv --path ${CARGO_INSTALL_PATH} \
 		--root="${ED}/usr" $(usex debug --debug "") "$@" \
 		|| die "cargo install failed"
 	rm -f "${ED}/usr/.crates.toml"
@@ -174,7 +177,7 @@ cargo_src_install() {
 cargo_src_test() {
 	debug-print-function ${FUNCNAME} "$@"
 
-	cargo test -vv -j $(makeopts_jobs) $(usex debug "" --release) "$@" \
+	cargo test -vv $(usex debug "" --release) "$@" \
 		|| die "cargo test failed"
 }
 
-- 
2.26.2