1 |
commit: 56911e5b7b0e6a0e71a495f7768123184ac7ac3b |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 1 09:32:24 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 1 09:32:41 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56911e5b |
7 |
|
8 |
net-libs/nodejs: Version 14.5.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-libs/nodejs/Manifest | 1 + |
14 |
net-libs/nodejs/nodejs-14.5.0.ebuild | 200 +++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 201 insertions(+) |
16 |
|
17 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
18 |
index b03065d8cac..71a2fcb5219 100644 |
19 |
--- a/net-libs/nodejs/Manifest |
20 |
+++ b/net-libs/nodejs/Manifest |
21 |
@@ -8,4 +8,5 @@ DIST node-v12.17.0.tar.xz 23702040 BLAKE2B 4b35c6f7a3c16a7b737bc5b71f075fe6c66c9 |
22 |
DIST node-v14.2.0.tar.xz 32884616 BLAKE2B 7bcb07cb7623c5e08c20267c320cdf23ad110f124c5ad1f2447ef8b76ab8dc44ed50dab7c5651424d9d3a36f7eeecdf3292b07c02cb2e22c3fbe4ed633c4b842 SHA512 47e5ec0b7a207082d43419a7e0a6ea9242ec43b4d7c2217eb66d0b45e2f4d5cb561b3f6fe35fdc41a8be95c182dc122ba262f696ebd12833596d71b372ec85d2 |
23 |
DIST node-v14.3.0.tar.xz 32985344 BLAKE2B 32ee357e109484422c3b22423ab9a593cd5d4611073c820f90c196dae4df2860573cdd06170879f675b738b01885eb2fe0f25c2328841838bf9367324cc981a7 SHA512 3afcc430bad57150baa8d1c0e5ef0f64691ef6549a052be654a86313fe28f31e7fdfeea4d2b3993798a7141bc6d7b1642747d1bc2636139e2f2fd79441580148 |
24 |
DIST node-v14.4.0.tar.xz 33005312 BLAKE2B bc1462d897e24a6b842e6f8146971866c73b54ff5383d76cfc5728a73e2c135d28ced068744174b3fb5af4a6ec05ef1f115ea51c2d65517cbe18e1d733460d04 SHA512 f1a7c788a8a149b942ec2b90a4314baaa5355c381029eda45002728ce7209925c016323b0ec1e0dfe2359fddb24f494df125805d0d266b738a333dcddb3f59c3 |
25 |
+DIST node-v14.5.0.tar.xz 33141456 BLAKE2B ff268f44d0a4133a0efe091bec3cac945c656f355b19d8d577ba239aa65c07bf909d6f1b3d7db4f2f5c3c856e3125fe31f9e9e39ca7772f34f47521d5106a101 SHA512 8bcd3d72f294fff60a59815137a193b465b3a901a59fcf08a4840507e2cfc74ee165d7ae0ca6388662dc218213376f559a6c872a92062691c7413351a2ec2b5f |
26 |
DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42 |
27 |
|
28 |
diff --git a/net-libs/nodejs/nodejs-14.5.0.ebuild b/net-libs/nodejs/nodejs-14.5.0.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..e2b60aae3bb |
31 |
--- /dev/null |
32 |
+++ b/net-libs/nodejs/nodejs-14.5.0.ebuild |
33 |
@@ -0,0 +1,200 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
39 |
+PYTHON_REQ_USE="threads(+)" |
40 |
+inherit bash-completion-r1 eutils flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
41 |
+ |
42 |
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
43 |
+HOMEPAGE="https://nodejs.org/" |
44 |
+SRC_URI=" |
45 |
+ https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz |
46 |
+" |
47 |
+ |
48 |
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
51 |
+IUSE="cpu_flags_x86_sse2 debug doc +icu inspector +npm pax_kernel +snapshot +ssl +system-ssl systemtap test" |
52 |
+REQUIRED_USE=" |
53 |
+ inspector? ( icu ssl ) |
54 |
+ npm? ( ssl ) |
55 |
+ system-ssl? ( ssl ) |
56 |
+" |
57 |
+ |
58 |
+RDEPEND=" |
59 |
+ >=dev-libs/libuv-1.38.0:= |
60 |
+ >=net-dns/c-ares-1.16.0 |
61 |
+ >=net-libs/nghttp2-1.41.0 |
62 |
+ sys-libs/zlib |
63 |
+ icu? ( >=dev-libs/icu-65:= ) |
64 |
+ system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
65 |
+" |
66 |
+BDEPEND=" |
67 |
+ ${PYTHON_DEPS} |
68 |
+ systemtap? ( dev-util/systemtap ) |
69 |
+ test? ( net-misc/curl ) |
70 |
+ pax_kernel? ( sys-apps/elfix ) |
71 |
+" |
72 |
+DEPEND=" |
73 |
+ ${RDEPEND} |
74 |
+" |
75 |
+PATCHES=( |
76 |
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
77 |
+) |
78 |
+RESTRICT="test" |
79 |
+S="${WORKDIR}/node-v${PV}" |
80 |
+ |
81 |
+pkg_pretend() { |
82 |
+ (use x86 && ! use cpu_flags_x86_sse2) && \ |
83 |
+ die "Your CPU doesn't support the required SSE2 instruction." |
84 |
+ |
85 |
+ ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
86 |
+ die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
87 |
+} |
88 |
+ |
89 |
+src_prepare() { |
90 |
+ tc-export AR CC CXX PKG_CONFIG |
91 |
+ export V=1 |
92 |
+ export BUILDTYPE=Release |
93 |
+ |
94 |
+ # fix compilation on Darwin |
95 |
+ # https://code.google.com/p/gyp/issues/detail?id=260 |
96 |
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
97 |
+ |
98 |
+ # less verbose install output (stating the same as portage, basically) |
99 |
+ sed -i -e "/print/d" tools/install.py || die |
100 |
+ |
101 |
+ # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
102 |
+ local LIBDIR=$(get_libdir) |
103 |
+ sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
104 |
+ sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
105 |
+ |
106 |
+ # Avoid writing a depfile, not useful |
107 |
+ sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
108 |
+ |
109 |
+ sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
110 |
+ |
111 |
+ # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
112 |
+ # seem sandbox related either (invoking it from a sandbox works fine). |
113 |
+ # The issue is that no stdin handle is openened when asked for one. |
114 |
+ # It doesn't really belong upstream , so it'll just be removed until someone |
115 |
+ # with more gentoo-knowledge than me (jbergstroem) figures it out. |
116 |
+ rm test/parallel/test-stdout-close-unref.js || die |
117 |
+ |
118 |
+ # debug builds. change install path, remove optimisations and override buildtype |
119 |
+ if use debug; then |
120 |
+ sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
121 |
+ BUILDTYPE=Debug |
122 |
+ fi |
123 |
+ |
124 |
+ # We need to disable mprotect on two files when it builds Bug 694100. |
125 |
+ use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) |
126 |
+ |
127 |
+ default |
128 |
+} |
129 |
+ |
130 |
+src_configure() { |
131 |
+ xdg_environment_reset |
132 |
+ |
133 |
+ local myconf=( |
134 |
+ --shared-cares --shared-libuv --shared-nghttp2 --shared-zlib |
135 |
+ ) |
136 |
+ use debug && myconf+=( --debug ) |
137 |
+ use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
138 |
+ use inspector || myconf+=( --without-inspector ) |
139 |
+ use npm || myconf+=( --without-npm ) |
140 |
+ use snapshot || myconf+=( --without-node-snapshot ) |
141 |
+ if use ssl; then |
142 |
+ use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
143 |
+ else |
144 |
+ myconf+=( --without-ssl ) |
145 |
+ fi |
146 |
+ |
147 |
+ local myarch="" |
148 |
+ case ${ABI} in |
149 |
+ amd64) myarch="x64";; |
150 |
+ arm) myarch="arm";; |
151 |
+ arm64) myarch="arm64";; |
152 |
+ ppc64) myarch="ppc64";; |
153 |
+ x32) myarch="x32";; |
154 |
+ x86) myarch="ia32";; |
155 |
+ *) myarch="${ABI}";; |
156 |
+ esac |
157 |
+ |
158 |
+ GYP_DEFINES="linux_use_gold_flags=0 |
159 |
+ linux_use_bundled_binutils=0 |
160 |
+ linux_use_bundled_gold=0" \ |
161 |
+ "${EPYTHON}" configure.py \ |
162 |
+ --prefix="${EPREFIX}"/usr \ |
163 |
+ --dest-cpu=${myarch} \ |
164 |
+ $(use_with systemtap dtrace) \ |
165 |
+ "${myconf[@]}" || die |
166 |
+} |
167 |
+ |
168 |
+src_compile() { |
169 |
+ emake -C out |
170 |
+} |
171 |
+ |
172 |
+src_install() { |
173 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
174 |
+ default |
175 |
+ |
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 "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
228 |
+} |
229 |
+ |
230 |
+src_test() { |
231 |
+ out/${BUILDTYPE}/cctest || die |
232 |
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
233 |
+} |