summaryrefslogtreecommitdiff
path: root/net-libs/nodejs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-18 00:29:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-18 00:29:05 +0000
commit467e2131896a3030032cd5b0fab2094a045bf9d0 (patch)
tree534578ca7ef61b3eb30fee861db78c0ae58e2fa6 /net-libs/nodejs
parent1f254b1ee917690b4f8f7738fdcfc295ee304ff7 (diff)
gentoo auto-resync : 18:03:2023 - 00:29:05
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest2
-rw-r--r--net-libs/nodejs/nodejs-18.15.0.ebuild255
2 files changed, 257 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 6c0f4c6d06e8..ac9ef3ce17c7 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -8,8 +8,10 @@ AUX nodejs-gcc-13.patch 841 BLAKE2B 86150b503987c2c84acfc2967883cd81109cb3117eb8
DIST node-v14.21.3.tar.xz 34508116 BLAKE2B 6fa001be10499ff2dfc920690dda9df25423f3e5c0bf19ae2ab9df571ca905e164e5a4eb778d0aa16a6026c354e39e063bde39d734a0532c3d95c937e509a9cb SHA512 bea8ccbb95ba00c220a42d30f8827fc94fb63725079dc3b63c65fd62d5f4f85d1d78e00b9b1f882a80449fa251930d3f3f5f9c8ae8d14d132660d4c4fd0b08f0
DIST node-v16.19.1.tar.xz 35465252 BLAKE2B 717cf15ab6fa5a2a643138959c4e539ef541783061605d0670564579bb43c89db0972228d42e529fb4104396ce7e1ed33486b6f28356752709a196924894b9f6 SHA512 7274ae1c7c92a4db9f8df9762f363cd9fb252c51142b98a25e718d749d10989d4228bc8d5fc864b83a4fe0c7f9541f59190b47374673a6ab4654a6366a373a48
DIST node-v18.14.2.tar.xz 40330824 BLAKE2B d18cf6a23f091633e5298727eeee15dec65ca83e688ff9fbed78385102aa44707ff4b33bcb034f6d10aab9a81a646ad7e8c28a239de151b816ff7072977df0de SHA512 72bb788b40d83bc42850dd9e2d00ffc06d9bcb17d24280d4721038038d1632846f859864328c849498255d1095296402b9b3c6b8910bbd399f7f516a43b9c86f
+DIST node-v18.15.0.tar.xz 40355624 BLAKE2B 56337de0b6e3c2421e6d9add81d30ada821525e0bb05fc977c91b7162f6dc075610ec53af50d6596cab6c0f647d61fb243896b25f0a768eeeefedf1a8bde1c05 SHA512 e41fcda469809186fd724ef4691e25f4a5bd81357ee99acf3d7faa1190a69c19cb62bd14aea199ca6f8b5cf9687af7d898cdf605ea2414d2c04db87ddb3b4dc8
EBUILD nodejs-14.21.3.ebuild 7089 BLAKE2B 5a039629b268d5b88ecb324d1a39415c9ebd810264aaae3c699a8a28333d2330fa904d7ba6295f53db6beb8941f7568415d5af576c7c289a2837f7f53596a4c2 SHA512 c51e35fd2936f3397e14dfab0aea7ac0db20734f4358d2cf804bfaa3173683ed58e47feb71f1c647467e1f69a1be5cf88893899263af0192c9613038c3ae55e1
EBUILD nodejs-16.19.1.ebuild 6703 BLAKE2B 9b4ec4b35cd13bf388b9e04d15386500d784445786b053e9cf9e1f1ef53250f48b9f1f013bfe768667d7ff3fde4ed0c0bd3ef14d76c945dcb9566a8a10a6d03c SHA512 ef0caf342f6a79b050c4d63fd4c701bbf0e7b5daf2eb3aa6d3d510d99d561df447d9f786f9d4a8296ef7d2b3ec9e6164a98530accaae640d0847b7b25b3afc9f
EBUILD nodejs-18.14.2.ebuild 7606 BLAKE2B 41a54764b744802268b2b06f09264edfbcb9b1998b032ab689643441ce4d6dc49609c6169a9e61445730ba4224ba141bc93cb7241486c72a2703e442d4efe1ab SHA512 3175d47941fda7b3b031d7a993043248fafa73d763f8cf7b37b0dd1a0b02d8776b83023e4f35b133c701bc42fcc99dce3f41d0fe3005a8dbfbc94c9ce7b5acf4
+EBUILD nodejs-18.15.0.ebuild 7676 BLAKE2B 0892f8116fec6f9b7a0e2e68d64b6ac007bff9377ca5ed1b143739be90cd6d6a7d8bfc520df7ecac9372f1d7947be847d3667d27bcbc4e54894ad65a660d3bfb SHA512 56f7c35e31a07275f062fa471a483eeed34182da8d94220e9f3a2ff7fb50294ce875bbb7c36a905edd4293f9630f72e4fc0a65eb3b5143e4df6f1603b6a50b54
EBUILD nodejs-99999999.ebuild 7611 BLAKE2B 1ba337fd68332a379cd174a81d1c0d6e8284c8292a0575c793f2ad9015d74f697a4b04def9bee226eaec1380c65272e070cdd29ad9d001428fb5056db4205ba4 SHA512 909e3366aee9b1b87a7fdb1d12aa834700cfde6dfa3bd3de2d399dc25609f328dd61111be85b7f8590bada73565f5005ec35880b27cc460e3b746012c7fe8fcd
MISC metadata.xml 898 BLAKE2B a67e85ea95c272b8d18746254894b058433267a74b5bad66bac7d78c7db4cec297e06bc87fad3ee836fc91749aaee2c11c88b48b6ba033c36fa79132552faa81 SHA512 d498b288058e7282c5e9a28d4ba192a2ac5ef796eb1edf644aea41cab2d0eb6036426b188dd9af7eeb2eaf04b84011460cb3c3695ca8dde5667add21d9963c97
diff --git a/net-libs/nodejs/nodejs-18.15.0.ebuild b/net-libs/nodejs/nodejs-18.15.0.ebuild
new file mode 100644
index 000000000000..a91643fe8d0d
--- /dev/null
+++ b/net-libs/nodejs/nodejs-18.15.0.ebuild
@@ -0,0 +1,255 @@
+# 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.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}"
+
+# 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
+ 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() {
+ rm -f "${S}"/tests/parallel/test-dns-setserver-when-querying.js
+ 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
+}
+
+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
+}