Gentoo Archives: gentoo-commits

From: Patrick Lauer <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nodejs/
Date: Tue, 28 Jun 2016 14:05:07
Message-Id: 1467122078.b27e67eb0609e7da45801459cd7c2e668f5ff9dc.patrick@gentoo
1 commit: b27e67eb0609e7da45801459cd7c2e668f5ff9dc
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 28 13:54:19 2016 +0000
4 Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 28 13:54:38 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b27e67eb
7
8 net-libs/nodejs: Bump 4.4 #585456
9
10 Package-Manager: portage-2.3.0
11
12 net-libs/nodejs/Manifest | 1 +
13 net-libs/nodejs/nodejs-4.4.6.ebuild | 143 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 144 insertions(+)
15
16 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
17 index 15ad57d..22dc532 100644
18 --- a/net-libs/nodejs/Manifest
19 +++ b/net-libs/nodejs/Manifest
20 @@ -3,6 +3,7 @@ DIST node-v0.12.6.tar.gz 19750717 SHA256 7a3b5ac351973a9dee8edbf0684bc8d0dea44b2
21 DIST node-v0.12.7.tar.gz 20063992 SHA256 b23d64df051c9c969b0c583f802d5d71de342e53067127a5061415be7e12f39d SHA512 0c9cb7542530463e7703435c8d819949785c1c6497c6d98f9854ca615fe33a62f451833e856f0159b836a698b4dee5d165fa505bad5d474f664e1533090d8606 WHIRLPOOL 647391b8c49fda868c14bd4eb3089cac139f50e710ac6b141ea82e1013c4ff7d40cdb0e88d69604d06e3bd07775876c754211a2b099685cb7353ae5708812525
22 DIST node-v4.4.0.tar.xz 13107524 SHA256 6ae44ae9a9cd1f102ca7f3ea09ca6223afe88fab4911f1bf21c9da2a1e795f1d SHA512 4bb1f660c5a80fffb3399c4465c311bd13c2f78e65fc9aaa7df96d3c2db5d3b3de3b4be9f50040065fa1889ad247a2949a84a6d9044301a636ebb8baf73edd4d WHIRLPOOL 50b126fc3a7b8b6be693334375b4704217b4e6f00e7e32404a17ebad512e3cc72434f00863a1e69bb85e01859054faac7bb5c2d25889b8ef131191a388528e0c
23 DIST node-v4.4.1.tar.xz 13112424 SHA256 3a37c89a3ac965688f9e6557579993b73eee44195a5fd53fded03a667d3d6a0a SHA512 53b479085a6f43b5932c75729b21a3efa67534ce6c10445c2ba66492a0e3f12d8e5de8d75bd583239b68f3d5ac1b639d45fd43d631d8a5ef013e25bff0fdab22 WHIRLPOOL d9cee2193a0f94f17ab84722ffb9999f156014cbe0b83bd138d5404ec543a3398bb4d1b965940b19230cf069337dfb5e0159aae3e694137e09261133ae2e2fdd
24 +DIST node-v4.4.6.tar.xz 13211732 SHA256 0f6bbfbea525469c91932b1aac35e0810e6bcda96f1c720e42a433942ee66106 SHA512 b06219ab63de89eeb1268d677769cb17c8290555962b1cbfaafbede3d2dbefaafb455f32a611160fcfbf7400059fa79ec3f9c2f3287c8746669c05b42d7aaa7c WHIRLPOOL ffb1372193a72a2e1ae6e21c281a28e770443e36e5e349b48bf30e92b3f6f9d9ba901794eaf1f7c8eaf05c7365e1249bb210760fa26680ed13d1a6d8854c8ce8
25 DIST node-v5.10.1.tar.xz 13317868 SHA256 9eecd853cdd06ebee24a1bb8d753cd20af5a19297c5d3a3b1680fe36b47d5cbe SHA512 e0dcd5fd6d23c4905a4fbf483621cb2a878516a5bfeefad68901edd1be2dba76281cd22fff073f5f8e2432dbac3c68728c597e1aab753ce3b3dfe9e0674ef808 WHIRLPOOL 2aecbb9a538320c09d6306a756ed6cde2537fd4d9e5ef9b6713956062178ba8070d060e1ae2fab264d834fbb1e5452eaf744b4c0a9cd70ffa181e6c479b4086a
26 DIST node-v5.11.0.tar.xz 13298460 SHA256 083766aff72fc5c78f6999dd0d00bc0340a052ab270fd60d6928b719ca2b3fd1 SHA512 47f2b25007877dc7597af9dd841e4f30197a9df6dcf01f45336c2eaec8d5c75057534b962df361e9bdaf461dab8cb97a878d326d74105a38a7797b77ed67df44 WHIRLPOOL 0b670baa82e3dbd0a2492476f3ebca8006d7c1c4efef47e85954624ad776517a3f0403d8556e438c16c8373818bed444bc66a72500c3a55025d50cdb694ec411
27 DIST node-v5.9.1.tar.xz 13226192 SHA256 668067077dfceb3d2039d0df693fec6aa20b920d01a42b53dc61d4aa91e0ae55 SHA512 34774d88eda775bdf153a76bd02b26c499e4a9ef47d8e94ad7b66d360d04891b45ce8f211833ca69e8c0a786ca36424b0c620a90b1fbc6d5afc77d20f4b5fadb WHIRLPOOL d666aa6fd4d577f7a6f89c3bfa75e62a0281e0dd7592373f384bfe01fa2dcbf81156bf6a21fc2097d48d5024a39057713c2593f4609c70ff8f84090471b073a9
28
29 diff --git a/net-libs/nodejs/nodejs-4.4.6.ebuild b/net-libs/nodejs/nodejs-4.4.6.ebuild
30 new file mode 100644
31 index 0000000..5512f91
32 --- /dev/null
33 +++ b/net-libs/nodejs/nodejs-4.4.6.ebuild
34 @@ -0,0 +1,143 @@
35 +# Copyright 1999-2016 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +# $Id$
38 +
39 +EAPI=5
40 +
41 +PYTHON_COMPAT=( python2_7 )
42 +PYTHON_REQ_USE="threads"
43 +
44 +inherit flag-o-matic pax-utils python-single-r1 toolchain-funcs
45 +
46 +DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
47 +HOMEPAGE="https://nodejs.org/"
48 +SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
49 +
50 +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~x64-macos"
53 +IUSE="cpu_flags_x86_sse2 debug icu +npm snapshot +ssl test"
54 +
55 +RDEPEND="icu? ( >=dev-libs/icu-55:= )
56 + npm? ( ${PYTHON_DEPS} )
57 + >=net-libs/http-parser-2.5.2:=
58 + >=dev-libs/libuv-1.8.0:=
59 + >=dev-libs/openssl-1.0.2g:0=[-bindist]
60 + sys-libs/zlib"
61 +DEPEND="${RDEPEND}
62 + ${PYTHON_DEPS}
63 + test? ( net-misc/curl )"
64 +
65 +S="${WORKDIR}/node-v${PV}"
66 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
67 +
68 +pkg_pretend() {
69 + (use x86 && ! use cpu_flags_x86_sse2) && \
70 + die "Your CPU doesn't support the required SSE2 instruction."
71 +
72 + ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
73 + die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
74 +}
75 +
76 +src_prepare() {
77 + tc-export CC CXX PKG_CONFIG
78 + export V=1 # Verbose build
79 + export BUILDTYPE=Release
80 +
81 + # fix compilation on Darwin
82 + # https://code.google.com/p/gyp/issues/detail?id=260
83 + sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
84 +
85 + # make sure we use python2.* while using gyp
86 + sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
87 + sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
88 +
89 + # less verbose install output (stating the same as portage, basically)
90 + sed -i -e "/print/d" tools/install.py || die
91 +
92 + # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
93 + local LIBDIR=$(get_libdir)
94 + sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
95 + sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
96 + sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
97 +
98 + # Avoid a test that I've only been able to reproduce from emerge. It doesnt
99 + # seem sandbox related either (invoking it from a sandbox works fine).
100 + # The issue is that no stdin handle is openened when asked for one.
101 + # It doesn't really belong upstream , so it'll just be removed until someone
102 + # with more gentoo-knowledge than me (jbergstroem) figures it out.
103 + rm test/parallel/test-stdout-close-unref.js || die
104 +
105 + # debug builds. change install path, remove optimisations and override buildtype
106 + if use debug; then
107 + sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
108 + BUILDTYPE=Debug
109 + fi
110 +
111 + epatch_user
112 +}
113 +
114 +src_configure() {
115 + local myarch=""
116 + local myconf+=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
117 + use npm || myconf+=( --without-npm )
118 + use icu && myconf+=( --with-intl=system-icu )
119 + use snapshot && myconf+=( --with-snapshot )
120 + use ssl || myconf+=( --without-ssl )
121 + use debug && myconf+=( --debug )
122 +
123 + case ${ABI} in
124 + x86) myarch="ia32";;
125 + amd64) myarch="x64";;
126 + x32) myarch="x32";;
127 + arm) myarch="arm";;
128 + arm64) myarch="arm64";;
129 + *) die "Unrecognized ARCH ${ARCH}";;
130 + esac
131 +
132 + GYP_DEFINES="linux_use_gold_flags=0
133 + linux_use_bundled_binutils=0
134 + linux_use_bundled_gold=0" \
135 + "${PYTHON}" configure \
136 + --prefix="${EPREFIX}"/usr \
137 + --dest-cpu=${myarch} \
138 + --without-dtrace \
139 + "${myconf[@]}" || die
140 +}
141 +
142 +src_compile() {
143 + emake -C out mksnapshot
144 + pax-mark m "out/${BUILDTYPE}/mksnapshot"
145 + emake -C out
146 +}
147 +
148 +src_install() {
149 + local LIBDIR="${ED}/usr/$(get_libdir)"
150 + emake install DESTDIR="${ED}" PREFIX=/usr
151 + if use npm; then
152 + dodoc -r "${LIBDIR}"/node_modules/npm/html
153 + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die
154 + find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or -name "LICENCE*" -delete || die
155 + fi
156 +
157 + # set up a symlink structure that npm expects..
158 + dodir /usr/include/node/deps/{v8,uv}
159 + dosym . /usr/include/node/src
160 + for var in deps/{uv,v8}/include; do
161 + dosym ../.. /usr/include/node/${var}
162 + done
163 +
164 + pax-mark -m "${ED}"/usr/bin/node
165 +}
166 +
167 +src_test() {
168 + out/${BUILDTYPE}/cctest || die
169 + "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
170 +}
171 +
172 +pkg_postinst() {
173 + einfo "When using node-gyp to install native modules, you can avoid"
174 + einfo "having to download the full tarball by doing the following:"
175 + einfo ""
176 + einfo "node-gyp --nodedir /usr/include/node <command>"
177 +}