summaryrefslogtreecommitdiff
path: root/net-libs/nodejs
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest9
-rw-r--r--net-libs/nodejs/files/nodejs-fix-incomplete-type.patch44
-rw-r--r--net-libs/nodejs/nodejs-16.20.0.ebuild234
-rw-r--r--net-libs/nodejs/nodejs-18.16.0.ebuild256
-rw-r--r--net-libs/nodejs/nodejs-20.6.0.ebuild (renamed from net-libs/nodejs/nodejs-20.2.0.ebuild)22
5 files changed, 19 insertions, 546 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index f92feb2a7c8b..75f7fb39b980 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -1,18 +1,13 @@
AUX nodejs-16.4.2-paxmarking.patch 4257 BLAKE2B c088deb4f9207d0cfbc43d71111230ec23a30c6fc86df67ab9bf17b3ca6de276e4d84980b58855bb94f0caa865fa5ab9af19fa4db72b7edb9394798b739fa939 SHA512 a96de4f57589db222eb493fcdcddbd67e051728165cdabde675aeb3bbdce857f13a9708b7495acc64cd88f7fa3994d89ade006a1292895b2299ef6b5162ec6a3
AUX nodejs-18.16.0-paxmarking.patch 3470 BLAKE2B 4de01a4b3267d24c7c899a9caf8dae3975a8ed4a82cfe4df2ffc6858a3e1153bd6801ec5f5dc17ab5984ffa2d3b5ec9651c80e6993bd20c14865b0d873f58547 SHA512 5f49c1ca953421b3aa07e0b93375e99c9e5f543b48df3cff833f5e55f7e1b511971c56ed250e36c8a7465229db135a8d2bd1319f2d09368788f6152f06ced4f9
AUX nodejs-20.3.0-gcc14.patch 1119 BLAKE2B 6be4d981ce94f618aa4a07766e8fa1c99e3825cee7374cae5c76264c961083604ce408a7847de54ae6c72d36c6b0cbe34921e69a800ebebc5553cdaead2cbaa5 SHA512 8137b7ac6b5920c7f16b6409923092f3eb3c4f81887035e1840ae61deb61090d88d6184c36db4bcf7249fa6d7a21687788616b2aee51cb6bdc08cb78ed656e5d
-AUX nodejs-fix-incomplete-type.patch 1895 BLAKE2B 30b548caee43f47dd25d35b789257b6355cf9ef4adde15c533fc6ea23650cd44d5dd555474248e39a8e6f782215847ec42595710349875c0817f60eae026873e SHA512 e97479bd7a3f6d3557609e5db2eab1f426a64fcc0ac1c3b204a93a0dd86ec4764040079e2dc14f84c9e69fdc2e18af2f9fe6e0c008d381eae9ce2da6616a25ba
-DIST node-v16.20.0.tar.xz 35546884 BLAKE2B 5bdb1fb7365e07f13d0a58a8d052d11efaadcf1b0792af0517b78b1ecf01e50eabe26e31588ae410ee63b7494a4eb9d23f70d4dd157a452d0bbf8bd548865255 SHA512 b155acdff0244307afcc334844f113b5c321f7764ebb69326d60a6a79d0e0d38d55257a38b815f5933aa4071e6a788e01c466476ef012cec648c84d74adda406
DIST node-v16.20.2.tar.xz 36834468 BLAKE2B 88bd0d91a6b69f7e5fba2b087684b07b8986fd1492f51f6fdccc02f043970303808c0cc1eeda29670aacddd4234ec3181752c916fefee060624b0462dff8cbcf SHA512 c7953630b7d0eb832ab5a4b839c07e6505cf5f4e37853f59cd0ffc6b8742ac2ecaba20bfb47d8995ef88f3c7005bb456c1eb70cb2fc6b6fc506e1d8b81f25cb4
-DIST node-v18.16.0.tar.xz 40467860 BLAKE2B b16749c0212f3aa196ec9fc0f999a023adeb9031b3332939330ba5a3edb5bc2ed6dc21bf861509696e19ed0cc5d5c54bb882018f0e54eb1ad8e9b0ba3bb64bff SHA512 608ce5db97ce2d851f381c7991f635c5e0927ae79037649b482c7e197479341b7c6560644e25f4d65ece8aa80c5763a0e044349a5be210fa33fbbf97a96462bd
DIST node-v18.17.1.tar.xz 40788836 BLAKE2B 50e0dc0eecd68620ffa7457319e71124bbba302f6acff79286a30cf97442fb09a96cf8781456bafd5c2e497ba88cf392c141f0e221683da421b87f653b1ad7ca SHA512 fd6f586447ecd44ac6738da1cf7d54e74bd33ffd1ee1acc2e0e1bdaf0031bcaef85751d3dd590bb278eb502daf9c77f0763b5a181a30ee4cf537aef254629622
-DIST node-v20.2.0.tar.xz 41778040 BLAKE2B 362b0ee89fe822722caeeb4b918550637bfb10791de75d872da334cb1123b744c351b5822b05abf4d36a0449badc5232ab1d73896dd5ce7755d10b226f0b9f52 SHA512 bf780e79bf6c7f766beb7734c7af45edc62094aba4c608f5519b130ff263e52ece925f85a4ee5740e962d16020070ef00933f6c74e771d948f23525c223da48e
DIST node-v20.5.1.tar.xz 41532256 BLAKE2B b26fbe8be7e3330b69ae0f630cabba7dee7879ae829c2c743491d26d9623c3170de85e4e7c0629993257935841978343c1ded2870ece24365784581c8be0143b SHA512 2828930bf2df0769ec7116fc6b89c7069294426b937ce38543426e0108a8c953301c523eb03419e35a993773895d74b28838bec96ffc01ab0e138a4b2a52737d
-EBUILD nodejs-16.20.0.ebuild 6517 BLAKE2B 252a45b8565c15b6ecb42c96e40fb54bf31d64673e11f1042fdc28f2672aad4fbc626389b0fc39bc0800154db3e6e00dea1d8827e6495ea97dd0bbe3e5755647 SHA512 d1ff9e94d0abf6a2eabbc8a7e0f09b29195cb0dd8941eec42f7ba36f7da25616cebb13786972c5a00a1c19329c17cf488a1c125702dafc1550d426b415a9105f
+DIST node-v20.6.0.tar.xz 41787960 BLAKE2B 05b91c9c8aca238a46d5c3bacb123886812b8856f26153d4590df8a17738691f25344d0f48273f7b510908579217dba057c19f1d06cd9a75c0a2cfc24a1b2adc SHA512 2d50407e55008fba82a8568287c77c690b43953bc9068a22714e8c19809e5130b15b01770c6aabfa6269ab1b58c2f1fde3c58822cabe2cae4b5067e27e38f204
EBUILD nodejs-16.20.2.ebuild 6492 BLAKE2B dfe025a55b69ff058e890fd743d968ea298aac98d29dca26da6335b1344e9b3ce151e28508adf7c9fd00b41a531a76baf5f57ec77bba7e902dc1eaa5d4dcb687 SHA512 62c711f68491f98976f00640ff21d5afbfc8de64a32d4f760674f309621816ccb3c3dabca3e23862a643bd682c278e1fd1f0fa2fd4ecc32e55575ce87bc91d56
-EBUILD nodejs-18.16.0.ebuild 7328 BLAKE2B 991dce66c991b452fd3e207bcf5dcf9116b2a7f421d4a117d366d78e902670dd235329f4f6de4a4edda7545b37e053ee1e6338ae96b1dfe794d85ca13005b466 SHA512 51e67374a5c2ecf2b89e071736badccc04d396ecb5e1d7e52d271eb152139d2dd0c73ecf76e6de75fe8acaae39eb3daf16ff85aa33806d70459ba22089984dea
EBUILD nodejs-18.17.1.ebuild 7464 BLAKE2B e43f7c5e5a74460dfe517e443eda9349aeb1aa17fc4db719ef1f68d2d6b560f9fa33f06a7900d918db5912475c47192380d2ec6d0437e1583c0fab2c105b96b9 SHA512 9af59096060b0291aea6fb97d7c87e961e2e1315e5345503c629518d35335db6f5d15ba25f0d0af6f47074cfb72d7ec8a59b1a6fbf042ccbd0d4cd6ec98ef66d
-EBUILD nodejs-20.2.0.ebuild 7138 BLAKE2B d7de0fce607c8b2118d52c06a9cb106095268ae6befbb472eceb12348efa84f0b5b5a3ff37756ef8f4e1151cc985ca716efa030746a94d710bf0a55d4b31a054 SHA512 40f9e0e5a8d04f91c7357a8c4497978ccc3c0c4cd77973a8350840e418ca1b4d644a5c19732c0b773e14ae9002ccbd043ac9cf88e5010f439be63edffe2a69dd
EBUILD nodejs-20.5.1.ebuild 7442 BLAKE2B 74548b5481ca33fe976e63a1436b395114875bca3d37c5f64b9aa7a8cbb86c45abe96cf17518a41e517ec12d840db7ef91b30aac7a9cce5451a5c3c0bfd6d173 SHA512 46a4771c4ec467884a2e1abd3f1ef864259cde863547ce73dfa98239a28495583b523958f183ac8cafaf56035e1263cff4dfb3eefb0c254478ec9c19ba4b8152
+EBUILD nodejs-20.6.0.ebuild 7486 BLAKE2B 6ea11def13407f00e99a182f094ae14faff86fe3bb3e6683add7479da017732bd0ab32de91762360a6cb9d911d8f4aef541ade41e42be07a39430fa07a24ca52 SHA512 da4374b8e9263b0693423359add241663842825c5b0820d7fe842d2fcf658b3df5f4987e615bbea64c59ea7c52b83f305c77486353e80c2e884385a4d0fba229
EBUILD nodejs-99999999.ebuild 7391 BLAKE2B 9036b0461f447aee6e75723085bae591264f0bb20aa33480398b5f17458912e2a8f75a6c76c3761879e216e437a0cb2c9eda8aeb84c3f65fd0c1ce590cc6c7b5 SHA512 ea53f8f425b2ea902d6e1b2e24ce9eaab9b290e672d432241a22dbd7ca23c8357e5f9cb438da16f5aa3cb6d9cb0cf7e1af426e1c733f0631b560e0b758d21ded
MISC metadata.xml 986 BLAKE2B 67133c97db85eced638323a93514e084da381b7cbebcab2f0f2ce2781cf0da02be705ab5781c18205a8d4e8b679b6f77f3c9e97ea6ef72b36b6a8a854a39617d SHA512 3f749720ea0623fefa703f8b4563ebabfd5e4aeff4f2e8998576860177d3b1a075afaabc2aa0dc5100df59b3cb787d70d44284976bad3409966b68c11ec64d7a
diff --git a/net-libs/nodejs/files/nodejs-fix-incomplete-type.patch b/net-libs/nodejs/files/nodejs-fix-incomplete-type.patch
deleted file mode 100644
index e204421597d0..000000000000
--- a/net-libs/nodejs/files/nodejs-fix-incomplete-type.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 0164c09d4025df2bd1a42f14de29166aa0e7ac7a Mon Sep 17 00:00:00 2001
-From: Richard Lau <rlau@redhat.com>
-Date: Wed, 26 Apr 2023 15:46:00 -0400
-Subject: [PATCH] deps: V8: cherry-pick c5ab3e4f0c5a
-
-Original commit message:
-
- libstdc++: fix incomplete type in v8::internal::is_subtype<T, U>
-
- Using std::convertible with incomplete types is UB. However, till
- GCC 12 it was accepted and std::convertible returned false.
- This fails now for e.g. v8::internal::WasmArray. Use
- std::disjunction and std::conjunction instead which are short-
- circuiting, because std::is_base_of<T, T> is already true.
-
- Bug: chromium:957519
- Change-Id: Ia26643dbdf0fb00d5586c71ae6b18e8d0f3cf96e
- Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4394663
- Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
- Reviewed-by: Clemens Backes <clemensb@chromium.org>
- Cr-Commit-Position: refs/heads/main@{#86904}
-
-Refs: https://github.com/v8/v8/commit/c5ab3e4f0c5a3ce880941184ef8447c27cd19a93
----
- common.gypi | 2 +-
- deps/v8/src/codegen/tnode.h | 5 +++--
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/deps/v8/src/codegen/tnode.h b/deps/v8/src/codegen/tnode.h
-index cd7bd8db98c24..7629e89ad693f 100644
---- a/deps/v8/src/codegen/tnode.h
-+++ b/deps/v8/src/codegen/tnode.h
-@@ -269,8 +269,9 @@ using BuiltinPtr = Smi;
- template <class T, class U>
- struct is_subtype {
- static const bool value =
-- std::is_base_of<U, T>::value || (std::is_same<U, MaybeObject>::value &&
-- std::is_convertible<T, Object>::value);
-+ std::disjunction<std::is_base_of<U, T>,
-+ std::conjunction<std::is_same<U, MaybeObject>,
-+ std::is_convertible<T, Object>>>::value;
- };
- template <class T1, class T2, class U>
- struct is_subtype<UnionT<T1, T2>, U> {
diff --git a/net-libs/nodejs/nodejs-16.20.0.ebuild b/net-libs/nodejs/nodejs-16.20.0.ebuild
deleted file mode 100644
index dd5275035cb6..000000000000
--- a/net-libs/nodejs/nodejs-16.20.0.ebuild
+++ /dev/null
@@ -1,234 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CONFIG_CHECK="~ADVISE_SYSCALLS"
-PYTHON_COMPAT=( python3_{9..10} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit bash-completion-r1 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/"
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/nodejs/node"
- SLOT="0"
-else
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
- SLOT="0/$(ver_cut 1)"
- KEYWORDS="amd64 arm arm64 ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
- S="${WORKDIR}/node-v${PV}"
-fi
-
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test"
-REQUIRED_USE="inspector? ( icu ssl )
- npm? ( ssl )
- system-icu? ( icu )
- system-ssl? ( ssl )"
-
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=app-arch/brotli-1.0.9:=
- >=dev-libs/libuv-1.40.0:=
- >=net-dns/c-ares-1.18.1:=
- >=net-libs/nghttp2-1.41.0:=
- sys-libs/zlib
- system-icu? ( >=dev-libs/icu-67:= )
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
- sys-devel/gcc:*"
-BDEPEND="${PYTHON_DEPS}
- sys-apps/coreutils
- virtual/pkgconfig
- systemtap? ( dev-util/systemtap )
- test? ( net-misc/curl )
- pax-kernel? ( sys-apps/elfix )"
-DEPEND="${RDEPEND}"
-
-pkg_pretend() {
- (use x86 && ! use cpu_flags_x86_sse2) && \
- die "Your CPU doesn't support the required SSE2 instruction."
-}
-
-pkg_setup() {
- python-any-r1_pkg_setup
- linux-info_pkg_setup
-}
-
-src_prepare() {
- tc-export AR CC CXX PKG_CONFIG
- export V=1
- export BUILDTYPE=Release
-
- # fix compilation on Darwin
- # https://code.google.com/p/gyp/issues/detail?id=260
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
-
- # less verbose install output (stating the same as portage, basically)
- sed -i -e "/print/d" tools/install.py || die
-
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
- local LIBDIR=$(get_libdir)
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
-
- # Avoid writing a depfile, not useful
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
-
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die
-
- # debug builds. change install path, remove optimisations and override buildtype
- if use debug; then
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
- BUILDTYPE=Debug
- fi
-
- # We need to disable mprotect on two files when it builds Bug 694100.
- use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-16.4.2-paxmarking.patch )
-
- default
-}
-
-src_configure() {
- xdg_environment_reset
-
- # LTO compiler flags are handled by configure.py itself
- filter-lto
- # nodejs unconditionally links to libatomic #869992
- # specifically it requires __atomic_is_lock_free which
- # is not yet implemented by sys-libs/compiler-rt (see
- # https://reviews.llvm.org/D85044?id=287068), therefore
- # we depend on gcc and force using libgcc as the support lib
- tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc"
-
- local myconf=(
- --shared-brotli
- --shared-cares
- --shared-libuv
- --shared-nghttp2
- --shared-zlib
- )
- use debug && myconf+=( --debug )
- use lto && myconf+=( --enable-lto )
- if use system-icu; then
- myconf+=( --with-intl=system-icu )
- elif use icu; then
- myconf+=( --with-intl=full-icu )
- else
- myconf+=( --with-intl=none )
- fi
- use inspector || myconf+=( --without-inspector )
- use npm || myconf+=( --without-npm )
- use snapshot || myconf+=( --without-node-snapshot )
- if use ssl; then
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store )
- else
- myconf+=( --without-ssl )
- fi
-
- local myarch=""
- case ${ABI} in
- amd64) myarch="x64";;
- arm) myarch="arm";;
- arm64) myarch="arm64";;
- lp64*) myarch="riscv64";;
- ppc64) myarch="ppc64";;
- x32) myarch="x32";;
- x86) myarch="ia32";;
- *) myarch="${ABI}";;
- esac
-
- GYP_DEFINES="linux_use_gold_flags=0
- linux_use_bundled_binutils=0
- linux_use_bundled_gold=0" \
- "${EPYTHON}" configure.py \
- --prefix="${EPREFIX}"/usr \
- --dest-cpu=${myarch} \
- $(use_with systemtap dtrace) \
- "${myconf[@]}" || die
-}
-
-src_compile() {
- emake -C out
-}
-
-src_install() {
- local LIBDIR="${ED}/usr/$(get_libdir)"
- default
-
- pax-mark -m "${ED}"/usr/bin/node
-
- # set up a symlink structure that node-gyp expects..
- dodir /usr/include/node/deps/{v8,uv}
- dosym . /usr/include/node/src
- for var in deps/{uv,v8}/include; do
- dosym ../.. /usr/include/node/${var}
- done
-
- if use doc; then
- docinto html
- dodoc -r "${S}"/doc/*
- fi
-
- if use npm; then
- keepdir /etc/npm
- echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm
- doenvd "${T}"/50npm
-
- # Install bash completion for `npm`
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)"
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
- newbashcomp "${tmp_npm_completion_file}" npm
-
- # Move man pages
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
-
- # Clean up
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile}
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man}
-
- local find_exp="-or -name"
- local find_name=()
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
- "*.md" "*.markdown" "*.bat" "*.cmd"; do
- find_name+=( ${find_exp} "${match}" )
- done
-
- # Remove various development and/or inappropriate files and
- # useless docs of dependend packages.
- find "${LIBDIR}"/node_modules \
- \( -type d -name examples \) -or \( -type f \( \
- -iname "LICEN?E*" \
- "${find_name[@]}" \
- \) \) -exec rm -rf "{}" \;
- fi
-
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
-}
-
-src_test() {
- local drop_tests=(
- test/parallel/test-dns-setserver-when-querying.js
- test/parallel/test-fs-mkdir.js
- test/parallel/test-fs-utimes-y2K38.js
- test/parallel/test-release-npm.js
- test/parallel/test-socket-write-after-fin-error.js
- test/parallel/test-strace-openat-openssl.js
- test/sequential/test-util-debug.js
- )
- rm "${drop_tests[@]}" || die "disabling tests failed"
-
- out/${BUILDTYPE}/cctest || die
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
-}
-
-pkg_postinst() {
- if use npm; then
- ewarn "remember to run: source /etc/profile if you plan to use nodejs"
- ewarn " in your current shell"
- fi
-}
diff --git a/net-libs/nodejs/nodejs-18.16.0.ebuild b/net-libs/nodejs/nodejs-18.16.0.ebuild
deleted file mode 100644
index c5e3710c3393..000000000000
--- a/net-libs/nodejs/nodejs-18.16.0.ebuild
+++ /dev/null
@@ -1,256 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-CONFIG_CHECK="~ADVISE_SYSCALLS"
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE="threads(+)"
-
-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/"
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/nodejs/node"
- SLOT="0"
-else
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
- SLOT="0/$(ver_cut 1)"
- KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
- S="${WORKDIR}/node-v${PV}"
-fi
-
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test"
-REQUIRED_USE="inspector? ( icu ssl )
- npm? ( ssl )
- system-icu? ( icu )
- system-ssl? ( ssl )"
-
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=app-arch/brotli-1.0.9:=
- >=dev-libs/libuv-1.44.0:=
- >=net-dns/c-ares-1.18.1:=
- >=net-libs/nghttp2-1.41.0:=
- sys-libs/zlib
- system-icu? ( >=dev-libs/icu-67:= )
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
- sys-devel/gcc:*"
-BDEPEND="${PYTHON_DEPS}
- sys-apps/coreutils
- virtual/pkgconfig
- systemtap? ( dev-util/systemtap )
- test? ( net-misc/curl )
- pax-kernel? ( sys-apps/elfix )"
-DEPEND="${RDEPEND}"
-
-# 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"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-fix-incomplete-type.patch
-)
-
-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() {
- python-any-r1_pkg_setup
- linux-info_pkg_setup
-}
-
-src_prepare() {
- tc-export AR CC CXX PKG_CONFIG
- export V=1
- export BUILDTYPE=Release
-
- # fix compilation on Darwin
- # https://code.google.com/p/gyp/issues/detail?id=260
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
-
- # less verbose install output (stating the same as portage, basically)
- sed -i -e "/print/d" tools/install.py || die
-
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
- local LIBDIR=$(get_libdir)
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
-
- # Avoid writing a depfile, not useful
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
-
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die
-
- # debug builds. change install path, remove optimisations and override buildtype
- if use debug; then
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
- BUILDTYPE=Debug
- fi
-
- # We need to disable mprotect on two files when it builds Bug 694100.
- use pax-kernel && PATCHES+=( "${FILESDIR}"/${P}-paxmarking.patch )
-
- default
-}
-
-src_configure() {
- xdg_environment_reset
-
- # LTO compiler flags are handled by configure.py itself
- filter-lto
- # nodejs unconditionally links to libatomic #869992
- # specifically it requires __atomic_is_lock_free which
- # is not yet implemented by sys-libs/compiler-rt (see
- # https://reviews.llvm.org/D85044?id=287068), therefore
- # we depend on gcc and force using libgcc as the support lib
- tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc"
-
- local myconf=(
- --shared-brotli
- --shared-cares
- --shared-libuv
- --shared-nghttp2
- --shared-zlib
- )
- use debug && myconf+=( --debug )
- use lto && myconf+=( --enable-lto )
- if use system-icu; then
- myconf+=( --with-intl=system-icu )
- elif use icu; then
- myconf+=( --with-intl=full-icu )
- else
- myconf+=( --with-intl=none )
- fi
- use inspector || myconf+=( --without-inspector )
- use npm || myconf+=( --without-npm )
- use snapshot || myconf+=( --without-node-snapshot )
- if use ssl; then
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store )
- else
- myconf+=( --without-ssl )
- fi
-
- local myarch=""
- case "${ARCH}:${ABI}" in
- *:amd64) myarch="x64";;
- *:arm) myarch="arm";;
- *:arm64) myarch="arm64";;
- loong:lp64*) myarch="loong64";;
- riscv:lp64*) myarch="riscv64";;
- *:ppc64) myarch="ppc64";;
- *:x32) myarch="x32";;
- *:x86) myarch="ia32";;
- *) myarch="${ABI}";;
- esac
-
- GYP_DEFINES="linux_use_gold_flags=0
- linux_use_bundled_binutils=0
- linux_use_bundled_gold=0" \
- "${EPYTHON}" configure.py \
- --prefix="${EPREFIX}"/usr \
- --dest-cpu=${myarch} \
- $(use_with systemtap dtrace) \
- "${myconf[@]}" || die
-}
-
-src_compile() {
- emake -C out
-}
-
-src_install() {
- local LIBDIR="${ED}/usr/$(get_libdir)"
- default
-
- pax-mark -m "${ED}"/usr/bin/node
-
- # set up a symlink structure that node-gyp expects..
- dodir /usr/include/node/deps/{v8,uv}
- dosym . /usr/include/node/src
- for var in deps/{uv,v8}/include; do
- dosym ../.. /usr/include/node/${var}
- done
-
- if use doc; then
- docinto html
- dodoc -r "${S}"/doc/*
- fi
-
- if use npm; then
- keepdir /etc/npm
- echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm
- doenvd "${T}"/50npm
-
- # Install bash completion for `npm`
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)"
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
- newbashcomp "${tmp_npm_completion_file}" npm
-
- # Move man pages
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
-
- # Clean up
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile}
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man}
-
- local find_exp="-or -name"
- local find_name=()
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
- "*.md" "*.markdown" "*.bat" "*.cmd"; do
- find_name+=( ${find_exp} "${match}" )
- done
-
- # Remove various development and/or inappropriate files and
- # useless docs of dependend packages.
- find "${LIBDIR}"/node_modules \
- \( -type d -name examples \) -or \( -type f \( \
- -iname "LICEN?E*" \
- "${find_name[@]}" \
- \) \) -exec rm -rf "{}" \;
- fi
-
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
-}
-
-src_test() {
- local drop_tests=(
- test/parallel/test-dns-setserver-when-querying.js
- test/parallel/test-fs-mkdir.js
- test/parallel/test-fs-utimes-y2K38.js
- test/parallel/test-release-npm.js
- test/parallel/test-socket-write-after-fin-error.js
- test/parallel/test-strace-openat-openssl.js
- test/sequential/test-util-debug.js
- )
- rm "${drop_tests[@]}" || die "disabling tests failed"
-
- out/${BUILDTYPE}/cctest || die
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
-}
-
-pkg_postinst() {
- if use npm; then
- ewarn "remember to run: source /etc/profile if you plan to use nodejs"
- ewarn " in your current shell"
- fi
-}
diff --git a/net-libs/nodejs/nodejs-20.2.0.ebuild b/net-libs/nodejs/nodejs-20.6.0.ebuild
index 6819486552a0..a70dfde5f996 100644
--- a/net-libs/nodejs/nodejs-20.2.0.ebuild
+++ b/net-libs/nodejs/nodejs-20.6.0.ebuild
@@ -20,12 +20,13 @@ if [[ ${PV} == *9999 ]]; then
else
SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
SLOT="0/$(ver_cut 1)"
- KEYWORDS="amd64 arm arm64 ~loong ~ppc64 ~riscv x86 ~amd64-linux ~x64-macos"
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos"
S="${WORKDIR}/node-v${PV}"
fi
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test"
-REQUIRED_USE="inspector? ( icu ssl )
+IUSE="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl test"
+REQUIRED_USE="corepack? ( !npm )
+ inspector? ( icu ssl )
npm? ( ssl )
system-icu? ( icu )
system-ssl? ( ssl )
@@ -38,6 +39,7 @@ RDEPEND=">=app-arch/brotli-1.0.9:=
>=net-dns/c-ares-1.18.1:=
>=net-libs/nghttp2-1.41.0:=
sys-libs/zlib
+ corepack? ( !sys-apps/yarn )
system-icu? ( >=dev-libs/icu-67:= )
system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
sys-devel/gcc:*"
@@ -59,6 +61,10 @@ DEPEND="${RDEPEND}"
CHECKREQS_MEMORY="8G"
CHECKREQS_DISK_BUILD="22G"
+PATCHES=(
+ "${FILESDIR}"/"${PN}"-20.3.0-gcc14.patch
+ )
+
pkg_pretend() {
if [[ ${MERGE_TYPE} != "binary" ]]; then
if is-flagq "-g*" && ! is-flagq "-g*0" ; then
@@ -120,7 +126,7 @@ src_configure() {
tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc"
local myconf=(
- --ninja
+ --ninja
--shared-brotli
--shared-cares
--shared-libuv
@@ -136,6 +142,7 @@ src_configure() {
else
myconf+=( --with-intl=none )
fi
+ use corepack || myconf+=( --without-corepack )
use inspector || myconf+=( --without-inspector )
use npm || myconf+=( --without-npm )
use snapshot || myconf+=( --without-node-snapshot )
@@ -223,20 +230,25 @@ src_install() {
\) \) -exec rm -rf "{}" \;
fi
+ use corepack &&
+ "${D}"/usr/bin/corepack enable --install-directory "${D}"/usr/bin
+
mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
}
src_test() {
local drop_tests=(
+ test/parallel/test-fs-read-stream.js
test/parallel/test-dns-setserver-when-querying.js
test/parallel/test-fs-mkdir.js
test/parallel/test-fs-utimes-y2K38.js
+ test/parallel/test-fs-watch-recursive-add-file.js
test/parallel/test-release-npm.js
test/parallel/test-socket-write-after-fin-error.js
test/parallel/test-strace-openat-openssl.js
test/sequential/test-util-debug.js
)
- rm "${drop_tests[@]}" || die "disabling tests failed"
+ rm -f "${drop_tests[@]}" || die "disabling tests failed"
out/${BUILDTYPE}/cctest || die
"${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die