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