1 |
commit: 00c00335eeca35c91062475642d308e222dab330 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 22 11:45:21 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 22 11:50:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00c00335 |
7 |
|
8 |
net-libs/nodejs: remove old |
9 |
|
10 |
No versions vulnerable to CVE-2021-3450, CVE-2021-3449 and CVE-2020-7774 |
11 |
left in the tree. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/781704 |
14 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
15 |
|
16 |
net-libs/nodejs/Manifest | 2 - |
17 |
net-libs/nodejs/nodejs-12.21.0.ebuild | 220 ---------------------------------- |
18 |
net-libs/nodejs/nodejs-14.16.0.ebuild | 209 -------------------------------- |
19 |
3 files changed, 431 deletions(-) |
20 |
|
21 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
22 |
index c01a018f5cf..5d6d3c41c13 100644 |
23 |
--- a/net-libs/nodejs/Manifest |
24 |
+++ b/net-libs/nodejs/Manifest |
25 |
@@ -1,6 +1,4 @@ |
26 |
-DIST node-v12.21.0.tar.xz 23650552 BLAKE2B 532eef3e77d78aa1b6f30ebdc1dee88ed95280c86e44db525ce369cb1c2d9707a30a1a4ec2d8e699f7c1a14ada036fc4d62d0f0c7fa017e72768662768bbbf18 SHA512 48df48a12657e3a2366cd80a1a7040365b7a90053676230f1f93f253a1fcdafc5bc1df5b5ec5c13f616277b5feb7e7653cd145ab9c23222bf7702d7cd1fa74eb |
27 |
DIST node-v12.22.1.tar.xz 23650180 BLAKE2B 90b0a8ab3842483fea0c776e0245e63539a986c18f55abd8c7cd22ec399ccde22fa5b008d3e07c0f07713b5a45a1ee2a0bc370c04408800db2ee59cd92fcb5be SHA512 eaead633611bda04ab9be200aeddf3b4004b8104e9c6af246023b8008003dd3a7103e1508ea690443e59c6591521b04a2d71c7344343f2a20d1c935ef51c66a0 |
28 |
-DIST node-v14.16.0.tar.xz 33301140 BLAKE2B faf380e8f02ea2e6084601fece1e9d3119aeabcebc844fd22a79c18e27cf54f0cd470971cc5a86277a226e59950f511e1173828565bdda1c1f06c52b144cba6f SHA512 ac6f7408df35e2bae8bcad3f461d8e260a2762c77f78d737b0339a592724ff1a98ba171a95e44366e731accfb3208e7cfd6d3edd0f646ddc26a01cfbdbbb655b |
29 |
DIST node-v14.16.1.tar.xz 33297064 BLAKE2B 0927434c63cd248e90a4002b50c7a0fd68a5527a4cd7424b451840ddf0c403ba452979b195e598cc3b323e24233248a74a1274519ce8cd3a2f4e71dc7a8f3dcb SHA512 d4f5fbab69592ae555613b2186090b85a458d2211b6035989aee2617bfd0f6768ca767ec45ce12756a9c452d00af7237edee3b1ae526049e9fcd01f8f67680c0 |
30 |
DIST node-v15.14.0.tar.xz 33324232 BLAKE2B 30639a4e87954226de57070457e34caad205d19a4446beb22735383d1576c9e529f7d10fb0da4c808963ae719b00d894cd92838bdd3dbe7ba72e354a22a9455e SHA512 781a18694760b5ef280aa439ac5641ab1bccd3a9ec4733528bd5078bbca4e10da3ebafde9d74580445d193acb7d15d1b9864c0ceee345bc06e956352f59366c4 |
31 |
DIST node-v16.0.0.tar.xz 33784448 BLAKE2B 3286cf6522074cb7b17dce8fce642204777fef26fd4bdb904fdef638061913a1eccda13b8e2f170906dd9098500c8fae7eaea7275e41bf97ea6d9fdd644b215c SHA512 6b976a8959079751bfdece15614a6286088d9145fc4db4ae048aca2ede4b7e38e86e91b1722be51eb4c934749a144a745e425ccf118bed9848c30ff254de2557 |
32 |
|
33 |
diff --git a/net-libs/nodejs/nodejs-12.21.0.ebuild b/net-libs/nodejs/nodejs-12.21.0.ebuild |
34 |
deleted file mode 100644 |
35 |
index fc8badc1b1c..00000000000 |
36 |
--- a/net-libs/nodejs/nodejs-12.21.0.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,220 +0,0 @@ |
39 |
-# Copyright 1999-2021 Gentoo Authors |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
- |
42 |
-EAPI=7 |
43 |
- |
44 |
-PYTHON_COMPAT=( python3_{7..9} ) |
45 |
-PYTHON_REQ_USE="threads(+)" |
46 |
- |
47 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
48 |
- |
49 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
50 |
-HOMEPAGE="https://nodejs.org/" |
51 |
-SRC_URI=" |
52 |
- https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz |
53 |
-" |
54 |
- |
55 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
56 |
-SLOT="0/$(ver_cut 1)" |
57 |
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~x64-macos" |
58 |
-IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl +system-ssl systemtap test" |
59 |
-REQUIRED_USE=" |
60 |
- inspector? ( icu ssl ) |
61 |
- npm? ( ssl ) |
62 |
- system-ssl? ( ssl ) |
63 |
-" |
64 |
- |
65 |
-RDEPEND=" |
66 |
- >=app-arch/brotli-1.0.9 |
67 |
- >=dev-libs/libuv-1.39.0:= |
68 |
- >=net-dns/c-ares-1.16.0 |
69 |
- >=net-libs/http-parser-2.9.3:= |
70 |
- >=net-libs/nghttp2-1.40.0 |
71 |
- sys-libs/zlib |
72 |
- icu? ( >=dev-libs/icu-64.2:= ) |
73 |
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
74 |
-" |
75 |
-BDEPEND=" |
76 |
- ${PYTHON_DEPS} |
77 |
- sys-apps/coreutils |
78 |
- virtual/pkgconfig |
79 |
- systemtap? ( dev-util/systemtap ) |
80 |
- test? ( net-misc/curl ) |
81 |
-" |
82 |
-DEPEND=" |
83 |
- ${RDEPEND} |
84 |
-" |
85 |
-PATCHES=( |
86 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
87 |
- "${FILESDIR}"/${PN}-12.20.1-fix_ppc64_crashes.patch |
88 |
- "${FILESDIR}"/${PN}-99999999-llhttp.patch |
89 |
-) |
90 |
-RESTRICT="test" |
91 |
-S="${WORKDIR}/node-v${PV}" |
92 |
- |
93 |
-pkg_pretend() { |
94 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
95 |
- die "Your CPU doesn't support the required SSE2 instruction." |
96 |
- |
97 |
- ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
98 |
- die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
99 |
-} |
100 |
- |
101 |
-src_prepare() { |
102 |
- tc-export CC CXX PKG_CONFIG |
103 |
- export V=1 |
104 |
- export BUILDTYPE=Release |
105 |
- |
106 |
- # fix compilation on Darwin |
107 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
108 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
109 |
- |
110 |
- # less verbose install output (stating the same as portage, basically) |
111 |
- sed -i -e "/print/d" tools/install.py || die |
112 |
- |
113 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
114 |
- local LIBDIR=$(get_libdir) |
115 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
116 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
117 |
- |
118 |
- # Avoid writing a depfile, not useful |
119 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
120 |
- |
121 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
122 |
- |
123 |
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
124 |
- # seem sandbox related either (invoking it from a sandbox works fine). |
125 |
- # The issue is that no stdin handle is openened when asked for one. |
126 |
- # It doesn't really belong upstream , so it'll just be removed until someone |
127 |
- # with more gentoo-knowledge than me (jbergstroem) figures it out. |
128 |
- rm test/parallel/test-stdout-close-unref.js || die |
129 |
- |
130 |
- # debug builds. change install path, remove optimisations and override buildtype |
131 |
- if use debug; then |
132 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
133 |
- BUILDTYPE=Debug |
134 |
- fi |
135 |
- |
136 |
- default |
137 |
-} |
138 |
- |
139 |
-src_configure() { |
140 |
- xdg_environment_reset |
141 |
- |
142 |
- local myconf=( |
143 |
- --shared-brotli |
144 |
- --shared-cares |
145 |
- --shared-http-parser |
146 |
- --shared-libuv |
147 |
- --shared-nghttp2 |
148 |
- --shared-zlib |
149 |
- ) |
150 |
- use debug && myconf+=( --debug ) |
151 |
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
152 |
- use inspector || myconf+=( --without-inspector ) |
153 |
- use npm || myconf+=( --without-npm ) |
154 |
- use snapshot || myconf+=( --without-node-snapshot ) |
155 |
- if use ssl; then |
156 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
157 |
- else |
158 |
- myconf+=( --without-ssl ) |
159 |
- fi |
160 |
- |
161 |
- local myarch="" |
162 |
- case ${ABI} in |
163 |
- amd64) myarch="x64";; |
164 |
- arm) myarch="arm";; |
165 |
- arm64) myarch="arm64";; |
166 |
- ppc64) myarch="ppc64";; |
167 |
- x32) myarch="x32";; |
168 |
- x86) myarch="ia32";; |
169 |
- *) myarch="${ABI}";; |
170 |
- esac |
171 |
- |
172 |
- GYP_DEFINES="linux_use_gold_flags=0 |
173 |
- linux_use_bundled_binutils=0 |
174 |
- linux_use_bundled_gold=0" \ |
175 |
- "${EPYTHON}" configure.py \ |
176 |
- --prefix="${EPREFIX}"/usr \ |
177 |
- --dest-cpu=${myarch} \ |
178 |
- $(use_with systemtap dtrace) \ |
179 |
- "${myconf[@]}" || die |
180 |
-} |
181 |
- |
182 |
-src_compile() { |
183 |
- emake -C out mksnapshot |
184 |
- pax-mark m "out/${BUILDTYPE}/mksnapshot" |
185 |
- emake -C out |
186 |
-} |
187 |
- |
188 |
-src_install() { |
189 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
190 |
- default |
191 |
- |
192 |
- pax-mark -m "${ED}"/usr/bin/node |
193 |
- |
194 |
- # set up a symlink structure that node-gyp expects.. |
195 |
- dodir /usr/include/node/deps/{v8,uv} |
196 |
- dosym . /usr/include/node/src |
197 |
- for var in deps/{uv,v8}/include; do |
198 |
- dosym ../.. /usr/include/node/${var} |
199 |
- done |
200 |
- |
201 |
- if use doc; then |
202 |
- docinto html |
203 |
- dodoc -r "${S}"/doc/* |
204 |
- fi |
205 |
- |
206 |
- if use npm; then |
207 |
- dodir /etc/npm |
208 |
- |
209 |
- # Install bash completion for `npm` |
210 |
- # We need to temporarily replace default config path since |
211 |
- # npm otherwise tries to write outside of the sandbox |
212 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
213 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
214 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
215 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
216 |
- newbashcomp "${tmp_npm_completion_file}" npm |
217 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
218 |
- |
219 |
- # Move man pages |
220 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
221 |
- |
222 |
- # Clean up |
223 |
- rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
224 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
225 |
- |
226 |
- local find_exp="-or -name" |
227 |
- local find_name=() |
228 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
229 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
230 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
231 |
- find_name+=( ${find_exp} "${match}" ) |
232 |
- done |
233 |
- |
234 |
- # Remove various development and/or inappropriate files and |
235 |
- # useless docs of dependend packages. |
236 |
- find "${LIBDIR}"/node_modules \ |
237 |
- \( -type d -name examples \) -or \( -type f \( \ |
238 |
- -iname "LICEN?E*" \ |
239 |
- "${find_name[@]}" \ |
240 |
- \) \) -exec rm -rf "{}" \; |
241 |
- fi |
242 |
- |
243 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
244 |
-} |
245 |
- |
246 |
-src_test() { |
247 |
- out/${BUILDTYPE}/cctest || die |
248 |
- "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
249 |
-} |
250 |
- |
251 |
-pkg_postinst() { |
252 |
- elog "The global npm config lives in /etc/npm. This deviates slightly" |
253 |
- elog "from upstream which otherwise would have it live in /usr/etc/." |
254 |
- elog "" |
255 |
- elog "Protip: When using node-gyp to install native modules, you can" |
256 |
- elog "avoid having to download extras by doing the following:" |
257 |
- elog "$ node-gyp --nodedir /usr/include/node <command>" |
258 |
-} |
259 |
|
260 |
diff --git a/net-libs/nodejs/nodejs-14.16.0.ebuild b/net-libs/nodejs/nodejs-14.16.0.ebuild |
261 |
deleted file mode 100644 |
262 |
index 2eedf296c75..00000000000 |
263 |
--- a/net-libs/nodejs/nodejs-14.16.0.ebuild |
264 |
+++ /dev/null |
265 |
@@ -1,209 +0,0 @@ |
266 |
-# Copyright 1999-2021 Gentoo Authors |
267 |
-# Distributed under the terms of the GNU General Public License v2 |
268 |
- |
269 |
-EAPI=7 |
270 |
- |
271 |
-PYTHON_COMPAT=( python3_{7..9} ) |
272 |
-PYTHON_REQ_USE="threads(+)" |
273 |
- |
274 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
275 |
- |
276 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
277 |
-HOMEPAGE="https://nodejs.org/" |
278 |
-SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
279 |
- |
280 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
281 |
-SLOT="0/$(ver_cut 1)" |
282 |
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~x64-macos" |
283 |
- |
284 |
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector +npm pax_kernel +snapshot +ssl system-icu +system-ssl systemtap test" |
285 |
-REQUIRED_USE="inspector? ( icu ssl ) |
286 |
- npm? ( ssl ) |
287 |
- system-icu? ( icu ) |
288 |
- system-ssl? ( ssl )" |
289 |
- |
290 |
-# FIXME: test-fs-mkdir fails with "no such file or directory". Investigate. |
291 |
-RESTRICT="test" |
292 |
- |
293 |
-RDEPEND=">=app-arch/brotli-1.0.9 |
294 |
- >=dev-libs/libuv-1.40.0:= |
295 |
- >=net-dns/c-ares-1.16.1 |
296 |
- >=net-libs/nghttp2-1.41.0 |
297 |
- sys-libs/zlib |
298 |
- system-icu? ( >=dev-libs/icu-67:= ) |
299 |
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= )" |
300 |
-BDEPEND="${PYTHON_DEPS} |
301 |
- sys-apps/coreutils |
302 |
- virtual/pkgconfig |
303 |
- systemtap? ( dev-util/systemtap ) |
304 |
- test? ( net-misc/curl ) |
305 |
- pax_kernel? ( sys-apps/elfix )" |
306 |
-DEPEND="${RDEPEND}" |
307 |
- |
308 |
-PATCHES=( |
309 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
310 |
- "${FILESDIR}"/${PN}-14.15.0-fix_ppc64_crashes.patch |
311 |
-) |
312 |
- |
313 |
-S="${WORKDIR}/node-v${PV}" |
314 |
- |
315 |
-pkg_pretend() { |
316 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
317 |
- die "Your CPU doesn't support the required SSE2 instruction." |
318 |
-} |
319 |
- |
320 |
-src_prepare() { |
321 |
- tc-export AR CC CXX PKG_CONFIG |
322 |
- export V=1 |
323 |
- export BUILDTYPE=Release |
324 |
- |
325 |
- # fix compilation on Darwin |
326 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
327 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
328 |
- |
329 |
- # less verbose install output (stating the same as portage, basically) |
330 |
- sed -i -e "/print/d" tools/install.py || die |
331 |
- |
332 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
333 |
- local LIBDIR=$(get_libdir) |
334 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
335 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
336 |
- |
337 |
- # Avoid writing a depfile, not useful |
338 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
339 |
- |
340 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
341 |
- |
342 |
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
343 |
- # seem sandbox related either (invoking it from a sandbox works fine). |
344 |
- # The issue is that no stdin handle is openened when asked for one. |
345 |
- # It doesn't really belong upstream , so it'll just be removed until someone |
346 |
- # with more gentoo-knowledge than me (jbergstroem) figures it out. |
347 |
- rm test/parallel/test-stdout-close-unref.js || die |
348 |
- |
349 |
- # debug builds. change install path, remove optimisations and override buildtype |
350 |
- if use debug; then |
351 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
352 |
- BUILDTYPE=Debug |
353 |
- fi |
354 |
- |
355 |
- # We need to disable mprotect on two files when it builds Bug 694100. |
356 |
- use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) |
357 |
- |
358 |
- default |
359 |
-} |
360 |
- |
361 |
-src_configure() { |
362 |
- xdg_environment_reset |
363 |
- |
364 |
- local myconf=( |
365 |
- --shared-brotli |
366 |
- --shared-cares |
367 |
- --shared-libuv |
368 |
- --shared-nghttp2 |
369 |
- --shared-zlib |
370 |
- ) |
371 |
- use debug && myconf+=( --debug ) |
372 |
- if use system-icu; then |
373 |
- myconf+=( --with-intl=system-icu ) |
374 |
- elif use icu; then |
375 |
- myconf+=( --with-intl=full-icu ) |
376 |
- else |
377 |
- myconf+=( --with-intl=none ) |
378 |
- fi |
379 |
- use inspector || myconf+=( --without-inspector ) |
380 |
- use npm || myconf+=( --without-npm ) |
381 |
- use snapshot || myconf+=( --without-node-snapshot ) |
382 |
- if use ssl; then |
383 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
384 |
- else |
385 |
- myconf+=( --without-ssl ) |
386 |
- fi |
387 |
- |
388 |
- local myarch="" |
389 |
- case ${ABI} in |
390 |
- amd64) myarch="x64";; |
391 |
- arm) myarch="arm";; |
392 |
- arm64) myarch="arm64";; |
393 |
- ppc64) myarch="ppc64";; |
394 |
- x32) myarch="x32";; |
395 |
- x86) myarch="ia32";; |
396 |
- *) myarch="${ABI}";; |
397 |
- esac |
398 |
- |
399 |
- GYP_DEFINES="linux_use_gold_flags=0 |
400 |
- linux_use_bundled_binutils=0 |
401 |
- linux_use_bundled_gold=0" \ |
402 |
- "${EPYTHON}" configure.py \ |
403 |
- --prefix="${EPREFIX}"/usr \ |
404 |
- --dest-cpu=${myarch} \ |
405 |
- $(use_with systemtap dtrace) \ |
406 |
- "${myconf[@]}" || die |
407 |
-} |
408 |
- |
409 |
-src_compile() { |
410 |
- emake -C out |
411 |
-} |
412 |
- |
413 |
-src_install() { |
414 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
415 |
- default |
416 |
- |
417 |
- pax-mark -m "${ED}"/usr/bin/node |
418 |
- |
419 |
- # set up a symlink structure that node-gyp expects.. |
420 |
- dodir /usr/include/node/deps/{v8,uv} |
421 |
- dosym . /usr/include/node/src |
422 |
- for var in deps/{uv,v8}/include; do |
423 |
- dosym ../.. /usr/include/node/${var} |
424 |
- done |
425 |
- |
426 |
- if use doc; then |
427 |
- docinto html |
428 |
- dodoc -r "${S}"/doc/* |
429 |
- fi |
430 |
- |
431 |
- if use npm; then |
432 |
- dodir /etc/npm |
433 |
- |
434 |
- # Install bash completion for `npm` |
435 |
- # We need to temporarily replace default config path since |
436 |
- # npm otherwise tries to write outside of the sandbox |
437 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
438 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
439 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
440 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
441 |
- newbashcomp "${tmp_npm_completion_file}" npm |
442 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
443 |
- |
444 |
- # Move man pages |
445 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
446 |
- |
447 |
- # Clean up |
448 |
- rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
449 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
450 |
- |
451 |
- local find_exp="-or -name" |
452 |
- local find_name=() |
453 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
454 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
455 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
456 |
- find_name+=( ${find_exp} "${match}" ) |
457 |
- done |
458 |
- |
459 |
- # Remove various development and/or inappropriate files and |
460 |
- # useless docs of dependend packages. |
461 |
- find "${LIBDIR}"/node_modules \ |
462 |
- \( -type d -name examples \) -or \( -type f \( \ |
463 |
- -iname "LICEN?E*" \ |
464 |
- "${find_name[@]}" \ |
465 |
- \) \) -exec rm -rf "{}" \; |
466 |
- fi |
467 |
- |
468 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
469 |
-} |
470 |
- |
471 |
-src_test() { |
472 |
- out/${BUILDTYPE}/cctest || die |
473 |
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
474 |
-} |