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