summaryrefslogtreecommitdiff
path: root/net-libs/nodejs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
commit90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch)
tree83fc5facb6b12be510a37bc3d241cc63e965b13a /net-libs/nodejs
parentfeb0daf81d888e9160f9f94502de09b66f2a63fd (diff)
gentoo resync : 29.06.2020
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest2
-rw-r--r--net-libs/nodejs/nodejs-10.21.0.ebuild205
2 files changed, 207 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index c134626f9ed6..ae31a8d3beb0 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -4,6 +4,7 @@ AUX nodejs-13.8.0-paxmarking.patch 4213 BLAKE2B 4235139400e33fbc0e9f9f965953ed16
AUX nodejs-99999999-llhttp.patch 506 BLAKE2B eea449910b97dfc320247f20bf20467f6c5bfe46f7acc95761270928b3413ffaa04ee948d8dece9a8ba47288804144c75ebda1009af17169b36bcd5b39aa0c33 SHA512 13cdbaf73696b4feef1fec48ac43f6a6d80f59096a81308c746655e2cffa0b0ef78850facff103f27062fd25192d8abd7bc200b36bd25df7bd4b800f80da0c5c
DIST node-v10.19.0.tar.xz 21906168 BLAKE2B 395504ef3befa47d8b967114e019e6a76c799871e7eb21e2c6c0453655ffa07f17f42209daddeb5417342cfbad71ba1a35ae15a2d210b692bc60be270c2fc415 SHA512 512efc58415ed789938c434af131d76bdd51772cac9f7e380afaa79d83cc9c433a979068fc7272adba6ba6551d195267978e1fc819236926b0d1fd6cf91c5eee
DIST node-v10.20.1.tar.xz 21947588 BLAKE2B 6078e29a125fc1020de7b62c97174d82273af5f6def1dbd2be7968227400735d62f8427811cced69f6365f3232d8800cad388853c34dc6620dfbbc5a27d7f716 SHA512 be2f87e1089be37caa87f5c109121f3f054ffc5a66c4d468f631fa718e461425fbb2dc397459e252eb66c11a06b60659a449dcdcd9d44506732f3703660b597b
+DIST node-v10.21.0.tar.xz 21953796 BLAKE2B 6bdbeafb0f4ceb5c02df96ea74e8796680706756d3cadf48b813c46bdf91e3e1d5c49616ff827f01c17ed3bce1af303a5f7219c1995adb482b11203091d614f4 SHA512 613d3c1bca79ea5f127dc6793de2b5cfdfa056c01ec092e3b7ee79205894b21ca5ec4a367265122641dd1d360c675cfb36a4f7892894194ddd18abd1b2206544
DIST node-v12.16.1.tar.xz 23481768 BLAKE2B 29371b952c14907778c064269108f1da5e3818c32773e73090c61edcd07190c418189db6a505987ca71f99bb868880e297de5d2181b9a880774eaaf515985f26 SHA512 fe1e9fabb6fe52e3bc4275b33e6c5e4a761550b04964c0ae7dbef7172f5d415207bb2985751d068e357ce45a0ba414b07c0abd1531ef839b9463e98eeae8f9a4
DIST node-v12.16.2.tar.xz 23654020 BLAKE2B aa4bb764a8731e32ce07d03d96d573632bbf9af79b127c2acec48fcf335c01ea0ea99532670a46befac42e2e1ce5a4dbd2e4cf0d068bac05749d87af59bb80fa SHA512 81688468bc6e20d83f7f58f0c15f9291a801eb2acc8ba7279e65d81f3eb4ea95e3b6cee0d09738c0d0fa35226ae3d52f2bad5da63a20a3edc9129197d42d000d
DIST node-v12.16.3.tar.xz 23682432 BLAKE2B 91b97c0de9c76f33d080f3f12a42a15140be6e3f4d42022a55305dc2afc04de6a2b8364b9fc5df0dd71c9ec249eb9e4da8ff23f53be43a1f306d2a6fbc6d6bce SHA512 e5d2d1960972f19ef5acc667efb702d534eb436212dea9e0bfd817328c927b55734406f232b32bba366f05c2691e5085e3a6f8c1e2d959398745e60719e731b3
@@ -14,6 +15,7 @@ DIST node-v14.4.0.tar.xz 33005312 BLAKE2B bc1462d897e24a6b842e6f8146971866c73b54
DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42
EBUILD nodejs-10.19.0.ebuild 6357 BLAKE2B b44a9661af496c8ba80b1ee680b2c511b3b6c2f7702d23710ff2876312e1f20016e579a36531083699a9881001e65150565c3b1fe6f5875b667aa9b79e87a665 SHA512 b290ea8a99c36e16fc0dcae001a3466a094c7ab6953c04f04a86ee0cef14b8ba861e86ad44e0a2b882636b16e95de6975afe40bb5d5e090791322bad6c276b8c
EBUILD nodejs-10.20.1.ebuild 6361 BLAKE2B 347a4d538848e42a071ecab801743002b1a2c979dfbf67be153024541b53ab7ad9814d25bdeb31ee13a659a24470c6a73fefcecd7b1175836506bb25681ff4cf SHA512 6858af544698d7b343bc41b0c6a57956cdff1602d0018b00662d0ceb4b619e821fd14dcef67573b96c680e1584714745e007088dbeda9f5f410937892260186e
+EBUILD nodejs-10.21.0.ebuild 6361 BLAKE2B b9cade7c3afd16ae8e365a6769480d6512ad12e44e1a101894b6637c165755d87e0bc5054c3c3c7121615fab584196f681e1cb6e29c75f3962c20a67649ebdbe SHA512 39e1f76ca82c6d46f919fbcc23c1bfbd4eaa8229e7c1d2b0b7ed14176e91c0847eb9362360f13a6d060552a76fbf07479e45886e8fb95e38c1d84d33cf021866
EBUILD nodejs-12.16.1.ebuild 6199 BLAKE2B 401807f39cc6cb178a532cb99f73558c47916f766a45184ce63cd0260605d2977a164cafa8a1197b7177da6b8198ba3224e2ca96733b47e8ea104fe1d6465a4c SHA512 7ce5fd34dc047875994da88d022c693e599b379bd9bcd98ecaecd99dd8eb45e7bfafc303f4d328e5cd241e5486a015a29197df0a905bb67e84c6b943930e229c
EBUILD nodejs-12.16.2.ebuild 6203 BLAKE2B 013443da57ae66e7a58247e7ab3599d72fbfcb1a62f9bf6d06b4412a5bae1372eefd7e8cbc68aed2d97b72734c60ce3a38effb34b6961872c946bfa4c5bba4b6 SHA512 9b56e373305402bd499d09b04f748f555f6e1966bbc5c112ddb0e1a372615c89b58850bc802b86f9e0b06942d6707095f156a05b15ad9c01b55c4c23c1301d53
EBUILD nodejs-12.16.3.ebuild 6203 BLAKE2B 244b4c61b0f6272b26e5664ddfbd67eb6bb8637af78b1e57b5a077d7ee978499875e7d4a8dacb29d93cfe6e589415c969fe52012b41d5dc718c78a25bc1d913f SHA512 19b19f7c108ae641833c1c8e1351de8ed511bf04b53a5003d5d6225b5aa59933857368ba8415afb88b2278d1daac8f4de9d57f3b755a3a27fa33b04a3f470a9e
diff --git a/net-libs/nodejs/nodejs-10.21.0.ebuild b/net-libs/nodejs/nodejs-10.21.0.ebuild
new file mode 100644
index 000000000000..f7ab581674c5
--- /dev/null
+++ b/net-libs/nodejs/nodejs-10.21.0.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 )
+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 +snapshot +ssl +system-ssl systemtap test"
+REQUIRED_USE="
+ inspector? ( icu ssl )
+ npm? ( ssl )
+ system-ssl? ( ssl )
+"
+
+RDEPEND="
+ >=dev-libs/libuv-1.34.2:=
+ >=net-dns/c-ares-1.15.0
+ >=net-libs/http-parser-2.9.3:=
+ >=net-libs/nghttp2-1.41.0
+ sys-libs/zlib
+ icu? ( >=dev-libs/icu-64.2:= )
+ system-ssl? ( >=dev-libs/openssl-1.1.1:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ ${PYTHON_DEPS}
+ systemtap? ( dev-util/systemtap )
+ test? ( net-misc/curl )
+"
+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
+
+ # make sure we use python2.* while using gyp
+ sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
+ sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || 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 deps/v8/gypfiles/toolchain.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
+
+ default
+}
+
+src_configure() {
+ xdg_environment_reset
+
+ local myconf=( --shared-cares --shared-http-parser --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+=( --with-snapshot )
+ if use ssl; then
+ use system-ssl && myconf+=( --shared-openssl )
+ 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" \
+ "${PYTHON}" configure \
+ --prefix="${EPREFIX}"/usr \
+ --dest-cpu=${myarch} \
+ $(use_with systemtap dtrace) \
+ "${myconf[@]}" || die
+}
+
+src_compile() {
+ emake -C out mksnapshot
+ pax-mark m "out/${BUILDTYPE}/mksnapshot"
+ emake -C out
+}
+
+src_install() {
+ local LIBDIR="${ED}/usr/$(get_libdir)"
+ emake install DESTDIR="${D}"
+ 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 "${D}"/usr/share/doc/node "${D}"/usr/share/doc/${PF} || die
+}
+
+src_test() {
+ out/${BUILDTYPE}/cctest || die
+ "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
+}
+
+pkg_postinst() {
+ einfo "The global npm config lives in /etc/npm. This deviates slightly"
+ einfo "from upstream which otherwise would have it live in /usr/etc/."
+ einfo ""
+ einfo "Protip: When using node-gyp to install native modules, you can"
+ einfo "avoid having to download extras by doing the following:"
+ einfo "$ node-gyp --nodedir /usr/include/node <command>"
+}