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, 06 Feb 2020 10:12:12
Message-Id: 1580983926.5248646089035b162db6f597b5a24ce941be3578.jer@gentoo
1 commit: 5248646089035b162db6f597b5a24ce941be3578
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 6 10:06:58 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 6 10:12:06 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52486460
7
8 net-libs/nodejs: Old
9
10 Package-Manager: Portage-2.3.87, Repoman-2.3.20
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-libs/nodejs/Manifest | 5 -
14 net-libs/nodejs/nodejs-10.18.1.ebuild | 200 -----------------------------
15 net-libs/nodejs/nodejs-12.14.1-r1.ebuild | 208 ------------------------------
16 net-libs/nodejs/nodejs-13.6.0-r1.ebuild | 204 ------------------------------
17 net-libs/nodejs/nodejs-13.7.0-r1.ebuild | 204 ------------------------------
18 net-libs/nodejs/nodejs-8.17.0.ebuild | 210 -------------------------------
19 6 files changed, 1031 deletions(-)
20
21 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
22 index ccd85f63cac..a61e53c7af4 100644
23 --- a/net-libs/nodejs/Manifest
24 +++ b/net-libs/nodejs/Manifest
25 @@ -1,11 +1,6 @@
26 DIST node-v10.18.0.tar.xz 21913328 BLAKE2B 84b0b5157671dcc3e96bb2cfd11e085251fd2942c03b27491f712f5603797bab7503d8f7c0eb45ca8e348b20a0555c1767d4d1964fff474c8590a47eb01523a5 SHA512 8fc9062e150af6f054f1ebebbdf67151b16f14bcca9cbb35338a4c7fcd7fa1c3f05c4a7ace12d4153180cec0007a195cbc94942c4d04c3895384dc18951d2c1c
27 -DIST node-v10.18.1.tar.xz 21920068 BLAKE2B 9dc0887a33f0888a347628e5bf15eb3687f15cba264a00317a15336fda48e41da9b4c45df6d0f223f2017c6b55b99eda0c4cd6f5913673da29c52a61450d03e2 SHA512 0979d264ef5286caea61a527771e2ac2fbe1b909a151061dbb7d9e0fde9461edd76b6060f55cfbd49d3ae2e7e10595a2eb4d2e98182e735e7df10940120fb9b6
28 DIST node-v10.19.0.tar.xz 21906168 BLAKE2B 395504ef3befa47d8b967114e019e6a76c799871e7eb21e2c6c0453655ffa07f17f42209daddeb5417342cfbad71ba1a35ae15a2d210b692bc60be270c2fc415 SHA512 512efc58415ed789938c434af131d76bdd51772cac9f7e380afaa79d83cc9c433a979068fc7272adba6ba6551d195267978e1fc819236926b0d1fd6cf91c5eee
29 DIST node-v12.14.0.tar.xz 23244684 BLAKE2B 0e25cbba5e256b139efd45908236f008834afdf01f57a8e84c7e55ba950e56b786cd52eba9a02986eb0e1d38cbf6df38e1cd719d7dcd8085e8c71767adf8155e SHA512 12e887709a54be911c5a81ab7b7be995247b47ebbd2954ca942f9ed8a784ae1a8e4bdb2613e5bb671196f9101d8861cd29e10650a3f0c414db4d096df94b309b
30 -DIST node-v12.14.1.tar.xz 23258936 BLAKE2B 125289ce3e342c2e5e7bbb6f0b1af109f0ba8fbf2d6630f2cdc4aa31c25a3d846afe773e84daed9824360a6680a2d21378af4fbc42c6337399a143f92850a82f SHA512 2e2b6fa8351b59450ab5491b5e31dc36ce4d9be13c55a14e6e4d95a82cc8334f9fc35261a56a8843903f8021ff333a333bb4d5f24c92b5d7483d4779c3d88342
31 DIST node-v12.15.0.tar.xz 23271600 BLAKE2B 20e31e2ecb6352f6fa9e2c60fc505046034434e287e827edd5e0b091c4d5e124b681ba178e1669db26ab3d1b588e3b0894595e9cd1fa46d560f7100d8ab7e1c1 SHA512 40cc5fc252e8939856886cd57cad50df11eedc37de8e50b1b2d49a2e7439d1f4bbba8de90efc030a659919106eca72facf8b31280323fc4803bed9a175ffbbfa
32 -DIST node-v13.6.0.tar.xz 32706824 BLAKE2B 69e66354570e057fe215830a2d5bd157e5decfd1e58e4ead4304e0dfcf64e5adfe48503f3bf54afe2cc27df581a0f2ae79e9b730257ceb70c412bd2a47fa5603 SHA512 e7dc8356ac1b167cc32055e209f13cee82c9251440b6a6cc99b26c91f9625e11bd025cfc1c22b6ece95ea178640209a7c8700d678678b3e8bad26080aa2762c6
33 -DIST node-v13.7.0.tar.xz 32739116 BLAKE2B 2bc4331a059d18f37f41bb472bb19d864366cebae32b6be18d9c14ab91019fbfa6dcb2a8c3c1c256ddd54773d801e852e1820d90bc3b55f3509bfa8e5425121d SHA512 e2a9b0b6c6e038b9c5c55b51531ed30e8767dd492d3c5c50a0de764f7a97f22a3fcb65c4f50adff62219b076e0c688f1320dc87061fbb751a867746e22c60ccf
34 DIST node-v13.8.0.tar.xz 32745596 BLAKE2B 14bf82e8cecde1a4125c7c00c4c9e613c1dbc5bb0241b20f4d30cb8d172612d5a8c362ac786ae516baf9553d5a9c3053414b269fb040cebb664f09096a57985c SHA512 b50d79f029bc04caf193f137b7b3d03f1e1ec9252712015cab2efdeef92bc3176cf7eb36e835cda6221950792e516f9c1894cd2c480e082106e07a11aa1d0761
35 DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42
36 -DIST node-v8.17.0.tar.xz 19013844 BLAKE2B 2f35f61ccc2d67132441dace8b59df6565e5df9e14e6798ab0cb0a024493182881708368248964db30e1213fa7b66301bd73b5146944129d7b14cd2b5b1a9583 SHA512 9f7b0b5695e882b4f727802ad855d398da596f908e64263902781e01f6222a4044be48c104eb76182ddb525dedfc4b28ccd07d64dfa126c462a248d9e8b49fca
37
38 diff --git a/net-libs/nodejs/nodejs-10.18.1.ebuild b/net-libs/nodejs/nodejs-10.18.1.ebuild
39 deleted file mode 100644
40 index 489857c39f9..00000000000
41 --- a/net-libs/nodejs/nodejs-10.18.1.ebuild
42 +++ /dev/null
43 @@ -1,200 +0,0 @@
44 -# Copyright 1999-2020 Gentoo Authors
45 -# Distributed under the terms of the GNU General Public License v2
46 -
47 -EAPI=7
48 -PYTHON_COMPAT=( python2_7 )
49 -PYTHON_REQ_USE="threads"
50 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
51 -
52 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
53 -HOMEPAGE="https://nodejs.org/"
54 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
55 -
56 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
57 -SLOT="0"
58 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
59 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test"
60 -REQUIRED_USE="
61 - inspector? ( icu ssl )
62 - npm? ( ssl )
63 -"
64 -
65 -RDEPEND="
66 - >=dev-libs/libuv-1.28.0:=
67 - >=net-dns/c-ares-1.15.0
68 - >=net-libs/http-parser-2.9.0:=
69 - >=net-libs/nghttp2-1.39.2
70 - sys-libs/zlib
71 - icu? ( >=dev-libs/icu-64.2:= )
72 - ssl? ( >=dev-libs/openssl-1.1.1:0= )
73 -"
74 -DEPEND="
75 - ${RDEPEND}
76 - ${PYTHON_DEPS}
77 - systemtap? ( dev-util/systemtap )
78 - test? ( net-misc/curl )
79 -"
80 -PATCHES=(
81 - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
82 -)
83 -RESTRICT="test"
84 -S="${WORKDIR}/node-v${PV}"
85 -
86 -pkg_pretend() {
87 - (use x86 && ! use cpu_flags_x86_sse2) && \
88 - die "Your CPU doesn't support the required SSE2 instruction."
89 -
90 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
91 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
92 -}
93 -
94 -src_prepare() {
95 - tc-export CC CXX PKG_CONFIG
96 - export V=1
97 - export BUILDTYPE=Release
98 -
99 - # fix compilation on Darwin
100 - # https://code.google.com/p/gyp/issues/detail?id=260
101 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
102 -
103 - # make sure we use python2.* while using gyp
104 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
105 - sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
106 -
107 - # less verbose install output (stating the same as portage, basically)
108 - sed -i -e "/print/d" tools/install.py || die
109 -
110 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
111 - local LIBDIR=$(get_libdir)
112 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
113 - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
114 -
115 - # Avoid writing a depfile, not useful
116 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
117 -
118 - sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die
119 -
120 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
121 - # seem sandbox related either (invoking it from a sandbox works fine).
122 - # The issue is that no stdin handle is openened when asked for one.
123 - # It doesn't really belong upstream , so it'll just be removed until someone
124 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
125 - rm test/parallel/test-stdout-close-unref.js || die
126 -
127 - # debug builds. change install path, remove optimisations and override buildtype
128 - if use debug; then
129 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
130 - BUILDTYPE=Debug
131 - fi
132 -
133 - default
134 -}
135 -
136 -src_configure() {
137 - xdg_environment_reset
138 -
139 - local myconf=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib )
140 - use debug && myconf+=( --debug )
141 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
142 - use inspector || myconf+=( --without-inspector )
143 - use npm || myconf+=( --without-npm )
144 - use snapshot && myconf+=( --with-snapshot )
145 - use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl )
146 -
147 - local myarch=""
148 - case ${ABI} in
149 - amd64) myarch="x64";;
150 - arm) myarch="arm";;
151 - arm64) myarch="arm64";;
152 - ppc64) myarch="ppc64";;
153 - x32) myarch="x32";;
154 - x86) myarch="ia32";;
155 - *) myarch="${ABI}";;
156 - esac
157 -
158 - GYP_DEFINES="linux_use_gold_flags=0
159 - linux_use_bundled_binutils=0
160 - linux_use_bundled_gold=0" \
161 - "${PYTHON}" configure \
162 - --prefix="${EPREFIX}"/usr \
163 - --dest-cpu=${myarch} \
164 - $(use_with systemtap dtrace) \
165 - "${myconf[@]}" || die
166 -}
167 -
168 -src_compile() {
169 - emake -C out mksnapshot
170 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
171 - emake -C out
172 -}
173 -
174 -src_install() {
175 - local LIBDIR="${ED}/usr/$(get_libdir)"
176 - emake install DESTDIR="${D}"
177 - pax-mark -m "${ED}"/usr/bin/node
178 -
179 - # set up a symlink structure that node-gyp expects..
180 - dodir /usr/include/node/deps/{v8,uv}
181 - dosym . /usr/include/node/src
182 - for var in deps/{uv,v8}/include; do
183 - dosym ../.. /usr/include/node/${var}
184 - done
185 -
186 - if use doc; then
187 - docinto html
188 - dodoc -r "${S}"/doc/*
189 - fi
190 -
191 - if use npm; then
192 - dodir /etc/npm
193 -
194 - # Install bash completion for `npm`
195 - # We need to temporarily replace default config path since
196 - # npm otherwise tries to write outside of the sandbox
197 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
198 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
199 - local tmp_npm_completion_file="$(emktemp)"
200 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
201 - newbashcomp "${tmp_npm_completion_file}" npm
202 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
203 -
204 - # Move man pages
205 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
206 -
207 - # Clean up
208 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
209 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
210 -
211 - local find_exp="-or -name"
212 - local find_name=()
213 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
214 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
215 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
216 - find_name+=( ${find_exp} "${match}" )
217 - done
218 -
219 - # Remove various development and/or inappropriate files and
220 - # useless docs of dependend packages.
221 - find "${LIBDIR}"/node_modules \
222 - \( -type d -name examples \) -or \( -type f \( \
223 - -iname "LICEN?E*" \
224 - "${find_name[@]}" \
225 - \) \) -exec rm -rf "{}" \;
226 - fi
227 -
228 - mv "${D}"/usr/share/doc/node "${D}"/usr/share/doc/${PF} || die
229 -}
230 -
231 -src_test() {
232 - out/${BUILDTYPE}/cctest || die
233 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
234 -}
235 -
236 -pkg_postinst() {
237 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
238 - einfo "from upstream which otherwise would have it live in /usr/etc/."
239 - einfo ""
240 - einfo "Protip: When using node-gyp to install native modules, you can"
241 - einfo "avoid having to download extras by doing the following:"
242 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
243 -}
244
245 diff --git a/net-libs/nodejs/nodejs-12.14.1-r1.ebuild b/net-libs/nodejs/nodejs-12.14.1-r1.ebuild
246 deleted file mode 100644
247 index b8a749a1745..00000000000
248 --- a/net-libs/nodejs/nodejs-12.14.1-r1.ebuild
249 +++ /dev/null
250 @@ -1,208 +0,0 @@
251 -# Copyright 1999-2020 Gentoo Authors
252 -# Distributed under the terms of the GNU General Public License v2
253 -
254 -EAPI=7
255 -PYTHON_COMPAT=( python{2_7,3_{6,7}} )
256 -PYTHON_REQ_USE="threads(+)"
257 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
258 -
259 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
260 -HOMEPAGE="https://nodejs.org/"
261 -SRC_URI="
262 - https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz
263 -"
264 -
265 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
266 -SLOT="0"
267 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
268 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test"
269 -REQUIRED_USE="
270 - inspector? ( icu ssl )
271 - npm? ( ssl )
272 -"
273 -
274 -RDEPEND="
275 - >=dev-libs/libuv-1.33.1:=
276 - >=net-dns/c-ares-1.15.0
277 - >=net-libs/http-parser-2.9.0:=
278 - >=net-libs/nghttp2-1.40.0
279 - sys-libs/zlib
280 - icu? ( >=dev-libs/icu-64.2:= )
281 - ssl? ( >=dev-libs/openssl-1.1.1:0= )
282 -"
283 -BDEPEND="
284 - ${PYTHON_DEPS}
285 - systemtap? ( dev-util/systemtap )
286 - test? ( net-misc/curl )
287 -"
288 -DEPEND="
289 - ${RDEPEND}
290 -"
291 -PATCHES=(
292 - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
293 - "${FILESDIR}"/${PN}-99999999-llhttp.patch
294 -)
295 -RESTRICT="test"
296 -S="${WORKDIR}/node-v${PV}"
297 -
298 -pkg_pretend() {
299 - (use x86 && ! use cpu_flags_x86_sse2) && \
300 - die "Your CPU doesn't support the required SSE2 instruction."
301 -
302 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
303 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
304 -}
305 -
306 -src_prepare() {
307 - tc-export CC CXX PKG_CONFIG
308 - export V=1
309 - export BUILDTYPE=Release
310 -
311 - # fix compilation on Darwin
312 - # https://code.google.com/p/gyp/issues/detail?id=260
313 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
314 -
315 - # less verbose install output (stating the same as portage, basically)
316 - sed -i -e "/print/d" tools/install.py || die
317 -
318 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
319 - local LIBDIR=$(get_libdir)
320 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
321 - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
322 -
323 - # Avoid writing a depfile, not useful
324 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
325 -
326 - sed -i -e "/'-O3'/d" common.gypi node.gypi || die
327 -
328 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
329 - # seem sandbox related either (invoking it from a sandbox works fine).
330 - # The issue is that no stdin handle is openened when asked for one.
331 - # It doesn't really belong upstream , so it'll just be removed until someone
332 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
333 - rm test/parallel/test-stdout-close-unref.js || die
334 -
335 - # debug builds. change install path, remove optimisations and override buildtype
336 - if use debug; then
337 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
338 - BUILDTYPE=Debug
339 - fi
340 -
341 - default
342 -}
343 -
344 -src_configure() {
345 - xdg_environment_reset
346 -
347 - local myconf=(
348 - --shared-cares
349 - --shared-http-parser
350 - --shared-libuv
351 - --shared-nghttp2
352 - --shared-zlib
353 - )
354 - use debug && myconf+=( --debug )
355 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
356 - use inspector || myconf+=( --without-inspector )
357 - use npm || myconf+=( --without-npm )
358 - use snapshot || myconf+=( --without-node-snapshot )
359 - use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl )
360 -
361 - local myarch=""
362 - case ${ABI} in
363 - amd64) myarch="x64";;
364 - arm) myarch="arm";;
365 - arm64) myarch="arm64";;
366 - ppc64) myarch="ppc64";;
367 - x32) myarch="x32";;
368 - x86) myarch="ia32";;
369 - *) myarch="${ABI}";;
370 - esac
371 -
372 - GYP_DEFINES="linux_use_gold_flags=0
373 - linux_use_bundled_binutils=0
374 - linux_use_bundled_gold=0" \
375 - "${EPYTHON}" configure.py \
376 - --prefix="${EPREFIX}"/usr \
377 - --dest-cpu=${myarch} \
378 - $(use_with systemtap dtrace) \
379 - "${myconf[@]}" || die
380 -}
381 -
382 -src_compile() {
383 - emake -C out mksnapshot
384 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
385 - emake -C out
386 -}
387 -
388 -src_install() {
389 - local LIBDIR="${ED}/usr/$(get_libdir)"
390 - default
391 -
392 - pax-mark -m "${ED}"/usr/bin/node
393 -
394 - # set up a symlink structure that node-gyp expects..
395 - dodir /usr/include/node/deps/{v8,uv}
396 - dosym . /usr/include/node/src
397 - for var in deps/{uv,v8}/include; do
398 - dosym ../.. /usr/include/node/${var}
399 - done
400 -
401 - if use doc; then
402 - docinto html
403 - dodoc -r "${S}"/doc/*
404 - fi
405 -
406 - if use npm; then
407 - dodir /etc/npm
408 -
409 - # Install bash completion for `npm`
410 - # We need to temporarily replace default config path since
411 - # npm otherwise tries to write outside of the sandbox
412 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
413 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
414 - local tmp_npm_completion_file="$(emktemp)"
415 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
416 - newbashcomp "${tmp_npm_completion_file}" npm
417 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
418 -
419 - # Move man pages
420 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
421 -
422 - # Clean up
423 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
424 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
425 -
426 - local find_exp="-or -name"
427 - local find_name=()
428 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
429 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
430 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
431 - find_name+=( ${find_exp} "${match}" )
432 - done
433 -
434 - # Remove various development and/or inappropriate files and
435 - # useless docs of dependend packages.
436 - find "${LIBDIR}"/node_modules \
437 - \( -type d -name examples \) -or \( -type f \( \
438 - -iname "LICEN?E*" \
439 - "${find_name[@]}" \
440 - \) \) -exec rm -rf "{}" \;
441 - fi
442 -
443 - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
444 -}
445 -
446 -src_test() {
447 - out/${BUILDTYPE}/cctest || die
448 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
449 -}
450 -
451 -pkg_postinst() {
452 - elog "The global npm config lives in /etc/npm. This deviates slightly"
453 - elog "from upstream which otherwise would have it live in /usr/etc/."
454 - elog ""
455 - elog "Protip: When using node-gyp to install native modules, you can"
456 - elog "avoid having to download extras by doing the following:"
457 - elog "$ node-gyp --nodedir /usr/include/node <command>"
458 -}
459
460 diff --git a/net-libs/nodejs/nodejs-13.6.0-r1.ebuild b/net-libs/nodejs/nodejs-13.6.0-r1.ebuild
461 deleted file mode 100644
462 index 640cc3cc0b1..00000000000
463 --- a/net-libs/nodejs/nodejs-13.6.0-r1.ebuild
464 +++ /dev/null
465 @@ -1,204 +0,0 @@
466 -# Copyright 1999-2020 Gentoo Authors
467 -# Distributed under the terms of the GNU General Public License v2
468 -
469 -EAPI=7
470 -PYTHON_COMPAT=( python{2_7,3_{6,7}} )
471 -PYTHON_REQ_USE="threads(+)"
472 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
473 -
474 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
475 -HOMEPAGE="https://nodejs.org/"
476 -SRC_URI="
477 - https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz
478 -"
479 -
480 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
481 -SLOT="0"
482 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
483 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl systemtap test"
484 -REQUIRED_USE="
485 - inspector? ( icu ssl )
486 - npm? ( ssl )
487 -"
488 -
489 -RDEPEND="
490 - >=dev-libs/libuv-1.34.0:=
491 - >=net-dns/c-ares-1.15.0
492 - >=net-libs/nghttp2-1.40.0
493 - sys-libs/zlib
494 - icu? ( >=dev-libs/icu-64.2:= )
495 - ssl? ( >=dev-libs/openssl-1.1.1:0= )
496 -"
497 -BDEPEND="
498 - ${PYTHON_DEPS}
499 - systemtap? ( dev-util/systemtap )
500 - test? ( net-misc/curl )
501 - pax_kernel? ( sys-apps/elfix )
502 -"
503 -DEPEND="
504 - ${RDEPEND}
505 -"
506 -PATCHES=(
507 - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
508 -)
509 -RESTRICT="test"
510 -S="${WORKDIR}/node-v${PV}"
511 -
512 -pkg_pretend() {
513 - (use x86 && ! use cpu_flags_x86_sse2) && \
514 - die "Your CPU doesn't support the required SSE2 instruction."
515 -
516 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
517 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
518 -}
519 -
520 -src_prepare() {
521 - tc-export CC CXX PKG_CONFIG
522 - export V=1
523 - export BUILDTYPE=Release
524 -
525 - # fix compilation on Darwin
526 - # https://code.google.com/p/gyp/issues/detail?id=260
527 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
528 -
529 - # less verbose install output (stating the same as portage, basically)
530 - sed -i -e "/print/d" tools/install.py || die
531 -
532 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
533 - local LIBDIR=$(get_libdir)
534 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
535 - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
536 -
537 - # Avoid writing a depfile, not useful
538 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
539 -
540 - sed -i -e "/'-O3'/d" common.gypi node.gypi || die
541 -
542 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
543 - # seem sandbox related either (invoking it from a sandbox works fine).
544 - # The issue is that no stdin handle is openened when asked for one.
545 - # It doesn't really belong upstream , so it'll just be removed until someone
546 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
547 - rm test/parallel/test-stdout-close-unref.js || die
548 -
549 - # debug builds. change install path, remove optimisations and override buildtype
550 - if use debug; then
551 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
552 - BUILDTYPE=Debug
553 - fi
554 -
555 - # We need to disable mprotect on two files when it builds Bug 694100.
556 - use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.2.0-paxmarking.patch )
557 -
558 - default
559 -}
560 -
561 -src_configure() {
562 - xdg_environment_reset
563 -
564 - local myconf=(
565 - --shared-cares --shared-libuv --shared-nghttp2 --shared-zlib
566 - )
567 - use debug && myconf+=( --debug )
568 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
569 - use inspector || myconf+=( --without-inspector )
570 - use npm || myconf+=( --without-npm )
571 - use snapshot || myconf+=( --without-node-snapshot )
572 - use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl )
573 -
574 - local myarch=""
575 - case ${ABI} in
576 - amd64) myarch="x64";;
577 - arm) myarch="arm";;
578 - arm64) myarch="arm64";;
579 - ppc64) myarch="ppc64";;
580 - x32) myarch="x32";;
581 - x86) myarch="ia32";;
582 - *) myarch="${ABI}";;
583 - esac
584 -
585 - GYP_DEFINES="linux_use_gold_flags=0
586 - linux_use_bundled_binutils=0
587 - linux_use_bundled_gold=0" \
588 - "${EPYTHON}" configure.py \
589 - --prefix="${EPREFIX}"/usr \
590 - --dest-cpu=${myarch} \
591 - $(use_with systemtap dtrace) \
592 - "${myconf[@]}" || die
593 -}
594 -
595 -src_compile() {
596 - emake -C out
597 -}
598 -
599 -src_install() {
600 - local LIBDIR="${ED}/usr/$(get_libdir)"
601 - default
602 -
603 - pax-mark -m "${ED}"/usr/bin/node
604 -
605 - # set up a symlink structure that node-gyp expects..
606 - dodir /usr/include/node/deps/{v8,uv}
607 - dosym . /usr/include/node/src
608 - for var in deps/{uv,v8}/include; do
609 - dosym ../.. /usr/include/node/${var}
610 - done
611 -
612 - if use doc; then
613 - docinto html
614 - dodoc -r "${S}"/doc/*
615 - fi
616 -
617 - if use npm; then
618 - dodir /etc/npm
619 -
620 - # Install bash completion for `npm`
621 - # We need to temporarily replace default config path since
622 - # npm otherwise tries to write outside of the sandbox
623 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
624 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
625 - local tmp_npm_completion_file="$(emktemp)"
626 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
627 - newbashcomp "${tmp_npm_completion_file}" npm
628 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
629 -
630 - # Move man pages
631 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
632 -
633 - # Clean up
634 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
635 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
636 -
637 - local find_exp="-or -name"
638 - local find_name=()
639 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
640 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
641 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
642 - find_name+=( ${find_exp} "${match}" )
643 - done
644 -
645 - # Remove various development and/or inappropriate files and
646 - # useless docs of dependend packages.
647 - find "${LIBDIR}"/node_modules \
648 - \( -type d -name examples \) -or \( -type f \( \
649 - -iname "LICEN?E*" \
650 - "${find_name[@]}" \
651 - \) \) -exec rm -rf "{}" \;
652 - fi
653 -
654 - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
655 -}
656 -
657 -src_test() {
658 - out/${BUILDTYPE}/cctest || die
659 - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
660 -}
661 -
662 -pkg_postinst() {
663 - elog "The global npm config lives in /etc/npm. This deviates slightly"
664 - elog "from upstream which otherwise would have it live in /usr/etc/."
665 - elog ""
666 - elog "Protip: When using node-gyp to install native modules, you can"
667 - elog "avoid having to download extras by doing the following:"
668 - elog "$ node-gyp --nodedir /usr/include/node <command>"
669 -}
670
671 diff --git a/net-libs/nodejs/nodejs-13.7.0-r1.ebuild b/net-libs/nodejs/nodejs-13.7.0-r1.ebuild
672 deleted file mode 100644
673 index 35f1444b8a4..00000000000
674 --- a/net-libs/nodejs/nodejs-13.7.0-r1.ebuild
675 +++ /dev/null
676 @@ -1,204 +0,0 @@
677 -# Copyright 1999-2020 Gentoo Authors
678 -# Distributed under the terms of the GNU General Public License v2
679 -
680 -EAPI=7
681 -PYTHON_COMPAT=( python{2_7,3_{6,7}} )
682 -PYTHON_REQ_USE="threads(+)"
683 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
684 -
685 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
686 -HOMEPAGE="https://nodejs.org/"
687 -SRC_URI="
688 - https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz
689 -"
690 -
691 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
692 -SLOT="0"
693 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
694 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl systemtap test"
695 -REQUIRED_USE="
696 - inspector? ( icu ssl )
697 - npm? ( ssl )
698 -"
699 -
700 -RDEPEND="
701 - >=dev-libs/libuv-1.34.1:=
702 - >=net-dns/c-ares-1.15.0
703 - >=net-libs/nghttp2-1.40.0
704 - sys-libs/zlib
705 - icu? ( >=dev-libs/icu-64.2:= )
706 - ssl? ( >=dev-libs/openssl-1.1.1:0= )
707 -"
708 -BDEPEND="
709 - ${PYTHON_DEPS}
710 - systemtap? ( dev-util/systemtap )
711 - test? ( net-misc/curl )
712 - pax_kernel? ( sys-apps/elfix )
713 -"
714 -DEPEND="
715 - ${RDEPEND}
716 -"
717 -PATCHES=(
718 - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
719 -)
720 -RESTRICT="test"
721 -S="${WORKDIR}/node-v${PV}"
722 -
723 -pkg_pretend() {
724 - (use x86 && ! use cpu_flags_x86_sse2) && \
725 - die "Your CPU doesn't support the required SSE2 instruction."
726 -
727 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
728 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
729 -}
730 -
731 -src_prepare() {
732 - tc-export CC CXX PKG_CONFIG
733 - export V=1
734 - export BUILDTYPE=Release
735 -
736 - # fix compilation on Darwin
737 - # https://code.google.com/p/gyp/issues/detail?id=260
738 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
739 -
740 - # less verbose install output (stating the same as portage, basically)
741 - sed -i -e "/print/d" tools/install.py || die
742 -
743 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
744 - local LIBDIR=$(get_libdir)
745 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
746 - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die
747 -
748 - # Avoid writing a depfile, not useful
749 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
750 -
751 - sed -i -e "/'-O3'/d" common.gypi node.gypi || die
752 -
753 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
754 - # seem sandbox related either (invoking it from a sandbox works fine).
755 - # The issue is that no stdin handle is openened when asked for one.
756 - # It doesn't really belong upstream , so it'll just be removed until someone
757 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
758 - rm test/parallel/test-stdout-close-unref.js || die
759 -
760 - # debug builds. change install path, remove optimisations and override buildtype
761 - if use debug; then
762 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
763 - BUILDTYPE=Debug
764 - fi
765 -
766 - # We need to disable mprotect on two files when it builds Bug 694100.
767 - use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.2.0-paxmarking.patch )
768 -
769 - default
770 -}
771 -
772 -src_configure() {
773 - xdg_environment_reset
774 -
775 - local myconf=(
776 - --shared-cares --shared-libuv --shared-nghttp2 --shared-zlib
777 - )
778 - use debug && myconf+=( --debug )
779 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
780 - use inspector || myconf+=( --without-inspector )
781 - use npm || myconf+=( --without-npm )
782 - use snapshot || myconf+=( --without-node-snapshot )
783 - use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl )
784 -
785 - local myarch=""
786 - case ${ABI} in
787 - amd64) myarch="x64";;
788 - arm) myarch="arm";;
789 - arm64) myarch="arm64";;
790 - ppc64) myarch="ppc64";;
791 - x32) myarch="x32";;
792 - x86) myarch="ia32";;
793 - *) myarch="${ABI}";;
794 - esac
795 -
796 - GYP_DEFINES="linux_use_gold_flags=0
797 - linux_use_bundled_binutils=0
798 - linux_use_bundled_gold=0" \
799 - "${EPYTHON}" configure.py \
800 - --prefix="${EPREFIX}"/usr \
801 - --dest-cpu=${myarch} \
802 - $(use_with systemtap dtrace) \
803 - "${myconf[@]}" || die
804 -}
805 -
806 -src_compile() {
807 - emake -C out
808 -}
809 -
810 -src_install() {
811 - local LIBDIR="${ED}/usr/$(get_libdir)"
812 - default
813 -
814 - pax-mark -m "${ED}"/usr/bin/node
815 -
816 - # set up a symlink structure that node-gyp expects..
817 - dodir /usr/include/node/deps/{v8,uv}
818 - dosym . /usr/include/node/src
819 - for var in deps/{uv,v8}/include; do
820 - dosym ../.. /usr/include/node/${var}
821 - done
822 -
823 - if use doc; then
824 - docinto html
825 - dodoc -r "${S}"/doc/*
826 - fi
827 -
828 - if use npm; then
829 - dodir /etc/npm
830 -
831 - # Install bash completion for `npm`
832 - # We need to temporarily replace default config path since
833 - # npm otherwise tries to write outside of the sandbox
834 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
835 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
836 - local tmp_npm_completion_file="$(emktemp)"
837 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
838 - newbashcomp "${tmp_npm_completion_file}" npm
839 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
840 -
841 - # Move man pages
842 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
843 -
844 - # Clean up
845 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
846 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
847 -
848 - local find_exp="-or -name"
849 - local find_name=()
850 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
851 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
852 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
853 - find_name+=( ${find_exp} "${match}" )
854 - done
855 -
856 - # Remove various development and/or inappropriate files and
857 - # useless docs of dependend packages.
858 - find "${LIBDIR}"/node_modules \
859 - \( -type d -name examples \) -or \( -type f \( \
860 - -iname "LICEN?E*" \
861 - "${find_name[@]}" \
862 - \) \) -exec rm -rf "{}" \;
863 - fi
864 -
865 - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
866 -}
867 -
868 -src_test() {
869 - out/${BUILDTYPE}/cctest || die
870 - "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
871 -}
872 -
873 -pkg_postinst() {
874 - elog "The global npm config lives in /etc/npm. This deviates slightly"
875 - elog "from upstream which otherwise would have it live in /usr/etc/."
876 - elog ""
877 - elog "Protip: When using node-gyp to install native modules, you can"
878 - elog "avoid having to download extras by doing the following:"
879 - elog "$ node-gyp --nodedir /usr/include/node <command>"
880 -}
881
882 diff --git a/net-libs/nodejs/nodejs-8.17.0.ebuild b/net-libs/nodejs/nodejs-8.17.0.ebuild
883 deleted file mode 100644
884 index b45783fca1b..00000000000
885 --- a/net-libs/nodejs/nodejs-8.17.0.ebuild
886 +++ /dev/null
887 @@ -1,210 +0,0 @@
888 -# Copyright 1999-2020 Gentoo Authors
889 -# Distributed under the terms of the GNU General Public License v2
890 -
891 -EAPI=7
892 -
893 -PYTHON_COMPAT=( python2_7 )
894 -PYTHON_REQ_USE="threads"
895 -
896 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
897 -
898 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
899 -HOMEPAGE="https://nodejs.org/"
900 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
901 -
902 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
903 -SLOT="0"
904 -KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos"
905 -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test"
906 -REQUIRED_USE="
907 - inspector? ( icu ssl )
908 - npm? ( ssl )
909 -"
910 -
911 -RDEPEND="
912 - >=dev-libs/libuv-1.23.2:=
913 - >=net-dns/c-ares-1.10.1
914 - >=net-libs/http-parser-2.9.0:=
915 - >=net-libs/nghttp2-1.39.2
916 - sys-libs/zlib
917 - icu? ( >=dev-libs/icu-60.1:= )
918 - ssl? ( =dev-libs/openssl-1.0.2*:0=[-bindist] )
919 -"
920 -BDEPEND="
921 - ${PYTHON_DEPS}
922 - systemtap? ( dev-util/systemtap )
923 - test? ( net-misc/curl )
924 -"
925 -DEPEND="
926 - ${RDEPEND}
927 -"
928 -PATCHES=(
929 - "${FILESDIR}"/nodejs-10.3.0-global-npm-config.patch
930 -)
931 -RESTRICT="test"
932 -S="${WORKDIR}/node-v${PV}"
933 -
934 -pkg_pretend() {
935 - (use x86 && ! use cpu_flags_x86_sse2) && \
936 - die "Your CPU doesn't support the required SSE2 instruction."
937 -
938 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
939 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
940 -}
941 -
942 -src_prepare() {
943 - tc-export CC CXX PKG_CONFIG
944 - export V=1
945 - export BUILDTYPE=Release
946 -
947 - # fix compilation on Darwin
948 - # https://code.google.com/p/gyp/issues/detail?id=260
949 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
950 -
951 - # make sure we use python2.* while using gyp
952 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
953 - sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
954 -
955 - # less verbose install output (stating the same as portage, basically)
956 - sed -i -e "/print/d" tools/install.py || die
957 -
958 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
959 - local LIBDIR=$(get_libdir)
960 - sed -i \
961 - -e "s|lib/|${LIBDIR}/|g" \
962 - -e 's|share/doc/node/|share/doc/'"${PF}"'/|g' \
963 - tools/install.py || die
964 -
965 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js deps/npm/lib/npm.js || die
966 -
967 - # Avoid writing a depfile, not useful
968 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
969 -
970 - sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die
971 -
972 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
973 - # seem sandbox related either (invoking it from a sandbox works fine).
974 - # The issue is that no stdin handle is openened when asked for one.
975 - # It doesn't really belong upstream , so it'll just be removed until someone
976 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
977 - rm test/parallel/test-stdout-close-unref.js || die
978 -
979 - # debug builds. change install path, remove optimisations and override buildtype
980 - if use debug; then
981 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
982 - BUILDTYPE=Debug
983 - fi
984 -
985 - default
986 -}
987 -
988 -src_configure() {
989 - xdg_environment_reset
990 -
991 - local myconf=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib )
992 - use debug && myconf+=( --debug )
993 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
994 - use inspector || myconf+=( --without-inspector )
995 - use npm || myconf+=( --without-npm )
996 - use snapshot && myconf+=( --with-snapshot )
997 - use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl )
998 -
999 - local myarch=""
1000 - case ${ABI} in
1001 - amd64) myarch="x64";;
1002 - arm) myarch="arm";;
1003 - arm64) myarch="arm64";;
1004 - ppc64) myarch="ppc64";;
1005 - x32) myarch="x32";;
1006 - x86) myarch="ia32";;
1007 - *) myarch="${ABI}";;
1008 - esac
1009 -
1010 - GYP_DEFINES="linux_use_gold_flags=0
1011 - linux_use_bundled_binutils=0
1012 - linux_use_bundled_gold=0" \
1013 - "${PYTHON}" configure \
1014 - --prefix="${EPREFIX}"/usr \
1015 - --dest-cpu=${myarch} \
1016 - $(use_with systemtap dtrace) \
1017 - "${myconf[@]}" || die
1018 -}
1019 -
1020 -src_compile() {
1021 - emake -C out mksnapshot
1022 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
1023 - emake -C out
1024 -}
1025 -
1026 -src_test() {
1027 - out/${BUILDTYPE}/cctest || die
1028 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
1029 -}
1030 -
1031 -src_install() {
1032 - local LIBDIR="${ED}/usr/$(get_libdir)"
1033 - emake install DESTDIR="${D}"
1034 - pax-mark -m "${ED}"/usr/bin/node
1035 -
1036 - # set up a symlink structure that node-gyp expects..
1037 - dodir /usr/include/node/deps/{v8,uv}
1038 - dosym . /usr/include/node/src
1039 - for var in deps/{uv,v8}/include; do
1040 - dosym ../.. /usr/include/node/${var}
1041 - done
1042 -
1043 - if use doc; then
1044 - # Patch docs to make them offline readable
1045 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
1046 - sed -i '/fonts.googleapis.com/ d' $i;
1047 - done
1048 - # Install docs
1049 - dodoc -r "${S}"/doc/*
1050 - fi
1051 -
1052 - if use npm; then
1053 - dodir /etc/npm
1054 -
1055 - # Install bash completion for `npm`
1056 - # We need to temporarily replace default config path since
1057 - # npm otherwise tries to write outside of the sandbox
1058 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
1059 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
1060 - local tmp_npm_completion_file="$(emktemp)"
1061 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
1062 - newbashcomp "${tmp_npm_completion_file}" npm
1063 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
1064 -
1065 - # Move man pages
1066 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
1067 -
1068 - # Clean up
1069 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
1070 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
1071 -
1072 - local find_exp="-or -name"
1073 - local find_name=()
1074 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
1075 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
1076 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
1077 - find_name+=( ${find_exp} "${match}" )
1078 - done
1079 -
1080 - # Remove various development and/or inappropriate files and
1081 - # useless docs of dependend packages.
1082 - find "${LIBDIR}"/node_modules \
1083 - \( -type d -name examples \) -or \( -type f \( \
1084 - -iname "LICEN?E*" \
1085 - "${find_name[@]}" \
1086 - \) \) -exec rm -rf "{}" \;
1087 - fi
1088 -}
1089 -
1090 -pkg_postinst() {
1091 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
1092 - einfo "from upstream which otherwise would have it live in /usr/etc/."
1093 - einfo ""
1094 - einfo "Protip: When using node-gyp to install native modules, you can"
1095 - einfo "avoid having to download extras by doing the following:"
1096 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
1097 -}