1 |
commit: 71daa4b7a12a55e12cf5ea64025565c9d301b87d |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 1 04:43:47 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 1 04:45:19 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71daa4b7 |
7 |
|
8 |
net-libs/nodejs: Old |
9 |
|
10 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-libs/nodejs/Manifest | 2 - |
14 |
net-libs/nodejs/nodejs-10.16.3.ebuild | 207 --------------------------------- |
15 |
net-libs/nodejs/nodejs-12.12.0.ebuild | 213 ---------------------------------- |
16 |
3 files changed, 422 deletions(-) |
17 |
|
18 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
19 |
index 65d97aa3908..b32c900c0f5 100644 |
20 |
--- a/net-libs/nodejs/Manifest |
21 |
+++ b/net-libs/nodejs/Manifest |
22 |
@@ -1,6 +1,4 @@ |
23 |
-DIST node-v10.16.3.tar.xz 21505540 BLAKE2B 2ae6c3ce96a42cb72a388ca7727affb1e2eae06b997098bd8cad2b339b888f1f188c868d39631c51e10ef7b3a5a9173a3b016afe9fa7a4fb74c24a584781c329 SHA512 5d5457adaae87e41699cdf5bd62d32e9590248f7dadd583614cca9078a1749a4ee477433ebbe4278ec872fdfc377d99097c1e06073e0fd47c8c6597256ccdeb7 |
24 |
DIST node-v10.17.0.tar.xz 21514260 BLAKE2B a37793d78e14d1d2ca861c39f27c5e1dbb47ad26f14aa97139fd9f9be039bd47e528f10c9977725f1ca4b5f4e31a1066715091ffaa488f764c67290bc1c84541 SHA512 4eec936fa8d848b7e261f83b6e25c1bfb06355a7146dcca91b0f64fc401ca32dd1b0758c127b81be7f0d1cc59c3b24b4ec2c17282b4bdb91c5bf71f42f2f7cbc |
25 |
-DIST node-v12.12.0.tar.xz 22836688 BLAKE2B 81ff202fb807c557a30eeb08a76a8e95e2faec300d360caac5ce177cdfcda3963bcea904f3e79f9ced9fe2219e7e1d4a760a9c4e69dfe5b670c737e2a598cf6a SHA512 91872784a7a7e7e1e0beeb1166eb1ddd7a5432271e9f62265815d4c5b5d831f269916954bb36724e65108c57d6a7ebac3a2a5be2e49f51f7904a7d549c92176b |
26 |
DIST node-v12.13.0.tar.xz 22862096 BLAKE2B b0121f45b535bac7baa0103db538070b4beb4b40a6c871c217eebfb1abb5a7821d83d46946047b3385af182f901c0390eb85134c9201be2d03b5745b297271f8 SHA512 a7aa8b1f010ea1df122d9d7b88ee0a9d10e0d79ae2f3d18c706ac6ce36e2e2039c21ea6f3dba3a22a79ed3f6069850a8a3c463dbd64e1e8f4a9dbe8901a89cc8 |
27 |
DIST node-v13.0.1.tar.xz 31986844 BLAKE2B f30937878ef68fe94b69912b994b84c03d75fd92e243d77453cfa7d335e9e1a37ce4f18eb1cbba141ff9a017a777e31ae64261f46dbf17d1f6ff0d6d5c263a2a SHA512 a39a64761ef3867379f3a2ef230f65ddeb91fb93d8833c1ada7312588fd75d060f4d73df1a106f7d7cc08886ac7c5335d453e4d882c8cdde28a25a0a8cbcbfa6 |
28 |
DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42 |
29 |
|
30 |
diff --git a/net-libs/nodejs/nodejs-10.16.3.ebuild b/net-libs/nodejs/nodejs-10.16.3.ebuild |
31 |
deleted file mode 100644 |
32 |
index 4f3b7078db4..00000000000 |
33 |
--- a/net-libs/nodejs/nodejs-10.16.3.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,207 +0,0 @@ |
36 |
-# Copyright 1999-2019 Gentoo Authors |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=6 |
40 |
- |
41 |
-PYTHON_COMPAT=( python2_7 ) |
42 |
-PYTHON_REQ_USE="threads" |
43 |
- |
44 |
-inherit bash-completion-r1 eutils flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
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 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
53 |
-IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" |
54 |
-REQUIRED_USE=" |
55 |
- inspector? ( icu ssl ) |
56 |
- npm? ( ssl ) |
57 |
-" |
58 |
- |
59 |
-RDEPEND=" |
60 |
- >=dev-libs/libuv-1.28.0:= |
61 |
- >=net-dns/c-ares-1.15.0 |
62 |
- >=net-libs/http-parser-2.9.0:= |
63 |
- >=net-libs/nghttp2-1.39.2 |
64 |
- sys-libs/zlib |
65 |
- icu? ( >=dev-libs/icu-64.2:= ) |
66 |
- ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
67 |
-" |
68 |
-DEPEND=" |
69 |
- ${RDEPEND} |
70 |
- ${PYTHON_DEPS} |
71 |
- systemtap? ( dev-util/systemtap ) |
72 |
- test? ( net-misc/curl ) |
73 |
-" |
74 |
-PATCHES=( |
75 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
76 |
-) |
77 |
-RESTRICT="test" |
78 |
-S="${WORKDIR}/node-v${PV}" |
79 |
- |
80 |
-pkg_pretend() { |
81 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
82 |
- die "Your CPU doesn't support the required SSE2 instruction." |
83 |
- |
84 |
- ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
85 |
- die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
86 |
-} |
87 |
- |
88 |
-src_prepare() { |
89 |
- tc-export CC CXX PKG_CONFIG |
90 |
- export V=1 |
91 |
- export BUILDTYPE=Release |
92 |
- |
93 |
- # fix compilation on Darwin |
94 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
95 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
96 |
- |
97 |
- # make sure we use python2.* while using gyp |
98 |
- sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
99 |
- sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die |
100 |
- |
101 |
- # less verbose install output (stating the same as portage, basically) |
102 |
- sed -i -e "/print/d" tools/install.py || die |
103 |
- |
104 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
105 |
- local LIBDIR=$(get_libdir) |
106 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
107 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
108 |
- |
109 |
- # Avoid writing a depfile, not useful |
110 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
111 |
- |
112 |
- sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die |
113 |
- |
114 |
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
115 |
- # seem sandbox related either (invoking it from a sandbox works fine). |
116 |
- # The issue is that no stdin handle is openened when asked for one. |
117 |
- # It doesn't really belong upstream , so it'll just be removed until someone |
118 |
- # with more gentoo-knowledge than me (jbergstroem) figures it out. |
119 |
- rm test/parallel/test-stdout-close-unref.js || die |
120 |
- |
121 |
- # debug builds. change install path, remove optimisations and override buildtype |
122 |
- if use debug; then |
123 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
124 |
- BUILDTYPE=Debug |
125 |
- fi |
126 |
- |
127 |
- default |
128 |
-} |
129 |
- |
130 |
-src_configure() { |
131 |
- xdg_environment_reset |
132 |
- |
133 |
- local myconf=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib ) |
134 |
- use debug && myconf+=( --debug ) |
135 |
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
136 |
- use inspector || myconf+=( --without-inspector ) |
137 |
- use npm || myconf+=( --without-npm ) |
138 |
- use snapshot && myconf+=( --with-snapshot ) |
139 |
- use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl ) |
140 |
- |
141 |
- local myarch="" |
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 |
- $(use_with systemtap 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 |
- docinto html |
187 |
- dodoc -r "${S}"/doc/* |
188 |
- fi |
189 |
- |
190 |
- if use npm; then |
191 |
- dodir /etc/npm |
192 |
- |
193 |
- # Install bash completion for `npm` |
194 |
- # We need to temporarily replace default config path since |
195 |
- # npm otherwise tries to write outside of the sandbox |
196 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
197 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
198 |
- local tmp_npm_completion_file="$(emktemp)" |
199 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
200 |
- newbashcomp "${tmp_npm_completion_file}" npm |
201 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
202 |
- |
203 |
- # Move man pages |
204 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
205 |
- |
206 |
- # Clean up |
207 |
- rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
208 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
209 |
- |
210 |
- local find_exp="-or -name" |
211 |
- local find_name=() |
212 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
213 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
214 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
215 |
- find_name+=( ${find_exp} "${match}" ) |
216 |
- done |
217 |
- |
218 |
- # Remove various development and/or inappropriate files and |
219 |
- # useless docs of dependend packages. |
220 |
- find "${LIBDIR}"/node_modules \ |
221 |
- \( -type d -name examples \) -or \( -type f \( \ |
222 |
- -iname "LICEN?E*" \ |
223 |
- "${find_name[@]}" \ |
224 |
- \) \) -exec rm -rf "{}" \; |
225 |
- fi |
226 |
- |
227 |
- mv "${D}"/usr/share/doc/node "${D}"/usr/share/doc/${PF} || die |
228 |
-} |
229 |
- |
230 |
-src_test() { |
231 |
- out/${BUILDTYPE}/cctest || die |
232 |
- "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
233 |
-} |
234 |
- |
235 |
-pkg_postinst() { |
236 |
- einfo "The global npm config lives in /etc/npm. This deviates slightly" |
237 |
- einfo "from upstream which otherwise would have it live in /usr/etc/." |
238 |
- einfo "" |
239 |
- einfo "Protip: When using node-gyp to install native modules, you can" |
240 |
- einfo "avoid having to download extras by doing the following:" |
241 |
- einfo "$ node-gyp --nodedir /usr/include/node <command>" |
242 |
-} |
243 |
|
244 |
diff --git a/net-libs/nodejs/nodejs-12.12.0.ebuild b/net-libs/nodejs/nodejs-12.12.0.ebuild |
245 |
deleted file mode 100644 |
246 |
index bd195e7518e..00000000000 |
247 |
--- a/net-libs/nodejs/nodejs-12.12.0.ebuild |
248 |
+++ /dev/null |
249 |
@@ -1,213 +0,0 @@ |
250 |
-# Copyright 1999-2019 Gentoo Authors |
251 |
-# Distributed under the terms of the GNU General Public License v2 |
252 |
- |
253 |
-EAPI=7 |
254 |
-PYTHON_COMPAT=( python2_7 ) |
255 |
-PYTHON_REQ_USE="threads" |
256 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
257 |
- |
258 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
259 |
-HOMEPAGE="https://nodejs.org/" |
260 |
-SRC_URI=" |
261 |
- https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz |
262 |
-" |
263 |
- |
264 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
265 |
-SLOT="0" |
266 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
267 |
-IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" |
268 |
-REQUIRED_USE=" |
269 |
- inspector? ( icu ssl ) |
270 |
- npm? ( ssl ) |
271 |
-" |
272 |
- |
273 |
-RDEPEND=" |
274 |
- >=dev-libs/libuv-1.31.0:= |
275 |
- >=net-dns/c-ares-1.15.0 |
276 |
- >=net-libs/http-parser-2.9.0:= |
277 |
- >=net-libs/nghttp2-1.39.2 |
278 |
- sys-libs/zlib |
279 |
- icu? ( >=dev-libs/icu-64.2:= ) |
280 |
- ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
281 |
-" |
282 |
-BDEPEND=" |
283 |
- ${PYTHON_DEPS} |
284 |
- systemtap? ( dev-util/systemtap ) |
285 |
- test? ( net-misc/curl ) |
286 |
-" |
287 |
-DEPEND=" |
288 |
- ${RDEPEND} |
289 |
-" |
290 |
-PATCHES=( |
291 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
292 |
- "${FILESDIR}"/${PN}-99999999-llhttp.patch |
293 |
-) |
294 |
-RESTRICT="test" |
295 |
-S="${WORKDIR}/node-v${PV}" |
296 |
- |
297 |
-pkg_pretend() { |
298 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
299 |
- die "Your CPU doesn't support the required SSE2 instruction." |
300 |
- |
301 |
- ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
302 |
- die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
303 |
-} |
304 |
- |
305 |
-src_prepare() { |
306 |
- tc-export CC CXX PKG_CONFIG |
307 |
- export V=1 |
308 |
- export BUILDTYPE=Release |
309 |
- |
310 |
- # fix compilation on Darwin |
311 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
312 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
313 |
- |
314 |
- # make sure we use python2.* while using gyp |
315 |
- sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
316 |
- |
317 |
- # less verbose install output (stating the same as portage, basically) |
318 |
- sed -i -e "/print/d" tools/install.py || die |
319 |
- |
320 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
321 |
- local LIBDIR=$(get_libdir) |
322 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
323 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
324 |
- |
325 |
- # Avoid writing a depfile, not useful |
326 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
327 |
- |
328 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
329 |
- |
330 |
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
331 |
- # seem sandbox related either (invoking it from a sandbox works fine). |
332 |
- # The issue is that no stdin handle is openened when asked for one. |
333 |
- # It doesn't really belong upstream , so it'll just be removed until someone |
334 |
- # with more gentoo-knowledge than me (jbergstroem) figures it out. |
335 |
- rm test/parallel/test-stdout-close-unref.js || die |
336 |
- |
337 |
- # debug builds. change install path, remove optimisations and override buildtype |
338 |
- if use debug; then |
339 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
340 |
- BUILDTYPE=Debug |
341 |
- fi |
342 |
- |
343 |
- default |
344 |
-} |
345 |
- |
346 |
-src_configure() { |
347 |
- xdg_environment_reset |
348 |
- |
349 |
- local myconf=( |
350 |
- --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 |
351 |
- --shared-zlib |
352 |
- ) |
353 |
- use debug && myconf+=( --debug ) |
354 |
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
355 |
- use inspector || myconf+=( --without-inspector ) |
356 |
- use npm || myconf+=( --without-npm ) |
357 |
- use snapshot && myconf+=( --with-snapshot ) |
358 |
- use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl ) |
359 |
- |
360 |
- local myarch="" |
361 |
- case ${ABI} in |
362 |
- amd64) myarch="x64";; |
363 |
- arm) myarch="arm";; |
364 |
- arm64) myarch="arm64";; |
365 |
- ppc64) myarch="ppc64";; |
366 |
- x32) myarch="x32";; |
367 |
- x86) myarch="ia32";; |
368 |
- *) myarch="${ABI}";; |
369 |
- esac |
370 |
- |
371 |
- GYP_DEFINES="linux_use_gold_flags=0 |
372 |
- linux_use_bundled_binutils=0 |
373 |
- linux_use_bundled_gold=0" \ |
374 |
- "${PYTHON}" configure \ |
375 |
- --prefix="${EPREFIX}"/usr \ |
376 |
- --dest-cpu=${myarch} \ |
377 |
- $(use_with systemtap dtrace) \ |
378 |
- "${myconf[@]}" || die |
379 |
-} |
380 |
- |
381 |
-src_compile() { |
382 |
- emake -C out mksnapshot |
383 |
- pax-mark m "out/${BUILDTYPE}/mksnapshot" |
384 |
- emake -C out |
385 |
-} |
386 |
- |
387 |
-src_install() { |
388 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
389 |
- default |
390 |
- |
391 |
- pax-mark -m "${ED}"/usr/bin/node |
392 |
- |
393 |
- # set up a symlink structure that node-gyp expects.. |
394 |
- dodir /usr/include/node/deps/{v8,uv} |
395 |
- dosym . /usr/include/node/src |
396 |
- for var in deps/{uv,v8}/include; do |
397 |
- dosym ../.. /usr/include/node/${var} |
398 |
- done |
399 |
- |
400 |
- if use doc; then |
401 |
- # Patch docs to make them offline readable |
402 |
- for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do |
403 |
- sed -i '/fonts.googleapis.com/ d' $i; |
404 |
- done |
405 |
- # Install docs |
406 |
- docinto html |
407 |
- dodoc -r "${S}"/doc/* |
408 |
- fi |
409 |
- |
410 |
- if use npm; then |
411 |
- dodir /etc/npm |
412 |
- |
413 |
- # Install bash completion for `npm` |
414 |
- # We need to temporarily replace default config path since |
415 |
- # npm otherwise tries to write outside of the sandbox |
416 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
417 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
418 |
- local tmp_npm_completion_file="$(emktemp)" |
419 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
420 |
- newbashcomp "${tmp_npm_completion_file}" npm |
421 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
422 |
- |
423 |
- # Move man pages |
424 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
425 |
- |
426 |
- # Clean up |
427 |
- rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
428 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
429 |
- |
430 |
- local find_exp="-or -name" |
431 |
- local find_name=() |
432 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
433 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
434 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
435 |
- find_name+=( ${find_exp} "${match}" ) |
436 |
- done |
437 |
- |
438 |
- # Remove various development and/or inappropriate files and |
439 |
- # useless docs of dependend packages. |
440 |
- find "${LIBDIR}"/node_modules \ |
441 |
- \( -type d -name examples \) -or \( -type f \( \ |
442 |
- -iname "LICEN?E*" \ |
443 |
- "${find_name[@]}" \ |
444 |
- \) \) -exec rm -rf "{}" \; |
445 |
- fi |
446 |
- |
447 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
448 |
-} |
449 |
- |
450 |
-src_test() { |
451 |
- out/${BUILDTYPE}/cctest || die |
452 |
- "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
453 |
-} |
454 |
- |
455 |
-pkg_postinst() { |
456 |
- elog "The global npm config lives in /etc/npm. This deviates slightly" |
457 |
- elog "from upstream which otherwise would have it live in /usr/etc/." |
458 |
- elog "" |
459 |
- elog "Protip: When using node-gyp to install native modules, you can" |
460 |
- elog "avoid having to download extras by doing the following:" |
461 |
- elog "$ node-gyp --nodedir /usr/include/node <command>" |
462 |
-} |