summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-03-17 04:27:31 +0100
committerPatrick Lauer <patrick@gentoo.org>2016-03-17 04:27:31 +0100
commitf29a36ccb1526e919ad54a62ce0d805edd3c2dd3 (patch)
tree1d15813152ea0364ca9a1e2f23b92aa8126bd253 /net-libs
parentapp-editors/gvim: version bump to 7.4.1583 (diff)
downloadgentoo-f29a36ccb1526e919ad54a62ce0d805edd3c2dd3.tar.gz
gentoo-f29a36ccb1526e919ad54a62ce0d805edd3c2dd3.tar.bz2
gentoo-f29a36ccb1526e919ad54a62ce0d805edd3c2dd3.zip
net-libs/nodejs: Bump
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/nodejs/Manifest1
-rw-r--r--net-libs/nodejs/nodejs-5.9.0.ebuild194
2 files changed, 195 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 572ba441e04a..0b47e63a5d95 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -10,3 +10,4 @@ DIST node-v5.4.1.tar.xz 12812444 SHA256 4e7d3fdfeac85c46ddaef0224695620f218e7a17
DIST node-v5.6.0.tar.xz 13311288 SHA256 588341e466ac72f6b8e9fa500f04edf149f7d4e8141c4175c495d6d1484405e3 SHA512 ef38d9ce708b8283b7f7441a0c2787e64c0602fb50542b4ccd29e705f879626adf2c1d89a9040af55b1f00b6e45d1d87ca829bf6816768933af9b5661f654aa7 WHIRLPOOL 6b5dcd85a74b47554400a6ff62e4001bb04b9063987571ac4434116d807d04ee58a0ca622973ff4b81c064e4ec1b0cd2f881680eb7f1ced5aeda745bf48538ab
DIST node-v5.7.1.tar.xz 13191096 SHA256 029ed8aeb997c68d1a901cd837af02d24b6b5e20a4ff93bed090fd289f91a9a1 SHA512 11b38722f1bb4c8310d66304541b6a644c453b770d562c0f172391b1234a304493ed39ddbd6790f0f98d3fa72a0be2ac0ae292d67604178a108217276530a463 WHIRLPOOL 6a7ea4bbfb0418912b4505a09a926b3a518368142e77bbddf78e325d719180254c6157ef46851eee61469749e1eb9dbd671960544b9cb0f8264f8c13d3542a1c
DIST node-v5.8.0.tar.xz 13214028 SHA256 c1246d473d6650ca02ab168eaf840e9edda82a4190ff08165fc44a7b381a9361 SHA512 ab23b90714be2efc937da2fe11457f266e4bb392da9856e548012d1812546ecebf4b49546d82c595b15d4c78835df612681a2bbd62dd925e1db204a19b6a09ce WHIRLPOOL 5f6dfdaf1e87ae79f92c9b075dec03287b896b05a4bc1c477404f571f25672ca8512a5cb88e602923135e2fd0ee27aea12bcb1349a6a5f2ac52b8855512f44b2
+DIST node-v5.9.0.tar.xz 13223372 SHA256 9bdf2f8e44a721df459dfad0072a8ac46f11c05d25fc33dc0dc9c522827e34bb SHA512 d0ec18fbb497d91d1520362af4a882357e1d6b33c3ae0e6cbb9697e1d1f4504361f8d6aeeada6a959b2bb190a81b5f118a66c768421344dcb6aebda512a24fa7 WHIRLPOOL 0f895fcc9e2fb82d203e80cf3166f9f524fb4e82ae2d5b1706a5dfe0db08588b474a32294c7865198cde116f228e60a6dfd3f1a965549792c884db7b44fca690
diff --git a/net-libs/nodejs/nodejs-5.9.0.ebuild b/net-libs/nodejs/nodejs-5.9.0.ebuild
new file mode 100644
index 000000000000..7084a66e6c9a
--- /dev/null
+++ b/net-libs/nodejs/nodejs-5.9.0.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+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 ~x86 ~x64-macos"
+IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl test"
+
+RDEPEND="icu? ( >=dev-libs/icu-56:= )
+ npm? ( ${PYTHON_DEPS} )
+ >=net-libs/http-parser-2.6.2:=
+ >=dev-libs/libuv-1.8.0:=
+ >=dev-libs/openssl-1.0.2g:0=[-bindist]
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ test? ( net-misc/curl )"
+
+S="${WORKDIR}/node-v${PV}"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+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/|| 'python'/|| '${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 || 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
+
+ # 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 myarch=""
+ local myconf=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
+ use npm || myconf+=( --without-npm )
+ use icu && myconf+=( --with-intl=system-icu )
+ use snapshot && myconf+=( --with-snapshot )
+ use ssl || myconf+=( --without-ssl )
+ use debug && myconf+=( --debug )
+
+ case ${ABI} in
+ x86) myarch="ia32";;
+ amd64) myarch="x64";;
+ x32) myarch="x32";;
+ arm) myarch="arm";;
+ arm64) myarch="arm64";;
+ *) die "Unrecognized ARCH ${ARCH}";;
+ 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} \
+ --without-dtrace \
+ "${myconf[@]}" || die
+}
+
+src_compile() {
+ emake -C out mksnapshot
+ pax-mark m "out/${BUILDTYPE}/mksnapshot"
+ emake -C out
+
+ use doc && emake doc
+}
+
+src_install() {
+ local LIBDIR="${ED}/usr/$(get_libdir)"
+ emake install DESTDIR="${ED}"
+ 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}"/out/doc/api/*
+ 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'|'${D}/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|'${D}/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>"
+}