1 |
commit: f038b512e0f1edf588472438c8613f08a4f728d6 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 19 19:46:33 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 19 19:49:10 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f038b512 |
7 |
|
8 |
net-libs/nodejs: Old |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-libs/nodejs/Manifest | 4 - |
14 |
net-libs/nodejs/nodejs-10.17.0.ebuild | 200 ------------------------------ |
15 |
net-libs/nodejs/nodejs-12.13.0.ebuild | 213 -------------------------------- |
16 |
net-libs/nodejs/nodejs-13.5.0-r1.ebuild | 204 ------------------------------ |
17 |
net-libs/nodejs/nodejs-8.16.2.ebuild | 210 ------------------------------- |
18 |
5 files changed, 831 deletions(-) |
19 |
|
20 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
21 |
index 3f379c6f8ef..dba27ddb7d3 100644 |
22 |
--- a/net-libs/nodejs/Manifest |
23 |
+++ b/net-libs/nodejs/Manifest |
24 |
@@ -1,11 +1,7 @@ |
25 |
-DIST node-v10.17.0.tar.xz 21514260 BLAKE2B a37793d78e14d1d2ca861c39f27c5e1dbb47ad26f14aa97139fd9f9be039bd47e528f10c9977725f1ca4b5f4e31a1066715091ffaa488f764c67290bc1c84541 SHA512 4eec936fa8d848b7e261f83b6e25c1bfb06355a7146dcca91b0f64fc401ca32dd1b0758c127b81be7f0d1cc59c3b24b4ec2c17282b4bdb91c5bf71f42f2f7cbc |
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-v12.13.0.tar.xz 22862096 BLAKE2B b0121f45b535bac7baa0103db538070b4beb4b40a6c871c217eebfb1abb5a7821d83d46946047b3385af182f901c0390eb85134c9201be2d03b5745b297271f8 SHA512 a7aa8b1f010ea1df122d9d7b88ee0a9d10e0d79ae2f3d18c706ac6ce36e2e2039c21ea6f3dba3a22a79ed3f6069850a8a3c463dbd64e1e8f4a9dbe8901a89cc8 |
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-v13.5.0.tar.xz 32706024 BLAKE2B 570b2d676919cb333e2f36529e886039f7abfc4f7cd705cabbb2a1115918aa9ffc9d1e54a90e8deac09488f248c007721c090ed0500f113af81b2cda2e8248be SHA512 85bad55334e6ef63be0dbf90cef856c0a0835aa1b32e6ffc418b6a52f88f7ee266505f769f4204c000c766869cd85f7d914c9a3592dd52bcabdb6cb906f433e3 |
32 |
DIST node-v13.6.0.tar.xz 32706824 BLAKE2B 69e66354570e057fe215830a2d5bd157e5decfd1e58e4ead4304e0dfcf64e5adfe48503f3bf54afe2cc27df581a0f2ae79e9b730257ceb70c412bd2a47fa5603 SHA512 e7dc8356ac1b167cc32055e209f13cee82c9251440b6a6cc99b26c91f9625e11bd025cfc1c22b6ece95ea178640209a7c8700d678678b3e8bad26080aa2762c6 |
33 |
DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42 |
34 |
-DIST node-v8.16.2.tar.xz 18531368 BLAKE2B aec2f6257ab9237097e590b70b2e8615b664576b3af2f176260f26460f4f50bb1e00c2aff477a32cdb9ebf83f8b4eadc3ccdc2df431e359904fe4375513fb6c1 SHA512 8b0d4a089a5c80869971ceeffbef3ca03f4de4f53452a9fd16cbd189e5d76c7fdef475c144848c8d657256b41e342c020e11f6acd1880dde92ed0d0e8cf9e600 |
35 |
DIST node-v8.17.0.tar.xz 19013844 BLAKE2B 2f35f61ccc2d67132441dace8b59df6565e5df9e14e6798ab0cb0a024493182881708368248964db30e1213fa7b66301bd73b5146944129d7b14cd2b5b1a9583 SHA512 9f7b0b5695e882b4f727802ad855d398da596f908e64263902781e01f6222a4044be48c104eb76182ddb525dedfc4b28ccd07d64dfa126c462a248d9e8b49fca |
36 |
|
37 |
diff --git a/net-libs/nodejs/nodejs-10.17.0.ebuild b/net-libs/nodejs/nodejs-10.17.0.ebuild |
38 |
deleted file mode 100644 |
39 |
index 0d092cf3066..00000000000 |
40 |
--- a/net-libs/nodejs/nodejs-10.17.0.ebuild |
41 |
+++ /dev/null |
42 |
@@ -1,200 +0,0 @@ |
43 |
-# Copyright 1999-2019 Gentoo Authors |
44 |
-# Distributed under the terms of the GNU General Public License v2 |
45 |
- |
46 |
-EAPI=7 |
47 |
-PYTHON_COMPAT=( python2_7 ) |
48 |
-PYTHON_REQ_USE="threads" |
49 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
50 |
- |
51 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
52 |
-HOMEPAGE="https://nodejs.org/" |
53 |
-SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
54 |
- |
55 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
56 |
-SLOT="0" |
57 |
-KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos" |
58 |
-IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" |
59 |
-REQUIRED_USE=" |
60 |
- inspector? ( icu ssl ) |
61 |
- npm? ( ssl ) |
62 |
-" |
63 |
- |
64 |
-RDEPEND=" |
65 |
- >=dev-libs/libuv-1.28.0:= |
66 |
- >=net-dns/c-ares-1.15.0 |
67 |
- >=net-libs/http-parser-2.9.0:= |
68 |
- >=net-libs/nghttp2-1.39.2 |
69 |
- sys-libs/zlib |
70 |
- icu? ( >=dev-libs/icu-64.2:= ) |
71 |
- ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
72 |
-" |
73 |
-DEPEND=" |
74 |
- ${RDEPEND} |
75 |
- ${PYTHON_DEPS} |
76 |
- systemtap? ( dev-util/systemtap ) |
77 |
- test? ( net-misc/curl ) |
78 |
-" |
79 |
-PATCHES=( |
80 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
81 |
-) |
82 |
-RESTRICT="test" |
83 |
-S="${WORKDIR}/node-v${PV}" |
84 |
- |
85 |
-pkg_pretend() { |
86 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
87 |
- die "Your CPU doesn't support the required SSE2 instruction." |
88 |
- |
89 |
- ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
90 |
- die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
91 |
-} |
92 |
- |
93 |
-src_prepare() { |
94 |
- tc-export CC CXX PKG_CONFIG |
95 |
- export V=1 |
96 |
- export BUILDTYPE=Release |
97 |
- |
98 |
- # fix compilation on Darwin |
99 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
100 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
101 |
- |
102 |
- # make sure we use python2.* while using gyp |
103 |
- sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
104 |
- sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || 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 deps/v8/gypfiles/toolchain.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=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib ) |
139 |
- use debug && myconf+=( --debug ) |
140 |
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
141 |
- use inspector || myconf+=( --without-inspector ) |
142 |
- use npm || myconf+=( --without-npm ) |
143 |
- use snapshot && myconf+=( --with-snapshot ) |
144 |
- use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl ) |
145 |
- |
146 |
- local myarch="" |
147 |
- case ${ABI} in |
148 |
- amd64) myarch="x64";; |
149 |
- arm) myarch="arm";; |
150 |
- arm64) myarch="arm64";; |
151 |
- ppc64) myarch="ppc64";; |
152 |
- x32) myarch="x32";; |
153 |
- x86) myarch="ia32";; |
154 |
- *) myarch="${ABI}";; |
155 |
- esac |
156 |
- |
157 |
- GYP_DEFINES="linux_use_gold_flags=0 |
158 |
- linux_use_bundled_binutils=0 |
159 |
- linux_use_bundled_gold=0" \ |
160 |
- "${PYTHON}" configure \ |
161 |
- --prefix="${EPREFIX}"/usr \ |
162 |
- --dest-cpu=${myarch} \ |
163 |
- $(use_with systemtap dtrace) \ |
164 |
- "${myconf[@]}" || die |
165 |
-} |
166 |
- |
167 |
-src_compile() { |
168 |
- emake -C out mksnapshot |
169 |
- pax-mark m "out/${BUILDTYPE}/mksnapshot" |
170 |
- emake -C out |
171 |
-} |
172 |
- |
173 |
-src_install() { |
174 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
175 |
- emake install DESTDIR="${D}" |
176 |
- pax-mark -m "${ED}"/usr/bin/node |
177 |
- |
178 |
- # set up a symlink structure that node-gyp expects.. |
179 |
- dodir /usr/include/node/deps/{v8,uv} |
180 |
- dosym . /usr/include/node/src |
181 |
- for var in deps/{uv,v8}/include; do |
182 |
- dosym ../.. /usr/include/node/${var} |
183 |
- done |
184 |
- |
185 |
- if use doc; then |
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.13.0.ebuild b/net-libs/nodejs/nodejs-12.13.0.ebuild |
245 |
deleted file mode 100644 |
246 |
index e6741c72ebb..00000000000 |
247 |
--- a/net-libs/nodejs/nodejs-12.13.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.32.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 |
-} |
463 |
|
464 |
diff --git a/net-libs/nodejs/nodejs-13.5.0-r1.ebuild b/net-libs/nodejs/nodejs-13.5.0-r1.ebuild |
465 |
deleted file mode 100644 |
466 |
index 3f434606d2f..00000000000 |
467 |
--- a/net-libs/nodejs/nodejs-13.5.0-r1.ebuild |
468 |
+++ /dev/null |
469 |
@@ -1,204 +0,0 @@ |
470 |
-# Copyright 1999-2020 Gentoo Authors |
471 |
-# Distributed under the terms of the GNU General Public License v2 |
472 |
- |
473 |
-EAPI=7 |
474 |
-PYTHON_COMPAT=( python{2_7,3_{6,7}} ) |
475 |
-PYTHON_REQ_USE="threads(+)" |
476 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
477 |
- |
478 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
479 |
-HOMEPAGE="https://nodejs.org/" |
480 |
-SRC_URI=" |
481 |
- https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz |
482 |
-" |
483 |
- |
484 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
485 |
-SLOT="0" |
486 |
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
487 |
-IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm pax_kernel +snapshot +ssl systemtap test" |
488 |
-REQUIRED_USE=" |
489 |
- inspector? ( icu ssl ) |
490 |
- npm? ( ssl ) |
491 |
-" |
492 |
- |
493 |
-RDEPEND=" |
494 |
- >=dev-libs/libuv-1.34.0:= |
495 |
- >=net-dns/c-ares-1.15.0 |
496 |
- >=net-libs/nghttp2-1.40.0 |
497 |
- sys-libs/zlib |
498 |
- icu? ( >=dev-libs/icu-64.2:= ) |
499 |
- ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
500 |
-" |
501 |
-BDEPEND=" |
502 |
- ${PYTHON_DEPS} |
503 |
- systemtap? ( dev-util/systemtap ) |
504 |
- test? ( net-misc/curl ) |
505 |
- pax_kernel? ( sys-apps/elfix ) |
506 |
-" |
507 |
-DEPEND=" |
508 |
- ${RDEPEND} |
509 |
-" |
510 |
-PATCHES=( |
511 |
- "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
512 |
-) |
513 |
-RESTRICT="test" |
514 |
-S="${WORKDIR}/node-v${PV}" |
515 |
- |
516 |
-pkg_pretend() { |
517 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
518 |
- die "Your CPU doesn't support the required SSE2 instruction." |
519 |
- |
520 |
- ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
521 |
- die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
522 |
-} |
523 |
- |
524 |
-src_prepare() { |
525 |
- tc-export CC CXX PKG_CONFIG |
526 |
- export V=1 |
527 |
- export BUILDTYPE=Release |
528 |
- |
529 |
- # fix compilation on Darwin |
530 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
531 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
532 |
- |
533 |
- # less verbose install output (stating the same as portage, basically) |
534 |
- sed -i -e "/print/d" tools/install.py || die |
535 |
- |
536 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
537 |
- local LIBDIR=$(get_libdir) |
538 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
539 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
540 |
- |
541 |
- # Avoid writing a depfile, not useful |
542 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
543 |
- |
544 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
545 |
- |
546 |
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
547 |
- # seem sandbox related either (invoking it from a sandbox works fine). |
548 |
- # The issue is that no stdin handle is openened when asked for one. |
549 |
- # It doesn't really belong upstream , so it'll just be removed until someone |
550 |
- # with more gentoo-knowledge than me (jbergstroem) figures it out. |
551 |
- rm test/parallel/test-stdout-close-unref.js || die |
552 |
- |
553 |
- # debug builds. change install path, remove optimisations and override buildtype |
554 |
- if use debug; then |
555 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
556 |
- BUILDTYPE=Debug |
557 |
- fi |
558 |
- |
559 |
- # We need to disable mprotect on two files when it builds Bug 694100. |
560 |
- use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.2.0-paxmarking.patch ) |
561 |
- |
562 |
- default |
563 |
-} |
564 |
- |
565 |
-src_configure() { |
566 |
- xdg_environment_reset |
567 |
- |
568 |
- local myconf=( |
569 |
- --shared-cares --shared-libuv --shared-nghttp2 --shared-zlib |
570 |
- ) |
571 |
- use debug && myconf+=( --debug ) |
572 |
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
573 |
- use inspector || myconf+=( --without-inspector ) |
574 |
- use npm || myconf+=( --without-npm ) |
575 |
- use snapshot && myconf+=( --with-snapshot ) |
576 |
- use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl ) |
577 |
- |
578 |
- local myarch="" |
579 |
- case ${ABI} in |
580 |
- amd64) myarch="x64";; |
581 |
- arm) myarch="arm";; |
582 |
- arm64) myarch="arm64";; |
583 |
- ppc64) myarch="ppc64";; |
584 |
- x32) myarch="x32";; |
585 |
- x86) myarch="ia32";; |
586 |
- *) myarch="${ABI}";; |
587 |
- esac |
588 |
- |
589 |
- GYP_DEFINES="linux_use_gold_flags=0 |
590 |
- linux_use_bundled_binutils=0 |
591 |
- linux_use_bundled_gold=0" \ |
592 |
- "${EPYTHON}" configure.py \ |
593 |
- --prefix="${EPREFIX}"/usr \ |
594 |
- --dest-cpu=${myarch} \ |
595 |
- $(use_with systemtap dtrace) \ |
596 |
- "${myconf[@]}" || die |
597 |
-} |
598 |
- |
599 |
-src_compile() { |
600 |
- emake -C out |
601 |
-} |
602 |
- |
603 |
-src_install() { |
604 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
605 |
- default |
606 |
- |
607 |
- pax-mark -m "${ED}"/usr/bin/node |
608 |
- |
609 |
- # set up a symlink structure that node-gyp expects.. |
610 |
- dodir /usr/include/node/deps/{v8,uv} |
611 |
- dosym . /usr/include/node/src |
612 |
- for var in deps/{uv,v8}/include; do |
613 |
- dosym ../.. /usr/include/node/${var} |
614 |
- done |
615 |
- |
616 |
- if use doc; then |
617 |
- docinto html |
618 |
- dodoc -r "${S}"/doc/* |
619 |
- fi |
620 |
- |
621 |
- if use npm; then |
622 |
- dodir /etc/npm |
623 |
- |
624 |
- # Install bash completion for `npm` |
625 |
- # We need to temporarily replace default config path since |
626 |
- # npm otherwise tries to write outside of the sandbox |
627 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
628 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
629 |
- local tmp_npm_completion_file="$(emktemp)" |
630 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
631 |
- newbashcomp "${tmp_npm_completion_file}" npm |
632 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
633 |
- |
634 |
- # Move man pages |
635 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
636 |
- |
637 |
- # Clean up |
638 |
- rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
639 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
640 |
- |
641 |
- local find_exp="-or -name" |
642 |
- local find_name=() |
643 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
644 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
645 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
646 |
- find_name+=( ${find_exp} "${match}" ) |
647 |
- done |
648 |
- |
649 |
- # Remove various development and/or inappropriate files and |
650 |
- # useless docs of dependend packages. |
651 |
- find "${LIBDIR}"/node_modules \ |
652 |
- \( -type d -name examples \) -or \( -type f \( \ |
653 |
- -iname "LICEN?E*" \ |
654 |
- "${find_name[@]}" \ |
655 |
- \) \) -exec rm -rf "{}" \; |
656 |
- fi |
657 |
- |
658 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
659 |
-} |
660 |
- |
661 |
-src_test() { |
662 |
- out/${BUILDTYPE}/cctest || die |
663 |
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
664 |
-} |
665 |
- |
666 |
-pkg_postinst() { |
667 |
- elog "The global npm config lives in /etc/npm. This deviates slightly" |
668 |
- elog "from upstream which otherwise would have it live in /usr/etc/." |
669 |
- elog "" |
670 |
- elog "Protip: When using node-gyp to install native modules, you can" |
671 |
- elog "avoid having to download extras by doing the following:" |
672 |
- elog "$ node-gyp --nodedir /usr/include/node <command>" |
673 |
-} |
674 |
|
675 |
diff --git a/net-libs/nodejs/nodejs-8.16.2.ebuild b/net-libs/nodejs/nodejs-8.16.2.ebuild |
676 |
deleted file mode 100644 |
677 |
index 9796fe0f07f..00000000000 |
678 |
--- a/net-libs/nodejs/nodejs-8.16.2.ebuild |
679 |
+++ /dev/null |
680 |
@@ -1,210 +0,0 @@ |
681 |
-# Copyright 1999-2019 Gentoo Authors |
682 |
-# Distributed under the terms of the GNU General Public License v2 |
683 |
- |
684 |
-EAPI=7 |
685 |
- |
686 |
-PYTHON_COMPAT=( python2_7 ) |
687 |
-PYTHON_REQ_USE="threads" |
688 |
- |
689 |
-inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
690 |
- |
691 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
692 |
-HOMEPAGE="https://nodejs.org/" |
693 |
-SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
694 |
- |
695 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
696 |
-SLOT="0" |
697 |
-KEYWORDS="amd64 ~arm arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos" |
698 |
-IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" |
699 |
-REQUIRED_USE=" |
700 |
- inspector? ( icu ssl ) |
701 |
- npm? ( ssl ) |
702 |
-" |
703 |
- |
704 |
-RDEPEND=" |
705 |
- >=dev-libs/libuv-1.23.2:= |
706 |
- >=net-dns/c-ares-1.10.1 |
707 |
- >=net-libs/http-parser-2.9.0:= |
708 |
- >=net-libs/nghttp2-1.39.2 |
709 |
- sys-libs/zlib |
710 |
- icu? ( >=dev-libs/icu-60.1:= ) |
711 |
- ssl? ( =dev-libs/openssl-1.0.2*:0=[-bindist] ) |
712 |
-" |
713 |
-BDEPEND=" |
714 |
- ${PYTHON_DEPS} |
715 |
- systemtap? ( dev-util/systemtap ) |
716 |
- test? ( net-misc/curl ) |
717 |
-" |
718 |
-DEPEND=" |
719 |
- ${RDEPEND} |
720 |
-" |
721 |
-PATCHES=( |
722 |
- "${FILESDIR}"/nodejs-10.3.0-global-npm-config.patch |
723 |
-) |
724 |
-RESTRICT="test" |
725 |
-S="${WORKDIR}/node-v${PV}" |
726 |
- |
727 |
-pkg_pretend() { |
728 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
729 |
- die "Your CPU doesn't support the required SSE2 instruction." |
730 |
- |
731 |
- ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
732 |
- die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
733 |
-} |
734 |
- |
735 |
-src_prepare() { |
736 |
- tc-export CC CXX PKG_CONFIG |
737 |
- export V=1 |
738 |
- export BUILDTYPE=Release |
739 |
- |
740 |
- # fix compilation on Darwin |
741 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
742 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
743 |
- |
744 |
- # make sure we use python2.* while using gyp |
745 |
- sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
746 |
- sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die |
747 |
- |
748 |
- # less verbose install output (stating the same as portage, basically) |
749 |
- sed -i -e "/print/d" tools/install.py || die |
750 |
- |
751 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
752 |
- local LIBDIR=$(get_libdir) |
753 |
- sed -i \ |
754 |
- -e "s|lib/|${LIBDIR}/|g" \ |
755 |
- -e 's|share/doc/node/|share/doc/'"${PF}"'/|g' \ |
756 |
- tools/install.py || die |
757 |
- |
758 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js deps/npm/lib/npm.js || die |
759 |
- |
760 |
- # Avoid writing a depfile, not useful |
761 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
762 |
- |
763 |
- sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die |
764 |
- |
765 |
- # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
766 |
- # seem sandbox related either (invoking it from a sandbox works fine). |
767 |
- # The issue is that no stdin handle is openened when asked for one. |
768 |
- # It doesn't really belong upstream , so it'll just be removed until someone |
769 |
- # with more gentoo-knowledge than me (jbergstroem) figures it out. |
770 |
- rm test/parallel/test-stdout-close-unref.js || die |
771 |
- |
772 |
- # debug builds. change install path, remove optimisations and override buildtype |
773 |
- if use debug; then |
774 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
775 |
- BUILDTYPE=Debug |
776 |
- fi |
777 |
- |
778 |
- default |
779 |
-} |
780 |
- |
781 |
-src_configure() { |
782 |
- xdg_environment_reset |
783 |
- |
784 |
- local myconf=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib ) |
785 |
- use debug && myconf+=( --debug ) |
786 |
- use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
787 |
- use inspector || myconf+=( --without-inspector ) |
788 |
- use npm || myconf+=( --without-npm ) |
789 |
- use snapshot && myconf+=( --with-snapshot ) |
790 |
- use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl ) |
791 |
- |
792 |
- local myarch="" |
793 |
- case ${ABI} in |
794 |
- amd64) myarch="x64";; |
795 |
- arm) myarch="arm";; |
796 |
- arm64) myarch="arm64";; |
797 |
- ppc64) myarch="ppc64";; |
798 |
- x32) myarch="x32";; |
799 |
- x86) myarch="ia32";; |
800 |
- *) myarch="${ABI}";; |
801 |
- esac |
802 |
- |
803 |
- GYP_DEFINES="linux_use_gold_flags=0 |
804 |
- linux_use_bundled_binutils=0 |
805 |
- linux_use_bundled_gold=0" \ |
806 |
- "${PYTHON}" configure \ |
807 |
- --prefix="${EPREFIX}"/usr \ |
808 |
- --dest-cpu=${myarch} \ |
809 |
- $(use_with systemtap dtrace) \ |
810 |
- "${myconf[@]}" || die |
811 |
-} |
812 |
- |
813 |
-src_compile() { |
814 |
- emake -C out mksnapshot |
815 |
- pax-mark m "out/${BUILDTYPE}/mksnapshot" |
816 |
- emake -C out |
817 |
-} |
818 |
- |
819 |
-src_test() { |
820 |
- out/${BUILDTYPE}/cctest || die |
821 |
- "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
822 |
-} |
823 |
- |
824 |
-src_install() { |
825 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
826 |
- emake install DESTDIR="${D}" |
827 |
- pax-mark -m "${ED}"/usr/bin/node |
828 |
- |
829 |
- # set up a symlink structure that node-gyp expects.. |
830 |
- dodir /usr/include/node/deps/{v8,uv} |
831 |
- dosym . /usr/include/node/src |
832 |
- for var in deps/{uv,v8}/include; do |
833 |
- dosym ../.. /usr/include/node/${var} |
834 |
- done |
835 |
- |
836 |
- if use doc; then |
837 |
- # Patch docs to make them offline readable |
838 |
- for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do |
839 |
- sed -i '/fonts.googleapis.com/ d' $i; |
840 |
- done |
841 |
- # Install docs |
842 |
- dodoc -r "${S}"/doc/* |
843 |
- fi |
844 |
- |
845 |
- if use npm; then |
846 |
- dodir /etc/npm |
847 |
- |
848 |
- # Install bash completion for `npm` |
849 |
- # We need to temporarily replace default config path since |
850 |
- # npm otherwise tries to write outside of the sandbox |
851 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
852 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
853 |
- local tmp_npm_completion_file="$(emktemp)" |
854 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
855 |
- newbashcomp "${tmp_npm_completion_file}" npm |
856 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
857 |
- |
858 |
- # Move man pages |
859 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
860 |
- |
861 |
- # Clean up |
862 |
- rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
863 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
864 |
- |
865 |
- local find_exp="-or -name" |
866 |
- local find_name=() |
867 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
868 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
869 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
870 |
- find_name+=( ${find_exp} "${match}" ) |
871 |
- done |
872 |
- |
873 |
- # Remove various development and/or inappropriate files and |
874 |
- # useless docs of dependend packages. |
875 |
- find "${LIBDIR}"/node_modules \ |
876 |
- \( -type d -name examples \) -or \( -type f \( \ |
877 |
- -iname "LICEN?E*" \ |
878 |
- "${find_name[@]}" \ |
879 |
- \) \) -exec rm -rf "{}" \; |
880 |
- fi |
881 |
-} |
882 |
- |
883 |
-pkg_postinst() { |
884 |
- einfo "The global npm config lives in /etc/npm. This deviates slightly" |
885 |
- einfo "from upstream which otherwise would have it live in /usr/etc/." |
886 |
- einfo "" |
887 |
- einfo "Protip: When using node-gyp to install native modules, you can" |
888 |
- einfo "avoid having to download extras by doing the following:" |
889 |
- einfo "$ node-gyp --nodedir /usr/include/node <command>" |
890 |
-} |