summaryrefslogtreecommitdiff
path: root/net-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-13 23:50:08 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-13 23:50:08 +0000
commitea8740cede74808fe1546789e18738612217bb97 (patch)
tree50a16d926ab0d05dd840e745118ff229fcaf0b78 /net-libs
parent06bb974d894b86598af155dc76a6fbd76c4fa30c (diff)
gentoo auto-resync : 13:01:2023 - 23:50:08
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/Manifest.gzbin32760 -> 32759 bytes
-rw-r--r--net-libs/http-parser/Manifest2
-rw-r--r--net-libs/http-parser/http-parser-2.9.4-r2.ebuild4
-rw-r--r--net-libs/nodejs/Manifest6
-rw-r--r--net-libs/nodejs/nodejs-14.21.2.ebuild241
-rw-r--r--net-libs/nodejs/nodejs-16.19.0.ebuild233
-rw-r--r--net-libs/nodejs/nodejs-18.13.0.ebuild250
7 files changed, 733 insertions, 3 deletions
diff --git a/net-libs/Manifest.gz b/net-libs/Manifest.gz
index 2fcc6802448f..946e2aeb2eee 100644
--- a/net-libs/Manifest.gz
+++ b/net-libs/Manifest.gz
Binary files differ
diff --git a/net-libs/http-parser/Manifest b/net-libs/http-parser/Manifest
index c92c6271a33b..a4305708ab9c 100644
--- a/net-libs/http-parser/Manifest
+++ b/net-libs/http-parser/Manifest
@@ -1,4 +1,4 @@
AUX http-parser-2.9.4-non-x86-test.patch 645 BLAKE2B c96cb4bbdd4560b738012b0c6a4e527a5d7b1e7253ec69ee65710b2afcd4162680b6835c20144e5baeed8e9dce253a60dbb240943adad91ec5b642cd981e7538 SHA512 4bd68020912ed43e07f2abaf7425e57ab855a3d04086a4b06d3bdb8fb4a30887a6094d0aebbf2fcd67757eda7c9dc2ae0a1c4e9cbcd2242f50fc4f0b38b764c0
DIST http-parser-2.9.4.tar.gz 52056 BLAKE2B 988ebc3f3e1a7d53ed4147dac2e09c4d6021bb1a287990d83130c24e9fee01a3123b4c5ad9e1b86c0f123248484dae272010aa1f3ebd3bd4574d8407ede94e62 SHA512 b45df7b94d1c51079d44687d0a7f901f44faae51df4e84c7e3fe38f130c2d809d0e7c2a146c57b3723e60732aededc246bf44eadb10a95b710963d641f9fe7cd
-EBUILD http-parser-2.9.4-r2.ebuild 1022 BLAKE2B 3ba7f1289e5eba0e8e41c30a92c843db519fd17e815e3af361aae347b4c3bd310e0fb98c1f4efd9bf643501804daeabb8ba5f9234e2adf82e42ea67d59c80169 SHA512 06d3ff9870ef20115f12a95c4c96913b910668f0ff3a4b9a45507c3d222cc0d3c0b20a14d93a712281ba21dafc84a72b634052a50ee4d0fd80422d7629e26397
+EBUILD http-parser-2.9.4-r2.ebuild 1021 BLAKE2B 68fa0890286a52530eff5e641bf66a472452ec8c4aa6d9d7ce9cd646849c76fe38fb2ed1f562a0c60be6bb8066ae167166571321f3cb6dd5893c98019a81a2bc SHA512 1dd5ce983433ff171b6dc4f019014bbfb46981459caf632a487d15f8f3704d0a47affce2a0132448fdd6ebbfe74863f0eb11cb890cafe25313cf67abd6a05d77
MISC metadata.xml 331 BLAKE2B d6e20b95ae54b8219010abf671695481ae680496170f863526517cbc5dadc226f62c1c9f4df6bc914007c564d8e7e4086854bcc1733219a1839e055d8888528e SHA512 0dcc220dc9e1e3a5ecfc773575b67c94808ce2dd7c573d4f102828b7ecf7f1f209b93a25ed0e0637904342f76d4c036584ccbab1c716d25be1e37fae5ffabf47
diff --git a/net-libs/http-parser/http-parser-2.9.4-r2.ebuild b/net-libs/http-parser/http-parser-2.9.4-r2.ebuild
index 491bceedc504..d979a9c69415 100644
--- a/net-libs/http-parser/http-parser-2.9.4-r2.ebuild
+++ b/net-libs/http-parser/http-parser-2.9.4-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -13,7 +13,7 @@ LICENSE="MIT"
# 2.9.4 restored ABI compatibility with 2.9.0 but since we failed
# to set subslot in 2.9.3, we want to provoke another rebuild
SLOT="0/2.9.4"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x64-macos ~x64-solaris"
PATCHES=(
"${FILESDIR}"/${P}-non-x86-test.patch
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 671439fa1672..f4e86fe1bc05 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -7,10 +7,16 @@ AUX nodejs-16.4.2-paxmarking.patch 4257 BLAKE2B c088deb4f9207d0cfbc43d71111230ec
AUX nodejs-18.3.0-paxmarking.patch 3303 BLAKE2B 627ef3dac873d7967181cbe44b3566080b98bbc08ff7d75dfcf0cbded2e71e8af2ec6ccf2386b4d67ee20f612a49b03d2d81d50c845a5e5447194d94146ae035 SHA512 59be93e86373993fcd5235b7b6fa9fe85df3e2bdd9e61e2374cedccf69a6a36263bf1ce10f3294fdb9bf04a85a6f0dba209d4d7f9dc24b52af83bce48f51b22c
AUX nodejs-gcc-13.patch 841 BLAKE2B 86150b503987c2c84acfc2967883cd81109cb3117eb8d647c8682cad7ba04e2248b1465acdb188f083bc246e165be336c153ff850236fccf6de8d04115a3577b SHA512 2d8f6c132c2e7a9c9acbf46ad4f7687c3bc0d1382b1966eaf9a4bd30d5eb0e6513c2fe32c73e9ed2bc8ae4cf3ebfcca29251b71e4589df0f898e11f1242fd936
DIST node-v14.21.1.tar.xz 34663612 BLAKE2B 9ae2034c56e8a4fe47c8a234c5d16a410e7e8a8df966d580451a04f51da697ab8691a211f9f5fcb8b4ae34d2b5e974216f9dbb10dd19c42e2cb9110c31ad58f5 SHA512 3c9247ee71b8deb0672ecebb68d4f330424598333f38ad8f8a19f251140815d4c2a288b0dc6fa227e93944ea6430934bd7419b1a7119d927ed9e85ff09bd335b
+DIST node-v14.21.2.tar.xz 34706392 BLAKE2B a7a8c8a0627b8b08bc3fcd1a24826ab633e86f620b7c7ecd0e241c2c2cff9be56bde113af8a24ae0b36411e58aae91b7af0c94f20be2dcfcb75f2443d17ac8ce SHA512 ffd681a1b5ffc20b7738b6575ddd8ca23c6ae696f7b2159f735e032cc92ecfde36410f0965baac6b19e6c0c187b136831200b428681c3dc40806d443769e020e
DIST node-v16.18.1.tar.xz 35843876 BLAKE2B f57bc1122207e846b9490960d648f412d72e6d414d7cf4459a90a7b3aa018aca405a43773344284748a5d68d3f29c4d579be3eb8053569a167fef48bd4d43f64 SHA512 3f05104f61ce8d18d11cc6964a4f8ed165cd5502127b8a0191c1e5609921886c38f48a842519f898c36b18a4a38c13a1e93bafe27c101fd89bdc61f283e7a452
+DIST node-v16.19.0.tar.xz 35897484 BLAKE2B 44069405b9cca3f9e6c0198383ea01692cf38b7e1401cce1f8d289427e6d50c10204f09e6ff35db8d62c5f74585a08658223e0c1dea15bceb3ddbc309e09d05a SHA512 cbc70067a7aefb6b8d2e238c9611fa901ddee8e9ffc3e6becddec4b156cc52da6e172b33e797265858cacbd014e0e1f0c93bd7c412a7afb436731b3fecd384a3
DIST node-v18.12.1.tar.xz 38454588 BLAKE2B dade180304ebe2bf30fc3270a13b8e024dd48a6dda26be7f730925500f997a9c703608b782eb40a16ed174699af256430434759678ae683b92f4fb4ba48b4707 SHA512 1eb4978a1de19c026561a8484df87bdeb6f7f2ec8ae1eb38b6241d0b0ff6158a4a7d19f42df7e295a63b8047eaf862a7470494143b2e27bb36b65e4663966588
+DIST node-v18.13.0.tar.xz 40324048 BLAKE2B 643a96edf5ee02e29b213d216d73b3d5f3175b70a776f9efb7146ec05c3c137397b498ba7ac6cbf3e2205e6b6fd08d8ead4f4940ddeaa23f288d3f69459874b8 SHA512 d32c8e333d8ee7ba24c9420c943a0e57f5a48e734ce7ced210a2977fc274db133bb01ba4f604cc06271357675fde0b6e9b5cd208de4d5202b08e722e9f32e20d
EBUILD nodejs-14.21.1.ebuild 7148 BLAKE2B b361effbe5645588daffc199e0e67a1ae2de09c8ff36aae5e7c68bcedd154b1ba2feb7bb9f3b9ab276f73254d0004caf644b5928ea55a86802c3a8b5cc3d0c1a SHA512 3151d756b43f2efa91b13a9b7eaa2dc5a714ada13137b90a209cab8ae64b4da954dab598f17c4fa8e1f76824c3a85904f28b95601680c98a0f6e5bdf3c3e1e63
+EBUILD nodejs-14.21.2.ebuild 7153 BLAKE2B 189cb397bf5af112ea4061017009b4df261dd9347a1fa0838b589bcec468f52e14c53aae91f811efdb480e769d27895e2700dffd7b2909ea9ef44de08d8856df SHA512 b4b601d9ad32548b5be10e8e1d271c1eea6bc4364848dbe8f67b160d9db19984e260e6b735e6bd441e9a95406caba5a956653ecdfb9761945d00ac1ab577a9a7
EBUILD nodejs-16.18.1.ebuild 6762 BLAKE2B d278f9efabb906fbbd301916d13879c6a9a1ecc957c5c6d23d1d8095baca0b22ff61b83e28fc1bf5e034431080cf527bf19437ffe2bd014e41e188d02def11f6 SHA512 797936389325834aef302f428ea66ee5d87c90beb156333f75210bc8b13efb700eb9ca945116e0017d4265ba010975d2fde571ad854a4391d69777f09cf0e85d
+EBUILD nodejs-16.19.0.ebuild 6767 BLAKE2B 27e5338d1c547e266fbdc7045033e1249037f073ff4079b9e8672f59b3fcf3df441efc807b64031b2c5aceb35828fc29664b3396abf4417839bdc704ef38298c SHA512 82535c7b220ae8f232b9a097633f1fb63e40ca3df32bdbfebb099b6711f7cc32c968ac77a29788003b3c02370ee5d71872c7bcd66f4d63f0b2e7d32a582e7c06
EBUILD nodejs-18.12.1.ebuild 7521 BLAKE2B 4ad01cada842a8e0c22ec469ff4448e9b459b00aa5854d4a811f1ec42f3186aed38af92dbb2f768dd4e9fca8953c914614fce60689382a381dab9c22aa168ccc SHA512 2df578a3d1df8cd76ea21e6b52c22bfe54cae1ccb24144d3aea72ac422352fe3c9172304847b23f836767436928ed8dbc2de2ec526af641eda5734db13176c0e
+EBUILD nodejs-18.13.0.ebuild 7492 BLAKE2B 97fac1d8a4b03bfd5ae05dcd755cc0fb88f3f2ae72362026f32625d65a2a0f00ba5d08af69ba541c9dc9261e3ff14633112b452b866ee54efa05ac844e25ec27 SHA512 e012deead2f3a9cfff7d1a6ef82125dac8dc292008302cb5da2c0901a70714ae6fc670bbf09ca92dc3cd9ec8dd10710fbddba9bf8b1569f843df7dd8ce97fdaf
EBUILD nodejs-99999999.ebuild 7492 BLAKE2B b4c56a266693fa31370785937c5f898631e3134b7830e3bc675c480f2cc048857612621f2f9962bc29b544bb3875392b2ef654863ce9fc6490dd617d148d01fb SHA512 c7bd59aef5b76beb67c070b5619aab15b9971c68b7414d7eece64dc31668f7b41708eec46985f3a4c522889f37d0d89a174a0fc743c12e7a1973e5fb7c57bb27
MISC metadata.xml 898 BLAKE2B a67e85ea95c272b8d18746254894b058433267a74b5bad66bac7d78c7db4cec297e06bc87fad3ee836fc91749aaee2c11c88b48b6ba033c36fa79132552faa81 SHA512 d498b288058e7282c5e9a28d4ba192a2ac5ef796eb1edf644aea41cab2d0eb6036426b188dd9af7eeb2eaf04b84011460cb3c3695ca8dde5667add21d9963c97
diff --git a/net-libs/nodejs/nodejs-14.21.2.ebuild b/net-libs/nodejs/nodejs-14.21.2.ebuild
new file mode 100644
index 000000000000..7ae390b5056f
--- /dev/null
+++ b/net-libs/nodejs/nodejs-14.21.2.ebuild
@@ -0,0 +1,241 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CONFIG_CHECK="~ADVISE_SYSCALLS"
+PYTHON_COMPAT=( python3_{8..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.17.2:=
+ >=net-libs/nghttp2-1.41.0:=
+ sys-libs/zlib
+ system-icu? ( >=dev-libs/icu-67:= )
+ system-ssl? (
+ >=dev-libs/openssl-1.1.1:0=
+ <dev-libs/openssl-3.0.0_beta1: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}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch
+ "${FILESDIR}"/${PN}-14.15.0-fix_ppc64_crashes.patch
+ "${FILESDIR}"/${PN}-14.19.0-global-npm-config.patch
+ "${FILESDIR}"/${PN}-gcc-13.patch
+)
+
+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}-13.8.0-paxmarking.patch )
+
+ # All this test does is check if the npm CLI produces warnings of any sort,
+ # failing if it does. Overkill, much? Especially given one possible warning
+ # is that there is a newer version of npm available upstream (yes, it does
+ # use the network if available), thus making it a real possibility for this
+ # test to begin failing one day even though it was fine before.
+ rm -f test/parallel/test-release-npm.js
+
+ default
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ # LTO compiler flags are handled by configure.py itself
+ filter-flags '-flto*'
+ # 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";;
+ 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
+ dodir /etc/npm
+
+ # Install bash completion for `npm`
+ # We need to temporarily replace default config path since
+ # npm otherwise tries to write outside of the sandbox
+ local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
+ sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
+ 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
+ sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
+
+ # 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() {
+ if has usersandbox ${FEATURES}; then
+ rm -f "${S}"/test/parallel/test-fs-mkdir.js
+ ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \
+ "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'."
+ fi
+
+ out/${BUILDTYPE}/cctest || die
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
+}
diff --git a/net-libs/nodejs/nodejs-16.19.0.ebuild b/net-libs/nodejs/nodejs-16.19.0.ebuild
new file mode 100644
index 000000000000..87efcfb2c0b0
--- /dev/null
+++ b/net-libs/nodejs/nodejs-16.19.0.ebuild
@@ -0,0 +1,233 @@
+# 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_{8..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.17.2:=
+ >=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}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch
+ "${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch
+ "${FILESDIR}"/${PN}-gcc-13.patch
+)
+
+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 )
+
+ # All this test does is check if the npm CLI produces warnings of any sort,
+ # failing if it does. Overkill, much? Especially given one possible warning
+ # is that there is a newer version of npm available upstream (yes, it does
+ # use the network if available), thus making it a real possibility for this
+ # test to begin failing one day even though it was fine before.
+ rm -f test/parallel/test-release-npm.js
+
+ default
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ # LTO compiler flags are handled by configure.py itself
+ filter-flags '-flto*'
+ # 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
+
+ # 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() {
+ if has usersandbox ${FEATURES}; then
+ rm -f "${S}"/test/parallel/test-fs-mkdir.js
+ ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \
+ "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'."
+ fi
+
+ out/${BUILDTYPE}/cctest || die
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
+}
diff --git a/net-libs/nodejs/nodejs-18.13.0.ebuild b/net-libs/nodejs/nodejs-18.13.0.ebuild
new file mode 100644
index 000000000000..7a42aad1aabb
--- /dev/null
+++ b/net-libs/nodejs/nodejs-18.13.0.ebuild
@@ -0,0 +1,250 @@
+# 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_{8..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.40.0:=
+ >=net-dns/c-ares-1.17.2:=
+ >=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}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch
+ "${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() {
+ 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}-18.3.0-paxmarking.patch )
+
+ # All this test does is check if the npm CLI produces warnings of any sort,
+ # failing if it does. Overkill, much? Especially given one possible warning
+ # is that there is a newer version of npm available upstream (yes, it does
+ # use the network if available), thus making it a real possibility for this
+ # test to begin failing one day even though it was fine before.
+ rm -f test/parallel/test-release-npm.js
+
+ default
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ # LTO compiler flags are handled by configure.py itself
+ filter-flags '-flto*'
+ # 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
+
+ # 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() {
+ if has usersandbox ${FEATURES}; then
+ rm -f "${S}"/test/parallel/test-fs-mkdir.js
+ ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \
+ "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'."
+ fi
+
+ out/${BUILDTYPE}/cctest || die
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
+}