summaryrefslogtreecommitdiff
path: root/net-libs/nodejs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-05-17 22:49:47 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-05-17 22:49:47 +0100
commit30c53e395853f5bfe805a1e429fcf26666eed8f8 (patch)
treea0670eaf9babda7b83503f7d36806a944bb49752 /net-libs/nodejs
parentd302a5d7fc9caafba5c8a404f2891bb6ccdec311 (diff)
gentoo resync : 17.05.2018
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest2
-rw-r--r--net-libs/nodejs/nodejs-8.11.2.ebuild201
2 files changed, 203 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 15b1f305983d..22129213f514 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -8,6 +8,7 @@ DIST node-v6.11.5.tar.xz 15699404 BLAKE2B ba2df91bf5ef38cedb60b42919cf56f16807e6
DIST node-v6.14.1.tar.xz 15758180 BLAKE2B 63db5d1f73cc16f5c73012953799193cbd58da3aa92d3d48c5419d4e5c4e9126a2eb45b7e27e7396269deeca7836cac62c5f89e5d23b695a3455305739d5df90 SHA512 c1f725c76bfad914d8d607e1d0bddbb6cb75a99adcf781d12291830bc41610ede346a5ab29648d16ad8bb3031dade89f7f4e16708083b5fcda2def965f0c7d21
DIST node-v6.14.2.tar.xz 15842896 BLAKE2B 8cbfdc6b865d003612cce1be9d9bab2d1e0a85e4a7d05b093dbd075cd659ccf834de3107d568a3d2d9273ac848ee02afd5c4c83789d9021f32654af82ccc5373 SHA512 0390febbc8abbfb8f9da72489bd90af71fa71c52bbac8f156017c66cb6fd505b52173f5626b75bcf10be22315ef0774b4c93369089e91688ec9567cc7405c6d3
DIST node-v8.11.1.tar.xz 18279516 BLAKE2B b06f31571c93455d16899e3ba57d1e5835951be7a644fafbfcac9cce1bf33ed8ca47929e0a5d0df72034a6c2b967c578e3c78a2ed27ba85e41c4af1de2307293 SHA512 0ca0dead15a1623ece7f972d420dec623141a795ddd984c32ce7e92ae32ead97bb0153ebd8c1c249b91a1bd6efcef7fb313105455f66d4d181473153c4e0736f
+DIST node-v8.11.2.tar.xz 18318444 BLAKE2B 04041462526dbcd6c4b852f9ca1dd1ed868a1afef51f6560eecf0c58a659c0cb5adb54e4b791655948ffadd6be4e53a07ca02baffc997c9b2f1b2cd9492b314a SHA512 b1aa109d0c1e498b840d14c91d6c268ed0f11e214a0dd9469ba10c06712909ceb7c38eed56c564a7b262f414ecda399074785c2f757b46827914cda2791102f5
DIST node-v9.11.1.tar.xz 18500884 BLAKE2B ac086b59144ed7393a7c0293616c1ef2b149e23ac67ba8ccf324c2c1f97b18435889e4fb2f1c205834e3309728853dcdbf34d00cc319a10bfed7cbea9fdf01e3 SHA512 6e5ed333ebb678c08fca8f567708874a50bd9311e326196bf86ca77db3046dd196b50208bcffb7f3435f0c031d47dff5471465c840be12903f3c683802000a1e
EBUILD nodejs-0.12.18.ebuild 3435 BLAKE2B 2fd0c799325e0def135f2618901aee64fd5d950aabe64b4ce52d3d525ce08a7581c68b60fe2e84773e04a0c101d873efe7cbfb08020a0b6f384649d0a265e182 SHA512 6d9a761e4fc8cd35899a10f57e47f00c1222c6573246756599c702e17885422a253b6906b1fc119d4298e562f6bc9994c89f59a405021bed1f6e03c4f53d88f0
EBUILD nodejs-10.0.0.ebuild 6333 BLAKE2B 5ca8e721fa5bfbf5c7bb4602de9e15228de138cde1ae522b673cfc61f601c9019e1988b472566172eb13471c91c0941b4d1d42db79d52f64a3be820322c77a7c SHA512 91492cd5bc82b5b454aa418b6b176ca6ad6417a7edd032c68f0c36cae4f7799d2da62791835656d5ba7487f1eb9f663f7347bd2b73c1fb1efd5fa2c732626e55
@@ -18,6 +19,7 @@ EBUILD nodejs-6.11.5.ebuild 6089 BLAKE2B d1b1c07ac7eb975d28291fca7fc10688e316e1f
EBUILD nodejs-6.14.1.ebuild 6170 BLAKE2B f8f9b6ead741f993da24c760daa48a7a5ac9415a9fec05c313257cd02c9f86ba03b4c15d7e2d0ef18dd1ad1e23b5d5152edb794756dd356368ac2fb534b68148 SHA512 c49be4f51d5fcace57544a7ab35ceac10870cee4e8341b9fb7303b2b030e21b65d3d158a854fe52b5d6813a5bf15cf5cc6c5dff254c2824c6fe8c8bc826aa634
EBUILD nodejs-6.14.2.ebuild 6171 BLAKE2B 7946e4fcd461d071fcdb81c1642d0eb6d812e5660aa308ca3bf78501aaf9cc9430f9be3a806e371c9216774a545507759faefcb30ff4861a91fc05915b4d9601 SHA512 3e77ce77a4d9453d36eb252834ed056751c8805d4e89e47448bc1bdeeb41732a8d380eb8b4c1d13254ce14ff37bd586ecf381a5878901528b5a50de777056f6a
EBUILD nodejs-8.11.1.ebuild 6348 BLAKE2B dd10b95ed52f83175d16c6a68c9daa39f38f8e839d2f181c8a4fb0f64715561c68cff6e704aedc186af3b657dd87b4b05f29ae7c01ef1b1a31d1799a7a66dd2d SHA512 09fc1df3c4cdeafc27dd63836f30f62c81144ec70ef09acd8ebd0e093a07c413c368c47ab6657c9fc290bf59abe72062e2f92b7f6782ffdd49e80d2036936a9f
+EBUILD nodejs-8.11.2.ebuild 6349 BLAKE2B 3698fe33d9c27ff1537be89b21fb845f7a350ce6dee2bc1f0d2f920fed6eb3588bf6400564657e8265e6dd901a658636f2b1a1e19a1673f0176668a34690cf55 SHA512 4180ee48c7473e74e0db596a4084915c801a5c1f40e87c72ef8d80a440a56ef1e585686bf9be8a744eb7e47a393376d26a3410b48ec79d4467bee6a3b1c03789
EBUILD nodejs-9.11.1.ebuild 6334 BLAKE2B 51236f25ddb70527867a9ceb89d77872627db453f74c909d0a9a57457b4814322731c9e5d6f93f9f5b37945bd35bcdda924834e22ce19c1eaf97df3873488ade SHA512 45035c68b6202f9aabd12be127674b89811e0192dcc5604969b27b85a4662a2219dfa6e507d40d7fb5f8e9643c49e755f19ba686fc611e83e1165e03fdb1c566
EBUILD nodejs-99999999.ebuild 6267 BLAKE2B 2858d03713127b51e3897909454354ee34f3ba11273972cf62cad065faa3a571bb1d17c7353ecc3487e9e8809bae45caa9898a05bf7c1871b13cc6bc7d7668ac SHA512 8a8f375e96f33b6c85f7c188b488586c4193708b9d3618e4f83d3f562bfd55baf8034b61b15b8e003611c6209787339adfd07358237b70250de376b1612d0a06
MISC metadata.xml 573 BLAKE2B 89ced6a86cc67a80119e520991d1de3229be3a777ff4f7b49daa8854c470e3f7e3335681028ce3f18d3acfc8c01057dcf5d0597becd76ef95fcc50b3b214c277 SHA512 231bb23c3dd421ea5c618bfea3a70225e089e6c2eed74fc80ca3becf3f84072dfbfc02a100083ac533a0d95496ce2ba802e1ec65e64659afcf2e70e638b7a2bc
diff --git a/net-libs/nodejs/nodejs-8.11.2.ebuild b/net-libs/nodejs/nodejs-8.11.2.ebuild
new file mode 100644
index 000000000000..a9902c8f8b4f
--- /dev/null
+++ b/net-libs/nodejs/nodejs-8.11.2.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+RESTRICT="test"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-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"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
+IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ inspector? ( icu ssl )
+"
+
+RDEPEND="
+ >=dev-libs/libuv-1.19.1:=
+ >=net-libs/http-parser-2.8.0:=
+ >=net-libs/nghttp2-1.29.0
+ sys-libs/zlib
+ icu? ( >=dev-libs/icu-60.1:= )
+ ssl? ( >=dev-libs/openssl-1.0.2n:0=[-bindist] )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ systemtap? ( dev-util/systemtap )
+ test? ( net-misc/curl )"
+
+S="${WORKDIR}/node-v${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/gentoo-global-npm-config.patch
+)
+
+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}'/" lib/module.js 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() {
+ local myconf=( --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 )
+ use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl )
+
+ 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
+ # Patch docs to make them offline readable
+ for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
+ sed -i '/fonts.googleapis.com/ d' $i;
+ done
+ # Install docs!
+ dohtml -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
+}
+
+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>"
+}