summaryrefslogtreecommitdiff
path: root/net-libs/nodejs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-07 01:33:16 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-07 01:33:16 +0100
commitc8fd0d84af0bfd1949542adc2cbb735b1d28f9ed (patch)
tree3ee550255947da075650f1a551dcc278f9a1b7f8 /net-libs/nodejs
parenta978c074e4272bb901fbe4a10de0a7b2af574f17 (diff)
gentoo resync : 07.05.2021
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest2
-rw-r--r--net-libs/nodejs/nodejs-16.1.0.ebuild224
2 files changed, 226 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index a2888ac15805..8a56e80b6066 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -12,10 +12,12 @@ AUX nodejs-99999999-llhttp.patch 506 BLAKE2B eea449910b97dfc320247f20bf20467f6c5
DIST node-v12.22.1.tar.xz 23650180 BLAKE2B 90b0a8ab3842483fea0c776e0245e63539a986c18f55abd8c7cd22ec399ccde22fa5b008d3e07c0f07713b5a45a1ee2a0bc370c04408800db2ee59cd92fcb5be SHA512 eaead633611bda04ab9be200aeddf3b4004b8104e9c6af246023b8008003dd3a7103e1508ea690443e59c6591521b04a2d71c7344343f2a20d1c935ef51c66a0
DIST node-v14.16.1.tar.xz 33297064 BLAKE2B 0927434c63cd248e90a4002b50c7a0fd68a5527a4cd7424b451840ddf0c403ba452979b195e598cc3b323e24233248a74a1274519ce8cd3a2f4e71dc7a8f3dcb SHA512 d4f5fbab69592ae555613b2186090b85a458d2211b6035989aee2617bfd0f6768ca767ec45ce12756a9c452d00af7237edee3b1ae526049e9fcd01f8f67680c0
DIST node-v16.0.0.tar.xz 33784448 BLAKE2B 3286cf6522074cb7b17dce8fce642204777fef26fd4bdb904fdef638061913a1eccda13b8e2f170906dd9098500c8fae7eaea7275e41bf97ea6d9fdd644b215c SHA512 6b976a8959079751bfdece15614a6286088d9145fc4db4ae048aca2ede4b7e38e86e91b1722be51eb4c934749a144a745e425ccf118bed9848c30ff254de2557
+DIST node-v16.1.0.tar.xz 33770472 BLAKE2B 2b7cf5f07dbf72eb25018cd046ce15cf6c5a444225e34d425614c19e69888b4f5c9488b079fed12e6fe52cb8dfdee20cf61c4df5a39f53e60b95c4da445f2091 SHA512 dc12078203940e7b280198ae15f51f68aaefcf8cab71a9f988952e67045e4b16dc48ec471abcc497bd15b0b426c06678e376b53762349d6568b48d52888cc2d5
EBUILD nodejs-12.22.1-r1.ebuild 6862 BLAKE2B f3dc14d263dccc7303cb4474ab793d3c6c0114feb1f75966576c908c0f049591b45bad99b3a9fbead5a76adce9e13d238bc1ff583b199be648b3d95abbda082d SHA512 c3ebea970e031fc1692b6f8bc3a4de1e57100e7f1a36cdaab69159816fbba5d8098b9820a464b3fb05f1c4ae658a4410d783306a10bedd1baa2b6f0178dd2aae
EBUILD nodejs-12.22.1.ebuild 6412 BLAKE2B 7e5671b07a93b739c8b3a84730f0a873dc18c6746fe25a112ef8efc6bcc44c5c68a4df3eb16cea05cbe0ef786857a4b417c463ae3469d3d09c1d1bb1ae5e1725 SHA512 b38fef7e77ac63f589d52b4836483aaa36ec36597f130e83334b3a59a9bc7e7c98fa3d2ada868472db556240b355ebf4415b656823adc60b5f1965a010e97a4a
EBUILD nodejs-14.16.1-r1.ebuild 6890 BLAKE2B a6e1eb484326c55b3a38ab13e76a46f634d3d03e61186b7323444f11063d3d58a82bbb3d8b63b38ec583a16455306fa466a74fa1595d2a4dca0d8422f7b38dff SHA512 ac0e157c8291b3388e219a22fadf25f4350e49888769ba306b12f9fb2c90d48b568cf7a9213d002a6eac046b1c26ba4cf9294c6b75194b54cc38ba55462af8b1
EBUILD nodejs-14.16.1.ebuild 6109 BLAKE2B 55b923b81044645154639c0768f2905b612dcea70e703451bc5bb0868f17c7c635017ab9d390cff31c2903e0b0226e5c5c0a5323d73eecb3ea730ca7ace83cc7 SHA512 017c31360f866ea46b435dcf1ba84cb8075bcdf3925da51e1c81a0b3f0a73e3b4f31b0192ea6efa890e64eb9d3ccf548fc57f17bb44f5c20c5cdf0736b287eb3
EBUILD nodejs-16.0.0-r1.ebuild 6572 BLAKE2B b96895e82435e6801d839f2b4d87b08f337c2b3d03e09d20f900a9371835956601d15c023d2472759737001708be3591e7aaeb6fec316b2565754bceb5ce58e9 SHA512 306f97d21a259a07511ba666a37aa9b3bf21546da4e0447d46403ce141d638e34d9f3e7a80fddf8821d8cdb154582cd2458c0c03fbc474802dee0dfc4062812a
+EBUILD nodejs-16.1.0.ebuild 6261 BLAKE2B e6fcaf943e25b08de9ae6708779ce495b9390c03c3dd3750e06c4ee609753a22e48b41d43229632240a2c26edc966f89dcea2860d722f02f0f85c4617a04c9ab SHA512 6e5405b52b9b292bf5cf72d5dc7887b982c8521765188061782e83e7c8ea5531a904d16e536e3ce7efcf4a972451a785da9b12b02892db274853398e9db6db2a
EBUILD nodejs-99999999.ebuild 5829 BLAKE2B c6c38b692df78a6292fda7f651ab9be5502f202d4c69831c4ae639b873e7d5b846899f245e88bb49bcbfe154750e6512dab01223e57c3188dae61112696b0a65 SHA512 ecc304e439c60d1f7f64e448e81eb12675fda7f8471b0a6341711c435509de81c90eb170c63a4c2b9f4cc5fcbd8fc604c40d6affa41d827f4f5ec46f474f0ae9
MISC metadata.xml 1000 BLAKE2B 4785dba31037ad28281266047c8e59cd1d3e0e723128831f3aebc0436727b41c283284a450b5c619868e0317d3bc61e239a85e0d47773e9867f2606d5dd59047 SHA512 6556cf00ea009b394a56de614226b8cf0e04e868f47d827dba1907b5d89b957d738e4529b6338126cff9ccbd573c4451e9c2d5d4f93e4e4dad376e88419ef489
diff --git a/net-libs/nodejs/nodejs-16.1.0.ebuild b/net-libs/nodejs/nodejs-16.1.0.ebuild
new file mode 100644
index 000000000000..61ddcf50edb9
--- /dev/null
+++ b/net-libs/nodejs/nodejs-16.1.0.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
+HOMEPAGE="https://nodejs.org/"
+SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
+
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
+SLOT="0/$(ver_cut 1)"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos"
+
+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.0
+ >=net-libs/nghttp2-1.41.0
+ sys-libs/zlib
+ system-icu? ( >=dev-libs/icu-67:= )
+ system-ssl? ( >=dev-libs/openssl-1.1.1:0= )"
+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.1-uvwasi_shared_libuv.patch
+ "${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch
+)
+
+S="${WORKDIR}/node-v${PV}"
+
+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 use lto; then
+ if tc-is-gcc; then
+ if [[ $(gcc-major-version) -ge 11 ]]; then
+ # Bug #787158
+ 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"
+ fi
+ else
+ # configure.py will abort on this later if we do not
+ die "${PN} only supports LTO for gcc"
+ fi
+ fi
+ fi
+}
+
+src_prepare() {
+ tc-export AR CC CXX PKG_CONFIG
+ export V=1
+ export BUILDTYPE=Release
+
+ # See https://github.com/nodejs/node/issues/38558
+ # FIXME: temporary, until we have figured out why that one single test fails.
+ rm -f test/parallel/test-repl-history-navigation.js
+
+ # 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 )
+
+ default
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ # LTO compiler flags are handled by configure.py itself
+ filter-flags '-flto*'
+
+ 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
+ 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() {
+ # parallel/test-fs-mkdir is known to fail with FEATURES=usersandbox
+ if has usersandbox ${FEATURES}; then
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
+ fi
+
+ out/${BUILDTYPE}/cctest || die
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
+}