From 3fa63e5307e626f1dd2c7397d05d1bc1ac7bba4d Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 5 Jan 2020 22:53:42 +0100 Subject: [PATCH] nheko: restrict to -j8 at most to avoid OOMs --- srcpkgs/nheko/template | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/srcpkgs/nheko/template b/srcpkgs/nheko/template index ffbb66a1378..83e0b0545e8 100644 --- a/srcpkgs/nheko/template +++ b/srcpkgs/nheko/template @@ -18,3 +18,12 @@ checksum=5dbe32cb8760cfae6f05644568cabf422a368eec62918839a92e182d508f751e pre_patch() { vsed -e '/Werror/d' -i CMakeLists.txt } + +# this one is very memory hungry and can use as much as 3GB per cc1plus +# realistically, using any more than 8 jobs will easily lead to OOM +do_build() { + cd build + local njobs=${XBPS_MAKEJOBS} + [ "$njobs" -gt 8 ] && njobs=8 + make -j${njobs} +}