diff options
author | B. Watson <urchlay@slackware.uk> | 2024-10-16 22:12:23 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-10-19 16:22:17 +0700 |
commit | 23a96bbb9ce26fe7d3ad2d516247b064b1718515 (patch) | |
tree | 26e7893b49708c4674e5795e67b2dc9cabd08698 | |
parent | 13d109f59865f57c419a408e3ddcfaa51a42c380 (diff) |
libraries/webkit2gtk: Fix -j0 build fails on single-core systems.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | libraries/webkit2gtk/webkit2gtk.SlackBuild | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libraries/webkit2gtk/webkit2gtk.SlackBuild b/libraries/webkit2gtk/webkit2gtk.SlackBuild index bfab77c06ded4..6b81735bad6c5 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 |