summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-05-19 23:46:25 +0200
committerJeroen Roovers <jer@gentoo.org>2020-05-19 23:46:39 +0200
commit7d77e077523fcdbccb714a7909024b7eaa1ed7be (patch)
tree728cc63a2666d8dd86190d85b8a71be44859de5d /net-libs/nodejs
parentnet-analyzer/wireshark: Remove /usr/share/appdata (diff)
downloadgentoo-7d77e077523fcdbccb714a7909024b7eaa1ed7be.tar.gz
gentoo-7d77e077523fcdbccb714a7909024b7eaa1ed7be.tar.bz2
gentoo-7d77e077523fcdbccb714a7909024b7eaa1ed7be.zip
net-libs/nodejs: Version 14.3.0
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest1
-rw-r--r--net-libs/nodejs/nodejs-14.3.0.ebuild209
2 files changed, 210 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 9c13e30211cf..f60462dcf834 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -8,4 +8,5 @@ DIST node-v13.14.0.tar.xz 32862504 BLAKE2B 2e74e1d8afd508aade66db2e4c251be183089
DIST node-v14.0.0.tar.xz 32850900 BLAKE2B ef24e6559246f64d9a54d1e6c9ac390bb416af2ac494547f4171db014e2213cd0b11a482ab611865ca3f61a60a9d793207c53f1779d687a7ba7a32fc4d9f29cc SHA512 030dff2bc46594e5e86e0383185030980ae486bbdab2fd2cf65e591c80a9426cf4e6f16c384d36e6094b8a58e8511d7019bef379c44650507d1352a680505710
DIST node-v14.1.0.tar.xz 32861052 BLAKE2B 34727e0c615b08941edf29da6cc88cfb039f25321b25ea2e544dc6b844520e9174572b5ada5719d73fdb55dbacc156726fdfb7a552defd02f2bfebd3a2cc3835 SHA512 90c981ea198dca59aa1e2b8e528d6e7ea0bf13066ae0d9ffdd9018d8923496e029f0e3ddc0bbf8e0eb67e1087a26a41e16101c83297e086b904a4a92865e7101
DIST node-v14.2.0.tar.xz 32884616 BLAKE2B 7bcb07cb7623c5e08c20267c320cdf23ad110f124c5ad1f2447ef8b76ab8dc44ed50dab7c5651424d9d3a36f7eeecdf3292b07c02cb2e22c3fbe4ed633c4b842 SHA512 47e5ec0b7a207082d43419a7e0a6ea9242ec43b4d7c2217eb66d0b45e2f4d5cb561b3f6fe35fdc41a8be95c182dc122ba262f696ebd12833596d71b372ec85d2
+DIST node-v14.3.0.tar.xz 32985344 BLAKE2B 32ee357e109484422c3b22423ab9a593cd5d4611073c820f90c196dae4df2860573cdd06170879f675b738b01885eb2fe0f25c2328841838bf9367324cc981a7 SHA512 3afcc430bad57150baa8d1c0e5ef0f64691ef6549a052be654a86313fe28f31e7fdfeea4d2b3993798a7141bc6d7b1642747d1bc2636139e2f2fd79441580148
DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42
diff --git a/net-libs/nodejs/nodejs-14.3.0.ebuild b/net-libs/nodejs/nodejs-14.3.0.ebuild
new file mode 100644
index 000000000000..ddd7391838eb
--- /dev/null
+++ b/net-libs/nodejs/nodejs-14.3.0.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_REQ_USE="threads(+)"
+inherit bash-completion-r1 eutils 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"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
+IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test"
+REQUIRED_USE="
+ inspector? ( icu ssl )
+ npm? ( ssl )
+ system-ssl? ( ssl )
+"
+
+RDEPEND="
+ >=dev-libs/libuv-1.37.0:=
+ >=net-dns/c-ares-1.16.0
+ >=net-libs/nghttp2-1.40.0
+ sys-libs/zlib
+ icu? ( >=dev-libs/icu-65:= )
+ system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ systemtap? ( dev-util/systemtap )
+ test? ( net-misc/curl )
+ pax_kernel? ( sys-apps/elfix )
+"
+DEPEND="
+ ${RDEPEND}
+"
+PATCHES=(
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
+)
+RESTRICT="test"
+S="${WORKDIR}/node-v${PV}"
+
+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."
+}
+
+src_prepare() {
+ tc-export 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
+
+ local myconf=(
+ --shared-cares --shared-libuv --shared-nghttp2 --shared-zlib
+ )
+ use debug && myconf+=( --debug )
+ use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
+ 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
+ dodir /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="$(emktemp)"
+ "${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
+
+ 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() {
+ out/${BUILDTYPE}/cctest || die
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
+}
+
+pkg_postinst() {
+ elog "The global npm config lives in /etc/npm. This deviates slightly"
+ elog "from upstream which otherwise would have it live in /usr/etc/."
+ elog ""
+ elog "Protip: When using node-gyp to install native modules, you can"
+ elog "avoid having to download extras by doing the following:"
+ elog "$ node-gyp --nodedir /usr/include/node <command>"
+}