summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2023-07-27 11:51:40 -0500
committerWilliam Hubbs <williamh@gentoo.org>2023-07-27 11:51:58 -0500
commit3bcd748f6a707cdb1ab307ad8f8ccc5fc4ec73e1 (patch)
tree5466c6ce363a451342ececfe1273f17de156cfcc /net-libs
parentlicenses: Remove unused linux-firmware (diff)
downloadgentoo-3bcd748f6a707cdb1ab307ad8f8ccc5fc4ec73e1.tar.gz
gentoo-3bcd748f6a707cdb1ab307ad8f8ccc5fc4ec73e1.tar.bz2
gentoo-3bcd748f6a707cdb1ab307ad8f8ccc5fc4ec73e1.zip
net-libs/nodejs: add 18.17.0
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/nodejs/Manifest1
-rw-r--r--net-libs/nodejs/nodejs-18.17.0.ebuild258
2 files changed, 259 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 56dc7b7d69ab..1666c939f0c4 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -2,6 +2,7 @@ DIST node-v16.20.0.tar.xz 35546884 BLAKE2B 5bdb1fb7365e07f13d0a58a8d052d11efaadc
DIST node-v16.20.1.tar.xz 35556440 BLAKE2B cd10c4bf8fdf47126b84bb746e5b11ae1a5a17492b7fe2920be98d5ff2a9bce984515af4833d9bcccf645d53ebc068a3c658a37ad878432664f15cea368a500e SHA512 3179c4b598f211f21c6d7ba378cd03a7ca4a06d99ae8e5bd5b8c0f1a895dc83222858a349cfb7589deecb7c654e9f25ce89c30aef9981ee18d4e24d6bbd5822e
DIST node-v18.16.0.tar.xz 40467860 BLAKE2B b16749c0212f3aa196ec9fc0f999a023adeb9031b3332939330ba5a3edb5bc2ed6dc21bf861509696e19ed0cc5d5c54bb882018f0e54eb1ad8e9b0ba3bb64bff SHA512 608ce5db97ce2d851f381c7991f635c5e0927ae79037649b482c7e197479341b7c6560644e25f4d65ece8aa80c5763a0e044349a5be210fa33fbbf97a96462bd
DIST node-v18.16.1.tar.xz 40462540 BLAKE2B 4103b771cdd629be794bd0433caa0e7a3b652511d5aa0535d48990d4ac7901f42e75f498b3a64b6d3b821046c1c26bb8b5c0e1edb953589a76d5fa87346da002 SHA512 15488a06aa31666a0af4470f08910b8a1df53d78cce597ddfdc0c6aebb77ae66138540d47ab0d4ab6d58d1c55226e3e2c0cfec641b2c55b417427171b1ace48c
+DIST node-v18.17.0.tar.xz 40780504 BLAKE2B 2f93bc7fecc6d3a578b43fd079ce4a0eb9f76f9f61c1306fba1e0cf3e7343189c74bfce8648e7b29d84c7b7eade78f9281e5276f7a29f5f527a113892117565b SHA512 01421e9ac6be8db90c14682a5c283f7d2a5824d9f1496e698dae27de090b3014efbbb98bb300c4bf9967681390d8f2450aa65648ddf7ea473814b81d2665b21c
DIST node-v20.2.0.tar.xz 41778040 BLAKE2B 362b0ee89fe822722caeeb4b918550637bfb10791de75d872da334cb1123b744c351b5822b05abf4d36a0449badc5232ab1d73896dd5ce7755d10b226f0b9f52 SHA512 bf780e79bf6c7f766beb7734c7af45edc62094aba4c608f5519b130ff263e52ece925f85a4ee5740e962d16020070ef00933f6c74e771d948f23525c223da48e
DIST node-v20.3.0.tar.xz 41709484 BLAKE2B 93aadc92914fd977a9bea5643c0806c709a4e68bca2840f7af0b24bfde654e9a3bfb83ead159579c67ebd8cfea81648863d2d87d07d2f11dfe73f1312d873d40 SHA512 6aade4c1cc0ef8f47f403286d88099a3c0bf43f6e1e2b6d50e777eb9327fc1f0a8ba73c943306a431fd422fdda9017b1931bcb31c48badcfcadde8a260840d7c
DIST node-v20.3.1.tar.xz 41712208 BLAKE2B 242f0d932d93e802a157d667aacec325cc40e357675237a96ab941fbf6e42a9a9b7888c87c37a16f24f50ecab9a42ec64ddf49bb3e9259f233c20daed18abcad SHA512 f9f7a3905aa05f9708d3dddcbbe8ad729db3a123ccbdbcade402c6faa6b36905239aca9ac19ca4ebb4682dde2c39058c58197f5015556ab2351f8035d35da5e1
diff --git a/net-libs/nodejs/nodejs-18.17.0.ebuild b/net-libs/nodejs/nodejs-18.17.0.ebuild
new file mode 100644
index 000000000000..c8b4e8bec6e9
--- /dev/null
+++ b/net-libs/nodejs/nodejs-18.17.0.ebuild
@@ -0,0 +1,258 @@
+# 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="corepack cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test"
+REQUIRED_USE="corepack? ( !npm )
+ 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
+ corepack? ( !sys-apps/yarn )
+ 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}"/${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 corepack || myconf+=( --without-corepack )
+ 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
+
+ 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-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
+}