commit:     b4ba9a7048d463fab68674e67cb9a0d237342a29
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  4 09:46:34 2016 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Aug  4 09:48:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4ba9a70

net-libs/nodejs: Version bump.

Package-Manager: portage-2.3.0

 net-libs/nodejs/Manifest            |   1 +
 net-libs/nodejs/nodejs-4.4.7.ebuild | 144 ++++++++++++++++++++++++++++++++++++
 2 files changed, 145 insertions(+)

diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
index a2f4109..2729d41 100644
--- a/net-libs/nodejs/Manifest
+++ b/net-libs/nodejs/Manifest
@@ -4,6 +4,7 @@ DIST node-v0.12.7.tar.gz 20063992 SHA256 
b23d64df051c9c969b0c583f802d5d71de342e5
 DIST node-v4.4.0.tar.xz 13107524 SHA256 
6ae44ae9a9cd1f102ca7f3ea09ca6223afe88fab4911f1bf21c9da2a1e795f1d SHA512 
4bb1f660c5a80fffb3399c4465c311bd13c2f78e65fc9aaa7df96d3c2db5d3b3de3b4be9f50040065fa1889ad247a2949a84a6d9044301a636ebb8baf73edd4d
 WHIRLPOOL 
50b126fc3a7b8b6be693334375b4704217b4e6f00e7e32404a17ebad512e3cc72434f00863a1e69bb85e01859054faac7bb5c2d25889b8ef131191a388528e0c
 DIST node-v4.4.1.tar.xz 13112424 SHA256 
3a37c89a3ac965688f9e6557579993b73eee44195a5fd53fded03a667d3d6a0a SHA512 
53b479085a6f43b5932c75729b21a3efa67534ce6c10445c2ba66492a0e3f12d8e5de8d75bd583239b68f3d5ac1b639d45fd43d631d8a5ef013e25bff0fdab22
 WHIRLPOOL 
d9cee2193a0f94f17ab84722ffb9999f156014cbe0b83bd138d5404ec543a3398bb4d1b965940b19230cf069337dfb5e0159aae3e694137e09261133ae2e2fdd
 DIST node-v4.4.6.tar.xz 13211732 SHA256 
0f6bbfbea525469c91932b1aac35e0810e6bcda96f1c720e42a433942ee66106 SHA512 
b06219ab63de89eeb1268d677769cb17c8290555962b1cbfaafbede3d2dbefaafb455f32a611160fcfbf7400059fa79ec3f9c2f3287c8746669c05b42d7aaa7c
 WHIRLPOOL 
ffb1372193a72a2e1ae6e21c281a28e770443e36e5e349b48bf30e92b3f6f9d9ba901794eaf1f7c8eaf05c7365e1249bb210760fa26680ed13d1a6d8854c8ce8
+DIST node-v4.4.7.tar.xz 13231156 SHA256 
1ef900b9cb3ffb617c433a3247a9d67ff36c9455cbc9c34175bee24bdbfdf731 SHA512 
0b4df07057ad8661fec7a2194d608e37d9c4d50b3e023bcc8c3b40308af6925098c280ca4b0c96454ea4f03f556d6b92133a6e5d3d61036afc5dd89e18c95c9e
 WHIRLPOOL 
3559240a51f77c64db5edd8d3436085f8a4164a25e442df90bdd4c4a81f06a863fe94c4bf26e7ad5b0c1bf6e1102b769fc18fa89ea76c548d84e4cfc9ee43d87
 DIST node-v5.10.1.tar.xz 13317868 SHA256 
9eecd853cdd06ebee24a1bb8d753cd20af5a19297c5d3a3b1680fe36b47d5cbe SHA512 
e0dcd5fd6d23c4905a4fbf483621cb2a878516a5bfeefad68901edd1be2dba76281cd22fff073f5f8e2432dbac3c68728c597e1aab753ce3b3dfe9e0674ef808
 WHIRLPOOL 
2aecbb9a538320c09d6306a756ed6cde2537fd4d9e5ef9b6713956062178ba8070d060e1ae2fab264d834fbb1e5452eaf744b4c0a9cd70ffa181e6c479b4086a
 DIST node-v5.11.0.tar.xz 13298460 SHA256 
083766aff72fc5c78f6999dd0d00bc0340a052ab270fd60d6928b719ca2b3fd1 SHA512 
47f2b25007877dc7597af9dd841e4f30197a9df6dcf01f45336c2eaec8d5c75057534b962df361e9bdaf461dab8cb97a878d326d74105a38a7797b77ed67df44
 WHIRLPOOL 
0b670baa82e3dbd0a2492476f3ebca8006d7c1c4efef47e85954624ad776517a3f0403d8556e438c16c8373818bed444bc66a72500c3a55025d50cdb694ec411
 DIST node-v5.9.1.tar.xz 13226192 SHA256 
668067077dfceb3d2039d0df693fec6aa20b920d01a42b53dc61d4aa91e0ae55 SHA512 
34774d88eda775bdf153a76bd02b26c499e4a9ef47d8e94ad7b66d360d04891b45ce8f211833ca69e8c0a786ca36424b0c620a90b1fbc6d5afc77d20f4b5fadb
 WHIRLPOOL 
d666aa6fd4d577f7a6f89c3bfa75e62a0281e0dd7592373f384bfe01fa2dcbf81156bf6a21fc2097d48d5024a39057713c2593f4609c70ff8f84090471b073a9

diff --git a/net-libs/nodejs/nodejs-4.4.7.ebuild 
b/net-libs/nodejs/nodejs-4.4.7.ebuild
new file mode 100644
index 0000000..f823be6
--- /dev/null
+++ b/net-libs/nodejs/nodejs-4.4.7.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit 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 ~x86 ~x64-macos"
+IUSE="cpu_flags_x86_sse2 debug icu +npm snapshot +ssl test"
+
+RDEPEND="icu? ( >=dev-libs/icu-55:= )
+       npm? ( ${PYTHON_DEPS} )
+       >=net-libs/http-parser-2.5.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}"
+
+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 # Verbose build
+       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 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
+
+       epatch_user
+}
+
+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
+               amd64) myarch="x64";;
+               arm) myarch="arm";;
+               arm64) myarch="arm64";;
+               ppc64) myarch="ppc64";;
+               x32) myarch="x32";;
+               x86) myarch="ia32";;
+               *) 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
+}
+
+src_install() {
+       local LIBDIR="${ED}/usr/$(get_libdir)"
+       emake install DESTDIR="${ED}" PREFIX=/usr
+       if use npm; then
+               dodoc -r "${LIBDIR}"/node_modules/npm/html
+               rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die
+               find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or 
-name "LICENCE*" -delete || die
+       fi
+
+       # set up a symlink structure that npm 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
+
+       pax-mark -m "${ED}"/usr/bin/node
+}
+
+src_test() {
+       out/${BUILDTYPE}/cctest || die
+       "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel 
sequential || die
+}
+
+pkg_postinst() {
+       einfo "When using node-gyp to install native modules, you can avoid"
+       einfo "having to download the full tarball by doing the following:"
+       einfo ""
+       einfo "node-gyp --nodedir /usr/include/node <command>"
+}

Reply via email to