From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1280169-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BCE931382C5 for <garchives@archives.gentoo.org>; Sun, 9 May 2021 14:29:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B91A9E070D; Sun, 9 May 2021 14:29:04 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 928C8E0729 for <gentoo-commits@lists.gentoo.org>; Sun, 9 May 2021 14:29:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 896EA340FA6 for <gentoo-commits@lists.gentoo.org>; Sun, 9 May 2021 14:29:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 26174752 for <gentoo-commits@lists.gentoo.org>; Sun, 9 May 2021 14:29:02 +0000 (UTC) From: "Marek Szuba" <marecki@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" <marecki@gentoo.org> Message-ID: <1620570526.2a69a9423d3c927e16b001ac7da9d07953ff9243.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nodejs/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/nodejs/nodejs-12.22.1-r1.ebuild net-libs/nodejs/nodejs-14.16.1-r1.ebuild net-libs/nodejs/nodejs-16.1.0.ebuild net-libs/nodejs/nodejs-99999999.ebuild X-VCS-Directories: net-libs/nodejs/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: 2a69a9423d3c927e16b001ac7da9d07953ff9243 X-VCS-Branch: master Date: Sun, 9 May 2021 14:29:02 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 37b37bfa-e00e-4267-b124-694d64dc300b X-Archives-Hash: e8304283de177f064cde796872026c03 commit: 2a69a9423d3c927e16b001ac7da9d07953ff9243 Author: Marek Szuba <marecki <AT> gentoo <DOT> org> AuthorDate: Sun May 9 14:27:49 2021 +0000 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> CommitDate: Sun May 9 14:28:46 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a69a942 net-libs/nodejs: sync the live ebuild with v16 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> net-libs/nodejs/nodejs-12.22.1-r1.ebuild | 19 ++++-- net-libs/nodejs/nodejs-14.16.1-r1.ebuild | 17 +++-- net-libs/nodejs/nodejs-16.1.0.ebuild | 17 +++-- net-libs/nodejs/nodejs-99999999.ebuild | 114 +++++++++++++++++++------------ 4 files changed, 104 insertions(+), 63 deletions(-) diff --git a/net-libs/nodejs/nodejs-12.22.1-r1.ebuild b/net-libs/nodejs/nodejs-12.22.1-r1.ebuild index f96dac1dcb1..84110ff8706 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 3eb26e5b189..82f78fb0068 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." diff --git a/net-libs/nodejs/nodejs-16.1.0.ebuild b/net-libs/nodejs/nodejs-16.1.0.ebuild index 6727a82af9e..f8ca995c2e1 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 ) @@ -45,8 +52,6 @@ PATCHES=( "${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." diff --git a/net-libs/nodejs/nodejs-99999999.ebuild b/net-libs/nodejs/nodejs-99999999.ebuild index 110b22734b4..2b81f6a39ed 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 }