1 |
commit: f7a871b4b3d3d10226c29f3e09cb74a2353e9b8c |
2 |
Author: WANG Xuerui <xen0n <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 18 15:15:58 2022 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 18 15:21:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7a871b4 |
7 |
|
8 |
net-libs/nodejs: run check-reqs when building with debugging CFLAGS |
9 |
|
10 |
Bug: https://github.com/gentoo/gentoo/pull/25655 |
11 |
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org> |
12 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
13 |
|
14 |
net-libs/nodejs/nodejs-18.7.0.ebuild | 19 ++++++++++++++++++- |
15 |
1 file changed, 18 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/net-libs/nodejs/nodejs-18.7.0.ebuild b/net-libs/nodejs/nodejs-18.7.0.ebuild |
18 |
index 6b031ed0b96c..34ed47477bc6 100644 |
19 |
--- a/net-libs/nodejs/nodejs-18.7.0.ebuild |
20 |
+++ b/net-libs/nodejs/nodejs-18.7.0.ebuild |
21 |
@@ -7,7 +7,7 @@ CONFIG_CHECK="~ADVISE_SYSCALLS" |
22 |
PYTHON_COMPAT=( python3_{8..11} ) |
23 |
PYTHON_REQ_USE="threads(+)" |
24 |
|
25 |
-inherit bash-completion-r1 flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils |
26 |
+inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils |
27 |
|
28 |
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
29 |
HOMEPAGE="https://nodejs.org/" |
30 |
@@ -52,9 +52,26 @@ PATCHES=( |
31 |
"${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch |
32 |
) |
33 |
|
34 |
+# These are measured on a loong machine with -ggdb on, and only checked |
35 |
+# if debugging flags are present in CFLAGS. |
36 |
+# |
37 |
+# The final link consumed a little more than 7GiB alone, so 8GiB is the lower |
38 |
+# limit for memory usage. Disk usage was 19.1GiB for the build directory and |
39 |
+# 1.2GiB for the installed image, so we leave some room for architectures with |
40 |
+# fatter binaries and set the disk requirement to 22GiB. |
41 |
+CHECKREQS_MEMORY="8G" |
42 |
+CHECKREQS_DISK_BUILD="22G" |
43 |
+ |
44 |
pkg_pretend() { |
45 |
(use x86 && ! use cpu_flags_x86_sse2) && \ |
46 |
die "Your CPU doesn't support the required SSE2 instruction." |
47 |
+ |
48 |
+ if [[ ${MERGE_TYPE} != "binary" ]]; then |
49 |
+ if is-flagq "-g*" && ! is-flagq "-g*0" ; then |
50 |
+ einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" |
51 |
+ check-reqs_pkg_pretend |
52 |
+ fi |
53 |
+ fi |
54 |
} |
55 |
|
56 |
pkg_setup() { |