summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Bergström <bugs@bergstroem.nu>2016-03-10 14:28:03 +1100
committerPatrice Clement <monsieurp@gentoo.org>2016-03-10 22:20:50 +0000
commitc3f1b67f625d8d27825d22ff23e241823966f1a5 (patch)
tree6a696c10e8ecfa12f9ebe6c6f6a26f3ef7fe59cb
parentmedia-video/mpv: remove old (diff)
downloadgentoo-c3f1b67f625d8d27825d22ff23e241823966f1a5.tar.gz
gentoo-c3f1b67f625d8d27825d22ff23e241823966f1a5.tar.bz2
gentoo-c3f1b67f625d8d27825d22ff23e241823966f1a5.zip
net-libs/nodejs: version bump to 5.8.0
Closes: https://github.com/gentoo/gentoo/pull/1021 Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
-rw-r--r--net-libs/nodejs/Manifest1
-rw-r--r--net-libs/nodejs/nodejs-5.8.0.ebuild194
2 files changed, 195 insertions, 0 deletions
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index 26b67b397dc8..a90d78417246 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -7,3 +7,4 @@ DIST node-v5.3.0.tar.xz 12776504 SHA256 e5115ee78c31ac3af0f2b3553aa84fff2f49ae59
DIST node-v5.4.1.tar.xz 12812444 SHA256 4e7d3fdfeac85c46ddaef0224695620f218e7a178e97d6e210d6d643483f1d53 SHA512 9803478d502bf11bfc77e56109568b0f64186826be35a9b36b47b63ec744595db128955e6f7bec7eb4db39e85afdd364b1215427954ce33ab67689ff03a5bc57 WHIRLPOOL 87f791f4f0722a2d3bcb630d22548f395ac0e86dedc37849caab2d63bc43bad2621058f95eb2b31b1f3b01ec8585c0731c969a1f0167d95495008b44f3b69066
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
diff --git a/net-libs/nodejs/nodejs-5.8.0.ebuild b/net-libs/nodejs/nodejs-5.8.0.ebuild
new file mode 100644
index 000000000000..7084a66e6c9a
--- /dev/null
+++ b/net-libs/nodejs/nodejs-5.8.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>"
+}