From 999ce1cd76607d63e1d083a73d8a9cde134252d9 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jeremy@system76.com>
Date: Wed, 14 Jul 2021 11:56:37 -0600
Subject: [PATCH] Build bash recipe without parallel jobs

---
 recipes/bash/recipe.toml | 1 +
 src/bin/cook.rs          | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/recipes/bash/recipe.toml b/recipes/bash/recipe.toml
index 685091a98..50e25dc35 100644
--- a/recipes/bash/recipe.toml
+++ b/recipes/bash/recipe.toml
@@ -17,5 +17,6 @@ COOKBOOK_CONFIGURE_FLAGS+=(
     --disable-readline
     bash_cv_getenv_redef=no
 )
+COOKBOOK_MAKE_JOBS=1 # workaround for parallel make bugs
 cookbook_configure
 """
diff --git a/src/bin/cook.rs b/src/bin/cook.rs
index 36c130460..702ba8e69 100644
--- a/src/bin/cook.rs
+++ b/src/bin/cook.rs
@@ -479,9 +479,10 @@ COOKBOOK_CONFIGURE_FLAGS=(
     --enable-static
 )
 COOKBOOK_MAKE="make"
+COOKBOOK_MAKE_JOBS="$(nproc)"
 function cookbook_configure {
     "${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
-    "${COOKBOOK_MAKE}" -j "$(nproc)"
+    "${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
     "${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}"
 }
 "#;
-- 
GitLab