summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Xuerui <xen0n@gentoo.org>2022-08-18 10:15:58 -0500
committerWilliam Hubbs <williamh@gentoo.org>2022-08-18 10:21:33 -0500
commitf7a871b4b3d3d10226c29f3e09cb74a2353e9b8c (patch)
tree14eb477c86ed640f2f5053a473d0c11a2f3f5c20
parentnet-libs/nodejs: fix ABI to nodejs arch mapping for loong (diff)
downloadgentoo-f7a871b4.tar.gz
gentoo-f7a871b4.tar.bz2
gentoo-f7a871b4.zip
net-libs/nodejs: run check-reqs when building with debugging CFLAGS
Bug: https://github.com/gentoo/gentoo/pull/25655 Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: William Hubbs <williamh@gentoo.org>
-rw-r--r--net-libs/nodejs/nodejs-18.7.0.ebuild19
1 files changed, 18 insertions, 1 deletions
diff --git a/net-libs/nodejs/nodejs-18.7.0.ebuild b/net-libs/nodejs/nodejs-18.7.0.ebuild
index 6b031ed0b96c..34ed47477bc6 100644
--- a/net-libs/nodejs/nodejs-18.7.0.ebuild
+++ b/net-libs/nodejs/nodejs-18.7.0.ebuild
@@ -7,7 +7,7 @@ CONFIG_CHECK="~ADVISE_SYSCALLS"
PYTHON_COMPAT=( python3_{8..11} )
PYTHON_REQ_USE="threads(+)"
-inherit bash-completion-r1 flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils
+inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
HOMEPAGE="https://nodejs.org/"
@@ -52,9 +52,26 @@ PATCHES=(
"${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch
)
+# These are measured on a loong machine with -ggdb on, and only checked
+# if debugging flags are present in CFLAGS.
+#
+# The final link consumed a little more than 7GiB alone, so 8GiB is the lower
+# limit for memory usage. Disk usage was 19.1GiB for the build directory and
+# 1.2GiB for the installed image, so we leave some room for architectures with
+# fatter binaries and set the disk requirement to 22GiB.
+CHECKREQS_MEMORY="8G"
+CHECKREQS_DISK_BUILD="22G"
+
pkg_pretend() {
(use x86 && ! use cpu_flags_x86_sse2) && \
die "Your CPU doesn't support the required SSE2 instruction."
+
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if is-flagq "-g*" && ! is-flagq "-g*0" ; then
+ einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS"
+ check-reqs_pkg_pretend
+ fi
+ fi
}
pkg_setup() {