Gentoo Archives: gentoo-dev

From: Matthew Smith <matthew@g.o>
To: gentoo-dev@l.g.o
Cc: Matthew Smith <matthew@g.o>
Subject: [gentoo-dev] [PATCH 3/4] waf-utils.eclass: set --jobs=1 for configure and install
Date: Sat, 19 Nov 2022 09:25:52
Message-Id: 20221119092358.280588-4-matthew@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/4] waf-utils.eclass: various improvements by Matthew Smith
1 MAKEOPTS was only respected for src_compile, leading to out-of-memory
2 issues for some users. Force number of concurrent jobs to 1 in src_configure
3 and src_install phases as it doesn't provide much of a benefit anyway.
4
5 Closes: https://bugs.gentoo.org/715542
6 Signed-off-by: Matthew Smith <matthew@g.o>
7 ---
8 eclass/waf-utils.eclass | 5 +++--
9 1 file changed, 3 insertions(+), 2 deletions(-)
10
11 diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass
12 index 2a386e99165..66041fc3f60 100644
13 --- a/eclass/waf-utils.eclass
14 +++ b/eclass/waf-utils.eclass
15 @@ -99,6 +99,7 @@ waf-utils_src_configure() {
16 LINKFLAGS="${CFLAGS} ${LDFLAGS}"
17 PKGCONFIG="$(tc-getPKG_CONFIG)"
18 "${WAF_BINARY}"
19 + "--jobs=1"
20 "--prefix=${EPREFIX}/usr"
21 "${conf_args[@]}"
22 "${@}"
23 @@ -129,8 +130,8 @@ waf-utils_src_compile() {
24 waf-utils_src_install() {
25 debug-print-function ${FUNCNAME} "$@"
26
27 - echo "\"${WAF_BINARY}\" --destdir=\"${D}\" ${*} install"
28 - "${WAF_BINARY}" --destdir="${D}" "${@}" install || die "Make install failed"
29 + echo "\"${WAF_BINARY}\" --jobs=1 --destdir=\"${D}\" ${*} install"
30 + "${WAF_BINARY}" --jobs=1 --destdir="${D}" "${@}" install || die "Make install failed"
31
32 # Manual document installation
33 einstalldocs
34 --
35 2.38.1