summaryrefslogtreecommitdiff
path: root/net-libs/nodejs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
commit185fa19bbf68a4d4dca534d2b46729207a177f16 (patch)
treea8a537b82fda83a0799c2ca9887f212558363aa7 /net-libs/nodejs
parentc8fd0d84af0bfd1949542adc2cbb735b1d28f9ed (diff)
gentoo resync : 11.05.2021
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest12
-rw-r--r--net-libs/nodejs/files/nodejs-16.0.0-v8_lto.patch39
-rw-r--r--net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch56
-rw-r--r--net-libs/nodejs/nodejs-12.22.1-r1.ebuild19
-rw-r--r--net-libs/nodejs/nodejs-14.16.1-r1.ebuild33
-rw-r--r--net-libs/nodejs/nodejs-16.0.0-r1.ebuild229
-rw-r--r--net-libs/nodejs/nodejs-16.1.0.ebuild29
-rw-r--r--net-libs/nodejs/nodejs-99999999.ebuild114
8 files changed, 181 insertions, 350 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 8a56e80b6066..567e36b6643c 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -7,17 +7,15 @@ AUX nodejs-13.8.0-paxmarking.patch 4209 BLAKE2B 35a100bc24b638beb35e021a79c1687f
AUX nodejs-14.15.0-fix_ppc64_crashes.patch 1633 BLAKE2B cded0eba081ff80f02ebc019d976503cc30ed8fd9974951d9c8b9dd659db7f17e54f30d59ec171711cfeeda16d43ed49d8b0fc1574c07014d5266c578de02814 SHA512 14b9b0a5963deafb972f455867831ecb349ffd5af229467c1e985c9a6c4f0f4f0faf905a51e50b8a6bf130040dde45407b37ab6d7ad6b1ecb9ef8209d9585396
AUX nodejs-14.16.1-v8_icu69.patch 2938 BLAKE2B d69206f4903c63df7bf1882bc9d41510a30d2c8bac8141ac08b949578b17e842761edeb10295b95b7aed96cf1ca38c6bdb3bc4b83d8fe2b795a39d50d779f883 SHA512 55933a40c9ca46b2a00a9d6ba6a2b5f08ce0b85692b602b38b05c323c46778f267c8ac5f960661165b4221c8ea84f92bd5957773b9a5e6ff49277a258df3e380
AUX nodejs-15.2.0-global-npm-config.patch 582 BLAKE2B ee05b2b54a0d2f0b7d6d2a1215321315a9a7f2a7b83544fbc4c7c08920d82eccf2ea45530b24aba734b27d82457cd7cf2ef8f780f309f4411ab973738fa3cbfd SHA512 e5dff5f8007716e2c3d6ea5829b2ed42ff9e458b751d06772c51b77a36b188f167c1d637a74ae7cf5c2b97c28436213f02374b0dbef5440607ce4e1c3e586e86
-AUX nodejs-16.0.0-v8_lto.patch 1332 BLAKE2B 75807eecfca7275afdde465ad20d558822e06488ecfc9d22a0e57826abafb3f3b66f77484fcdc078142ba7293d627a25d7d3ccdfecc7610cb076f919900c794c SHA512 26e4e1a64356800de20609543ddbac2e5adad04faf28962cbbfcb6499e3a9d38e391f945353ac3f5e9f997dfb666aa3260b0296e55317f9aa2c8c3f4bd894003
+AUX nodejs-16.1.0-test-repl-history-navigation.patch 1970 BLAKE2B 7c33e36c1faafabff42e0b98ca83fe25433fadfc77196158abb2a7e6fdaad09fcdeb0aed75a1424e8e96425b10a7e396b21cd8ac3cb06f20a632f4cf38b76060 SHA512 d53bc20931bc3f6c20ed0d9b050e95a2aa698b9dd73d0faf8628e6e0f07c030c3dd4d6504ec4b962c9932384d85683188692ef3fac264a73785f3c961ce72454
AUX nodejs-99999999-llhttp.patch 506 BLAKE2B eea449910b97dfc320247f20bf20467f6c5bfe46f7acc95761270928b3413ffaa04ee948d8dece9a8ba47288804144c75ebda1009af17169b36bcd5b39aa0c33 SHA512 13cdbaf73696b4feef1fec48ac43f6a6d80f59096a81308c746655e2cffa0b0ef78850facff103f27062fd25192d8abd7bc200b36bd25df7bd4b800f80da0c5c
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-r1.ebuild 6976 BLAKE2B 65c091a3834df7f256fe9f24d81c4a350bc80d2c73c97190d376d65106948511843ad5610bbfaced8dcd8a2839abfb402f9119d8142354e5fb2b0ec53e601005 SHA512 06f2f07ba8a0e5173549fbf3d01ff92e58e3ed4c7f3cb048d03e561f58ce1d79112c25c6486625c7b971d8118860ffe75f493b5ea684359709a74e43a4e50276
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-r1.ebuild 7025 BLAKE2B abaf829b8f37b6f985319e770e5888c376e3845eeca30ec4f40d8bfbb0f7205ea030d42c74e0c0364d9f7cef35ecbc79f241daa92c4ff85999f1c7d675f5f502 SHA512 f3a4580d9396a6bd2993219e85eb50d7653e0f49ac6c8ee04c2020430d2e21ba1f4d2002d8595ca338a791b96bc0ce4457080cd1104fa2b5f0dd45b484ffc9b5
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
+EBUILD nodejs-16.1.0.ebuild 6669 BLAKE2B 4411616ca4379b122d832a32801aee91dcdd4d4396f02c3a1b0ef2c48a69108eff7ec0739ab435479a6a94c203ac8fdd3bf2eb98fee4d6ee21cde54a7346118e SHA512 758c31953bb6e94794ce6877d3196b4d89d196a2ba5cb27d51c51c5a6676a400662bfce9a2fa3a9c9e95d7ece8bf64e2eb46c62370f1d8babbaac06ab6060709
+EBUILD nodejs-99999999.ebuild 6486 BLAKE2B c686818d5a5f832f3520ef3c4c5458526aac4894c251a2c589bcfff5e313b7b7602fb7d58bc89e7fbfdea28eeb4b570748026d38e8060430aea1b983b49a7698 SHA512 49a89ee3ef022a9d1866a33a4643d23f362c39442725a7267aa55c12898dd7d96dceb95fc44bdf36112b18c93ec9dde6124cec34b3b277e4be2fa740ffde4b4a
MISC metadata.xml 1000 BLAKE2B 4785dba31037ad28281266047c8e59cd1d3e0e723128831f3aebc0436727b41c283284a450b5c619868e0317d3bc61e239a85e0d47773e9867f2606d5dd59047 SHA512 6556cf00ea009b394a56de614226b8cf0e04e868f47d827dba1907b5d89b957d738e4529b6338126cff9ccbd573c4451e9c2d5d4f93e4e4dad376e88419ef489
diff --git a/net-libs/nodejs/files/nodejs-16.0.0-v8_lto.patch b/net-libs/nodejs/files/nodejs-16.0.0-v8_lto.patch
deleted file mode 100644
index a3e4acb02c3a..000000000000
--- a/net-libs/nodejs/files/nodejs-16.0.0-v8_lto.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From ea694e2b138d2f991989e09fc0e964fec3587b5f Mon Sep 17 00:00:00 2001
-From: Jesse Chan <jc@linux.com>
-Date: Thu, 22 Apr 2021 19:41:09 +0800
-Subject: [PATCH] tools: disable LTO for "v8_cppgc_shared" target
-
-"PushAllRegistersAndIterateStack" is implemented in assembly and
-called from "stack.cc" via 'extern "C"'. [1]
-
-However, LTO does not work well with symbol usage from assembly. [2]
-
-This change workarounds the issue by disabling LTO for the target.
-
-With GCC 10 and "./configure --enable-lto", compilation succeeds
-after this change.
-
-[1] v8/v8@c10863153
-[2] https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ#Symbol_usage_from_assembly_language
-
-Refs: #35957
-Refs: #38335
-Signed-off-by: Jesse Chan <jc@linux.com>
----
- tools/v8_gypfiles/v8.gyp | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
-index ccb5984f47d..377e12d1fdc 100644
---- a/tools/v8_gypfiles/v8.gyp
-+++ b/tools/v8_gypfiles/v8.gyp
-@@ -1378,6 +1378,9 @@
- '<(V8_ROOT)/src/heap/base/worklist.h',
- ],
- 'conditions': [
-+ ['enable_lto=="true"', {
-+ 'cflags_cc': [ '-fno-lto' ],
-+ }],
- ['clang or OS!="win"', {
- 'conditions': [
- ['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
diff --git a/net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch b/net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch
new file mode 100644
index 000000000000..724541a870db
--- /dev/null
+++ b/net-libs/nodejs/files/nodejs-16.1.0-test-repl-history-navigation.patch
@@ -0,0 +1,56 @@
+From 7c8a60851c459ea18afbfc54bfc8cf7394ea56c3 Mon Sep 17 00:00:00 2001
+From: Antoine du Hamel <duhamelantoine1995@gmail.com>
+Date: Thu, 6 May 2021 12:00:07 +0200
+Subject: [PATCH] test,repl: fix tests when inspector is disabled
+
+Fixes: https://github.com/nodejs/node/issues/38558
+
+PR-URL: https://github.com/nodejs/node/pull/38564
+Reviewed-By: Anna Henningsen <anna@addaleax.net>
+Reviewed-By: James M Snell <jasnell@gmail.com>
+Reviewed-By: Rich Trott <rtrott@gmail.com>
+---
+ test/parallel/test-repl-history-navigation.js | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/parallel/test-repl-history-navigation.js b/test/parallel/test-repl-history-navigation.js
+index df4f0390a69c..527cf235bddd 100644
+--- a/test/parallel/test-repl-history-navigation.js
++++ b/test/parallel/test-repl-history-navigation.js
+@@ -559,14 +559,14 @@ const tests = [
+ env: { NODE_REPL_HISTORY: defaultHistoryPath },
+ test: ['const util = {}', ENTER,
+ 'ut', RIGHT, ENTER],
+- expected: common.hasIntl && common.hasCrypto ? [
++ expected: [
+ prompt, ...'const util = {}',
+ 'undefined\n',
+- prompt, ...'ut', ' // il', '\n// {}',
+- 'il', '\n// {}',
++ prompt, ...'ut', ...(prev ? [' // il', '\n// {}',
++ 'il', '\n// {}'] : [' // il', 'il']),
+ '{}\n',
+ prompt,
+- ] : [],
++ ],
+ clean: false
+ },
+ {
+@@ -577,7 +577,7 @@ const tests = [
+ 'globalThis.util = {}', ENTER,
+ 'ut', RIGHT, ENTER,
+ 'Reflect.defineProperty(globalThis, "util", utilDesc)', ENTER],
+- expected: common.hasIntl && common.hasCrypto ? [
++ expected: [
+ prompt, ...'const utilDesc = ' +
+ 'Reflect.getOwnPropertyDescriptor(globalThis, "util")',
+ 'undefined\n',
+@@ -588,7 +588,7 @@ const tests = [
+ prompt, ...'Reflect.defineProperty(globalThis, "util", utilDesc)',
+ 'true\n',
+ prompt,
+- ] : [],
++ ],
+ clean: false
+ },
+ ];
diff --git a/net-libs/nodejs/nodejs-12.22.1-r1.ebuild b/net-libs/nodejs/nodejs-12.22.1-r1.ebuild
index f96dac1dcb1a..84110ff87064 100644
--- a/net-libs/nodejs/nodejs-12.22.1-r1.ebuild
+++ b/net-libs/nodejs/nodejs-12.22.1-r1.ebuild
@@ -10,13 +10,19 @@ inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs
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"
+
+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 ~x86 ~amd64-linux ~x64-macos"
+ S="${WORKDIR}/node-v${PV}"
+fi
+
IUSE="cpu_flags_x86_sse2 debug doc icu inspector lto +npm +snapshot +ssl +system-ssl systemtap test"
REQUIRED_USE="
inspector? ( icu ssl )
@@ -52,7 +58,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-99999999-llhttp.patch
)
RESTRICT="test"
-S="${WORKDIR}/node-v${PV}"
pkg_pretend() {
(use x86 && ! use cpu_flags_x86_sse2) && \
diff --git a/net-libs/nodejs/nodejs-14.16.1-r1.ebuild b/net-libs/nodejs/nodejs-14.16.1-r1.ebuild
index c386c0e45b7c..82f78fb0068e 100644
--- a/net-libs/nodejs/nodejs-14.16.1-r1.ebuild
+++ b/net-libs/nodejs/nodejs-14.16.1-r1.ebuild
@@ -10,11 +10,18 @@ inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs
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"
+
+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 ~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 )
@@ -46,8 +53,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-14.16.1-v8_icu69.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."
@@ -89,13 +94,6 @@ src_prepare() {
sed -i -e "/'-O3'/d" common.gypi node.gypi || die
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt
- # seem sandbox related either (invoking it from a sandbox works fine).
- # The issue is that no stdin handle is openened when asked for one.
- # It doesn't really belong upstream , so it'll just be removed until someone
- # with more gentoo-knowledge than me (jbergstroem) figures it out.
- rm test/parallel/test-stdout-close-unref.js || 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
@@ -105,6 +103,13 @@ src_prepare() {
# 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
}
@@ -230,5 +235,5 @@ src_test() {
fi
out/${BUILDTYPE}/cctest || die
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
}
diff --git a/net-libs/nodejs/nodejs-16.0.0-r1.ebuild b/net-libs/nodejs/nodejs-16.0.0-r1.ebuild
deleted file mode 100644
index 95528f2021f9..000000000000
--- a/net-libs/nodejs/nodejs-16.0.0-r1.ebuild
+++ /dev/null
@@ -1,229 +0,0 @@
-# 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 )"
-
-# As of 16.0.0, tests fail because "npm is not ready for this release"
-RESTRICT="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
- "${FILESDIR}"/${PN}-16.0.0-v8_lto.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
-
- # 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
-
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt
- # seem sandbox related either (invoking it from a sandbox works fine).
- # The issue is that no stdin handle is openened when asked for one.
- # It doesn't really belong upstream , so it'll just be removed until someone
- # with more gentoo-knowledge than me (jbergstroem) figures it out.
- rm test/parallel/test-stdout-close-unref.js || 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,,} -J message parallel sequential || die
-}
diff --git a/net-libs/nodejs/nodejs-16.1.0.ebuild b/net-libs/nodejs/nodejs-16.1.0.ebuild
index 61ddcf50edb9..f8ca995c2e13 100644
--- a/net-libs/nodejs/nodejs-16.1.0.ebuild
+++ b/net-libs/nodejs/nodejs-16.1.0.ebuild
@@ -10,11 +10,18 @@ inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs
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"
+
+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 ~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 )
@@ -42,10 +49,9 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-12.22.1-uvwasi_shared_libuv.patch
"${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch
+ "${FILESDIR}"/${PN}-16.1.0-test-repl-history-navigation.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."
@@ -70,10 +76,6 @@ src_prepare() {
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
@@ -100,6 +102,13 @@ src_prepare() {
# 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
}
diff --git a/net-libs/nodejs/nodejs-99999999.ebuild b/net-libs/nodejs/nodejs-99999999.ebuild
index 110b22734b40..2b81f6a39ed8 100644
--- a/net-libs/nodejs/nodejs-99999999.ebuild
+++ b/net-libs/nodejs/nodejs-99999999.ebuild
@@ -2,52 +2,67 @@
# 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 git-r3 pax-utils python-any-r1 toolchain-funcs xdg-utils
+
+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/"
-EGIT_REPO_URI="https://github.com/nodejs/node"
-
LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
-SLOT="0"
-KEYWORDS=""
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
- inspector? ( icu ssl )
+
+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 ~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-ssl? ( ssl )
-"
+ system-icu? ( icu )
+ system-ssl? ( ssl )"
+
+RESTRICT="!test? ( test )"
-RDEPEND="
- >=app-arch/brotli-1.0.9
+RDEPEND=">=app-arch/brotli-1.0.9
>=dev-libs/libuv-1.40.0:=
- >=net-dns/c-ares-1.16.1
+ >=net-dns/c-ares-1.17.0
>=net-libs/nghttp2-1.41.0
sys-libs/zlib
- icu? ( >=dev-libs/icu-67.1:= )
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
-"
-BDEPEND="
- ${PYTHON_DEPS}
+ 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}
-"
+ 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."
- ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
- die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
+ 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() {
@@ -72,13 +87,6 @@ src_prepare() {
sed -i -e "/'-O3'/d" common.gypi node.gypi || die
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt
- # seem sandbox related either (invoking it from a sandbox works fine).
- # The issue is that no stdin handle is openened when asked for one.
- # It doesn't really belong upstream , so it'll just be removed until someone
- # with more gentoo-knowledge than me (jbergstroem) figures it out.
- rm test/parallel/test-stdout-close-unref.js || 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
@@ -86,7 +94,14 @@ src_prepare() {
fi
# We need to disable mprotect on two files when it builds Bug 694100.
- use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.2.0-paxmarking.patch )
+ 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
}
@@ -94,6 +109,9 @@ src_prepare() {
src_configure() {
xdg_environment_reset
+ # LTO compiler flags are handled by configure.py itself
+ filter-flags '-flto*'
+
local myconf=(
--shared-brotli
--shared-cares
@@ -102,7 +120,14 @@ src_configure() {
--shared-zlib
)
use debug && myconf+=( --debug )
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
+ 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 )
@@ -156,24 +181,19 @@ src_install() {
fi
if use npm; then
- dodir /etc/npm
+ keepdir /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 "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
+ 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=()
@@ -196,6 +216,12 @@ src_install() {
}
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,,} -J message parallel sequential || die
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die
}