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: Fri, 01 Jan 2016 11:32:46
Message-Id: 1451647842.a740a5e22b1d466c89c8285fd0ecca354dfd29bb.patrick@gentoo
1 commit: a740a5e22b1d466c89c8285fd0ecca354dfd29bb
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 30 10:04:57 2015 +0000
4 Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 1 11:30:42 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a740a5e2
7
8 net-libs/nodejs: Bump
9
10 Package-Manager: portage-2.2.26
11
12 net-libs/nodejs/Manifest | 1 +
13 net-libs/nodejs/nodejs-5.3.0.ebuild | 156 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 157 insertions(+)
15
16 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
17 index 1306a7c..fcdfc21 100644
18 --- a/net-libs/nodejs/Manifest
19 +++ b/net-libs/nodejs/Manifest
20 @@ -3,3 +3,4 @@ DIST node-v0.12.7.tar.gz 20063992 SHA256 b23d64df051c9c969b0c583f802d5d71de342e5
21 DIST node-v4.1.1.tar.xz 12818088 SHA256 f7ca9ceb0b7cc49b12f28a652c908a1f0ffbf34cec73ad0805fe717b14996bb9 SHA512 1b38df92f0349e3da6c50d90b74500bfdaac479d93ad68e5f8f49b3c865867df637a642086669ed5c0b6561cf02716ebddb53888bd1b82e6324bd42f70915680 WHIRLPOOL e6ab82b9f61c2ab3e43949a150e51d9505ef72833516bc60e6a929a3c403928ec6fe3ee2bb55cf6d73eea38defcae7abe2935a44ff27b80e0cd8709d4a55c629
22 DIST node-v4.2.2.tar.xz 12791572 SHA256 b016c3d2f434f86d8d3da9ad90ffb2fd35b32223e9081e3d4f67b8de0370ce69 SHA512 fe6563ca641581afa4ba7fda1b25175eae474aeb196504cd82a6486bf9dfe6c753c554b31d9aa3b6453c509aa792615e897343de69a0b8bfd26759efaea2e1cb WHIRLPOOL 2c2927697370c17cc3178e8dfbfe5819f5a406f84b28da4813507033b14d20616fe610e161618a6aea1463ac499c2d5a559360b97f236005db60ae9879ea8167
23 DIST node-v5.0.0.tar.xz 12863764 SHA256 cf4f261618e19517c8cbf2fdde00d0b5160e271760abee00f387b11a0b3ca834 SHA512 5b07af6b77a25924e3028257a511f035df943b854c694168e24c20f6aa735cde72546fc231d63a491367e16232ee9b6622d1f748624bf3e99e0d0468528e96c3 WHIRLPOOL 8958da059e0bc8e196d9b5f1b079f6d1927a3707b466fdc6e87ece676f981a7f22c4fa485bdb6de9879305cf2deb578d49840dee6d69d1cddba698e070b19923
24 +DIST node-v5.3.0.tar.xz 12776504 SHA256 e5115ee78c31ac3af0f2b3553aa84fff2f49ae59bd6e01e11d78ce86c544569e SHA512 f65773c35ce774bc6fe242f8627e5786f441f0286f7d272e854e2e2d6b927d5f368c366ff52dd780f7817fedf3935ec25e78ed3f81d4613495663eb81e2afbb1 WHIRLPOOL 5f270ed6fe35dba091bd75e6ad9de419c781fc6f919915a4117b8c0bbb2ea11a05369a9149e4f69614de508ff109eb94b24bdafc0832e91e055f01b0ef214c67
25
26 diff --git a/net-libs/nodejs/nodejs-5.3.0.ebuild b/net-libs/nodejs/nodejs-5.3.0.ebuild
27 new file mode 100644
28 index 0000000..c47c090
29 --- /dev/null
30 +++ b/net-libs/nodejs/nodejs-5.3.0.ebuild
31 @@ -0,0 +1,156 @@
32 +# Copyright 1999-2015 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=5
37 +
38 +PYTHON_COMPAT=( python2_7 )
39 +
40 +inherit flag-o-matic pax-utils python-single-r1 toolchain-funcs
41 +
42 +DESCRIPTION="Evented IO for V8 Javascript"
43 +HOMEPAGE="http://nodejs.org/"
44 +SRC_URI="http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
45 +
46 +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~x86 ~x64-macos"
49 +IUSE="debug icu +npm snapshot +ssl"
50 +
51 +RDEPEND="icu? ( >=dev-libs/icu-55:= )
52 + ${PYTHON_DEPS}
53 + >=net-libs/http-parser-2.5:=
54 + >=dev-libs/libuv-1.6.1:=
55 + >=dev-libs/openssl-1.0.2d:0=[-bindist]
56 + sys-libs/zlib
57 +"
58 +DEPEND="${RDEPEND}
59 + !!net-libs/iojs"
60 +
61 +S="${WORKDIR}/node-v${PV}"
62 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
63 +
64 +pkg_pretend() {
65 + if [[ ${MERGE_TYPE} != "binary" ]] ; then
66 + if ! test-flag-CXX -std=c++11 ; then
67 + die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
68 + fi
69 + fi
70 +}
71 +
72 +src_prepare() {
73 + tc-export CC CXX PKG_CONFIG
74 + export V=1 # Verbose build
75 + export BUILDTYPE=Release
76 +
77 + # fix compilation on Darwin
78 + # https://code.google.com/p/gyp/issues/detail?id=260
79 + sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
80 +
81 + # make sure we use python2.* while using gyp
82 + sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
83 + sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
84 +
85 + # less verbose install output (stating the same as portage, basically)
86 + sed -i -e "/print/d" tools/install.py || die
87 +
88 + # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
89 + local LIBDIR=$(get_libdir)
90 + sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
91 + sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
92 + sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
93 +
94 + # Avoid a test that I've only been able to reproduce from emerge. It doesnt
95 + # seem sandbox related either (invoking it from a sandbox works fine).
96 + # The issue is that no stdin handle is openened when asked for one.
97 + # It doesn't really belong upstream , so it'll just be removed until someone
98 + # with more gentoo-knowledge than me (jbergstroem) figures it out.
99 + rm test/parallel/test-stdout-close-unref.js || die
100 + # AssertionError: 1 == 2 (on line 97)
101 + rm test/parallel/test-cluster-disconnect.js || die
102 + # AssertionError: Client never errored
103 + rm test/parallel/test-tls-hello-parser-failure.js || die
104 + # --- TIMEOUT ---
105 + rm test/parallel/test-child-process-fork-net.js \
106 + test/parallel/test-child-process-fork-net2.js \
107 + test/parallel/test-child-process-recv-handle.js \
108 + test/parallel/test-cluster-dgram-1.js \
109 + test/parallel/test-cluster-send-deadlock.js \
110 + test/parallel/test-cluster-shared-handle-bind-error.js \
111 + test/parallel/test-dgram-exclusive-implicit-bind.js \
112 + test/parallel/test-tls-ticket-cluster.js || die
113 +
114 + # debug builds. change install path, remove optimisations and override buildtype
115 + if use debug; then
116 + sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
117 + BUILDTYPE=Debug
118 + fi
119 +
120 + epatch_user
121 +}
122 +
123 +src_configure() {
124 + local myarch=""
125 + local myconf+=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
126 + use npm || myconf+=( --without-npm )
127 + use icu && myconf+=( --with-intl=system-icu )
128 + use snapshot && myconf+=( --with-snapshot )
129 + use ssl || myconf+=( --without-ssl )
130 + use debug && myconf+=( --debug )
131 +
132 + case ${ABI} in
133 + x86) myarch="ia32";;
134 + amd64) myarch="x64";;
135 + x32) myarch="x32";;
136 + arm) myarch="arm";;
137 + arm64) myarch="arm64";;
138 + *) die "Unrecognized ARCH ${ARCH}";;
139 + esac
140 +
141 + GYP_DEFINES="linux_use_gold_flags=0
142 + linux_use_bundled_binutils=0
143 + linux_use_bundled_gold=0" \
144 + "${PYTHON}" configure \
145 + --prefix="${EPREFIX}"/usr \
146 + --dest-cpu=${myarch} \
147 + --without-dtrace \
148 + "${myconf[@]}" || die
149 +}
150 +
151 +src_compile() {
152 + emake -C out mksnapshot
153 + pax-mark m "out/${BUILDTYPE}/mksnapshot"
154 + emake -C out
155 +}
156 +
157 +src_install() {
158 + local LIBDIR="${ED}/usr/$(get_libdir)"
159 + emake install DESTDIR="${ED}" PREFIX=/usr
160 + if use npm; then
161 + dodoc -r "${LIBDIR}"/node_modules/npm/html
162 + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html} || die
163 + find "${LIBDIR}"/node_modules -type f -name "LICENSE*" -or -name "LICENCE*" -delete || die
164 + fi
165 +
166 + # set up a symlink structure that npm expects..
167 + dodir /usr/include/node/deps/{v8,uv}
168 + dosym . /usr/include/node/src
169 + for var in deps/{uv,v8}/include; do
170 + dosym ../.. /usr/include/node/${var}
171 + done
172 +
173 + pax-mark -m "${ED}"/usr/bin/node
174 +}
175 +
176 +src_test() {
177 + out/${BUILDTYPE}/cctest || die
178 + declare -xl TESTTYPE="${BUILDTYPE}"
179 + "${PYTHON}" tools/test.py --mode=${TESTTYPE} -J message parallel sequential || die
180 +}
181 +
182 +pkg_postinst() {
183 + einfo "When using node-gyp to install native modules, you can avoid"
184 + einfo "having to download the full tarball by doing the following:"
185 + einfo ""
186 + einfo "node-gyp --nodedir /usr/include/node <command>"
187 +}