Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nodejs/, net-libs/nodejs/files/
Date: Fri, 06 May 2022 05:21:49
Message-Id: 1651814203.8b79544e2355159f0abb411c86dd5a8d06d8d820.juippis@gentoo
1 commit: 8b79544e2355159f0abb411c86dd5a8d06d8d820
2 Author: Joonas Niilola <juippis <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 6 05:16:43 2022 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri May 6 05:16:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b79544e
7
8 reapply: "net-libs/nodejs: drop 12.22.5-r1, 12.22.6, 12.22.10"
9
10 This reverts commit 06150adeff078a4cefa44939362f24059dbabfc2.
11
12 - with kibana-bin <7 removed we can now re-remove nodejs-12*
13
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 net-libs/nodejs/Manifest | 3 -
17 .../files/nodejs-12.20.1-fix_ppc64_crashes.patch | 44 ----
18 .../nodejs-12.22.1-jinja_collections_abc.patch | 95 --------
19 net-libs/nodejs/nodejs-12.22.10.ebuild | 249 ---------------------
20 net-libs/nodejs/nodejs-12.22.5-r1.ebuild | 249 ---------------------
21 net-libs/nodejs/nodejs-12.22.6.ebuild | 249 ---------------------
22 6 files changed, 889 deletions(-)
23
24 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
25 index 0b7285ce5651..0c6c3c7600cc 100644
26 --- a/net-libs/nodejs/Manifest
27 +++ b/net-libs/nodejs/Manifest
28 @@ -1,6 +1,3 @@
29 -DIST node-v12.22.10.tar.xz 24089580 BLAKE2B 0ecf0b2ed64cba1bbcab287ccf7e524bd08ce787399d01fb792fd5232983289403a85810bc6eccd090b6d15796c48dc6ea3baf0cb3154e392dc343da53086b81 SHA512 da984e98856ef89eb259346d9d1eae60ff3d255d964f3b09d59851a9c21c86acd0c56b9c888f61423de07afab1c09946c00856c832a1f1a8abc4c671c31e23b1
30 -DIST node-v12.22.5.tar.xz 23654908 BLAKE2B ca4f304e31f091ae656142035851d6e4427d8b2ddd2a69506dec96efbb1269a19a08e9ab8d44dfe10f8429bc239e4102f3f030adb25e9c41901c7d94b53e88c8 SHA512 80f3c673a1f2af7fffd6aaa556c06b8225034c8413e1a738c19d491aff1b3e6ed388df66ecbff88e4bfbefe1013dac7e3beb301456c2099b6a954ba468b21883
31 -DIST node-v12.22.6.tar.xz 23664904 BLAKE2B 04dd4fd4cbe39642a1c3dd8639a4d9e3362055f56bc2565303d0095cda1655033ba4e0ce5a969647d2be73df13ddbcccc4907825a94a41b45c0723b3c02ca980 SHA512 d107f1ff7073d2db9f0198f14b0523870e9b262c71055de2e03fba54f87bc98a57dad43d902c0b349957df21de71dc066133d4831eb7eb07f4e548d0ac724fb2
32 DIST node-v14.17.5.tar.xz 33585724 BLAKE2B cf79397caad8c81e4096f344f9fdb88d8ecea44b97fe208256dfd4afb750ecdf52142a2dc0430285b9d5117bdd43fa5ce42b4418926eec4d2c7f0a5f5d1a1539 SHA512 9d62c8946d05862d96a13a71b241a097b9f592a9e5f7362c81d8f3c74e7c5546a308b4c74bef34a66cafeef5d1a87d9d3e5ae8bb87d470c1ecf5abb8de0dedb5
33 DIST node-v14.17.6.tar.xz 33606464 BLAKE2B c2c449e5eaf8214d7ed4bfab8db0208034cee1d08ef0e1fca478c30fc5cf95be037eb141080dbcfbe4fc58ef734457747dcbd0fe585a0536f9c0bec495435f25 SHA512 581c5698112426042fbf54fa793e56a30cae0c54ce8f23af6ac20d73c69a4f1166c5410f357c5a7b0409a773f99e3b9291e4afffd53b3c0e00569725dc4c47d3
34 DIST node-v14.19.0.tar.xz 34486868 BLAKE2B 12e571a366c1d4b2475ef258e338f516bb81e9c08f7e6b7f951decbf371028cdcf32c72181d8504d0890496eaecce0d6b23437b8dad6c6e498d30bf6636bd1e7 SHA512 80573fa3a0882c1f2a40b991f187f49714748ca4c56c78133e2d2be0322f201816eb059a1a7d38ea8a925229c1b1324d0ffc28ff4002d0115bfae44fe87efe97
35
36 diff --git a/net-libs/nodejs/files/nodejs-12.20.1-fix_ppc64_crashes.patch b/net-libs/nodejs/files/nodejs-12.20.1-fix_ppc64_crashes.patch
37 deleted file mode 100644
38 index 0982d3c81c2a..000000000000
39 --- a/net-libs/nodejs/files/nodejs-12.20.1-fix_ppc64_crashes.patch
40 +++ /dev/null
41 @@ -1,44 +0,0 @@
42 -Backport of https://github.com/nodejs/node/pull/33866 to nodejs-12
43 -
44 ---- a/deps/v8/src/compiler/backend/instruction-selector.cc
45 -+++ b/deps/v8/src/compiler/backend/instruction-selector.cc
46 -@@ -2788,7 +2788,7 @@
47 - switch (call_descriptor->kind()) {
48 - case CallDescriptor::kCallAddress: {
49 - int misc_field = static_cast<int>(call_descriptor->ParameterCount());
50 --#if defined(_AIX)
51 -+#if ABI_USES_FUNCTION_DESCRIPTORS
52 - // Highest misc_field bit is used on AIX to indicate if a CFunction call
53 - // has function descriptor or not.
54 - misc_field |= call_descriptor->HasFunctionDescriptor()
55 ---- a/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
56 -+++ b/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
57 -@@ -1026,7 +1026,7 @@
58 - Label start_call;
59 - bool isWasmCapiFunction =
60 - linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
61 --#if defined(_AIX)
62 -+#if ABI_USES_FUNCTION_DESCRIPTORS
63 - // AIX/PPC64BE Linux uses a function descriptor
64 - int kNumParametersMask = kHasFunctionDescriptorBitMask - 1;
65 - num_parameters = kNumParametersMask & misc_field;
66 ---- a/deps/v8/src/execution/simulator.h
67 -+++ b/deps/v8/src/execution/simulator.h
68 -@@ -122,7 +122,7 @@
69 -
70 - DISABLE_CFI_ICALL Return Call(Args... args) {
71 - // When running without a simulator we call the entry directly.
72 --#if V8_OS_AIX
73 -+#if ABI_USES_FUNCTION_DESCRIPTORS
74 - // AIX ABI requires function descriptors (FD). Artificially create a pseudo
75 - // FD to ensure correct dispatch to generated code. The 'volatile'
76 - // declaration is required to avoid the compiler from not observing the
77 -@@ -134,7 +134,7 @@
78 - return fn(args...);
79 - #else
80 - return fn_ptr_(args...);
81 --#endif // V8_OS_AIX
82 -+#endif // ABI_USES_FUNCTION_DESCRIPTORS
83 - }
84 - #endif // USE_SIMULATOR
85 -
86
87 diff --git a/net-libs/nodejs/files/nodejs-12.22.1-jinja_collections_abc.patch b/net-libs/nodejs/files/nodejs-12.22.1-jinja_collections_abc.patch
88 deleted file mode 100644
89 index 5f0df09b6e2e..000000000000
90 --- a/net-libs/nodejs/files/nodejs-12.22.1-jinja_collections_abc.patch
91 +++ /dev/null
92 @@ -1,95 +0,0 @@
93 ---- a/deps/v8/third_party/jinja2/tests.py
94 -+++ b/deps/v8/third_party/jinja2/tests.py
95 -@@ -10,7 +10,7 @@
96 - """
97 - import operator
98 - import re
99 --from collections import Mapping
100 -+from collections.abc import Mapping
101 - from jinja2.runtime import Undefined
102 - from jinja2._compat import text_type, string_types, integer_types
103 - import decimal
104 ---- a/deps/v8/third_party/jinja2/runtime.py
105 -+++ b/deps/v8/third_party/jinja2/runtime.py
106 -@@ -315,7 +315,7 @@ class Context(with_metaclass(ContextMeta)):
107 -
108 - # register the context as mapping if possible
109 - try:
110 -- from collections import Mapping
111 -+ from collections.abc import Mapping
112 - Mapping.register(Context)
113 - except ImportError:
114 - pass
115 ---- a/deps/v8/third_party/jinja2/sandbox.py
116 -+++ b/deps/v8/third_party/jinja2/sandbox.py
117 -@@ -14,7 +14,7 @@
118 - """
119 - import types
120 - import operator
121 --from collections import Mapping
122 -+from collections.abc import Mapping
123 - from jinja2.environment import Environment
124 - from jinja2.exceptions import SecurityError
125 - from jinja2._compat import string_types, PY2
126 -@@ -79,7 +79,7 @@ except ImportError:
127 - pass
128 -
129 - #: register Python 2.6 abstract base classes
130 --from collections import MutableSet, MutableMapping, MutableSequence
131 -+from collections.abc import MutableSet, MutableMapping, MutableSequence
132 - _mutable_set_types += (MutableSet,)
133 - _mutable_mapping_types += (MutableMapping,)
134 - _mutable_sequence_types += (MutableSequence,)
135 ---- a/deps/v8/third_party/jinja2/utils.py
136 -+++ b/deps/v8/third_party/jinja2/utils.py
137 -@@ -482,7 +482,7 @@ class LRUCache(object):
138 -
139 - # register the LRU cache as mutable mapping if possible
140 - try:
141 -- from collections import MutableMapping
142 -+ from collections.abc import MutableMapping
143 - MutableMapping.register(LRUCache)
144 - except ImportError:
145 - pass
146 ---- a/tools/inspector_protocol/jinja2/runtime.py
147 -+++ b/tools/inspector_protocol/jinja2/runtime.py
148 -@@ -315,7 +315,7 @@ class Context(with_metaclass(ContextMeta)):
149 -
150 - # register the context as mapping if possible
151 - try:
152 -- from collections import Mapping
153 -+ from collections.abc import Mapping
154 - Mapping.register(Context)
155 - except ImportError:
156 - pass
157 ---- a/tools/inspector_protocol/jinja2/sandbox.py
158 -+++ b/tools/inspector_protocol/jinja2/sandbox.py
159 -@@ -14,7 +14,7 @@
160 - """
161 - import types
162 - import operator
163 --from collections import Mapping
164 -+from collections.abc import Mapping
165 - from jinja2.environment import Environment
166 - from jinja2.exceptions import SecurityError
167 - from jinja2._compat import string_types, PY2
168 -@@ -79,7 +79,7 @@ except ImportError:
169 - pass
170 -
171 - #: register Python 2.6 abstract base classes
172 --from collections import MutableSet, MutableMapping, MutableSequence
173 -+from collections.abc import MutableSet, MutableMapping, MutableSequence
174 - _mutable_set_types += (MutableSet,)
175 - _mutable_mapping_types += (MutableMapping,)
176 - _mutable_sequence_types += (MutableSequence,)
177 ---- a/tools/inspector_protocol/jinja2/tests.py
178 -+++ b/tools/inspector_protocol/jinja2/tests.py
179 -@@ -10,7 +10,7 @@
180 - """
181 - import operator
182 - import re
183 --from collections import Mapping
184 -+from collections.abc import Mapping
185 - from jinja2.runtime import Undefined
186 - from jinja2._compat import text_type, string_types, integer_types
187 - import decimal
188
189 diff --git a/net-libs/nodejs/nodejs-12.22.10.ebuild b/net-libs/nodejs/nodejs-12.22.10.ebuild
190 deleted file mode 100644
191 index 4638f6304808..000000000000
192 --- a/net-libs/nodejs/nodejs-12.22.10.ebuild
193 +++ /dev/null
194 @@ -1,249 +0,0 @@
195 -# Copyright 1999-2022 Gentoo Authors
196 -# Distributed under the terms of the GNU General Public License v2
197 -
198 -EAPI=8
199 -
200 -PYTHON_COMPAT=( python3_{8..10} )
201 -PYTHON_REQ_USE="threads(+)"
202 -
203 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
204 -
205 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
206 -HOMEPAGE="https://nodejs.org/"
207 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
208 -
209 -if [[ ${PV} == *9999 ]]; then
210 - inherit git-r3
211 - EGIT_REPO_URI="https://github.com/nodejs/node"
212 - SLOT="0"
213 -else
214 - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
215 - SLOT="0/$(ver_cut 1)"
216 - KEYWORDS="amd64 ~arm arm64 ppc64 -riscv x86 ~amd64-linux ~x64-macos"
217 - S="${WORKDIR}/node-v${PV}"
218 -fi
219 -
220 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector lto +npm +snapshot +ssl +system-ssl systemtap test"
221 -REQUIRED_USE="
222 - inspector? ( icu ssl )
223 - npm? ( ssl )
224 - system-ssl? ( ssl )
225 -"
226 -
227 -RESTRICT="!test? ( test )"
228 -
229 -RDEPEND="
230 - >=app-arch/brotli-1.0.9:=
231 - >=dev-libs/libuv-1.39.0:=
232 - >=net-dns/c-ares-1.17.2:=
233 - >=net-libs/http-parser-2.9.3:=
234 - >=net-libs/nghttp2-1.40.0:=
235 - sys-libs/zlib
236 - icu? ( >=dev-libs/icu-64.2:= )
237 - system-ssl? (
238 - >=dev-libs/openssl-1.1.1:0=
239 - <dev-libs/openssl-3.0.0_beta1:0=
240 - )
241 -"
242 -BDEPEND="
243 - ${PYTHON_DEPS}
244 - sys-apps/coreutils
245 - virtual/pkgconfig
246 - systemtap? ( dev-util/systemtap )
247 - test? ( net-misc/curl )
248 -"
249 -DEPEND="
250 - ${RDEPEND}
251 -"
252 -PATCHES=(
253 - "${FILESDIR}"/${P}-global-npm-config.patch
254 - "${FILESDIR}"/${PN}-12.20.1-fix_ppc64_crashes.patch
255 - "${FILESDIR}"/${PN}-12.22.1-jinja_collections_abc.patch
256 - "${FILESDIR}"/${PN}-12.22.1-uvwasi_shared_libuv.patch
257 - "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch
258 - "${FILESDIR}"/${PN}-99999999-llhttp.patch
259 -)
260 -
261 -pkg_pretend() {
262 - (use x86 && ! use cpu_flags_x86_sse2) && \
263 - die "Your CPU doesn't support the required SSE2 instruction."
264 -
265 - if [[ ${MERGE_TYPE} != "binary" ]]; then
266 - if use lto; then
267 - if tc-is-gcc; then
268 - if [[ $(gcc-major-version) -ge 11 ]]; then
269 - # Bug #787158
270 - die "LTO builds of ${PN} using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild"
271 - fi
272 - else
273 - # configure.py will abort on this later if we do not
274 - die "${PN} only supports LTO for gcc"
275 - fi
276 - fi
277 - fi
278 -}
279 -
280 -src_prepare() {
281 - tc-export CC CXX PKG_CONFIG
282 - export V=1
283 - export BUILDTYPE=Release
284 -
285 - # fix compilation on Darwin
286 - # https://code.google.com/p/gyp/issues/detail?id=260
287 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
288 -
289 - # less verbose install output (stating the same as portage, basically)
290 - sed -i -e "/print/d" tools/install.py || die
291 -
292 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
293 - local LIBDIR=$(get_libdir)
294 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
295 - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
296 -
297 - # Avoid writing a depfile, not useful
298 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
299 -
300 - sed -i -e "/'-O3'/d" common.gypi node.gypi || die
301 -
302 - # Known-to-fail test of a deprecated, legacy HTTP parser. Just don't bother.
303 - rm -f test/parallel/test-http-transfer-encoding-smuggling-legacy.js
304 -
305 - # debug builds. change install path, remove optimisations and override buildtype
306 - if use debug; then
307 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
308 - BUILDTYPE=Debug
309 - fi
310 -
311 - default
312 -}
313 -
314 -src_configure() {
315 - xdg_environment_reset
316 -
317 - # LTO compiler flags are handled by configure.py itself
318 - filter-flags '-flto*'
319 -
320 - local myconf=(
321 - --shared-brotli
322 - --shared-cares
323 - --shared-http-parser
324 - --shared-libuv
325 - --shared-nghttp2
326 - --shared-zlib
327 - )
328 - use debug && myconf+=( --debug )
329 - use lto && myconf+=( --enable-lto )
330 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
331 - use inspector || myconf+=( --without-inspector )
332 - use npm || myconf+=( --without-npm )
333 - use snapshot || myconf+=( --without-node-snapshot )
334 - if use ssl; then
335 - use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store )
336 - else
337 - myconf+=( --without-ssl )
338 - fi
339 -
340 - local myarch=""
341 - case ${ABI} in
342 - amd64) myarch="x64";;
343 - arm) myarch="arm";;
344 - arm64) myarch="arm64";;
345 - ppc64) myarch="ppc64";;
346 - x32) myarch="x32";;
347 - x86) myarch="ia32";;
348 - *) myarch="${ABI}";;
349 - esac
350 -
351 - GYP_DEFINES="linux_use_gold_flags=0
352 - linux_use_bundled_binutils=0
353 - linux_use_bundled_gold=0" \
354 - "${EPYTHON}" configure.py \
355 - --prefix="${EPREFIX}"/usr \
356 - --dest-cpu=${myarch} \
357 - $(use_with systemtap dtrace) \
358 - "${myconf[@]}" || die
359 -}
360 -
361 -src_compile() {
362 - emake -C out mksnapshot
363 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
364 - emake -C out
365 -}
366 -
367 -src_install() {
368 - local LIBDIR="${ED}/usr/$(get_libdir)"
369 - default
370 -
371 - pax-mark -m "${ED}"/usr/bin/node
372 -
373 - # set up a symlink structure that node-gyp expects..
374 - dodir /usr/include/node/deps/{v8,uv}
375 - dosym . /usr/include/node/src
376 - for var in deps/{uv,v8}/include; do
377 - dosym ../.. /usr/include/node/${var}
378 - done
379 -
380 - if use doc; then
381 - docinto html
382 - dodoc -r "${S}"/doc/*
383 - fi
384 -
385 - if use npm; then
386 - dodir /etc/npm
387 -
388 - # Install bash completion for `npm`
389 - # We need to temporarily replace default config path since
390 - # npm otherwise tries to write outside of the sandbox
391 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
392 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
393 - local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)"
394 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
395 - newbashcomp "${tmp_npm_completion_file}" npm
396 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
397 -
398 - # Move man pages
399 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
400 -
401 - # Clean up
402 - rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile}
403 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man}
404 -
405 - local find_exp="-or -name"
406 - local find_name=()
407 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
408 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
409 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
410 - find_name+=( ${find_exp} "${match}" )
411 - done
412 -
413 - # Remove various development and/or inappropriate files and
414 - # useless docs of dependend packages.
415 - find "${LIBDIR}"/node_modules \
416 - \( -type d -name examples \) -or \( -type f \( \
417 - -iname "LICEN?E*" \
418 - "${find_name[@]}" \
419 - \) \) -exec rm -rf "{}" \;
420 - fi
421 -
422 - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
423 -}
424 -
425 -src_test() {
426 - if has usersandbox ${FEATURES}; then
427 - rm -f "${S}"/test/parallel/test-fs-mkdir.js
428 - ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \
429 - "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'."
430 - fi
431 -
432 - out/${BUILDTYPE}/cctest || die
433 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
434 -}
435 -
436 -pkg_postinst() {
437 - elog "The global npm config lives in /etc/npm. This deviates slightly"
438 - elog "from upstream which otherwise would have it live in /usr/etc/."
439 - elog ""
440 - elog "Protip: When using node-gyp to install native modules, you can"
441 - elog "avoid having to download extras by doing the following:"
442 - elog "$ node-gyp --nodedir /usr/include/node <command>"
443 -}
444
445 diff --git a/net-libs/nodejs/nodejs-12.22.5-r1.ebuild b/net-libs/nodejs/nodejs-12.22.5-r1.ebuild
446 deleted file mode 100644
447 index 1e716cbf5e85..000000000000
448 --- a/net-libs/nodejs/nodejs-12.22.5-r1.ebuild
449 +++ /dev/null
450 @@ -1,249 +0,0 @@
451 -# Copyright 1999-2021 Gentoo Authors
452 -# Distributed under the terms of the GNU General Public License v2
453 -
454 -EAPI=7
455 -
456 -PYTHON_COMPAT=( python3_{8..10} )
457 -PYTHON_REQ_USE="threads(+)"
458 -
459 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
460 -
461 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
462 -HOMEPAGE="https://nodejs.org/"
463 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
464 -
465 -if [[ ${PV} == *9999 ]]; then
466 - inherit git-r3
467 - EGIT_REPO_URI="https://github.com/nodejs/node"
468 - SLOT="0"
469 -else
470 - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
471 - SLOT="0/$(ver_cut 1)"
472 - KEYWORDS="amd64 arm arm64 ppc64 -riscv x86 ~amd64-linux ~x64-macos"
473 - S="${WORKDIR}/node-v${PV}"
474 -fi
475 -
476 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector lto +npm +snapshot +ssl +system-ssl systemtap test"
477 -REQUIRED_USE="
478 - inspector? ( icu ssl )
479 - npm? ( ssl )
480 - system-ssl? ( ssl )
481 -"
482 -
483 -RESTRICT="!test? ( test )"
484 -
485 -RDEPEND="
486 - >=app-arch/brotli-1.0.9:=
487 - >=dev-libs/libuv-1.39.0:=
488 - >=net-dns/c-ares-1.17.2:=
489 - >=net-libs/http-parser-2.9.3:=
490 - >=net-libs/nghttp2-1.40.0:=
491 - sys-libs/zlib
492 - icu? ( >=dev-libs/icu-64.2:= )
493 - system-ssl? (
494 - >=dev-libs/openssl-1.1.1:0=
495 - <dev-libs/openssl-3.0.0_beta1:0=
496 - )
497 -"
498 -BDEPEND="
499 - ${PYTHON_DEPS}
500 - sys-apps/coreutils
501 - virtual/pkgconfig
502 - systemtap? ( dev-util/systemtap )
503 - test? ( net-misc/curl )
504 -"
505 -DEPEND="
506 - ${RDEPEND}
507 -"
508 -PATCHES=(
509 - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
510 - "${FILESDIR}"/${PN}-12.20.1-fix_ppc64_crashes.patch
511 - "${FILESDIR}"/${PN}-12.22.1-jinja_collections_abc.patch
512 - "${FILESDIR}"/${PN}-12.22.1-uvwasi_shared_libuv.patch
513 - "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch
514 - "${FILESDIR}"/${PN}-99999999-llhttp.patch
515 -)
516 -
517 -pkg_pretend() {
518 - (use x86 && ! use cpu_flags_x86_sse2) && \
519 - die "Your CPU doesn't support the required SSE2 instruction."
520 -
521 - if [[ ${MERGE_TYPE} != "binary" ]]; then
522 - if use lto; then
523 - if tc-is-gcc; then
524 - if [[ $(gcc-major-version) -ge 11 ]]; then
525 - # Bug #787158
526 - die "LTO builds of ${PN} using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild"
527 - fi
528 - else
529 - # configure.py will abort on this later if we do not
530 - die "${PN} only supports LTO for gcc"
531 - fi
532 - fi
533 - fi
534 -}
535 -
536 -src_prepare() {
537 - tc-export CC CXX PKG_CONFIG
538 - export V=1
539 - export BUILDTYPE=Release
540 -
541 - # fix compilation on Darwin
542 - # https://code.google.com/p/gyp/issues/detail?id=260
543 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
544 -
545 - # less verbose install output (stating the same as portage, basically)
546 - sed -i -e "/print/d" tools/install.py || die
547 -
548 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
549 - local LIBDIR=$(get_libdir)
550 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
551 - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
552 -
553 - # Avoid writing a depfile, not useful
554 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
555 -
556 - sed -i -e "/'-O3'/d" common.gypi node.gypi || die
557 -
558 - # Known-to-fail test of a deprecated, legacy HTTP parser. Just don't bother.
559 - rm -f test/parallel/test-http-transfer-encoding-smuggling-legacy.js
560 -
561 - # debug builds. change install path, remove optimisations and override buildtype
562 - if use debug; then
563 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
564 - BUILDTYPE=Debug
565 - fi
566 -
567 - default
568 -}
569 -
570 -src_configure() {
571 - xdg_environment_reset
572 -
573 - # LTO compiler flags are handled by configure.py itself
574 - filter-flags '-flto*'
575 -
576 - local myconf=(
577 - --shared-brotli
578 - --shared-cares
579 - --shared-http-parser
580 - --shared-libuv
581 - --shared-nghttp2
582 - --shared-zlib
583 - )
584 - use debug && myconf+=( --debug )
585 - use lto && myconf+=( --enable-lto )
586 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
587 - use inspector || myconf+=( --without-inspector )
588 - use npm || myconf+=( --without-npm )
589 - use snapshot || myconf+=( --without-node-snapshot )
590 - if use ssl; then
591 - use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store )
592 - else
593 - myconf+=( --without-ssl )
594 - fi
595 -
596 - local myarch=""
597 - case ${ABI} in
598 - amd64) myarch="x64";;
599 - arm) myarch="arm";;
600 - arm64) myarch="arm64";;
601 - ppc64) myarch="ppc64";;
602 - x32) myarch="x32";;
603 - x86) myarch="ia32";;
604 - *) myarch="${ABI}";;
605 - esac
606 -
607 - GYP_DEFINES="linux_use_gold_flags=0
608 - linux_use_bundled_binutils=0
609 - linux_use_bundled_gold=0" \
610 - "${EPYTHON}" configure.py \
611 - --prefix="${EPREFIX}"/usr \
612 - --dest-cpu=${myarch} \
613 - $(use_with systemtap dtrace) \
614 - "${myconf[@]}" || die
615 -}
616 -
617 -src_compile() {
618 - emake -C out mksnapshot
619 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
620 - emake -C out
621 -}
622 -
623 -src_install() {
624 - local LIBDIR="${ED}/usr/$(get_libdir)"
625 - default
626 -
627 - pax-mark -m "${ED}"/usr/bin/node
628 -
629 - # set up a symlink structure that node-gyp expects..
630 - dodir /usr/include/node/deps/{v8,uv}
631 - dosym . /usr/include/node/src
632 - for var in deps/{uv,v8}/include; do
633 - dosym ../.. /usr/include/node/${var}
634 - done
635 -
636 - if use doc; then
637 - docinto html
638 - dodoc -r "${S}"/doc/*
639 - fi
640 -
641 - if use npm; then
642 - dodir /etc/npm
643 -
644 - # Install bash completion for `npm`
645 - # We need to temporarily replace default config path since
646 - # npm otherwise tries to write outside of the sandbox
647 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
648 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
649 - local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)"
650 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
651 - newbashcomp "${tmp_npm_completion_file}" npm
652 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
653 -
654 - # Move man pages
655 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
656 -
657 - # Clean up
658 - rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile}
659 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man}
660 -
661 - local find_exp="-or -name"
662 - local find_name=()
663 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
664 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
665 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
666 - find_name+=( ${find_exp} "${match}" )
667 - done
668 -
669 - # Remove various development and/or inappropriate files and
670 - # useless docs of dependend packages.
671 - find "${LIBDIR}"/node_modules \
672 - \( -type d -name examples \) -or \( -type f \( \
673 - -iname "LICEN?E*" \
674 - "${find_name[@]}" \
675 - \) \) -exec rm -rf "{}" \;
676 - fi
677 -
678 - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
679 -}
680 -
681 -src_test() {
682 - if has usersandbox ${FEATURES}; then
683 - rm -f "${S}"/test/parallel/test-fs-mkdir.js
684 - ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \
685 - "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'."
686 - fi
687 -
688 - out/${BUILDTYPE}/cctest || die
689 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
690 -}
691 -
692 -pkg_postinst() {
693 - elog "The global npm config lives in /etc/npm. This deviates slightly"
694 - elog "from upstream which otherwise would have it live in /usr/etc/."
695 - elog ""
696 - elog "Protip: When using node-gyp to install native modules, you can"
697 - elog "avoid having to download extras by doing the following:"
698 - elog "$ node-gyp --nodedir /usr/include/node <command>"
699 -}
700
701 diff --git a/net-libs/nodejs/nodejs-12.22.6.ebuild b/net-libs/nodejs/nodejs-12.22.6.ebuild
702 deleted file mode 100644
703 index fc7f6f38aaa1..000000000000
704 --- a/net-libs/nodejs/nodejs-12.22.6.ebuild
705 +++ /dev/null
706 @@ -1,249 +0,0 @@
707 -# Copyright 1999-2021 Gentoo Authors
708 -# Distributed under the terms of the GNU General Public License v2
709 -
710 -EAPI=8
711 -
712 -PYTHON_COMPAT=( python3_{8..10} )
713 -PYTHON_REQ_USE="threads(+)"
714 -
715 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
716 -
717 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
718 -HOMEPAGE="https://nodejs.org/"
719 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
720 -
721 -if [[ ${PV} == *9999 ]]; then
722 - inherit git-r3
723 - EGIT_REPO_URI="https://github.com/nodejs/node"
724 - SLOT="0"
725 -else
726 - SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
727 - SLOT="0/$(ver_cut 1)"
728 - KEYWORDS="amd64 arm arm64 ppc64 -riscv x86 ~amd64-linux ~x64-macos"
729 - S="${WORKDIR}/node-v${PV}"
730 -fi
731 -
732 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector lto +npm +snapshot +ssl +system-ssl systemtap test"
733 -REQUIRED_USE="
734 - inspector? ( icu ssl )
735 - npm? ( ssl )
736 - system-ssl? ( ssl )
737 -"
738 -
739 -RESTRICT="!test? ( test )"
740 -
741 -RDEPEND="
742 - >=app-arch/brotli-1.0.9:=
743 - >=dev-libs/libuv-1.39.0:=
744 - >=net-dns/c-ares-1.17.2:=
745 - >=net-libs/http-parser-2.9.3:=
746 - >=net-libs/nghttp2-1.40.0:=
747 - sys-libs/zlib
748 - icu? ( >=dev-libs/icu-64.2:= )
749 - system-ssl? (
750 - >=dev-libs/openssl-1.1.1:0=
751 - <dev-libs/openssl-3.0.0_beta1:0=
752 - )
753 -"
754 -BDEPEND="
755 - ${PYTHON_DEPS}
756 - sys-apps/coreutils
757 - virtual/pkgconfig
758 - systemtap? ( dev-util/systemtap )
759 - test? ( net-misc/curl )
760 -"
761 -DEPEND="
762 - ${RDEPEND}
763 -"
764 -PATCHES=(
765 - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
766 - "${FILESDIR}"/${PN}-12.20.1-fix_ppc64_crashes.patch
767 - "${FILESDIR}"/${PN}-12.22.1-jinja_collections_abc.patch
768 - "${FILESDIR}"/${PN}-12.22.1-uvwasi_shared_libuv.patch
769 - "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch
770 - "${FILESDIR}"/${PN}-99999999-llhttp.patch
771 -)
772 -
773 -pkg_pretend() {
774 - (use x86 && ! use cpu_flags_x86_sse2) && \
775 - die "Your CPU doesn't support the required SSE2 instruction."
776 -
777 - if [[ ${MERGE_TYPE} != "binary" ]]; then
778 - if use lto; then
779 - if tc-is-gcc; then
780 - if [[ $(gcc-major-version) -ge 11 ]]; then
781 - # Bug #787158
782 - die "LTO builds of ${PN} using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild"
783 - fi
784 - else
785 - # configure.py will abort on this later if we do not
786 - die "${PN} only supports LTO for gcc"
787 - fi
788 - fi
789 - fi
790 -}
791 -
792 -src_prepare() {
793 - tc-export CC CXX PKG_CONFIG
794 - export V=1
795 - export BUILDTYPE=Release
796 -
797 - # fix compilation on Darwin
798 - # https://code.google.com/p/gyp/issues/detail?id=260
799 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
800 -
801 - # less verbose install output (stating the same as portage, basically)
802 - sed -i -e "/print/d" tools/install.py || die
803 -
804 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
805 - local LIBDIR=$(get_libdir)
806 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
807 - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
808 -
809 - # Avoid writing a depfile, not useful
810 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
811 -
812 - sed -i -e "/'-O3'/d" common.gypi node.gypi || die
813 -
814 - # Known-to-fail test of a deprecated, legacy HTTP parser. Just don't bother.
815 - rm -f test/parallel/test-http-transfer-encoding-smuggling-legacy.js
816 -
817 - # debug builds. change install path, remove optimisations and override buildtype
818 - if use debug; then
819 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
820 - BUILDTYPE=Debug
821 - fi
822 -
823 - default
824 -}
825 -
826 -src_configure() {
827 - xdg_environment_reset
828 -
829 - # LTO compiler flags are handled by configure.py itself
830 - filter-flags '-flto*'
831 -
832 - local myconf=(
833 - --shared-brotli
834 - --shared-cares
835 - --shared-http-parser
836 - --shared-libuv
837 - --shared-nghttp2
838 - --shared-zlib
839 - )
840 - use debug && myconf+=( --debug )
841 - use lto && myconf+=( --enable-lto )
842 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
843 - use inspector || myconf+=( --without-inspector )
844 - use npm || myconf+=( --without-npm )
845 - use snapshot || myconf+=( --without-node-snapshot )
846 - if use ssl; then
847 - use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store )
848 - else
849 - myconf+=( --without-ssl )
850 - fi
851 -
852 - local myarch=""
853 - case ${ABI} in
854 - amd64) myarch="x64";;
855 - arm) myarch="arm";;
856 - arm64) myarch="arm64";;
857 - ppc64) myarch="ppc64";;
858 - x32) myarch="x32";;
859 - x86) myarch="ia32";;
860 - *) myarch="${ABI}";;
861 - esac
862 -
863 - GYP_DEFINES="linux_use_gold_flags=0
864 - linux_use_bundled_binutils=0
865 - linux_use_bundled_gold=0" \
866 - "${EPYTHON}" configure.py \
867 - --prefix="${EPREFIX}"/usr \
868 - --dest-cpu=${myarch} \
869 - $(use_with systemtap dtrace) \
870 - "${myconf[@]}" || die
871 -}
872 -
873 -src_compile() {
874 - emake -C out mksnapshot
875 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
876 - emake -C out
877 -}
878 -
879 -src_install() {
880 - local LIBDIR="${ED}/usr/$(get_libdir)"
881 - default
882 -
883 - pax-mark -m "${ED}"/usr/bin/node
884 -
885 - # set up a symlink structure that node-gyp expects..
886 - dodir /usr/include/node/deps/{v8,uv}
887 - dosym . /usr/include/node/src
888 - for var in deps/{uv,v8}/include; do
889 - dosym ../.. /usr/include/node/${var}
890 - done
891 -
892 - if use doc; then
893 - docinto html
894 - dodoc -r "${S}"/doc/*
895 - fi
896 -
897 - if use npm; then
898 - dodir /etc/npm
899 -
900 - # Install bash completion for `npm`
901 - # We need to temporarily replace default config path since
902 - # npm otherwise tries to write outside of the sandbox
903 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
904 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
905 - local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)"
906 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
907 - newbashcomp "${tmp_npm_completion_file}" npm
908 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
909 -
910 - # Move man pages
911 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
912 -
913 - # Clean up
914 - rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile}
915 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man}
916 -
917 - local find_exp="-or -name"
918 - local find_name=()
919 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
920 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
921 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
922 - find_name+=( ${find_exp} "${match}" )
923 - done
924 -
925 - # Remove various development and/or inappropriate files and
926 - # useless docs of dependend packages.
927 - find "${LIBDIR}"/node_modules \
928 - \( -type d -name examples \) -or \( -type f \( \
929 - -iname "LICEN?E*" \
930 - "${find_name[@]}" \
931 - \) \) -exec rm -rf "{}" \;
932 - fi
933 -
934 - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
935 -}
936 -
937 -src_test() {
938 - if has usersandbox ${FEATURES}; then
939 - rm -f "${S}"/test/parallel/test-fs-mkdir.js
940 - ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \
941 - "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'."
942 - fi
943 -
944 - out/${BUILDTYPE}/cctest || die
945 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
946 -}
947 -
948 -pkg_postinst() {
949 - elog "The global npm config lives in /etc/npm. This deviates slightly"
950 - elog "from upstream which otherwise would have it live in /usr/etc/."
951 - elog ""
952 - elog "Protip: When using node-gyp to install native modules, you can"
953 - elog "avoid having to download extras by doing the following:"
954 - elog "$ node-gyp --nodedir /usr/include/node <command>"
955 -}