aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/webkit2gtk/webkit2gtk.SlackBuild9
1 files changed, 8 insertions, 1 deletions
diff --git a/libraries/webkit2gtk/webkit2gtk.SlackBuild b/libraries/webkit2gtk/webkit2gtk.SlackBuild
index bfab77c06ded..6b81735bad6c 100644
--- a/libraries/webkit2gtk/webkit2gtk.SlackBuild
+++ b/libraries/webkit2gtk/webkit2gtk.SlackBuild
@@ -109,7 +109,14 @@ cd build
# The build might crash on high specs machines because ninja eat all
# of the resources, so let's try to limit it to half the available ones
-"${NINJA:=ninja}" -j$(expr $(nproc) / 2)
+# 20241016 bkw: without the + 1 here, machines with only one core were
+# getting -j0 (aka *infinite* jobs), leading to build failures. Issue
+# was reported on IRC by TommyC.
+# Since (almost?) all CPUs with multiple cores have an even number of
+# them, adding 1 to nproc doesn't change the result (still 2 out of 4,
+# or 4 out of 8, etc). If you do have an odd number, the new code
+# rounds up instead of down (uses e.g. 3 out of 5, instead of 2).
+"${NINJA:=ninja}" -j$(expr '(' $(nproc) + 1 ')' / 2)
DESTDIR=$PKG $NINJA -j1 install
mkdir -p $PKG/usr/share/gtk-doc/html/webkit{2,dom}gtk-4.0