1 |
commit: 62a926df13c36c50771f462a08f597f03e04f9f0 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 3 03:09:04 2023 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 3 03:09:04 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62a926df |
7 |
|
8 |
net-libs/nodejs: drop 14.21.2, 16.19.0, 18.13.0, 18.14.0 |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
net-libs/nodejs/Manifest | 4 - |
13 |
net-libs/nodejs/nodejs-14.21.2.ebuild | 241 ------------------------------- |
14 |
net-libs/nodejs/nodejs-16.19.0.ebuild | 233 ------------------------------ |
15 |
net-libs/nodejs/nodejs-18.13.0.ebuild | 250 -------------------------------- |
16 |
net-libs/nodejs/nodejs-18.14.0.ebuild | 258 ---------------------------------- |
17 |
5 files changed, 986 deletions(-) |
18 |
|
19 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
20 |
index bbed98bd4ca0..85f80d9eba57 100644 |
21 |
--- a/net-libs/nodejs/Manifest |
22 |
+++ b/net-libs/nodejs/Manifest |
23 |
@@ -1,10 +1,6 @@ |
24 |
DIST node-v14.21.1.tar.xz 34663612 BLAKE2B 9ae2034c56e8a4fe47c8a234c5d16a410e7e8a8df966d580451a04f51da697ab8691a211f9f5fcb8b4ae34d2b5e974216f9dbb10dd19c42e2cb9110c31ad58f5 SHA512 3c9247ee71b8deb0672ecebb68d4f330424598333f38ad8f8a19f251140815d4c2a288b0dc6fa227e93944ea6430934bd7419b1a7119d927ed9e85ff09bd335b |
25 |
-DIST node-v14.21.2.tar.xz 34706392 BLAKE2B a7a8c8a0627b8b08bc3fcd1a24826ab633e86f620b7c7ecd0e241c2c2cff9be56bde113af8a24ae0b36411e58aae91b7af0c94f20be2dcfcb75f2443d17ac8ce SHA512 ffd681a1b5ffc20b7738b6575ddd8ca23c6ae696f7b2159f735e032cc92ecfde36410f0965baac6b19e6c0c187b136831200b428681c3dc40806d443769e020e |
26 |
DIST node-v14.21.3.tar.xz 34508116 BLAKE2B 6fa001be10499ff2dfc920690dda9df25423f3e5c0bf19ae2ab9df571ca905e164e5a4eb778d0aa16a6026c354e39e063bde39d734a0532c3d95c937e509a9cb SHA512 bea8ccbb95ba00c220a42d30f8827fc94fb63725079dc3b63c65fd62d5f4f85d1d78e00b9b1f882a80449fa251930d3f3f5f9c8ae8d14d132660d4c4fd0b08f0 |
27 |
DIST node-v16.18.1.tar.xz 35843876 BLAKE2B f57bc1122207e846b9490960d648f412d72e6d414d7cf4459a90a7b3aa018aca405a43773344284748a5d68d3f29c4d579be3eb8053569a167fef48bd4d43f64 SHA512 3f05104f61ce8d18d11cc6964a4f8ed165cd5502127b8a0191c1e5609921886c38f48a842519f898c36b18a4a38c13a1e93bafe27c101fd89bdc61f283e7a452 |
28 |
-DIST node-v16.19.0.tar.xz 35897484 BLAKE2B 44069405b9cca3f9e6c0198383ea01692cf38b7e1401cce1f8d289427e6d50c10204f09e6ff35db8d62c5f74585a08658223e0c1dea15bceb3ddbc309e09d05a SHA512 cbc70067a7aefb6b8d2e238c9611fa901ddee8e9ffc3e6becddec4b156cc52da6e172b33e797265858cacbd014e0e1f0c93bd7c412a7afb436731b3fecd384a3 |
29 |
DIST node-v16.19.1.tar.xz 35465252 BLAKE2B 717cf15ab6fa5a2a643138959c4e539ef541783061605d0670564579bb43c89db0972228d42e529fb4104396ce7e1ed33486b6f28356752709a196924894b9f6 SHA512 7274ae1c7c92a4db9f8df9762f363cd9fb252c51142b98a25e718d749d10989d4228bc8d5fc864b83a4fe0c7f9541f59190b47374673a6ab4654a6366a373a48 |
30 |
DIST node-v18.12.1.tar.xz 38454588 BLAKE2B dade180304ebe2bf30fc3270a13b8e024dd48a6dda26be7f730925500f997a9c703608b782eb40a16ed174699af256430434759678ae683b92f4fb4ba48b4707 SHA512 1eb4978a1de19c026561a8484df87bdeb6f7f2ec8ae1eb38b6241d0b0ff6158a4a7d19f42df7e295a63b8047eaf862a7470494143b2e27bb36b65e4663966588 |
31 |
-DIST node-v18.13.0.tar.xz 40324048 BLAKE2B 643a96edf5ee02e29b213d216d73b3d5f3175b70a776f9efb7146ec05c3c137397b498ba7ac6cbf3e2205e6b6fd08d8ead4f4940ddeaa23f288d3f69459874b8 SHA512 d32c8e333d8ee7ba24c9420c943a0e57f5a48e734ce7ced210a2977fc274db133bb01ba4f604cc06271357675fde0b6e9b5cd208de4d5202b08e722e9f32e20d |
32 |
-DIST node-v18.14.0.tar.xz 41425240 BLAKE2B 3229845225613c129da4379b9ae87c66e0e313ace230a9455ec88a2e64dc3dde28a8d37ccbcab7c46bbc2bef544b812c2e248419a126ef0f7d65ec798f398194 SHA512 bf1072d17a5ae003310f792b5acf7c36c2f294a802aadbb0977df240e8214344b0d4e9c3ee6fc8351e6249154b4468f1e5db15561168715ae1ecdeb8868b884b |
33 |
DIST node-v18.14.2.tar.xz 40330824 BLAKE2B d18cf6a23f091633e5298727eeee15dec65ca83e688ff9fbed78385102aa44707ff4b33bcb034f6d10aab9a81a646ad7e8c28a239de151b816ff7072977df0de SHA512 72bb788b40d83bc42850dd9e2d00ffc06d9bcb17d24280d4721038038d1632846f859864328c849498255d1095296402b9b3c6b8910bbd399f7f516a43b9c86f |
34 |
|
35 |
diff --git a/net-libs/nodejs/nodejs-14.21.2.ebuild b/net-libs/nodejs/nodejs-14.21.2.ebuild |
36 |
deleted file mode 100644 |
37 |
index 36fe10d19ce0..000000000000 |
38 |
--- a/net-libs/nodejs/nodejs-14.21.2.ebuild |
39 |
+++ /dev/null |
40 |
@@ -1,241 +0,0 @@ |
41 |
-# Copyright 1999-2023 Gentoo Authors |
42 |
-# Distributed under the terms of the GNU General Public License v2 |
43 |
- |
44 |
-EAPI=7 |
45 |
- |
46 |
-CONFIG_CHECK="~ADVISE_SYSCALLS" |
47 |
-PYTHON_COMPAT=( python3_{9..10} ) |
48 |
-PYTHON_REQ_USE="threads(+)" |
49 |
- |
50 |
-inherit bash-completion-r1 flag-o-matic linux-info 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 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
55 |
- |
56 |
-if [[ ${PV} == *9999 ]]; then |
57 |
- inherit git-r3 |
58 |
- EGIT_REPO_URI="https://github.com/nodejs/node" |
59 |
- SLOT="0" |
60 |
-else |
61 |
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
62 |
- SLOT="0/$(ver_cut 1)" |
63 |
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 -riscv ~x86 ~amd64-linux ~x64-macos" |
64 |
- S="${WORKDIR}/node-v${PV}" |
65 |
-fi |
66 |
- |
67 |
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" |
68 |
-REQUIRED_USE="inspector? ( icu ssl ) |
69 |
- npm? ( ssl ) |
70 |
- system-icu? ( icu ) |
71 |
- system-ssl? ( ssl )" |
72 |
- |
73 |
-RESTRICT="!test? ( test )" |
74 |
- |
75 |
-RDEPEND=">=app-arch/brotli-1.0.9:= |
76 |
- >=dev-libs/libuv-1.40.0:= |
77 |
- >=net-dns/c-ares-1.17.2:= |
78 |
- >=net-libs/nghttp2-1.41.0:= |
79 |
- sys-libs/zlib |
80 |
- system-icu? ( >=dev-libs/icu-67:= ) |
81 |
- system-ssl? ( |
82 |
- >=dev-libs/openssl-1.1.1:0= |
83 |
- <dev-libs/openssl-3.0.0_beta1:0= |
84 |
- ) |
85 |
- sys-devel/gcc:*" |
86 |
-BDEPEND="${PYTHON_DEPS} |
87 |
- sys-apps/coreutils |
88 |
- virtual/pkgconfig |
89 |
- systemtap? ( dev-util/systemtap ) |
90 |
- test? ( net-misc/curl ) |
91 |
- pax-kernel? ( sys-apps/elfix )" |
92 |
-DEPEND="${RDEPEND}" |
93 |
- |
94 |
-PATCHES=( |
95 |
- "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch |
96 |
- "${FILESDIR}"/${PN}-14.15.0-fix_ppc64_crashes.patch |
97 |
- "${FILESDIR}"/${PN}-14.19.0-global-npm-config.patch |
98 |
- "${FILESDIR}"/${PN}-gcc-13.patch |
99 |
-) |
100 |
- |
101 |
-pkg_pretend() { |
102 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
103 |
- die "Your CPU doesn't support the required SSE2 instruction." |
104 |
-} |
105 |
- |
106 |
-pkg_setup() { |
107 |
- python-any-r1_pkg_setup |
108 |
- linux-info_pkg_setup |
109 |
-} |
110 |
- |
111 |
-src_prepare() { |
112 |
- tc-export AR CC CXX PKG_CONFIG |
113 |
- export V=1 |
114 |
- export BUILDTYPE=Release |
115 |
- |
116 |
- # fix compilation on Darwin |
117 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
118 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
119 |
- |
120 |
- # less verbose install output (stating the same as portage, basically) |
121 |
- sed -i -e "/print/d" tools/install.py || die |
122 |
- |
123 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
124 |
- local LIBDIR=$(get_libdir) |
125 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
126 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
127 |
- |
128 |
- # Avoid writing a depfile, not useful |
129 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
130 |
- |
131 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
132 |
- |
133 |
- # debug builds. change install path, remove optimisations and override buildtype |
134 |
- if use debug; then |
135 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
136 |
- BUILDTYPE=Debug |
137 |
- fi |
138 |
- |
139 |
- # We need to disable mprotect on two files when it builds Bug 694100. |
140 |
- use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) |
141 |
- |
142 |
- # All this test does is check if the npm CLI produces warnings of any sort, |
143 |
- # failing if it does. Overkill, much? Especially given one possible warning |
144 |
- # is that there is a newer version of npm available upstream (yes, it does |
145 |
- # use the network if available), thus making it a real possibility for this |
146 |
- # test to begin failing one day even though it was fine before. |
147 |
- rm -f test/parallel/test-release-npm.js |
148 |
- |
149 |
- default |
150 |
-} |
151 |
- |
152 |
-src_configure() { |
153 |
- xdg_environment_reset |
154 |
- |
155 |
- # LTO compiler flags are handled by configure.py itself |
156 |
- filter-flags '-flto*' |
157 |
- # nodejs unconditionally links to libatomic #869992 |
158 |
- # specifically it requires __atomic_is_lock_free which |
159 |
- # is not yet implemented by sys-libs/compiler-rt (see |
160 |
- # https://reviews.llvm.org/D85044?id=287068), therefore |
161 |
- # we depend on gcc and force using libgcc as the support lib |
162 |
- tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" |
163 |
- |
164 |
- local myconf=( |
165 |
- --shared-brotli |
166 |
- --shared-cares |
167 |
- --shared-libuv |
168 |
- --shared-nghttp2 |
169 |
- --shared-zlib |
170 |
- ) |
171 |
- use debug && myconf+=( --debug ) |
172 |
- use lto && myconf+=( --enable-lto ) |
173 |
- if use system-icu; then |
174 |
- myconf+=( --with-intl=system-icu ) |
175 |
- elif use icu; then |
176 |
- myconf+=( --with-intl=full-icu ) |
177 |
- else |
178 |
- myconf+=( --with-intl=none ) |
179 |
- fi |
180 |
- use inspector || myconf+=( --without-inspector ) |
181 |
- use npm || myconf+=( --without-npm ) |
182 |
- use snapshot || myconf+=( --without-node-snapshot ) |
183 |
- if use ssl; then |
184 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
185 |
- else |
186 |
- myconf+=( --without-ssl ) |
187 |
- fi |
188 |
- |
189 |
- local myarch="" |
190 |
- case ${ABI} in |
191 |
- amd64) myarch="x64";; |
192 |
- arm) myarch="arm";; |
193 |
- arm64) myarch="arm64";; |
194 |
- ppc64) myarch="ppc64";; |
195 |
- x32) myarch="x32";; |
196 |
- x86) myarch="ia32";; |
197 |
- *) myarch="${ABI}";; |
198 |
- esac |
199 |
- |
200 |
- GYP_DEFINES="linux_use_gold_flags=0 |
201 |
- linux_use_bundled_binutils=0 |
202 |
- linux_use_bundled_gold=0" \ |
203 |
- "${EPYTHON}" configure.py \ |
204 |
- --prefix="${EPREFIX}"/usr \ |
205 |
- --dest-cpu=${myarch} \ |
206 |
- $(use_with systemtap dtrace) \ |
207 |
- "${myconf[@]}" || die |
208 |
-} |
209 |
- |
210 |
-src_compile() { |
211 |
- emake -C out |
212 |
-} |
213 |
- |
214 |
-src_install() { |
215 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
216 |
- default |
217 |
- |
218 |
- pax-mark -m "${ED}"/usr/bin/node |
219 |
- |
220 |
- # set up a symlink structure that node-gyp expects.. |
221 |
- dodir /usr/include/node/deps/{v8,uv} |
222 |
- dosym . /usr/include/node/src |
223 |
- for var in deps/{uv,v8}/include; do |
224 |
- dosym ../.. /usr/include/node/${var} |
225 |
- done |
226 |
- |
227 |
- if use doc; then |
228 |
- docinto html |
229 |
- dodoc -r "${S}"/doc/* |
230 |
- fi |
231 |
- |
232 |
- if use npm; then |
233 |
- dodir /etc/npm |
234 |
- |
235 |
- # Install bash completion for `npm` |
236 |
- # We need to temporarily replace default config path since |
237 |
- # npm otherwise tries to write outside of the sandbox |
238 |
- local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
239 |
- sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
240 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
241 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
242 |
- newbashcomp "${tmp_npm_completion_file}" npm |
243 |
- sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
244 |
- |
245 |
- # Move man pages |
246 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
247 |
- |
248 |
- # Clean up |
249 |
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} |
250 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} |
251 |
- |
252 |
- local find_exp="-or -name" |
253 |
- local find_name=() |
254 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
255 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
256 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
257 |
- find_name+=( ${find_exp} "${match}" ) |
258 |
- done |
259 |
- |
260 |
- # Remove various development and/or inappropriate files and |
261 |
- # useless docs of dependend packages. |
262 |
- find "${LIBDIR}"/node_modules \ |
263 |
- \( -type d -name examples \) -or \( -type f \( \ |
264 |
- -iname "LICEN?E*" \ |
265 |
- "${find_name[@]}" \ |
266 |
- \) \) -exec rm -rf "{}" \; |
267 |
- fi |
268 |
- |
269 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
270 |
-} |
271 |
- |
272 |
-src_test() { |
273 |
- if has usersandbox ${FEATURES}; then |
274 |
- rm -f "${S}"/test/parallel/test-fs-mkdir.js |
275 |
- ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \ |
276 |
- "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'." |
277 |
- fi |
278 |
- |
279 |
- out/${BUILDTYPE}/cctest || die |
280 |
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die |
281 |
-} |
282 |
|
283 |
diff --git a/net-libs/nodejs/nodejs-16.19.0.ebuild b/net-libs/nodejs/nodejs-16.19.0.ebuild |
284 |
deleted file mode 100644 |
285 |
index 1f15e25417b3..000000000000 |
286 |
--- a/net-libs/nodejs/nodejs-16.19.0.ebuild |
287 |
+++ /dev/null |
288 |
@@ -1,233 +0,0 @@ |
289 |
-# Copyright 1999-2023 Gentoo Authors |
290 |
-# Distributed under the terms of the GNU General Public License v2 |
291 |
- |
292 |
-EAPI=8 |
293 |
- |
294 |
-CONFIG_CHECK="~ADVISE_SYSCALLS" |
295 |
-PYTHON_COMPAT=( python3_{9..10} ) |
296 |
-PYTHON_REQ_USE="threads(+)" |
297 |
- |
298 |
-inherit bash-completion-r1 flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils |
299 |
- |
300 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
301 |
-HOMEPAGE="https://nodejs.org/" |
302 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
303 |
- |
304 |
-if [[ ${PV} == *9999 ]]; then |
305 |
- inherit git-r3 |
306 |
- EGIT_REPO_URI="https://github.com/nodejs/node" |
307 |
- SLOT="0" |
308 |
-else |
309 |
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
310 |
- SLOT="0/$(ver_cut 1)" |
311 |
- KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" |
312 |
- S="${WORKDIR}/node-v${PV}" |
313 |
-fi |
314 |
- |
315 |
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" |
316 |
-REQUIRED_USE="inspector? ( icu ssl ) |
317 |
- npm? ( ssl ) |
318 |
- system-icu? ( icu ) |
319 |
- system-ssl? ( ssl )" |
320 |
- |
321 |
-RESTRICT="!test? ( test )" |
322 |
- |
323 |
-RDEPEND=">=app-arch/brotli-1.0.9:= |
324 |
- >=dev-libs/libuv-1.40.0:= |
325 |
- >=net-dns/c-ares-1.17.2:= |
326 |
- >=net-libs/nghttp2-1.41.0:= |
327 |
- sys-libs/zlib |
328 |
- system-icu? ( >=dev-libs/icu-67:= ) |
329 |
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
330 |
- sys-devel/gcc:*" |
331 |
-BDEPEND="${PYTHON_DEPS} |
332 |
- sys-apps/coreutils |
333 |
- virtual/pkgconfig |
334 |
- systemtap? ( dev-util/systemtap ) |
335 |
- test? ( net-misc/curl ) |
336 |
- pax-kernel? ( sys-apps/elfix )" |
337 |
-DEPEND="${RDEPEND}" |
338 |
- |
339 |
-PATCHES=( |
340 |
- "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch |
341 |
- "${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch |
342 |
- "${FILESDIR}"/${PN}-gcc-13.patch |
343 |
-) |
344 |
- |
345 |
-pkg_pretend() { |
346 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
347 |
- die "Your CPU doesn't support the required SSE2 instruction." |
348 |
-} |
349 |
- |
350 |
-pkg_setup() { |
351 |
- python-any-r1_pkg_setup |
352 |
- linux-info_pkg_setup |
353 |
-} |
354 |
- |
355 |
-src_prepare() { |
356 |
- tc-export AR CC CXX PKG_CONFIG |
357 |
- export V=1 |
358 |
- export BUILDTYPE=Release |
359 |
- |
360 |
- # fix compilation on Darwin |
361 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
362 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
363 |
- |
364 |
- # less verbose install output (stating the same as portage, basically) |
365 |
- sed -i -e "/print/d" tools/install.py || die |
366 |
- |
367 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
368 |
- local LIBDIR=$(get_libdir) |
369 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
370 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
371 |
- |
372 |
- # Avoid writing a depfile, not useful |
373 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
374 |
- |
375 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
376 |
- |
377 |
- # debug builds. change install path, remove optimisations and override buildtype |
378 |
- if use debug; then |
379 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
380 |
- BUILDTYPE=Debug |
381 |
- fi |
382 |
- |
383 |
- # We need to disable mprotect on two files when it builds Bug 694100. |
384 |
- use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-16.4.2-paxmarking.patch ) |
385 |
- |
386 |
- # All this test does is check if the npm CLI produces warnings of any sort, |
387 |
- # failing if it does. Overkill, much? Especially given one possible warning |
388 |
- # is that there is a newer version of npm available upstream (yes, it does |
389 |
- # use the network if available), thus making it a real possibility for this |
390 |
- # test to begin failing one day even though it was fine before. |
391 |
- rm -f test/parallel/test-release-npm.js |
392 |
- |
393 |
- default |
394 |
-} |
395 |
- |
396 |
-src_configure() { |
397 |
- xdg_environment_reset |
398 |
- |
399 |
- # LTO compiler flags are handled by configure.py itself |
400 |
- filter-flags '-flto*' |
401 |
- # nodejs unconditionally links to libatomic #869992 |
402 |
- # specifically it requires __atomic_is_lock_free which |
403 |
- # is not yet implemented by sys-libs/compiler-rt (see |
404 |
- # https://reviews.llvm.org/D85044?id=287068), therefore |
405 |
- # we depend on gcc and force using libgcc as the support lib |
406 |
- tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" |
407 |
- |
408 |
- local myconf=( |
409 |
- --shared-brotli |
410 |
- --shared-cares |
411 |
- --shared-libuv |
412 |
- --shared-nghttp2 |
413 |
- --shared-zlib |
414 |
- ) |
415 |
- use debug && myconf+=( --debug ) |
416 |
- use lto && myconf+=( --enable-lto ) |
417 |
- if use system-icu; then |
418 |
- myconf+=( --with-intl=system-icu ) |
419 |
- elif use icu; then |
420 |
- myconf+=( --with-intl=full-icu ) |
421 |
- else |
422 |
- myconf+=( --with-intl=none ) |
423 |
- fi |
424 |
- use inspector || myconf+=( --without-inspector ) |
425 |
- use npm || myconf+=( --without-npm ) |
426 |
- use snapshot || myconf+=( --without-node-snapshot ) |
427 |
- if use ssl; then |
428 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
429 |
- else |
430 |
- myconf+=( --without-ssl ) |
431 |
- fi |
432 |
- |
433 |
- local myarch="" |
434 |
- case ${ABI} in |
435 |
- amd64) myarch="x64";; |
436 |
- arm) myarch="arm";; |
437 |
- arm64) myarch="arm64";; |
438 |
- lp64*) myarch="riscv64";; |
439 |
- ppc64) myarch="ppc64";; |
440 |
- x32) myarch="x32";; |
441 |
- x86) myarch="ia32";; |
442 |
- *) myarch="${ABI}";; |
443 |
- esac |
444 |
- |
445 |
- GYP_DEFINES="linux_use_gold_flags=0 |
446 |
- linux_use_bundled_binutils=0 |
447 |
- linux_use_bundled_gold=0" \ |
448 |
- "${EPYTHON}" configure.py \ |
449 |
- --prefix="${EPREFIX}"/usr \ |
450 |
- --dest-cpu=${myarch} \ |
451 |
- $(use_with systemtap dtrace) \ |
452 |
- "${myconf[@]}" || die |
453 |
-} |
454 |
- |
455 |
-src_compile() { |
456 |
- emake -C out |
457 |
-} |
458 |
- |
459 |
-src_install() { |
460 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
461 |
- default |
462 |
- |
463 |
- pax-mark -m "${ED}"/usr/bin/node |
464 |
- |
465 |
- # set up a symlink structure that node-gyp expects.. |
466 |
- dodir /usr/include/node/deps/{v8,uv} |
467 |
- dosym . /usr/include/node/src |
468 |
- for var in deps/{uv,v8}/include; do |
469 |
- dosym ../.. /usr/include/node/${var} |
470 |
- done |
471 |
- |
472 |
- if use doc; then |
473 |
- docinto html |
474 |
- dodoc -r "${S}"/doc/* |
475 |
- fi |
476 |
- |
477 |
- if use npm; then |
478 |
- keepdir /etc/npm |
479 |
- |
480 |
- # Install bash completion for `npm` |
481 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
482 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
483 |
- newbashcomp "${tmp_npm_completion_file}" npm |
484 |
- |
485 |
- # Move man pages |
486 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
487 |
- |
488 |
- # Clean up |
489 |
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} |
490 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} |
491 |
- |
492 |
- local find_exp="-or -name" |
493 |
- local find_name=() |
494 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
495 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
496 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
497 |
- find_name+=( ${find_exp} "${match}" ) |
498 |
- done |
499 |
- |
500 |
- # Remove various development and/or inappropriate files and |
501 |
- # useless docs of dependend packages. |
502 |
- find "${LIBDIR}"/node_modules \ |
503 |
- \( -type d -name examples \) -or \( -type f \( \ |
504 |
- -iname "LICEN?E*" \ |
505 |
- "${find_name[@]}" \ |
506 |
- \) \) -exec rm -rf "{}" \; |
507 |
- fi |
508 |
- |
509 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
510 |
-} |
511 |
- |
512 |
-src_test() { |
513 |
- if has usersandbox ${FEATURES}; then |
514 |
- rm -f "${S}"/test/parallel/test-fs-mkdir.js |
515 |
- ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \ |
516 |
- "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'." |
517 |
- fi |
518 |
- |
519 |
- out/${BUILDTYPE}/cctest || die |
520 |
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die |
521 |
-} |
522 |
|
523 |
diff --git a/net-libs/nodejs/nodejs-18.13.0.ebuild b/net-libs/nodejs/nodejs-18.13.0.ebuild |
524 |
deleted file mode 100644 |
525 |
index 44014bbc6a22..000000000000 |
526 |
--- a/net-libs/nodejs/nodejs-18.13.0.ebuild |
527 |
+++ /dev/null |
528 |
@@ -1,250 +0,0 @@ |
529 |
-# Copyright 1999-2023 Gentoo Authors |
530 |
-# Distributed under the terms of the GNU General Public License v2 |
531 |
- |
532 |
-EAPI=8 |
533 |
- |
534 |
-CONFIG_CHECK="~ADVISE_SYSCALLS" |
535 |
-PYTHON_COMPAT=( python3_{9..11} ) |
536 |
-PYTHON_REQ_USE="threads(+)" |
537 |
- |
538 |
-inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils |
539 |
- |
540 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
541 |
-HOMEPAGE="https://nodejs.org/" |
542 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
543 |
- |
544 |
-if [[ ${PV} == *9999 ]]; then |
545 |
- inherit git-r3 |
546 |
- EGIT_REPO_URI="https://github.com/nodejs/node" |
547 |
- SLOT="0" |
548 |
-else |
549 |
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
550 |
- SLOT="0/$(ver_cut 1)" |
551 |
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" |
552 |
- S="${WORKDIR}/node-v${PV}" |
553 |
-fi |
554 |
- |
555 |
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" |
556 |
-REQUIRED_USE="inspector? ( icu ssl ) |
557 |
- npm? ( ssl ) |
558 |
- system-icu? ( icu ) |
559 |
- system-ssl? ( ssl )" |
560 |
- |
561 |
-RESTRICT="!test? ( test )" |
562 |
- |
563 |
-RDEPEND=">=app-arch/brotli-1.0.9:= |
564 |
- >=dev-libs/libuv-1.44.0:= |
565 |
- >=net-dns/c-ares-1.17.2:= |
566 |
- >=net-libs/nghttp2-1.41.0:= |
567 |
- sys-libs/zlib |
568 |
- system-icu? ( >=dev-libs/icu-67:= ) |
569 |
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
570 |
- sys-devel/gcc:*" |
571 |
-BDEPEND="${PYTHON_DEPS} |
572 |
- sys-apps/coreutils |
573 |
- virtual/pkgconfig |
574 |
- systemtap? ( dev-util/systemtap ) |
575 |
- test? ( net-misc/curl ) |
576 |
- pax-kernel? ( sys-apps/elfix )" |
577 |
-DEPEND="${RDEPEND}" |
578 |
- |
579 |
-PATCHES=( |
580 |
- "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch |
581 |
- "${FILESDIR}"/${PN}-15.2.0-global-npm-config.patch |
582 |
-) |
583 |
- |
584 |
-# These are measured on a loong machine with -ggdb on, and only checked |
585 |
-# if debugging flags are present in CFLAGS. |
586 |
-# |
587 |
-# The final link consumed a little more than 7GiB alone, so 8GiB is the lower |
588 |
-# limit for memory usage. Disk usage was 19.1GiB for the build directory and |
589 |
-# 1.2GiB for the installed image, so we leave some room for architectures with |
590 |
-# fatter binaries and set the disk requirement to 22GiB. |
591 |
-CHECKREQS_MEMORY="8G" |
592 |
-CHECKREQS_DISK_BUILD="22G" |
593 |
- |
594 |
-pkg_pretend() { |
595 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
596 |
- die "Your CPU doesn't support the required SSE2 instruction." |
597 |
- |
598 |
- if [[ ${MERGE_TYPE} != "binary" ]]; then |
599 |
- if is-flagq "-g*" && ! is-flagq "-g*0" ; then |
600 |
- einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" |
601 |
- check-reqs_pkg_pretend |
602 |
- fi |
603 |
- fi |
604 |
-} |
605 |
- |
606 |
-pkg_setup() { |
607 |
- python-any-r1_pkg_setup |
608 |
- linux-info_pkg_setup |
609 |
-} |
610 |
- |
611 |
-src_prepare() { |
612 |
- tc-export AR CC CXX PKG_CONFIG |
613 |
- export V=1 |
614 |
- export BUILDTYPE=Release |
615 |
- |
616 |
- # fix compilation on Darwin |
617 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
618 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
619 |
- |
620 |
- # less verbose install output (stating the same as portage, basically) |
621 |
- sed -i -e "/print/d" tools/install.py || die |
622 |
- |
623 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
624 |
- local LIBDIR=$(get_libdir) |
625 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
626 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
627 |
- |
628 |
- # Avoid writing a depfile, not useful |
629 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
630 |
- |
631 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
632 |
- |
633 |
- # debug builds. change install path, remove optimisations and override buildtype |
634 |
- if use debug; then |
635 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
636 |
- BUILDTYPE=Debug |
637 |
- fi |
638 |
- |
639 |
- # We need to disable mprotect on two files when it builds Bug 694100. |
640 |
- use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-18.3.0-paxmarking.patch ) |
641 |
- |
642 |
- # All this test does is check if the npm CLI produces warnings of any sort, |
643 |
- # failing if it does. Overkill, much? Especially given one possible warning |
644 |
- # is that there is a newer version of npm available upstream (yes, it does |
645 |
- # use the network if available), thus making it a real possibility for this |
646 |
- # test to begin failing one day even though it was fine before. |
647 |
- rm -f test/parallel/test-release-npm.js |
648 |
- |
649 |
- default |
650 |
-} |
651 |
- |
652 |
-src_configure() { |
653 |
- xdg_environment_reset |
654 |
- |
655 |
- # LTO compiler flags are handled by configure.py itself |
656 |
- filter-flags '-flto*' |
657 |
- # nodejs unconditionally links to libatomic #869992 |
658 |
- # specifically it requires __atomic_is_lock_free which |
659 |
- # is not yet implemented by sys-libs/compiler-rt (see |
660 |
- # https://reviews.llvm.org/D85044?id=287068), therefore |
661 |
- # we depend on gcc and force using libgcc as the support lib |
662 |
- tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" |
663 |
- |
664 |
- local myconf=( |
665 |
- --shared-brotli |
666 |
- --shared-cares |
667 |
- --shared-libuv |
668 |
- --shared-nghttp2 |
669 |
- --shared-zlib |
670 |
- ) |
671 |
- use debug && myconf+=( --debug ) |
672 |
- use lto && myconf+=( --enable-lto ) |
673 |
- if use system-icu; then |
674 |
- myconf+=( --with-intl=system-icu ) |
675 |
- elif use icu; then |
676 |
- myconf+=( --with-intl=full-icu ) |
677 |
- else |
678 |
- myconf+=( --with-intl=none ) |
679 |
- fi |
680 |
- use inspector || myconf+=( --without-inspector ) |
681 |
- use npm || myconf+=( --without-npm ) |
682 |
- use snapshot || myconf+=( --without-node-snapshot ) |
683 |
- if use ssl; then |
684 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
685 |
- else |
686 |
- myconf+=( --without-ssl ) |
687 |
- fi |
688 |
- |
689 |
- local myarch="" |
690 |
- case "${ARCH}:${ABI}" in |
691 |
- *:amd64) myarch="x64";; |
692 |
- *:arm) myarch="arm";; |
693 |
- *:arm64) myarch="arm64";; |
694 |
- loong:lp64*) myarch="loong64";; |
695 |
- riscv:lp64*) myarch="riscv64";; |
696 |
- *:ppc64) myarch="ppc64";; |
697 |
- *:x32) myarch="x32";; |
698 |
- *:x86) myarch="ia32";; |
699 |
- *) myarch="${ABI}";; |
700 |
- esac |
701 |
- |
702 |
- GYP_DEFINES="linux_use_gold_flags=0 |
703 |
- linux_use_bundled_binutils=0 |
704 |
- linux_use_bundled_gold=0" \ |
705 |
- "${EPYTHON}" configure.py \ |
706 |
- --prefix="${EPREFIX}"/usr \ |
707 |
- --dest-cpu=${myarch} \ |
708 |
- $(use_with systemtap dtrace) \ |
709 |
- "${myconf[@]}" || die |
710 |
-} |
711 |
- |
712 |
-src_compile() { |
713 |
- emake -C out |
714 |
-} |
715 |
- |
716 |
-src_install() { |
717 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
718 |
- default |
719 |
- |
720 |
- pax-mark -m "${ED}"/usr/bin/node |
721 |
- |
722 |
- # set up a symlink structure that node-gyp expects.. |
723 |
- dodir /usr/include/node/deps/{v8,uv} |
724 |
- dosym . /usr/include/node/src |
725 |
- for var in deps/{uv,v8}/include; do |
726 |
- dosym ../.. /usr/include/node/${var} |
727 |
- done |
728 |
- |
729 |
- if use doc; then |
730 |
- docinto html |
731 |
- dodoc -r "${S}"/doc/* |
732 |
- fi |
733 |
- |
734 |
- if use npm; then |
735 |
- keepdir /etc/npm |
736 |
- |
737 |
- # Install bash completion for `npm` |
738 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
739 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
740 |
- newbashcomp "${tmp_npm_completion_file}" npm |
741 |
- |
742 |
- # Move man pages |
743 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
744 |
- |
745 |
- # Clean up |
746 |
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} |
747 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} |
748 |
- |
749 |
- local find_exp="-or -name" |
750 |
- local find_name=() |
751 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
752 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
753 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
754 |
- find_name+=( ${find_exp} "${match}" ) |
755 |
- done |
756 |
- |
757 |
- # Remove various development and/or inappropriate files and |
758 |
- # useless docs of dependend packages. |
759 |
- find "${LIBDIR}"/node_modules \ |
760 |
- \( -type d -name examples \) -or \( -type f \( \ |
761 |
- -iname "LICEN?E*" \ |
762 |
- "${find_name[@]}" \ |
763 |
- \) \) -exec rm -rf "{}" \; |
764 |
- fi |
765 |
- |
766 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
767 |
-} |
768 |
- |
769 |
-src_test() { |
770 |
- if has usersandbox ${FEATURES}; then |
771 |
- rm -f "${S}"/test/parallel/test-fs-mkdir.js |
772 |
- ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \ |
773 |
- "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'." |
774 |
- fi |
775 |
- |
776 |
- out/${BUILDTYPE}/cctest || die |
777 |
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die |
778 |
-} |
779 |
|
780 |
diff --git a/net-libs/nodejs/nodejs-18.14.0.ebuild b/net-libs/nodejs/nodejs-18.14.0.ebuild |
781 |
deleted file mode 100644 |
782 |
index 77822a99f225..000000000000 |
783 |
--- a/net-libs/nodejs/nodejs-18.14.0.ebuild |
784 |
+++ /dev/null |
785 |
@@ -1,258 +0,0 @@ |
786 |
-# Copyright 1999-2023 Gentoo Authors |
787 |
-# Distributed under the terms of the GNU General Public License v2 |
788 |
- |
789 |
-EAPI=8 |
790 |
- |
791 |
-CONFIG_CHECK="~ADVISE_SYSCALLS" |
792 |
-PYTHON_COMPAT=( python3_{9..11} ) |
793 |
-PYTHON_REQ_USE="threads(+)" |
794 |
- |
795 |
-inherit bash-completion-r1 check-reqs flag-o-matic linux-info pax-utils python-any-r1 toolchain-funcs xdg-utils |
796 |
- |
797 |
-DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
798 |
-HOMEPAGE="https://nodejs.org/" |
799 |
-LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
800 |
- |
801 |
-if [[ ${PV} == *9999 ]]; then |
802 |
- inherit git-r3 |
803 |
- EGIT_REPO_URI="https://github.com/nodejs/node" |
804 |
- SLOT="0" |
805 |
-else |
806 |
- SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
807 |
- SLOT="0/$(ver_cut 1)" |
808 |
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" |
809 |
- S="${WORKDIR}/node-v${PV}" |
810 |
-fi |
811 |
- |
812 |
-IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" |
813 |
-REQUIRED_USE="inspector? ( icu ssl ) |
814 |
- npm? ( ssl ) |
815 |
- system-icu? ( icu ) |
816 |
- system-ssl? ( ssl )" |
817 |
- |
818 |
-RESTRICT="!test? ( test )" |
819 |
- |
820 |
-RDEPEND=">=app-arch/brotli-1.0.9:= |
821 |
- >=dev-libs/libuv-1.44.0:= |
822 |
- >=net-dns/c-ares-1.17.2:= |
823 |
- >=net-libs/nghttp2-1.41.0:= |
824 |
- sys-libs/zlib |
825 |
- system-icu? ( >=dev-libs/icu-67:= ) |
826 |
- system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
827 |
- sys-devel/gcc:*" |
828 |
-BDEPEND="${PYTHON_DEPS} |
829 |
- sys-apps/coreutils |
830 |
- virtual/pkgconfig |
831 |
- systemtap? ( dev-util/systemtap ) |
832 |
- test? ( net-misc/curl ) |
833 |
- pax-kernel? ( sys-apps/elfix )" |
834 |
-DEPEND="${RDEPEND}" |
835 |
- |
836 |
-PATCHES=( |
837 |
- "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch |
838 |
-) |
839 |
- |
840 |
-# These are measured on a loong machine with -ggdb on, and only checked |
841 |
-# if debugging flags are present in CFLAGS. |
842 |
-# |
843 |
-# The final link consumed a little more than 7GiB alone, so 8GiB is the lower |
844 |
-# limit for memory usage. Disk usage was 19.1GiB for the build directory and |
845 |
-# 1.2GiB for the installed image, so we leave some room for architectures with |
846 |
-# fatter binaries and set the disk requirement to 22GiB. |
847 |
-CHECKREQS_MEMORY="8G" |
848 |
-CHECKREQS_DISK_BUILD="22G" |
849 |
- |
850 |
-pkg_pretend() { |
851 |
- (use x86 && ! use cpu_flags_x86_sse2) && \ |
852 |
- die "Your CPU doesn't support the required SSE2 instruction." |
853 |
- |
854 |
- if [[ ${MERGE_TYPE} != "binary" ]]; then |
855 |
- if is-flagq "-g*" && ! is-flagq "-g*0" ; then |
856 |
- einfo "Checking for sufficient disk space and memory to build ${PN} with debugging CFLAGS" |
857 |
- check-reqs_pkg_pretend |
858 |
- fi |
859 |
- fi |
860 |
-} |
861 |
- |
862 |
-pkg_setup() { |
863 |
- python-any-r1_pkg_setup |
864 |
- linux-info_pkg_setup |
865 |
-} |
866 |
- |
867 |
-src_prepare() { |
868 |
- tc-export AR CC CXX PKG_CONFIG |
869 |
- export V=1 |
870 |
- export BUILDTYPE=Release |
871 |
- |
872 |
- # fix compilation on Darwin |
873 |
- # https://code.google.com/p/gyp/issues/detail?id=260 |
874 |
- sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
875 |
- |
876 |
- # less verbose install output (stating the same as portage, basically) |
877 |
- sed -i -e "/print/d" tools/install.py || die |
878 |
- |
879 |
- # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
880 |
- local LIBDIR=$(get_libdir) |
881 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
882 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
883 |
- |
884 |
- # Avoid writing a depfile, not useful |
885 |
- sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
886 |
- |
887 |
- sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
888 |
- |
889 |
- # debug builds. change install path, remove optimisations and override buildtype |
890 |
- if use debug; then |
891 |
- sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
892 |
- BUILDTYPE=Debug |
893 |
- fi |
894 |
- |
895 |
- # We need to disable mprotect on two files when it builds Bug 694100. |
896 |
- use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-18.3.0-paxmarking.patch ) |
897 |
- |
898 |
- # All this test does is check if the npm CLI produces warnings of any sort, |
899 |
- # failing if it does. Overkill, much? Especially given one possible warning |
900 |
- # is that there is a newer version of npm available upstream (yes, it does |
901 |
- # use the network if available), thus making it a real possibility for this |
902 |
- # test to begin failing one day even though it was fine before. |
903 |
- rm -f test/parallel/test-release-npm.js |
904 |
- |
905 |
- default |
906 |
-} |
907 |
- |
908 |
-src_configure() { |
909 |
- xdg_environment_reset |
910 |
- |
911 |
- # LTO compiler flags are handled by configure.py itself |
912 |
- filter-flags '-flto*' |
913 |
- # nodejs unconditionally links to libatomic #869992 |
914 |
- # specifically it requires __atomic_is_lock_free which |
915 |
- # is not yet implemented by sys-libs/compiler-rt (see |
916 |
- # https://reviews.llvm.org/D85044?id=287068), therefore |
917 |
- # we depend on gcc and force using libgcc as the support lib |
918 |
- tc-is-clang && append-ldflags "--rtlib=libgcc --unwindlib=libgcc" |
919 |
- |
920 |
- local myconf=( |
921 |
- --shared-brotli |
922 |
- --shared-cares |
923 |
- --shared-libuv |
924 |
- --shared-nghttp2 |
925 |
- --shared-zlib |
926 |
- ) |
927 |
- use debug && myconf+=( --debug ) |
928 |
- use lto && myconf+=( --enable-lto ) |
929 |
- if use system-icu; then |
930 |
- myconf+=( --with-intl=system-icu ) |
931 |
- elif use icu; then |
932 |
- myconf+=( --with-intl=full-icu ) |
933 |
- else |
934 |
- myconf+=( --with-intl=none ) |
935 |
- fi |
936 |
- use inspector || myconf+=( --without-inspector ) |
937 |
- use npm || myconf+=( --without-npm ) |
938 |
- use snapshot || myconf+=( --without-node-snapshot ) |
939 |
- if use ssl; then |
940 |
- use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
941 |
- else |
942 |
- myconf+=( --without-ssl ) |
943 |
- fi |
944 |
- |
945 |
- local myarch="" |
946 |
- case "${ARCH}:${ABI}" in |
947 |
- *:amd64) myarch="x64";; |
948 |
- *:arm) myarch="arm";; |
949 |
- *:arm64) myarch="arm64";; |
950 |
- loong:lp64*) myarch="loong64";; |
951 |
- riscv:lp64*) myarch="riscv64";; |
952 |
- *:ppc64) myarch="ppc64";; |
953 |
- *:x32) myarch="x32";; |
954 |
- *:x86) myarch="ia32";; |
955 |
- *) myarch="${ABI}";; |
956 |
- esac |
957 |
- |
958 |
- GYP_DEFINES="linux_use_gold_flags=0 |
959 |
- linux_use_bundled_binutils=0 |
960 |
- linux_use_bundled_gold=0" \ |
961 |
- "${EPYTHON}" configure.py \ |
962 |
- --prefix="${EPREFIX}"/usr \ |
963 |
- --dest-cpu=${myarch} \ |
964 |
- $(use_with systemtap dtrace) \ |
965 |
- "${myconf[@]}" || die |
966 |
-} |
967 |
- |
968 |
-src_compile() { |
969 |
- emake -C out |
970 |
-} |
971 |
- |
972 |
-src_install() { |
973 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
974 |
- default |
975 |
- |
976 |
- pax-mark -m "${ED}"/usr/bin/node |
977 |
- |
978 |
- # set up a symlink structure that node-gyp expects.. |
979 |
- dodir /usr/include/node/deps/{v8,uv} |
980 |
- dosym . /usr/include/node/src |
981 |
- for var in deps/{uv,v8}/include; do |
982 |
- dosym ../.. /usr/include/node/${var} |
983 |
- done |
984 |
- |
985 |
- if use doc; then |
986 |
- docinto html |
987 |
- dodoc -r "${S}"/doc/* |
988 |
- fi |
989 |
- |
990 |
- if use npm; then |
991 |
- keepdir /etc/npm |
992 |
- echo "NPM_CONFIG_GLOBALCONFIG=${EPREFIX}/etc/npm/npmrc" > "${T}"/50npm |
993 |
- doenvd "${T}"/50npm |
994 |
- |
995 |
- # Install bash completion for `npm` |
996 |
- local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
997 |
- "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
998 |
- newbashcomp "${tmp_npm_completion_file}" npm |
999 |
- |
1000 |
- # Move man pages |
1001 |
- doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
1002 |
- |
1003 |
- # Clean up |
1004 |
- rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} |
1005 |
- rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} |
1006 |
- |
1007 |
- local find_exp="-or -name" |
1008 |
- local find_name=() |
1009 |
- for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
1010 |
- ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
1011 |
- "*.md" "*.markdown" "*.bat" "*.cmd"; do |
1012 |
- find_name+=( ${find_exp} "${match}" ) |
1013 |
- done |
1014 |
- |
1015 |
- # Remove various development and/or inappropriate files and |
1016 |
- # useless docs of dependend packages. |
1017 |
- find "${LIBDIR}"/node_modules \ |
1018 |
- \( -type d -name examples \) -or \( -type f \( \ |
1019 |
- -iname "LICEN?E*" \ |
1020 |
- "${find_name[@]}" \ |
1021 |
- \) \) -exec rm -rf "{}" \; |
1022 |
- fi |
1023 |
- |
1024 |
- mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
1025 |
-} |
1026 |
- |
1027 |
-src_test() { |
1028 |
- if has usersandbox ${FEATURES}; then |
1029 |
- rm -f "${S}"/test/parallel/test-fs-mkdir.js |
1030 |
- ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \ |
1031 |
- "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'." |
1032 |
- fi |
1033 |
- |
1034 |
- out/${BUILDTYPE}/cctest || die |
1035 |
- "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die |
1036 |
-} |
1037 |
- |
1038 |
-pkg_postinst() { |
1039 |
- if use npm; then |
1040 |
- ewarn "remember to run: source /etc/profile if you plan to use nodejs" |
1041 |
- ewarn " in your current shell" |
1042 |
- fi |
1043 |
-} |