Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nodejs/
Date: Thu, 04 Jan 2018 12:17:50
Message-Id: 1515068263.05e105b0b55394e7fe0fd3bff992e5710cd5510a.jer@gentoo
1 commit: 05e105b0b55394e7fe0fd3bff992e5710cd5510a
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 4 12:17:11 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 4 12:17:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05e105b0
7
8 net-libs/nodejs: Old.
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11
12 net-libs/nodejs/Manifest | 3 -
13 net-libs/nodejs/nodejs-6.12.2.ebuild | 200 ----------------------------------
14 net-libs/nodejs/nodejs-8.9.3.ebuild | 202 ----------------------------------
15 net-libs/nodejs/nodejs-9.2.1.ebuild | 203 -----------------------------------
16 4 files changed, 608 deletions(-)
17
18 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
19 index 2be2bd67bd1..2a27ec2a9ba 100644
20 --- a/net-libs/nodejs/Manifest
21 +++ b/net-libs/nodejs/Manifest
22 @@ -2,10 +2,7 @@ DIST node-v0.12.17.tar.gz 19938029 BLAKE2B 0118fb016c70afc9940c3b9e2fbed9fd3a56a
23 DIST node-v4.8.5.tar.xz 13316060 BLAKE2B fb32f176b9d4add3e9695f0bee7ebd0bba66770d479b1fade572de4694566603f08875da6ff97a1904edd1156708b58670fb1c4717e213aab6ad44ae5d470f40 SHA512 64d936ca14648b5648dedb41f2ee8d39466788762d335fbfc9ce4cb7484d05b6c24ad912fb4b1579a08f466be50b129a96be700fd89cbca5e1de84baa63ddd12
24 DIST node-v4.8.7.tar.xz 13370828 BLAKE2B b1ee93a586b66f8582783b1be50667547afe4bf48038ebc0b8148db55542cbc0520ac84ef88e4a7f453cabc245f484c32dbc238c1932bbc708791ceeb5c9d2ab SHA512 25837a31023747723b146c45984a5b2096b61c0aa43cbf45fc8ff50b4bd5079bd0bc9f1dfd3fb076817448dc5537eb93ffb2f345280b7756ba93b67ad757c696
25 DIST node-v6.11.5.tar.xz 15699404 BLAKE2B ba2df91bf5ef38cedb60b42919cf56f16807e619a81876fc92a5741e49da7ec91c4239d00f549c5e80d0bb8282bb9b396dd984507916cd18d61b403a3a7cef94 SHA512 62490725ef7957294c1bddf21ef0626c7472876791210168116501255ecee58457e9de9b044e10033706243299bbfd1495efeca169596fbf26f5eeba6d8fa4c9
26 -DIST node-v6.12.2.tar.xz 15760164 BLAKE2B 89daf5d52a430a729f9c55f10483805a6b802abdffa2a3bbcaa8ce71c78321eadedaabe1b28cd781c6b894923821bbb1743754cbabafda0a0e9abb7b6b11fa78 SHA512 914eea968dacb086f5083ee0845a982969a5c56ab183c8da17812d8386095db1e9c2d07dee4f6186091d64cde605d1ffc15d17025ea28d1c3ee3bceefff6c399
27 DIST node-v6.12.3.tar.xz 15767900 BLAKE2B 2a986c8099d14b199e33676e1a7d416919407558a42d14e526794baa29d8788c74a5ff47e8d2a8509a747682bea393b45e31965569a4b72976b7691f2a84e971 SHA512 dcf30bc221aa949e6ca3bd9321ac68adb05d93af0b06119b4b73bfd4cfa2c31897520d90247ac0f783946c1fc2efe77178f52225150dad4522ac9408d036a8e4
28 DIST node-v6.9.4.tar.xz 15519264 BLAKE2B 4dfad88b06b209272b8468501cc3c87c40425781fb55011ee93326555c2df88a166ffaff1877563668e06389703053849361739556f1bc87c1e2386d48b9542e SHA512 86d3e2889031c2b50c021bd3fd63194c2c22c44291d51dff1b5e1652b01853c09d2880c2f58fdad062e3e2a3f637a3f0d78dac66b835b676790cf272e64f8dce
29 -DIST node-v8.9.3.tar.xz 18298212 BLAKE2B 7d19fcb77c496fb3aa717d426a3db4630e382738f0fe3273bba3137814470a5fe5e9593c18934cfd62816a0ac33d195eb241c810f4756d84eaa8f974606a485b SHA512 7bd037189925387bfd1339eef5be9af10af0a063914b4cdb2a1f3befec2e76eb566f7d14874b8c70a02172ebeb4d1c1fdbb0715ca8f18b0b5711a38b30214bc8
30 DIST node-v8.9.4.tar.xz 18338980 BLAKE2B 81180fc0c9b10cebc051a72649fb40650c89a05d427b826a6f3937e2b108b97edd27dd1c1521e57168e5a92b37e590429735c07c3198e4b912774c305ae61693 SHA512 9656b57145c2b3048ff9ad70f91dbff33a7349dca564efe3b2ff585e2ffad004ea8de920a7a049ff4c5487683986d78b5a578306c2c99f3b1a3de96d9ad1dece
31 -DIST node-v9.2.1.tar.xz 18346796 BLAKE2B 8fe82a9b50636fef21f9bba05e89381f6785f18599adb5183d4276df4d0e5b2a4d1bb3d8137143fb87d8638ce82f6812ff237764f7b76f1bee65199a93c91e88 SHA512 379a340186c8299df02a90dce730250d46b502ef58ca4720ede48a5053d0f1e6ee958003dd9e3c0b76f4575980217d9dc5a9cd93a2a4e58da324d04d6d5edc7e
32 DIST node-v9.3.0.tar.xz 18385364 BLAKE2B 825fd8786b68020f7bb2735e519cd5ecb49552766646425613780736e7c20f555007e90048abd3e985d27656a39da6737ced5c905f113b0e531549312751e2d8 SHA512 bafc3bbd01ce0cc00f13e6f34b8ed361cff337c71b90836132c8188b1103ba2d6aab145258b6afafafc2455fa8a5de54be265435a553793946fd6d308095ae3e
33
34 diff --git a/net-libs/nodejs/nodejs-6.12.2.ebuild b/net-libs/nodejs/nodejs-6.12.2.ebuild
35 deleted file mode 100644
36 index d4deaf929b2..00000000000
37 --- a/net-libs/nodejs/nodejs-6.12.2.ebuild
38 +++ /dev/null
39 @@ -1,200 +0,0 @@
40 -# Copyright 1999-2017 Gentoo Foundation
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI=6
44 -RESTRICT="test"
45 -
46 -PYTHON_COMPAT=( python2_7 )
47 -PYTHON_REQ_USE="threads"
48 -
49 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
50 -
51 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
52 -HOMEPAGE="https://nodejs.org/"
53 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
54 -
55 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
56 -SLOT="0"
57 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
58 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl test"
59 -REQUIRED_USE="
60 - inspector? ( icu ssl )
61 -"
62 -
63 -RDEPEND="
64 - >=dev-libs/libuv-1.15.0:=
65 - >=dev-libs/openssl-1.0.2n:0=[-bindist]
66 - >=net-libs/http-parser-2.7.0:=
67 - sys-libs/zlib
68 - icu? ( >=dev-libs/icu-58.2:= )
69 -"
70 -DEPEND="
71 - ${RDEPEND}
72 - ${PYTHON_DEPS}
73 - test? ( net-misc/curl )
74 -"
75 -
76 -S="${WORKDIR}/node-v${PV}"
77 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
78 -
79 -PATCHES=(
80 - "${FILESDIR}"/gentoo-global-npm-config.patch
81 -)
82 -
83 -pkg_pretend() {
84 - (use x86 && ! use cpu_flags_x86_sse2) && \
85 - die "Your CPU doesn't support the required SSE2 instruction."
86 -
87 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
88 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
89 -}
90 -
91 -src_prepare() {
92 - tc-export CC CXX PKG_CONFIG
93 - export V=1
94 - export BUILDTYPE=Release
95 -
96 - # fix compilation on Darwin
97 - # https://code.google.com/p/gyp/issues/detail?id=260
98 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
99 -
100 - # make sure we use python2.* while using gyp
101 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
102 - sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
103 -
104 - # less verbose install output (stating the same as portage, basically)
105 - sed -i -e "/print/d" tools/install.py || die
106 -
107 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
108 - local LIBDIR=$(get_libdir)
109 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
110 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
111 - sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
112 -
113 - # Avoid writing a depfile, not useful
114 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
115 -
116 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
117 - # seem sandbox related either (invoking it from a sandbox works fine).
118 - # The issue is that no stdin handle is openened when asked for one.
119 - # It doesn't really belong upstream , so it'll just be removed until someone
120 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
121 - rm test/parallel/test-stdout-close-unref.js || die
122 -
123 - # debug builds. change install path, remove optimisations and override buildtype
124 - if use debug; then
125 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
126 - BUILDTYPE=Debug
127 - fi
128 -
129 - default
130 -}
131 -
132 -src_configure() {
133 - local myarch=""
134 - local myconf=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
135 - use debug && myconf+=( --debug )
136 - use icu && myconf+=( --with-intl=system-icu )
137 - use inspector || myconf+=( --without-inspector )
138 - use npm || myconf+=( --without-npm )
139 - use snapshot && myconf+=( --with-snapshot )
140 - use ssl || myconf+=( --without-ssl )
141 -
142 - case ${ABI} in
143 - amd64) myarch="x64";;
144 - arm) myarch="arm";;
145 - arm64) myarch="arm64";;
146 - ppc64) myarch="ppc64";;
147 - x32) myarch="x32";;
148 - x86) myarch="ia32";;
149 - *) myarch="${ABI}";;
150 - esac
151 -
152 - GYP_DEFINES="linux_use_gold_flags=0
153 - linux_use_bundled_binutils=0
154 - linux_use_bundled_gold=0" \
155 - "${PYTHON}" configure \
156 - --prefix="${EPREFIX}"/usr \
157 - --dest-cpu=${myarch} \
158 - --without-dtrace \
159 - "${myconf[@]}" || die
160 -}
161 -
162 -src_compile() {
163 - emake -C out mksnapshot
164 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
165 - emake -C out
166 -}
167 -
168 -src_install() {
169 - local LIBDIR="${ED}/usr/$(get_libdir)"
170 - emake install DESTDIR="${D}"
171 - pax-mark -m "${ED}"usr/bin/node
172 -
173 - # set up a symlink structure that node-gyp expects..
174 - dodir /usr/include/node/deps/{v8,uv}
175 - dosym . /usr/include/node/src
176 - for var in deps/{uv,v8}/include; do
177 - dosym ../.. /usr/include/node/${var}
178 - done
179 -
180 - if use doc; then
181 - # Patch docs to make them offline readable
182 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
183 - sed -i '/fonts.googleapis.com/ d' $i;
184 - done
185 - # Install docs!
186 - dohtml -r "${S}"/doc/*
187 - fi
188 -
189 - if use npm; then
190 - dodir /etc/npm
191 -
192 - # Install bash completion for `npm`
193 - # We need to temporarily replace default config path since
194 - # npm otherwise tries to write outside of the sandbox
195 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
196 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
197 - local tmp_npm_completion_file="$(emktemp)"
198 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
199 - newbashcomp "${tmp_npm_completion_file}" npm
200 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
201 -
202 - # Move man pages
203 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
204 -
205 - # Clean up
206 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
207 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
208 -
209 - local find_exp="-or -name"
210 - local find_name=()
211 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
212 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
213 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
214 - find_name+=( ${find_exp} "${match}" )
215 - done
216 -
217 - # Remove various development and/or inappropriate files and
218 - # useless docs of dependend packages.
219 - find "${LIBDIR}"/node_modules \
220 - \( -type d -name examples \) -or \( -type f \( \
221 - -iname "LICEN?E*" \
222 - "${find_name[@]}" \
223 - \) \) -exec rm -rf "{}" \;
224 - fi
225 -}
226 -
227 -src_test() {
228 - out/${BUILDTYPE}/cctest || die
229 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
230 -}
231 -
232 -pkg_postinst() {
233 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
234 - einfo "from upstream which otherwise would have it live in /usr/etc/."
235 - einfo ""
236 - einfo "Protip: When using node-gyp to install native modules, you can"
237 - einfo "avoid having to download extras by doing the following:"
238 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
239 -}
240
241 diff --git a/net-libs/nodejs/nodejs-8.9.3.ebuild b/net-libs/nodejs/nodejs-8.9.3.ebuild
242 deleted file mode 100644
243 index dac3eab7cd8..00000000000
244 --- a/net-libs/nodejs/nodejs-8.9.3.ebuild
245 +++ /dev/null
246 @@ -1,202 +0,0 @@
247 -# Copyright 1999-2017 Gentoo Foundation
248 -# Distributed under the terms of the GNU General Public License v2
249 -
250 -EAPI=6
251 -RESTRICT="test"
252 -
253 -PYTHON_COMPAT=( python2_7 )
254 -PYTHON_REQ_USE="threads"
255 -
256 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
257 -
258 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
259 -HOMEPAGE="https://nodejs.org/"
260 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
261 -
262 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
263 -SLOT="0"
264 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
265 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test"
266 -REQUIRED_USE="
267 - ${PYTHON_REQUIRED_USE}
268 - inspector? ( icu ssl )
269 -"
270 -
271 -RDEPEND="
272 - >=dev-libs/libuv-1.15.0:=
273 - >=net-libs/http-parser-2.7.0:=
274 - >=net-libs/nghttp2-1.25.0
275 - sys-libs/zlib
276 - icu? ( >=dev-libs/icu-59.1:= )
277 - ssl? ( >=dev-libs/openssl-1.0.2n:0=[-bindist] )
278 -"
279 -DEPEND="${RDEPEND}
280 - ${PYTHON_DEPS}
281 - systemtap? ( dev-util/systemtap )
282 - test? ( net-misc/curl )"
283 -
284 -S="${WORKDIR}/node-v${PV}"
285 -
286 -PATCHES=(
287 - "${FILESDIR}"/gentoo-global-npm-config.patch
288 - "${FILESDIR}"/nodejs-8.9.0-shared-nghttp2.patch
289 -)
290 -
291 -pkg_pretend() {
292 - (use x86 && ! use cpu_flags_x86_sse2) && \
293 - die "Your CPU doesn't support the required SSE2 instruction."
294 -
295 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
296 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
297 -}
298 -
299 -src_prepare() {
300 - tc-export CC CXX PKG_CONFIG
301 - export V=1
302 - export BUILDTYPE=Release
303 -
304 - # fix compilation on Darwin
305 - # https://code.google.com/p/gyp/issues/detail?id=260
306 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
307 -
308 - # make sure we use python2.* while using gyp
309 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
310 - sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
311 -
312 - # less verbose install output (stating the same as portage, basically)
313 - sed -i -e "/print/d" tools/install.py || die
314 -
315 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
316 - local LIBDIR=$(get_libdir)
317 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
318 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js deps/npm/lib/npm.js || die
319 -
320 - # Avoid writing a depfile, not useful
321 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
322 -
323 - sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die
324 -
325 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
326 - # seem sandbox related either (invoking it from a sandbox works fine).
327 - # The issue is that no stdin handle is openened when asked for one.
328 - # It doesn't really belong upstream , so it'll just be removed until someone
329 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
330 - rm test/parallel/test-stdout-close-unref.js || die
331 -
332 - # debug builds. change install path, remove optimisations and override buildtype
333 - if use debug; then
334 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
335 - BUILDTYPE=Debug
336 - fi
337 -
338 - default
339 -}
340 -
341 -src_configure() {
342 - local myconf=( --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib )
343 - use debug && myconf+=( --debug )
344 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
345 - use inspector || myconf+=( --without-inspector )
346 - use npm || myconf+=( --without-npm )
347 - use snapshot && myconf+=( --with-snapshot )
348 - use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl )
349 -
350 - local myarch=""
351 - case ${ABI} in
352 - amd64) myarch="x64";;
353 - arm) myarch="arm";;
354 - arm64) myarch="arm64";;
355 - ppc64) myarch="ppc64";;
356 - x32) myarch="x32";;
357 - x86) myarch="ia32";;
358 - *) myarch="${ABI}";;
359 - esac
360 -
361 - GYP_DEFINES="linux_use_gold_flags=0
362 - linux_use_bundled_binutils=0
363 - linux_use_bundled_gold=0" \
364 - "${PYTHON}" configure \
365 - --prefix="${EPREFIX}"/usr \
366 - --dest-cpu=${myarch} \
367 - $(use_with systemtap dtrace) \
368 - "${myconf[@]}" || die
369 -}
370 -
371 -src_compile() {
372 - emake -C out mksnapshot
373 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
374 - emake -C out
375 -}
376 -
377 -src_install() {
378 - local LIBDIR="${ED}/usr/$(get_libdir)"
379 - emake install DESTDIR="${D}"
380 - pax-mark -m "${ED}"usr/bin/node
381 -
382 - # set up a symlink structure that node-gyp expects..
383 - dodir /usr/include/node/deps/{v8,uv}
384 - dosym . /usr/include/node/src
385 - for var in deps/{uv,v8}/include; do
386 - dosym ../.. /usr/include/node/${var}
387 - done
388 -
389 - if use doc; then
390 - # Patch docs to make them offline readable
391 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
392 - sed -i '/fonts.googleapis.com/ d' $i;
393 - done
394 - # Install docs!
395 - dohtml -r "${S}"/doc/*
396 - fi
397 -
398 - if use npm; then
399 - dodir /etc/npm
400 -
401 - # Install bash completion for `npm`
402 - # We need to temporarily replace default config path since
403 - # npm otherwise tries to write outside of the sandbox
404 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
405 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
406 - local tmp_npm_completion_file="$(emktemp)"
407 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
408 - newbashcomp "${tmp_npm_completion_file}" npm
409 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
410 -
411 - # Move man pages
412 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
413 -
414 - # Clean up
415 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
416 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
417 -
418 - local find_exp="-or -name"
419 - local find_name=()
420 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
421 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
422 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
423 - find_name+=( ${find_exp} "${match}" )
424 - done
425 -
426 - # Remove various development and/or inappropriate files and
427 - # useless docs of dependend packages.
428 - find "${LIBDIR}"/node_modules \
429 - \( -type d -name examples \) -or \( -type f \( \
430 - -iname "LICEN?E*" \
431 - "${find_name[@]}" \
432 - \) \) -exec rm -rf "{}" \;
433 - fi
434 -}
435 -
436 -src_test() {
437 - out/${BUILDTYPE}/cctest || die
438 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
439 -}
440 -
441 -pkg_postinst() {
442 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
443 - einfo "from upstream which otherwise would have it live in /usr/etc/."
444 - einfo ""
445 - einfo "Protip: When using node-gyp to install native modules, you can"
446 - einfo "avoid having to download extras by doing the following:"
447 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
448 -}
449
450 diff --git a/net-libs/nodejs/nodejs-9.2.1.ebuild b/net-libs/nodejs/nodejs-9.2.1.ebuild
451 deleted file mode 100644
452 index 782c1225204..00000000000
453 --- a/net-libs/nodejs/nodejs-9.2.1.ebuild
454 +++ /dev/null
455 @@ -1,203 +0,0 @@
456 -# Copyright 1999-2017 Gentoo Foundation
457 -# Distributed under the terms of the GNU General Public License v2
458 -
459 -EAPI=6
460 -RESTRICT="test"
461 -
462 -PYTHON_COMPAT=( python2_7 )
463 -PYTHON_REQ_USE="threads"
464 -
465 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
466 -
467 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
468 -HOMEPAGE="https://nodejs.org/"
469 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
470 -
471 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
472 -SLOT="0"
473 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
474 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test"
475 -REQUIRED_USE="
476 - ${PYTHON_REQUIRED_USE}
477 - inspector? ( icu ssl )
478 -"
479 -
480 -RDEPEND="
481 - >=dev-libs/libuv-1.16.1:=
482 - >=net-libs/http-parser-2.7.0:=
483 - >=net-libs/nghttp2-1.25.0
484 - sys-libs/zlib
485 - icu? ( >=dev-libs/icu-59:= )
486 - npm? ( ${PYTHON_DEPS} )
487 - ssl? ( >=dev-libs/openssl-1.0.2g:0=[-bindist] )
488 -"
489 -DEPEND="${RDEPEND}
490 - ${PYTHON_DEPS}
491 - systemtap? ( dev-util/systemtap )
492 - test? ( net-misc/curl )"
493 -
494 -S="${WORKDIR}/node-v${PV}"
495 -
496 -PATCHES=(
497 - "${FILESDIR}"/gentoo-global-npm-config.patch
498 - "${FILESDIR}"/nodejs-9.2.0-shared-nghttp2.patch
499 -)
500 -
501 -pkg_pretend() {
502 - (use x86 && ! use cpu_flags_x86_sse2) && \
503 - die "Your CPU doesn't support the required SSE2 instruction."
504 -
505 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
506 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
507 -}
508 -
509 -src_prepare() {
510 - tc-export CC CXX PKG_CONFIG
511 - export V=1
512 - export BUILDTYPE=Release
513 -
514 - # fix compilation on Darwin
515 - # https://code.google.com/p/gyp/issues/detail?id=260
516 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
517 -
518 - # make sure we use python2.* while using gyp
519 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
520 - sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
521 -
522 - # less verbose install output (stating the same as portage, basically)
523 - sed -i -e "/print/d" tools/install.py || die
524 -
525 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
526 - local LIBDIR=$(get_libdir)
527 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
528 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js deps/npm/lib/npm.js || die
529 -
530 - # Avoid writing a depfile, not useful
531 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
532 -
533 - sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die
534 -
535 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
536 - # seem sandbox related either (invoking it from a sandbox works fine).
537 - # The issue is that no stdin handle is openened when asked for one.
538 - # It doesn't really belong upstream , so it'll just be removed until someone
539 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
540 - rm test/parallel/test-stdout-close-unref.js || die
541 -
542 - # debug builds. change install path, remove optimisations and override buildtype
543 - if use debug; then
544 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
545 - BUILDTYPE=Debug
546 - fi
547 -
548 - default
549 -}
550 -
551 -src_configure() {
552 - local myconf=( --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib )
553 - use debug && myconf+=( --debug )
554 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
555 - use inspector || myconf+=( --without-inspector )
556 - use npm || myconf+=( --without-npm )
557 - use snapshot && myconf+=( --with-snapshot )
558 - use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl )
559 -
560 - local myarch=""
561 - case ${ABI} in
562 - amd64) myarch="x64";;
563 - arm) myarch="arm";;
564 - arm64) myarch="arm64";;
565 - ppc64) myarch="ppc64";;
566 - x32) myarch="x32";;
567 - x86) myarch="ia32";;
568 - *) myarch="${ABI}";;
569 - esac
570 -
571 - GYP_DEFINES="linux_use_gold_flags=0
572 - linux_use_bundled_binutils=0
573 - linux_use_bundled_gold=0" \
574 - "${PYTHON}" configure \
575 - --prefix="${EPREFIX}"/usr \
576 - --dest-cpu=${myarch} \
577 - $(use_with systemtap dtrace) \
578 - "${myconf[@]}" || die
579 -}
580 -
581 -src_compile() {
582 - emake -C out mksnapshot
583 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
584 - emake -C out
585 -}
586 -
587 -src_install() {
588 - local LIBDIR="${ED}/usr/$(get_libdir)"
589 - emake install DESTDIR="${D}"
590 - pax-mark -m "${ED}"usr/bin/node
591 -
592 - # set up a symlink structure that node-gyp expects..
593 - dodir /usr/include/node/deps/{v8,uv}
594 - dosym . /usr/include/node/src
595 - for var in deps/{uv,v8}/include; do
596 - dosym ../.. /usr/include/node/${var}
597 - done
598 -
599 - if use doc; then
600 - # Patch docs to make them offline readable
601 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
602 - sed -i '/fonts.googleapis.com/ d' $i;
603 - done
604 - # Install docs!
605 - dohtml -r "${S}"/doc/*
606 - fi
607 -
608 - if use npm; then
609 - dodir /etc/npm
610 -
611 - # Install bash completion for `npm`
612 - # We need to temporarily replace default config path since
613 - # npm otherwise tries to write outside of the sandbox
614 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
615 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
616 - local tmp_npm_completion_file="$(emktemp)"
617 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
618 - newbashcomp "${tmp_npm_completion_file}" npm
619 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
620 -
621 - # Move man pages
622 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
623 -
624 - # Clean up
625 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
626 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
627 -
628 - local find_exp="-or -name"
629 - local find_name=()
630 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
631 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
632 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
633 - find_name+=( ${find_exp} "${match}" )
634 - done
635 -
636 - # Remove various development and/or inappropriate files and
637 - # useless docs of dependend packages.
638 - find "${LIBDIR}"/node_modules \
639 - \( -type d -name examples \) -or \( -type f \( \
640 - -iname "LICEN?E*" \
641 - "${find_name[@]}" \
642 - \) \) -exec rm -rf "{}" \;
643 - fi
644 -}
645 -
646 -src_test() {
647 - out/${BUILDTYPE}/cctest || die
648 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
649 -}
650 -
651 -pkg_postinst() {
652 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
653 - einfo "from upstream which otherwise would have it live in /usr/etc/."
654 - einfo ""
655 - einfo "Protip: When using node-gyp to install native modules, you can"
656 - einfo "avoid having to download extras by doing the following:"
657 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
658 -}