summaryrefslogtreecommitdiff
path: root/net-libs/nodejs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-06 18:23:20 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-06 18:23:20 +0000
commitd37b97a25b8b10f748eead6574b01f893f140b01 (patch)
tree13e2a142a31cd193a39c63042a64cab29a1f7ae9 /net-libs/nodejs
parenta833e3f4a431b8eea751b7420e127787f9c92117 (diff)
gentoo resync : 06.12.2017
Diffstat (limited to 'net-libs/nodejs')
-rw-r--r--net-libs/nodejs/Manifest2
-rw-r--r--net-libs/nodejs/nodejs-8.9.2.ebuild203
2 files changed, 205 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 7a18b16107df..dfbc329b4d5f 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -6,11 +6,13 @@ DIST node-v4.8.5.tar.xz 13316060 BLAKE2B fb32f176b9d4add3e9695f0bee7ebd0bba66770
DIST node-v6.11.5.tar.xz 15699404 BLAKE2B ba2df91bf5ef38cedb60b42919cf56f16807e619a81876fc92a5741e49da7ec91c4239d00f549c5e80d0bb8282bb9b396dd984507916cd18d61b403a3a7cef94 SHA512 62490725ef7957294c1bddf21ef0626c7472876791210168116501255ecee58457e9de9b044e10033706243299bbfd1495efeca169596fbf26f5eeba6d8fa4c9
DIST node-v6.9.4.tar.xz 15519264 BLAKE2B 4dfad88b06b209272b8468501cc3c87c40425781fb55011ee93326555c2df88a166ffaff1877563668e06389703053849361739556f1bc87c1e2386d48b9542e SHA512 86d3e2889031c2b50c021bd3fd63194c2c22c44291d51dff1b5e1652b01853c09d2880c2f58fdad062e3e2a3f637a3f0d78dac66b835b676790cf272e64f8dce
DIST node-v8.9.1.tar.xz 18290848 BLAKE2B b2a89d759bd19df6a6ea8db31ab3e63d111f24d9e00dbd8cdfc2d5d89a56ee7789c51b936516cdbce8384cc91591f4c1fb1eb0f2b3c18148a9211168cfe8121f SHA512 e1d93def34c1b91de90b807031e2f313661658cd045d44d290950190b10512770df05cb92e9657bab7ad6654d3359364193567cf693ddb2b3574d2a48e4ee256
+DIST node-v8.9.2.tar.xz 18294828 BLAKE2B dab8389814baa3b965050aa15f70410a1de376431d5be1026176ddccf44c94068e6ce724b3b0f0d4fb33fc16cb91ca91177926c1efed1453c200799da4ccea51 SHA512 94d442c69eea1548281bd068a6dd1fb2a8ccddda3615dd2a364e7f9095554f6d114e3aeba0034198cfa3e0782506a36c56a7c75a86a099478ca456d15fee0da7
DIST node-v9.2.0.tar.xz 18347108 BLAKE2B ff98445ac3e7649b4c6fde3a2fe8375e541f7e120d0b2dbd39a07f3953784793752a927c99a74da50f34cfe1447672f8b14af84a56e899fd46e52b9a7f8d19bc SHA512 3335a2ec17f4698bda58f2a2c9548546912b9a4109c0bff0ffc57bca14d40101bcc00356231c95c08733860286ac340e227ca79debac581835f84ae3967cdb4b
EBUILD nodejs-0.12.17.ebuild 3425 BLAKE2B b1c8ea2a39ee873c2d46a68af2e6050ae6e879ae9a80d20543e4486fda5885385b702394b4af1284883cc0685541ae7184e3b0c9b97866190d28e66a3d508534 SHA512 5507119d2bf420f8096c15258dded17cd5bc5470aa36d8ca1ef4324c183536580965b5c0b8022f22ebce509621d84ab2423d768e2c5d8e2268a40f622ead8075
EBUILD nodejs-4.8.5.ebuild 4435 BLAKE2B 0a226e511e27eef347c542d1830e86208636159384983d1be76f08b220008e5e999e303a78feeff58beb52d6f3f18382804b9114cd1d73a4b1aaab329f676406 SHA512 66f3bfae15bef4755f9ec630c4bc50a44ae0b63102c3568bf6ca41caea66bca09cd67eb8dc314a27b0a571f2672e93f3937b9f14e3b19a0eaf36221c36c07d66
EBUILD nodejs-6.11.5.ebuild 6090 BLAKE2B c90aa71b89dab6ff99da43cdfeae4eabcbd28f4e865bcd4129a0978070f176a826bd81b7464453ea54f4a17a582667a1a2f4622eec5d76117d4c4b2af6ae15e0 SHA512 3b203a496f10605a816d5cd8ca9563b9d8ce6829dccf6b8934d9c63275e042aca2371bb5b9356ad88d299aa7336c94e074fa5e8d9ebe8259bd80c76205216486
EBUILD nodejs-6.9.4.ebuild 6073 BLAKE2B cf41081773527f8efb120d6d7ba8d21dc834fc47fbf1964fc235853d842321899c605f42e2799136a54f65e6140c89a05726ba49d86a5fcd78fa4c78114f1e96 SHA512 aefc407c057e7c660ed0be4adc5056c9130b95adb63b22bd55d06c4981d70d53d82a65350df4778684c597de5b5bf6b2f8cd28b0ce61de4914c4db02ac3461f7
EBUILD nodejs-8.9.1-r1.ebuild 6421 BLAKE2B 1cc15687b44dc144b6f004483ed7fb875a3ebc3b2d82c6fdc95cd62b2c2e2ba2400dbb95c5a7ffa9cb338d6bab09fb4ef098fa71e3b3c2d32f6ddd302f384a6e SHA512 8c312851a25fd71aa64fc9b3a209f463b1c5099d87a0ae5ad3b6ba6c4c41651a683249c09b81079cc990c8bdb38bcca12138eec7f4a3d03d04a75c9036c60d7d
+EBUILD nodejs-8.9.2.ebuild 6421 BLAKE2B 1cc15687b44dc144b6f004483ed7fb875a3ebc3b2d82c6fdc95cd62b2c2e2ba2400dbb95c5a7ffa9cb338d6bab09fb4ef098fa71e3b3c2d32f6ddd302f384a6e SHA512 8c312851a25fd71aa64fc9b3a209f463b1c5099d87a0ae5ad3b6ba6c4c41651a683249c09b81079cc990c8bdb38bcca12138eec7f4a3d03d04a75c9036c60d7d
EBUILD nodejs-9.2.0-r1.ebuild 6421 BLAKE2B 8373da68cf051d055edfe47e737ecd091dce243430efb25cd9ce2b04213a16364aac0613ff793ef7e44dde94a1c28bfa7b0711c7bfa02a80c01097fb6dfcb546 SHA512 25d09d0fed3bf63d67edfc98699388b8fdd33812577417704f2a242f9e8290dce509c6c90b335020960a387999e35c0343256e5a85003b9a253bcd14ba805eb1
MISC metadata.xml 502 BLAKE2B 8640b71810454f7c091026e02910563ee44866ed666fc18be431415054ce38e6dab45f8e1890161d5b39e6eafe0279caed936046b803e619880a7ddeb3e4e428 SHA512 bc6fd0a671ad96d8c3f190514932ccc19319c895829136cd04d99b4123666380ed84502d7dea711dfb1d0ba7f0c6edb88afdc95ff24fbca4a6ad636062b5c32a
diff --git a/net-libs/nodejs/nodejs-8.9.2.ebuild b/net-libs/nodejs/nodejs-8.9.2.ebuild
new file mode 100644
index 000000000000..e3f1fec1f463
--- /dev/null
+++ b/net-libs/nodejs/nodejs-8.9.2.ebuild
@@ -0,0 +1,203 @@
+# Copyright 1999-2017 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.15.0:=
+ >=net-libs/http-parser-2.7.0:=
+ >=net-libs/nghttp2-1.25.0
+ sys-libs/zlib
+ icu? ( >=dev-libs/icu-56:= )
+ npm? ( ${PYTHON_DEPS} )
+ ssl? ( >=dev-libs/openssl-1.0.2g: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
+ "${FILESDIR}"/nodejs-8.9.0-shared-nghttp2.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>"
+}