1 |
commit: 6dc1820485c0424b0f2e14d41050911f419cd46a |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 4 21:04:14 2021 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 4 22:32:58 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6dc18204 |
7 |
|
8 |
net-libs/nodejs: 14.18.0 bump |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
net-libs/nodejs/Manifest | 1 + |
13 |
net-libs/nodejs/nodejs-14.18.0.ebuild | 242 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 243 insertions(+) |
15 |
|
16 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
17 |
index 568ccd15c7f..24aea7c1961 100644 |
18 |
--- a/net-libs/nodejs/Manifest |
19 |
+++ b/net-libs/nodejs/Manifest |
20 |
@@ -2,4 +2,5 @@ DIST node-v12.22.5.tar.xz 23654908 BLAKE2B ca4f304e31f091ae656142035851d6e4427d8 |
21 |
DIST node-v12.22.6.tar.xz 23664904 BLAKE2B 04dd4fd4cbe39642a1c3dd8639a4d9e3362055f56bc2565303d0095cda1655033ba4e0ce5a969647d2be73df13ddbcccc4907825a94a41b45c0723b3c02ca980 SHA512 d107f1ff7073d2db9f0198f14b0523870e9b262c71055de2e03fba54f87bc98a57dad43d902c0b349957df21de71dc066133d4831eb7eb07f4e548d0ac724fb2 |
22 |
DIST node-v14.17.5.tar.xz 33585724 BLAKE2B cf79397caad8c81e4096f344f9fdb88d8ecea44b97fe208256dfd4afb750ecdf52142a2dc0430285b9d5117bdd43fa5ce42b4418926eec4d2c7f0a5f5d1a1539 SHA512 9d62c8946d05862d96a13a71b241a097b9f592a9e5f7362c81d8f3c74e7c5546a308b4c74bef34a66cafeef5d1a87d9d3e5ae8bb87d470c1ecf5abb8de0dedb5 |
23 |
DIST node-v14.17.6.tar.xz 33606464 BLAKE2B c2c449e5eaf8214d7ed4bfab8db0208034cee1d08ef0e1fca478c30fc5cf95be037eb141080dbcfbe4fc58ef734457747dcbd0fe585a0536f9c0bec495435f25 SHA512 581c5698112426042fbf54fa793e56a30cae0c54ce8f23af6ac20d73c69a4f1166c5410f357c5a7b0409a773f99e3b9291e4afffd53b3c0e00569725dc4c47d3 |
24 |
+DIST node-v14.18.0.tar.xz 33698388 BLAKE2B 0a26aac559f2cd44d863b5375bc26692f1abf121c368df040041c9916e56410c3c919be377f099651e9a5e27bad972705d02a20f108f527cf23044e8ba95dd78 SHA512 0603e2466bf89b57e404e2992dda25012866a347489fb811a9757aea07056fc4f346236adf44a56d52c442f5f298f4dfdfc961f8582cd194d062beeb80c60cbf |
25 |
DIST node-v16.9.1.tar.xz 34026992 BLAKE2B 8bb0d75ab91a00d5b03a31ded17a6b8845894630185d353ded616bf8435b672ea5cef06b4ca5bd01bb3536c5c50774f6ad0aa08a0fa8cbb00d8866e29561c2ab SHA512 e570c39fffa5d79c8d3fa1fe90ece53b22729af6e882416a35b54362be7169eeb3d37cf8be69ee1b748a981b1fbc725d8c85a739bc5cb0b22d6d2e313ab646ac |
26 |
|
27 |
diff --git a/net-libs/nodejs/nodejs-14.18.0.ebuild b/net-libs/nodejs/nodejs-14.18.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..745a7dace6a |
30 |
--- /dev/null |
31 |
+++ b/net-libs/nodejs/nodejs-14.18.0.ebuild |
32 |
@@ -0,0 +1,242 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{8..10} ) |
39 |
+PYTHON_REQ_USE="threads(+)" |
40 |
+ |
41 |
+inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
42 |
+ |
43 |
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
44 |
+HOMEPAGE="https://nodejs.org/" |
45 |
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
46 |
+ |
47 |
+if [[ ${PV} == *9999 ]]; then |
48 |
+ inherit git-r3 |
49 |
+ EGIT_REPO_URI="https://github.com/nodejs/node" |
50 |
+ SLOT="0" |
51 |
+else |
52 |
+ SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
53 |
+ SLOT="0/$(ver_cut 1)" |
54 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 -riscv ~x86 ~amd64-linux ~x64-macos" |
55 |
+ S="${WORKDIR}/node-v${PV}" |
56 |
+fi |
57 |
+ |
58 |
+IUSE="cpu_flags_x86_sse2 debug doc +icu inspector lto +npm pax-kernel +snapshot +ssl +system-icu +system-ssl systemtap test" |
59 |
+REQUIRED_USE="inspector? ( icu ssl ) |
60 |
+ npm? ( ssl ) |
61 |
+ system-icu? ( icu ) |
62 |
+ system-ssl? ( ssl )" |
63 |
+ |
64 |
+RESTRICT="!test? ( test )" |
65 |
+ |
66 |
+RDEPEND=">=app-arch/brotli-1.0.9:= |
67 |
+ >=dev-libs/libuv-1.40.0:= |
68 |
+ >=net-dns/c-ares-1.17.2:= |
69 |
+ >=net-libs/nghttp2-1.41.0:= |
70 |
+ sys-libs/zlib |
71 |
+ system-icu? ( >=dev-libs/icu-67:= ) |
72 |
+ system-ssl? ( |
73 |
+ >=dev-libs/openssl-1.1.1:0= |
74 |
+ <dev-libs/openssl-3.0.0_beta1:0= |
75 |
+ )" |
76 |
+BDEPEND="${PYTHON_DEPS} |
77 |
+ sys-apps/coreutils |
78 |
+ virtual/pkgconfig |
79 |
+ systemtap? ( dev-util/systemtap ) |
80 |
+ test? ( net-misc/curl ) |
81 |
+ pax-kernel? ( sys-apps/elfix )" |
82 |
+DEPEND="${RDEPEND}" |
83 |
+ |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
86 |
+ "${FILESDIR}"/${PN}-12.22.1-jinja_collections_abc.patch |
87 |
+ "${FILESDIR}"/${PN}-12.22.5-shared_c-ares_nameser_h.patch |
88 |
+ "${FILESDIR}"/${PN}-14.15.0-fix_ppc64_crashes.patch |
89 |
+) |
90 |
+ |
91 |
+pkg_pretend() { |
92 |
+ (use x86 && ! use cpu_flags_x86_sse2) && \ |
93 |
+ die "Your CPU doesn't support the required SSE2 instruction." |
94 |
+ |
95 |
+ if [[ ${MERGE_TYPE} != "binary" ]]; then |
96 |
+ if use lto; then |
97 |
+ if tc-is-gcc; then |
98 |
+ if [[ $(gcc-major-version) -ge 11 ]]; then |
99 |
+ # Bug #787158 |
100 |
+ die "LTO builds of ${PN} using gcc-11+ currently fail tests and produce runtime errors. Either switch to gcc-10 or unset USE=lto for this ebuild" |
101 |
+ fi |
102 |
+ else |
103 |
+ # configure.py will abort on this later if we do not |
104 |
+ die "${PN} only supports LTO for gcc" |
105 |
+ fi |
106 |
+ fi |
107 |
+ fi |
108 |
+} |
109 |
+ |
110 |
+src_prepare() { |
111 |
+ tc-export AR CC CXX PKG_CONFIG |
112 |
+ export V=1 |
113 |
+ export BUILDTYPE=Release |
114 |
+ |
115 |
+ # fix compilation on Darwin |
116 |
+ # https://code.google.com/p/gyp/issues/detail?id=260 |
117 |
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
118 |
+ |
119 |
+ # less verbose install output (stating the same as portage, basically) |
120 |
+ sed -i -e "/print/d" tools/install.py || die |
121 |
+ |
122 |
+ # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
123 |
+ local LIBDIR=$(get_libdir) |
124 |
+ sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
125 |
+ sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
126 |
+ |
127 |
+ # Avoid writing a depfile, not useful |
128 |
+ sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
129 |
+ |
130 |
+ sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
131 |
+ |
132 |
+ # debug builds. change install path, remove optimisations and override buildtype |
133 |
+ if use debug; then |
134 |
+ sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
135 |
+ BUILDTYPE=Debug |
136 |
+ fi |
137 |
+ |
138 |
+ # We need to disable mprotect on two files when it builds Bug 694100. |
139 |
+ use pax-kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) |
140 |
+ |
141 |
+ # All this test does is check if the npm CLI produces warnings of any sort, |
142 |
+ # failing if it does. Overkill, much? Especially given one possible warning |
143 |
+ # is that there is a newer version of npm available upstream (yes, it does |
144 |
+ # use the network if available), thus making it a real possibility for this |
145 |
+ # test to begin failing one day even though it was fine before. |
146 |
+ rm -f test/parallel/test-release-npm.js |
147 |
+ |
148 |
+ default |
149 |
+} |
150 |
+ |
151 |
+src_configure() { |
152 |
+ xdg_environment_reset |
153 |
+ |
154 |
+ # LTO compiler flags are handled by configure.py itself |
155 |
+ filter-flags '-flto*' |
156 |
+ |
157 |
+ local myconf=( |
158 |
+ --shared-brotli |
159 |
+ --shared-cares |
160 |
+ --shared-libuv |
161 |
+ --shared-nghttp2 |
162 |
+ --shared-zlib |
163 |
+ ) |
164 |
+ use debug && myconf+=( --debug ) |
165 |
+ use lto && myconf+=( --enable-lto ) |
166 |
+ if use system-icu; then |
167 |
+ myconf+=( --with-intl=system-icu ) |
168 |
+ elif use icu; then |
169 |
+ myconf+=( --with-intl=full-icu ) |
170 |
+ else |
171 |
+ myconf+=( --with-intl=none ) |
172 |
+ fi |
173 |
+ use inspector || myconf+=( --without-inspector ) |
174 |
+ use npm || myconf+=( --without-npm ) |
175 |
+ use snapshot || myconf+=( --without-node-snapshot ) |
176 |
+ if use ssl; then |
177 |
+ use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
178 |
+ else |
179 |
+ myconf+=( --without-ssl ) |
180 |
+ fi |
181 |
+ |
182 |
+ local myarch="" |
183 |
+ case ${ABI} in |
184 |
+ amd64) myarch="x64";; |
185 |
+ arm) myarch="arm";; |
186 |
+ arm64) myarch="arm64";; |
187 |
+ ppc64) myarch="ppc64";; |
188 |
+ x32) myarch="x32";; |
189 |
+ x86) myarch="ia32";; |
190 |
+ *) myarch="${ABI}";; |
191 |
+ esac |
192 |
+ |
193 |
+ GYP_DEFINES="linux_use_gold_flags=0 |
194 |
+ linux_use_bundled_binutils=0 |
195 |
+ linux_use_bundled_gold=0" \ |
196 |
+ "${EPYTHON}" configure.py \ |
197 |
+ --prefix="${EPREFIX}"/usr \ |
198 |
+ --dest-cpu=${myarch} \ |
199 |
+ $(use_with systemtap dtrace) \ |
200 |
+ "${myconf[@]}" || die |
201 |
+} |
202 |
+ |
203 |
+src_compile() { |
204 |
+ emake -C out |
205 |
+} |
206 |
+ |
207 |
+src_install() { |
208 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
209 |
+ default |
210 |
+ |
211 |
+ pax-mark -m "${ED}"/usr/bin/node |
212 |
+ |
213 |
+ # set up a symlink structure that node-gyp expects.. |
214 |
+ dodir /usr/include/node/deps/{v8,uv} |
215 |
+ dosym . /usr/include/node/src |
216 |
+ for var in deps/{uv,v8}/include; do |
217 |
+ dosym ../.. /usr/include/node/${var} |
218 |
+ done |
219 |
+ |
220 |
+ if use doc; then |
221 |
+ docinto html |
222 |
+ dodoc -r "${S}"/doc/* |
223 |
+ fi |
224 |
+ |
225 |
+ if use npm; then |
226 |
+ dodir /etc/npm |
227 |
+ |
228 |
+ # Install bash completion for `npm` |
229 |
+ # We need to temporarily replace default config path since |
230 |
+ # npm otherwise tries to write outside of the sandbox |
231 |
+ local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
232 |
+ sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
233 |
+ local tmp_npm_completion_file="$(TMPDIR="${T}" mktemp -t npm.XXXXXXXXXX)" |
234 |
+ "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
235 |
+ newbashcomp "${tmp_npm_completion_file}" npm |
236 |
+ sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
237 |
+ |
238 |
+ # Move man pages |
239 |
+ doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
240 |
+ |
241 |
+ # Clean up |
242 |
+ rm -f "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} |
243 |
+ rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} |
244 |
+ |
245 |
+ local find_exp="-or -name" |
246 |
+ local find_name=() |
247 |
+ for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
248 |
+ ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
249 |
+ "*.md" "*.markdown" "*.bat" "*.cmd"; do |
250 |
+ find_name+=( ${find_exp} "${match}" ) |
251 |
+ done |
252 |
+ |
253 |
+ # Remove various development and/or inappropriate files and |
254 |
+ # useless docs of dependend packages. |
255 |
+ find "${LIBDIR}"/node_modules \ |
256 |
+ \( -type d -name examples \) -or \( -type f \( \ |
257 |
+ -iname "LICEN?E*" \ |
258 |
+ "${find_name[@]}" \ |
259 |
+ \) \) -exec rm -rf "{}" \; |
260 |
+ fi |
261 |
+ |
262 |
+ mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
263 |
+} |
264 |
+ |
265 |
+src_test() { |
266 |
+ if has usersandbox ${FEATURES}; then |
267 |
+ rm -f "${S}"/test/parallel/test-fs-mkdir.js |
268 |
+ ewarn "You are emerging ${PN} with 'usersandbox' enabled. Excluding tests known to fail in this mode." \ |
269 |
+ "For full test coverage, emerge =${CATEGORY}/${PF} with 'FEATURES=-usersandbox'." |
270 |
+ fi |
271 |
+ |
272 |
+ out/${BUILDTYPE}/cctest || die |
273 |
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} --flaky-tests=dontcare -J message parallel sequential || die |
274 |
+} |