Diff nodejs-16.20.2 with a nodejs-18.17.1

/usr/portage/net-libs/nodejs/nodejs-18.17.1.ebuild 2023-10-09 14:52:34.596368479 +0300
7 7
PYTHON_COMPAT=( python3_{9..11} )
8 8
PYTHON_REQ_USE="threads(+)"
9 9

  
10
inherit bash-completion-r1 flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils
10
inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils
11 11

  
12 12
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
13 13
HOMEPAGE="https://nodejs.org/"
......
20 20
else
21 21
	SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
22 22
	SLOT="0/$(ver_cut 1)"
23
	KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
23
	KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
24 24
	S="${WORKDIR}/node-v${PV}"
25 25
fi
26 26

  
27
IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test"
28
REQUIRED_USE="inspector? ( icu ssl )
27
IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test"
28
REQUIRED_USE="corepack? ( !npm )
29
	inspector? ( icu ssl )
29 30
	npm? ( ssl )
30 31
	system-icu? ( icu )
31 32
	system-ssl? ( ssl )"
......
33 34
RESTRICT="!test? ( test )"
34 35

  
35 36
RDEPEND=">=app-arch/brotli-1.0.9:=
36
	>=dev-libs/libuv-1.40.0:=
37
	>=dev-libs/libuv-1.44.0:=
37 38
	>=net-dns/c-ares-1.18.1:=
38 39
	>=net-libs/nghttp2-1.41.0:=
39 40
	sys-libs/zlib
41
	corepack? ( !sys-apps/yarn )
40 42
	system-icu? ( >=dev-libs/icu-67:= )
41 43
	system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
42 44
	sys-devel/gcc:*"
......
48 50
	pax-kernel? ( sys-apps/elfix )"
49 51
DEPEND="${RDEPEND}"
50 52

  
53
# These are measured on a loong machine with -ggdb on, and only checked
54
# if debugging flags are present in CFLAGS.
55
#
56
# The final link consumed a little more than 7GiB alone, so 8GiB is the lower
57
# limit for memory usage. Disk usage was 19.1GiB for the build directory and
58
# 1.2GiB for the installed image, so we leave some room for architectures with
59
# fatter binaries and set the disk requirement to 22GiB.
60
CHECKREQS_MEMORY="8G"
61
CHECKREQS_DISK_BUILD="22G"
62

  
51 63
pkg_pretend() {
52 64
	(use x86 && ! use cpu_flags_x86_sse2) && \
53 65
		die "Your CPU doesn't support the required SSE2 instruction."
66

  
67
	if [[ ${MERGE_TYPE} != "binary" ]]; then
68
		if is-flagq "-g*" && ! is-flagq "-g*0" ; then
69
			einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS"
70
			check-reqs_pkg_pretend
71
		fi
72
	fi
54 73
}
55 74

  
56 75
pkg_setup() {
......
87 106
	fi
88 107

  
89 108
	# We need to disable mprotect on two files when it builds Bug 694100.
90
	use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-16.4.2-paxmarking.patch )
109
	use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-18.16.0-paxmarking.patch )
91 110

  
92 111
	default
93 112
}
......
120 139
	else
121 140
		myconf+=( --with-intl=none )
122 141
	fi
142
	use corepack || myconf+=( --without-corepack )
123 143
	use inspector || myconf+=( --without-inspector )
124 144
	use npm || myconf+=( --without-npm )
125 145
	use snapshot || myconf+=( --without-node-snapshot )
......
130 150
	fi
131 151

  
132 152
	local myarch=""
133
	case ${ABI} in
134
		amd64) myarch="x64";;
135
		arm) myarch="arm";;
136
		arm64) myarch="arm64";;
137
		lp64*) myarch="riscv64";;
138
		ppc64) myarch="ppc64";;
139
		x32) myarch="x32";;
140
		x86) myarch="ia32";;
153
	case "${ARCH}:${ABI}" in
154
		*:amd64) myarch="x64";;
155
		*:arm) myarch="arm";;
156
		*:arm64) myarch="arm64";;
157
		loong:lp64*) myarch="loong64";;
158
		riscv:lp64*) myarch="riscv64";;
159
		*:ppc64) myarch="ppc64";;
160
		*:x32) myarch="x32";;
161
		*:x86) myarch="ia32";;
141 162
		*) myarch="${ABI}";;
142 163
	esac
143 164

  
......
207 228
			\) \) -exec rm -rf "{}" \;
208 229
	fi
209 230

  
231
	use corepack &&
232
		"${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin
233

  
210 234
	mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
211 235
}
212 236

  
......
217 241
		test/parallel/test-fs-utimes-y2K38.js
218 242
		test/parallel/test-release-npm.js
219 243
		test/parallel/test-socket-write-after-fin-error.js
220
		test/parallel/test-tls-streamwrap-buffersize.js
244
		test/parallel/test-strace-openat-openssl.js
221 245
		test/sequential/test-util-debug.js
222 246
	)
223
	rm -f "${drop_tests[@]}"
247
	rm -f "${drop_tests[@]}" || die "disabling tests failed"
224 248

  
225 249
	out/${BUILDTYPE}/cctest || die
226 250
	"${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
Thank you!