1 |
commit: 0527bdd1afab83adc209f7d413a2d1d1559f540b |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 7 09:20:40 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 7 09:23:01 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0527bdd1 |
7 |
|
8 |
net-libs/nodejs: drop 12.22.1-r1, 14.17.0 |
9 |
|
10 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
11 |
|
12 |
net-libs/nodejs/Manifest | 1 - |
13 |
net-libs/nodejs/nodejs-12.22.1-r1.ebuild | 246 ------------------------------- |
14 |
net-libs/nodejs/nodejs-14.17.0.ebuild | 240 ------------------------------ |
15 |
3 files changed, 487 deletions(-) |
16 |
|
17 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
18 |
index cb8fe0ae3ee..ec00b3caa06 100644 |
19 |
--- a/net-libs/nodejs/Manifest |
20 |
+++ b/net-libs/nodejs/Manifest |
21 |
@@ -1,6 +1,5 @@ |
22 |
DIST node-v12.22.1.tar.xz 23650180 BLAKE2B 90b0a8ab3842483fea0c776e0245e63539a986c18f55abd8c7cd22ec399ccde22fa5b008d3e07c0f07713b5a45a1ee2a0bc370c04408800db2ee59cd92fcb5be SHA512 eaead633611bda04ab9be200aeddf3b4004b8104e9c6af246023b8008003dd3a7103e1508ea690443e59c6591521b04a2d71c7344343f2a20d1c935ef51c66a0 |
23 |
DIST node-v12.22.2.tar.xz 23665228 BLAKE2B 2213029c3a819981bab8b50d3e5d1a2f4c05bee797cf0e5f28d8bf621ac394b14dcfa63e682a00b21b023579155f2f373d21ff75e2fb2f25af484a02362cdd29 SHA512 6722498b51b7240d08068687e015920189a04ce3a19669089f96a15eafd14876db3dc49372674177f0d78bebc31eb873e22a07947a8e156ca5d3e240a42b8cc6 |
24 |
DIST node-v14.16.1.tar.xz 33297064 BLAKE2B 0927434c63cd248e90a4002b50c7a0fd68a5527a4cd7424b451840ddf0c403ba452979b195e598cc3b323e24233248a74a1274519ce8cd3a2f4e71dc7a8f3dcb SHA512 d4f5fbab69592ae555613b2186090b85a458d2211b6035989aee2617bfd0f6768ca767ec45ce12756a9c452d00af7237edee3b1ae526049e9fcd01f8f67680c0 |
25 |
-DIST node-v14.17.0.tar.xz 33484212 BLAKE2B 0ad045b7e0b96f564f42cef703338fece2167cb8bfe32840b765b137e01491a43a9c31ce290a3379ffa834ddfe4e2e1f42f95d4d0014240151b06313e0339383 SHA512 7a7683523904580462077c8bf3ee9640f1b674c7df55655049ca50ca3cfdb2973b13088f2b65e4eccf4df2641cd9c86c9716bcd160a5d5863a969cb1e88de093 |
26 |
DIST node-v14.17.3.tar.xz 33585080 BLAKE2B 37267c9da2d773dbbe95f7378f5b0c2b0dc397b17850be325f9fec637c6745dede4ca4136ba4bf109d72d8982ee985f1e077cc706165f1be2e3dc3053edfe229 SHA512 c6096715299f155b96df873976da91e854da7e99cde635cdb65d5c962abc5283dac86b8ddce4f5a9f7498f9793ff08943645b5e5b0b23395dfe035f7295218bb |
27 |
DIST node-v16.4.1.tar.xz 33583984 BLAKE2B 24dbe2c9a07212a2911b55932fc6e5dd0d83f2d5a07ac6a16dfe2359c0cbaf87d5b52ac12b4be7cb77fe63c61f79f598235c7ba43693b4dd7d71bb83c478ee73 SHA512 ce01440a737f063fff84a3f05c54e85d8f85694dfea69c45cda4de2f0ab1e8e778f406b3ea989665b1af218d1a6c33a8e25019e986d345f5dccfc913a52deffe |
28 |
|
29 |
diff --git a/net-libs/nodejs/nodejs-12.22.1-r1.ebuild b/net-libs/nodejs/nodejs-12.22.1-r1.ebuild |
30 |
deleted file mode 100644 |
31 |
index 9c4fe05c005..00000000000 |
32 |
--- a/net-libs/nodejs/nodejs-12.22.1-r1.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,246 +0,0 @@ |
35 |
-# Copyright 1999-2021 Gentoo Authors |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=7 |
39 |
- |
40 |
-PYTHON_COMPAT=( python3_{7..10} ) |
41 |
-PYTHON_REQ_USE="threads(+)" |
42 |
- |
43 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
44 |
- |
45 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
46 |
-HOMEPAGE="https://nodejs.org/" |
47 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
48 |
- |
49 |
-if [[ ${PV} == *9999 ]]; then |
50 |
- inherit git-r3 |
51 |
- EGIT_REPO_URI="https://github.com/nodejs/node" |
52 |
- SLOT="0" |
53 |
-else |
54 |
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
55 |
- SLOT="0/$(ver_cut 1)" |
56 |
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
57 |
- S="${WORKDIR}/node-v${PV}" |
58 |
-fi |
59 |
- |
60 |
-IUSE="cpu_flags_x86_sse2 debug doc icu inspector lto +npm +snapshot +ssl +system-ssl systemtap test" |
61 |
-REQUIRED_USE=" |
62 |
- inspector? ( icu ssl ) |
63 |
- npm? ( ssl ) |
64 |
- system-ssl? ( ssl ) |
65 |
-" |
66 |
- |
67 |
-RESTRICT="!test? ( test )" |
68 |
- |
69 |
-RDEPEND=" |
70 |
- >=app-arch/brotli-1.0.9 |
71 |
- >=dev-libs/libuv-1.39.0:= |
72 |
- >=net-dns/c-ares-1.16.0 |
73 |
- >=net-libs/http-parser-2.9.3:= |
74 |
- >=net-libs/nghttp2-1.40.0 |
75 |
- sys-libs/zlib |
76 |
- icu? ( >=dev-libs/icu-64.2:= ) |
77 |
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
78 |
-" |
79 |
-BDEPEND=" |
80 |
- ${PYTHON_DEPS} |
81 |
- sys-apps/coreutils |
82 |
- virtual/pkgconfig |
83 |
- systemtap? ( dev-util/systemtap ) |
84 |
- test? ( net-misc/curl ) |
85 |
-" |
86 |
-DEPEND=" |
87 |
- ${RDEPEND} |
88 |
-" |
89 |
-PATCHES=( |
90 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
91 |
- "${FILESDIR}"/${PN}-12.20.1-fix_ppc64_crashes.patch |
92 |
- "${FILESDIR}"/${PN}-12.22.1-jinja_collections_abc.patch |
93 |
- "${FILESDIR}"/${PN}-12.22.1-uvwasi_shared_libuv.patch |
94 |
- "${FILESDIR}"/${PN}-12.22.1-v8_icu69.patch |
95 |
- "${FILESDIR}"/${PN}-99999999-llhttp.patch |
96 |
-) |
97 |
- |
98 |
-pkg_pretend() { |
99 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
100 |
- die "Your CPU doesn't support the required SSE2 instruction." |
101 |
- |
102 |
- if [[ ${MERGE_TYPE} != "binary" ]]; then |
103 |
- if use lto; then |
104 |
- if tc-is-gcc; then |
105 |
- if [[ $(gcc-major-version) -ge 11 ]]; then |
106 |
- # Bug #787158 |
107 |
- die "LTO builds of ${PN} using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild" |
108 |
- fi |
109 |
- else |
110 |
- # configure.py will abort on this later if we do not |
111 |
- die "${PN} only supports LTO for gcc" |
112 |
- fi |
113 |
- fi |
114 |
- fi |
115 |
-} |
116 |
- |
117 |
-src_prepare() { |
118 |
- tc-export CC CXX PKG_CONFIG |
119 |
- export V=1 |
120 |
- export BUILDTYPE=Release |
121 |
- |
122 |
- # fix compilation on Darwin |
123 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
124 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
125 |
- |
126 |
- # less verbose install output (stating the same as portage, basically) |
127 |
- sed -i -e "/print/d" tools/install.py || die |
128 |
- |
129 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
130 |
- local LIBDIR=$(get_libdir) |
131 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
132 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
133 |
- |
134 |
- # Avoid writing a depfile, not useful |
135 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
136 |
- |
137 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
138 |
- |
139 |
- # Known-to-fail test of a deprecated, legacy HTTP parser. Just don't bother. |
140 |
- rm -f test/parallel/test-http-transfer-encoding-smuggling-legacy.js |
141 |
- |
142 |
- # debug builds. change install path, remove optimisations and override buildtype |
143 |
- if use debug; then |
144 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
145 |
- BUILDTYPE=Debug |
146 |
- fi |
147 |
- |
148 |
- default |
149 |
-} |
150 |
- |
151 |
-src_configure() { |
152 |
- xdg_environment_reset |
153 |
- |
154 |
- # LTO compiler flags are handled by configure.py itself |
155 |
- filter-flags '-flto*' |
156 |
- |
157 |
- local myconf=( |
158 |
- --shared-brotli |
159 |
- --shared-cares |
160 |
- --shared-http-parser |
161 |
- --shared-libuv |
162 |
- --shared-nghttp2 |
163 |
- --shared-zlib |
164 |
- ) |
165 |
- use debug && myconf+=( --debug ) |
166 |
- use lto && myconf+=( --enable-lto ) |
167 |
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
168 |
- use inspector || myconf+=( --without-inspector ) |
169 |
- use npm || myconf+=( --without-npm ) |
170 |
- use snapshot || myconf+=( --without-node-snapshot ) |
171 |
- if use ssl; then |
172 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
173 |
- else |
174 |
- myconf+=( --without-ssl ) |
175 |
- fi |
176 |
- |
177 |
- local myarch="" |
178 |
- case ${ABI} in |
179 |
- amd64) myarch="x64";; |
180 |
- arm) myarch="arm";; |
181 |
- arm64) myarch="arm64";; |
182 |
- ppc64) myarch="ppc64";; |
183 |
- x32) myarch="x32";; |
184 |
- x86) myarch="ia32";; |
185 |
- *) myarch="${ABI}";; |
186 |
- esac |
187 |
- |
188 |
- GYP_DEFINES="linux_use_gold_flags=0 |
189 |
- linux_use_bundled_binutils=0 |
190 |
- linux_use_bundled_gold=0" \ |
191 |
- "${EPYTHON}" configure.py \ |
192 |
- --prefix="${EPREFIX}"/usr \ |
193 |
- --dest-cpu=${myarch} \ |
194 |
- $(use_with systemtap dtrace) \ |
195 |
- "${myconf[@]}" || die |
196 |
-} |
197 |
- |
198 |
-src_compile() { |
199 |
- emake -C out mksnapshot |
200 |
- pax-mark m "out/${BUILDTYPE}/mksnapshot" |
201 |
- emake -C out |
202 |
-} |
203 |
- |
204 |
-src_install() { |
205 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
206 |
- default |
207 |
- |
208 |
- pax-mark -m "${ED}"/usr/bin/node |
209 |
- |
210 |
- # set up a symlink structure that node-gyp expects.. |
211 |
- dodir /usr/include/node/deps/{v8,uv} |
212 |
- dosym . /usr/include/node/src |
213 |
- for var in deps/{uv,v8}/include; do |
214 |
- dosym ../.. /usr/include/node/${var} |
215 |
- done |
216 |
- |
217 |
- if use doc; then |
218 |
- docinto html |
219 |
- dodoc -r "${S}"/doc/* |
220 |
- fi |
221 |
- |
222 |
- if use npm; then |
223 |
- dodir /etc/npm |
224 |
- |
225 |
- # Install bash completion for `npm` |
226 |
- # We need to temporarily replace default config path since |
227 |
- # npm otherwise tries to write outside of the sandbox |
228 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
229 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
230 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
231 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
232 |
- newbashcomp "${tmp_npm_completion_file}" npm |
233 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
234 |
- |
235 |
- # Move man pages |
236 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
237 |
- |
238 |
- # Clean up |
239 |
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} |
240 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} |
241 |
- |
242 |
- local find_exp="-or -name" |
243 |
- local find_name=() |
244 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
245 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
246 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
247 |
- find_name+=( ${find_exp} "${match}" ) |
248 |
- done |
249 |
- |
250 |
- # Remove various development and/or inappropriate files and |
251 |
- # useless docs of dependend packages. |
252 |
- find "${LIBDIR}"/node_modules \ |
253 |
- \( -type d -name examples \) -or \( -type f \( \ |
254 |
- -iname "LICEN?E*" \ |
255 |
- "${find_name[@]}" \ |
256 |
- \) \) -exec rm -rf "{}" \; |
257 |
- fi |
258 |
- |
259 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
260 |
-} |
261 |
- |
262 |
-src_test() { |
263 |
- # parallel/test-fs-mkdir is known to fail with FEATURES=usersandbox |
264 |
- if has usersandbox ${FEATURES}; then |
265 |
- ewarn "You are emerging ${P} with 'usersandbox' enabled." \ |
266 |
- "Expect some test failures or emerge with 'FEATURES=-usersandbox'!" |
267 |
- fi |
268 |
- |
269 |
- out/${BUILDTYPE}/cctest || die |
270 |
- "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die |
271 |
-} |
272 |
- |
273 |
-pkg_postinst() { |
274 |
- elog "The global npm config lives in /etc/npm. This deviates slightly" |
275 |
- elog "from upstream which otherwise would have it live in /usr/etc/." |
276 |
- elog "" |
277 |
- elog "Protip: When using node-gyp to install native modules, you can" |
278 |
- elog "avoid having to download extras by doing the following:" |
279 |
- elog "$ node-gyp --nodedir /usr/include/node <command>" |
280 |
-} |
281 |
|
282 |
diff --git a/net-libs/nodejs/nodejs-14.17.0.ebuild b/net-libs/nodejs/nodejs-14.17.0.ebuild |
283 |
deleted file mode 100644 |
284 |
index c27716a6b0b..00000000000 |
285 |
--- a/net-libs/nodejs/nodejs-14.17.0.ebuild |
286 |
+++ /dev/null |
287 |
@@ -1,240 +0,0 @@ |
288 |
-# Copyright 1999-2021 Gentoo Authors |
289 |
-# Distributed under the terms of the GNU General Public License v2 |
290 |
- |
291 |
-EAPI=7 |
292 |
- |
293 |
-PYTHON_COMPAT=( python3_{7..10} ) |
294 |
-PYTHON_REQ_USE="threads(+)" |
295 |
- |
296 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
297 |
- |
298 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
299 |
-HOMEPAGE="https://nodejs.org/" |
300 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
301 |
- |
302 |
-if [[ ${PV} == *9999 ]]; then |
303 |
- inherit git-r3 |
304 |
- EGIT_REPO_URI="https://github.com/nodejs/node" |
305 |
- SLOT="0" |
306 |
-else |
307 |
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
308 |
- SLOT="0/$(ver_cut 1)" |
309 |
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
310 |
- S="${WORKDIR}/node-v${PV}" |
311 |
-fi |
312 |
- |
313 |
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl system-icu +system-ssl systemtap test" |
314 |
-REQUIRED_USE="inspector? ( icu ssl ) |
315 |
- npm? ( ssl ) |
316 |
- system-icu? ( icu ) |
317 |
- system-ssl? ( ssl )" |
318 |
- |
319 |
-RESTRICT="!test? ( test )" |
320 |
- |
321 |
-RDEPEND=">=app-arch/brotli-1.0.9 |
322 |
- >=dev-libs/libuv-1.40.0:= |
323 |
- >=net-dns/c-ares-1.16.1 |
324 |
- >=net-libs/nghttp2-1.41.0 |
325 |
- sys-libs/zlib |
326 |
- system-icu? ( >=dev-libs/icu-67:= ) |
327 |
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= )" |
328 |
-BDEPEND="${PYTHON_DEPS} |
329 |
- sys-apps/coreutils |
330 |
- virtual/pkgconfig |
331 |
- systemtap? ( dev-util/systemtap ) |
332 |
- test? ( net-misc/curl ) |
333 |
- pax-kernel? ( sys-apps/elfix )" |
334 |
-DEPEND="${RDEPEND}" |
335 |
- |
336 |
-PATCHES=( |
337 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
338 |
- "${FILESDIR}"/${PN}-12.22.1-jinja_collections_abc.patch |
339 |
- "${FILESDIR}"/${PN}-12.22.1-uvwasi_shared_libuv.patch |
340 |
- "${FILESDIR}"/${PN}-14.15.0-fix_ppc64_crashes.patch |
341 |
- "${FILESDIR}"/${PN}-14.16.1-v8_icu69.patch |
342 |
-) |
343 |
- |
344 |
-pkg_pretend() { |
345 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
346 |
- die "Your CPU doesn't support the required SSE2 instruction." |
347 |
- |
348 |
- if [[ ${MERGE_TYPE} != "binary" ]]; then |
349 |
- if use lto; then |
350 |
- if tc-is-gcc; then |
351 |
- if [[ $(gcc-major-version) -ge 11 ]]; then |
352 |
- # Bug #787158 |
353 |
- die "LTO builds of ${PN} using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild" |
354 |
- fi |
355 |
- else |
356 |
- # configure.py will abort on this later if we do not |
357 |
- die "${PN} only supports LTO for gcc" |
358 |
- fi |
359 |
- fi |
360 |
- fi |
361 |
-} |
362 |
- |
363 |
-src_prepare() { |
364 |
- tc-export AR CC CXX PKG_CONFIG |
365 |
- export V=1 |
366 |
- export BUILDTYPE=Release |
367 |
- |
368 |
- # fix compilation on Darwin |
369 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
370 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
371 |
- |
372 |
- # less verbose install output (stating the same as portage, basically) |
373 |
- sed -i -e "/print/d" tools/install.py || die |
374 |
- |
375 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
376 |
- local LIBDIR=$(get_libdir) |
377 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
378 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
379 |
- |
380 |
- # Avoid writing a depfile, not useful |
381 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
382 |
- |
383 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
384 |
- |
385 |
- # debug builds. change install path, remove optimisations and override buildtype |
386 |
- if use debug; then |
387 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
388 |
- BUILDTYPE=Debug |
389 |
- fi |
390 |
- |
391 |
- # We need to disable mprotect on two files when it builds Bug 694100. |
392 |
- use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) |
393 |
- |
394 |
- # All this test does is check if the npm CLI produces warnings of any sort, |
395 |
- # failing if it does. Overkill, much? Especially given one possible warning |
396 |
- # is that there is a newer version of npm available upstream (yes, it does |
397 |
- # use the network if available), thus making it a real possibility for this |
398 |
- # test to begin failing one day even though it was fine before. |
399 |
- rm -f test/parallel/test-release-npm.js |
400 |
- |
401 |
- default |
402 |
-} |
403 |
- |
404 |
-src_configure() { |
405 |
- xdg_environment_reset |
406 |
- |
407 |
- # LTO compiler flags are handled by configure.py itself |
408 |
- filter-flags '-flto*' |
409 |
- |
410 |
- local myconf=( |
411 |
- --shared-brotli |
412 |
- --shared-cares |
413 |
- --shared-libuv |
414 |
- --shared-nghttp2 |
415 |
- --shared-zlib |
416 |
- ) |
417 |
- use debug && myconf+=( --debug ) |
418 |
- use lto && myconf+=( --enable-lto ) |
419 |
- if use system-icu; then |
420 |
- myconf+=( --with-intl=system-icu ) |
421 |
- elif use icu; then |
422 |
- myconf+=( --with-intl=full-icu ) |
423 |
- else |
424 |
- myconf+=( --with-intl=none ) |
425 |
- fi |
426 |
- use inspector || myconf+=( --without-inspector ) |
427 |
- use npm || myconf+=( --without-npm ) |
428 |
- use snapshot || myconf+=( --without-node-snapshot ) |
429 |
- if use ssl; then |
430 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
431 |
- else |
432 |
- myconf+=( --without-ssl ) |
433 |
- fi |
434 |
- |
435 |
- local myarch="" |
436 |
- case ${ABI} in |
437 |
- amd64) myarch="x64";; |
438 |
- arm) myarch="arm";; |
439 |
- arm64) myarch="arm64";; |
440 |
- ppc64) myarch="ppc64";; |
441 |
- x32) myarch="x32";; |
442 |
- x86) myarch="ia32";; |
443 |
- *) myarch="${ABI}";; |
444 |
- esac |
445 |
- |
446 |
- GYP_DEFINES="linux_use_gold_flags=0 |
447 |
- linux_use_bundled_binutils=0 |
448 |
- linux_use_bundled_gold=0" \ |
449 |
- "${EPYTHON}" configure.py \ |
450 |
- --prefix="${EPREFIX}"/usr \ |
451 |
- --dest-cpu=${myarch} \ |
452 |
- $(use_with systemtap dtrace) \ |
453 |
- "${myconf[@]}" || die |
454 |
-} |
455 |
- |
456 |
-src_compile() { |
457 |
- emake -C out |
458 |
-} |
459 |
- |
460 |
-src_install() { |
461 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
462 |
- default |
463 |
- |
464 |
- pax-mark -m "${ED}"/usr/bin/node |
465 |
- |
466 |
- # set up a symlink structure that node-gyp expects.. |
467 |
- dodir /usr/include/node/deps/{v8,uv} |
468 |
- dosym . /usr/include/node/src |
469 |
- for var in deps/{uv,v8}/include; do |
470 |
- dosym ../.. /usr/include/node/${var} |
471 |
- done |
472 |
- |
473 |
- if use doc; then |
474 |
- docinto html |
475 |
- dodoc -r "${S}"/doc/* |
476 |
- fi |
477 |
- |
478 |
- if use npm; then |
479 |
- dodir /etc/npm |
480 |
- |
481 |
- # Install bash completion for `npm` |
482 |
- # We need to temporarily replace default config path since |
483 |
- # npm otherwise tries to write outside of the sandbox |
484 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
485 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
486 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
487 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
488 |
- newbashcomp "${tmp_npm_completion_file}" npm |
489 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
490 |
- |
491 |
- # Move man pages |
492 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
493 |
- |
494 |
- # Clean up |
495 |
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} |
496 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} |
497 |
- |
498 |
- local find_exp="-or -name" |
499 |
- local find_name=() |
500 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
501 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
502 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
503 |
- find_name+=( ${find_exp} "${match}" ) |
504 |
- done |
505 |
- |
506 |
- # Remove various development and/or inappropriate files and |
507 |
- # useless docs of dependend packages. |
508 |
- find "${LIBDIR}"/node_modules \ |
509 |
- \( -type d -name examples \) -or \( -type f \( \ |
510 |
- -iname "LICEN?E*" \ |
511 |
- "${find_name[@]}" \ |
512 |
- \) \) -exec rm -rf "{}" \; |
513 |
- fi |
514 |
- |
515 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
516 |
-} |
517 |
- |
518 |
-src_test() { |
519 |
- # parallel/test-fs-mkdir is known to fail with FEATURES=usersandbox |
520 |
- if has usersandbox ${FEATURES}; then |
521 |
- ewarn "You are emerging ${P} with 'usersandbox' enabled." \ |
522 |
- "Expect some test failures or emerge with 'FEATURES=-usersandbox'!" |
523 |
- fi |
524 |
- |
525 |
- out/${BUILDTYPE}/cctest || die |
526 |
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die |
527 |
-} |