Diff nodejs-20.18.2 with a nodejs-22.23.4

/usr/portage/net-libs/nodejs/nodejs-22.23.4.ebuild 2026-10-28 20:01:05.213079588 +0300
4 4
EAPI=8
5 5

  
6 6
CONFIG_CHECK="~ADVISE_SYSCALLS"
7
PYTHON_COMPAT=( python3_{11..12} )
7
PYTHON_COMPAT=( python3_{11..14} )
8 8
PYTHON_REQ_USE="threads(+)"
9 9

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

  
13 13
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
14 14
HOMEPAGE="https://nodejs.org/"
15
LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
15
LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT npm? ( Artistic-2 )"
16 16

  
17 17
if [[ ${PV} == *9999 ]]; then
18 18
	inherit git-r3
......
21 21
else
22 22
	SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
23 23
	SLOT="0/$(ver_cut 1)"
24
	KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~x64-macos"
24
	KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~x64-macos"
25 25
	S="${WORKDIR}/node-v${PV}"
26 26
fi
27 27

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

  
35 35
RESTRICT="!test? ( test )"
36 36

  
37
RDEPEND=">=app-arch/brotli-1.0.9:=
38
	>=dev-libs/libuv-1.46.0:=
39
	>=net-dns/c-ares-1.18.1:=
40
	>=net-libs/nghttp2-1.41.0:=
41
	>=net-libs/ngtcp2-1.1.0:=
37
COMMON_DEPEND=">=app-arch/brotli-1.2.1:=
38
	dev-db/sqlite:3
39
	>=dev-libs/libuv-1.51.0:=
40
	>=dev-libs/simdjson-3.13.0:=
41
	>=net-dns/c-ares-1.34.4:=
42
	>=net-libs/nghttp2-1.64.0:=
43
	>=net-libs/nghttp3-1.7.0:=
42 44
	virtual/zlib:=
43 45
	corepack? ( !sys-apps/yarn )
44 46
	system-icu? ( >=dev-libs/icu-73:= )
45
	system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
46
	sys-devel/gcc:*"
47
	system-ssl? (
48
		>=net-libs/ngtcp2-1.9.1:=
49
		>=dev-libs/openssl-3.5.4:0=
50
	)
51
	!system-ssl? ( >=net-libs/ngtcp2-1.9.1:=[-gnutls] )
52
	|| (
53
		sys-devel/gcc:*
54
		llvm-runtimes/libatomic-stub
55
	)"
47 56
BDEPEND="${PYTHON_DEPS}
48 57
	app-alternatives/ninja
49 58
	sys-apps/coreutils
50 59
	virtual/pkgconfig
51 60
	test? ( net-misc/curl )
52 61
	pax-kernel? ( sys-apps/elfix )"
53
DEPEND="${RDEPEND}"
62
DEPEND="${COMMON_DEPEND}"
63
RDEPEND="${COMMON_DEPEND}"
54 64

  
55 65
# These are measured on a loong machine with -ggdb on, and only checked
56 66
# if debugging flags are present in CFLAGS.
......
102 112
	fi
103 113

  
104 114
	# We need to disable mprotect on two files when it builds Bug 694100.
105
	use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-20.6.0-paxmarking.patch )
115
	use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-22.12.0-paxmarking.patch )
116

  
117
	# bug 931256
118
	use riscv && PATCHES+=( "${FILESDIR}"/${PN}-22.2.0-riscv.patch )
106 119

  
107 120
	default
108 121
}
......
112 125

  
113 126
	# LTO compiler flags are handled by configure.py itself
114 127
	filter-lto
115
	# nodejs unconditionally links to libatomic #869992
116
	# specifically it requires __atomic_is_lock_free which
117
	# is not yet implemented by llvm-runtimes/compiler-rt (see
118
	# https://reviews.llvm.org/D85044?id=287068), therefore
119
	# we depend on gcc and force using libgcc as the support lib
120
	tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc"
128
	# The warnings are *so* noisy and make build.logs massive
129
	append-cxxflags $(test-flags-CXX -Wno-template-id-cdtor)
130
	# https://bugs.gentoo.org/931514
131
	use arm64 && append-flags $(test-flags-CXX -mbranch-protection=none)
121 132

  
122 133
	local myconf=(
123 134
		--ninja
135
		# ada is not packaged yet
136
		# https://github.com/ada-url/ada
137
		# --shared-ada
124 138
		--shared-brotli
125 139
		--shared-cares
126 140
		--shared-libuv
127 141
		--shared-nghttp2
142
		--shared-nghttp3
128 143
		--shared-ngtcp2
144
		--shared-simdjson
145
		# sindutf is not packaged yet
146
		# https://github.com/simdutf/simdutf
147
		# --shared-simdutf
148
		--shared-sqlite
129 149
		--shared-zlib
130 150
	)
131 151
	use debug && myconf+=( --debug )
......
206 226

  
207 227
		# Clean up
208 228
		rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile}
209
		rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man}
210 229

  
211 230
		local find_exp="-or -name"
212 231
		local find_name=()
213 232
		for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
214 233
			".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
215
			"*.md" "*.markdown" "*.bat" "*.cmd"; do
234
			"*.bat" "*.cmd"; do
216 235
			find_name+=( ${find_exp} "${match}" )
217 236
		done
218 237

  
......
236 255
		test/parallel/test-dns.js
237 256
		test/parallel/test-dns-resolveany-bad-ancount.js
238 257
		test/parallel/test-dns-setserver-when-querying.js
258
		test/parallel/test-dotenv.js
239 259
		test/parallel/test-fs-mkdir.js
240 260
		test/parallel/test-fs-read-stream.js
241 261
		test/parallel/test-fs-utimes-y2K38.js
242 262
		test/parallel/test-fs-watch-recursive-add-file.js
243
		test/parallel/test-inspector-emit-protocol-event.js
244
		test/parallel/test-inspector-network-domain.js
263
		test/parallel/test-http2-client-set-priority.js
264
		test/parallel/test-http2-priority-event.js
245 265
		test/parallel/test-process-euid-egid.js
246 266
		test/parallel/test-process-get-builtin.mjs
247 267
		test/parallel/test-process-initgroups.js
......
250 270
		test/parallel/test-release-npm.js
251 271
		test/parallel/test-socket-write-after-fin-error.js
252 272
		test/parallel/test-strace-openat-openssl.js
253
		test/parallel/test-tls-cert-regression.js
254
		test/parallel/test-tls-client-getephemeralkeyinfo.js
255
		test/parallel/test-tls-getcipher.js
256
		test/parallel/test-tls-set-ciphers.js
257
		test/parallel/test-tls-junk-closes-server.js
258
		test/parallel/test-util-styletext.js
273
		test/sequential/test-tls-session-timeout.js
259 274
		test/sequential/test-util-debug.js
260 275
	)
261
	use inspector || drop_tests+=( test/sequential/test-watch-mode.mjs )
276
	use inspector ||
277
		drop_tests+=(
278
			test/parallel/test-inspector-emit-protocol-event.js
279
			test/parallel/test-inspector-network-arbitrary-data.js
280
			test/parallel/test-inspector-network-domain.js
281
			test/parallel/test-inspector-network-fetch.js
282
			test/parallel/test-inspector-network-http.js
283
			test/sequential/test-watch-mode.mjs
284
		)
262 285
	rm -f "${drop_tests[@]}" || die "disabling tests failed"
263 286

  
264 287
	out/${BUILDTYPE}/cctest || die
......
268 291
pkg_postinst() {
269 292
	if use npm; then
270 293
		ewarn "remember to run: source /etc/profile if you plan to use nodejs"
271
		ewarn "	in your current shell"
294
		ewarn " in your current shell"
272 295
	fi
273 296
}
Thank you!