1 |
commit: 5942bed822227a8522f002d7ce8555431d3f6336 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 29 14:08:40 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 29 14:09:12 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5942bed8 |
7 |
|
8 |
net-libs/nodejs: Version 10.16.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.67, Repoman-2.3.13 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-libs/nodejs/Manifest | 1 + |
14 |
net-libs/nodejs/nodejs-10.16.0.ebuild | 205 ++++++++++++++++++++++++++++++++++ |
15 |
profiles/package.mask | 1 + |
16 |
3 files changed, 207 insertions(+) |
17 |
|
18 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
19 |
index fa5a663689f..7eaf335aa89 100644 |
20 |
--- a/net-libs/nodejs/Manifest |
21 |
+++ b/net-libs/nodejs/Manifest |
22 |
@@ -1,5 +1,6 @@ |
23 |
DIST node-v0.12.18.tar.gz 19842591 BLAKE2B f94f4de6e2875267be194580c645087a262b90da99f10d651a22838c041da07056df81204bb04ce8da083a080062509dcca4d1e3ac2250d651ead8a4cc025028 SHA512 6866608a43eb213f3b715ea0fcc28983fd959ab679c567a1b464f62acd936506f2bce88ea48a60209d8ef8d98259f4b47cd3434893eb4ff82a132775edb37b7b |
24 |
DIST node-v10.15.3.tar.xz 20262632 BLAKE2B d65d4e274fa829be5cda1970b0ebe7081e8476334cb825e5727324c3202bc015f4ba39589608284d0f8c0b722079c06d1587de5299a3c81ccb7b0eacbdaccf84 SHA512 cf741f733af7a7e1fbd37b0f98110078494b4771dbdfccacfda95a5ea4cda6cdcea4f8d31dddcf27477213614e4ab6cf7d1a1f900cb92936333730737ac4f9e8 |
25 |
+DIST node-v10.16.0.tar.xz 21480088 BLAKE2B de91e718893aa0bb87b75225a484281370ca1054fed919d6177911ca8e57228a0925c077a02397efd05594f72438d47b264d6f4b91623173e3a577a58a5d86db SHA512 df197c7b929fe1e0acf0334dbeb45be4c0cfa3266f9ddb513eafffcd6405bc02cba2fcbd34a7a5bef2e45a1d61ef3734ca0afe7295904ed563744fe06751cc62 |
26 |
DIST node-v11.14.0.tar.xz 22106812 BLAKE2B 3a8dd9feb5916f235bf69d0610e32c1861e64f427b6de5ec27b3634268f273826f271cf5ea821042420d3b3f348124be2ce2fda13d0addea092db1338c9f95f7 SHA512 4e8033ea0f326fe5a8372c81771cd58242881ac7db905f697ce79ef9cb3ba2dfe2b94fb24a36775761c72ac531096c5e18a8574f933d76c1b652b18419b25446 |
27 |
DIST node-v11.15.0.tar.xz 22115480 BLAKE2B ed1f621e46d24051f8d84255875e7cb2c1bc0f9432a12fcc35dc5e336a71bb3e7f511146d112d1f236f9f978a68987d80331c22699479ce63b7bf30e50643219 SHA512 48270620fab3eef86c21387b316ce9054e2b0aac60a36f7fc08d18ad4a11c8d2082886ca20a455fb4a74a561d7e97c77403227ec9a83a13c47fa230b47a5af2e |
28 |
DIST node-v12.3.0.tar.xz 22448392 BLAKE2B 8c6e40d9bcfee315b6bb5f97846db27ebeae2520fcde5ede942af2f24032101c06653dded9d4fa77992fcdaf5b0f67452e5e3cbb032bd33cde4dc496a652c283 SHA512 4b97524781efb8c284337b36d1b02576aa6703aa37d0775329eff735f38bcb5391364bd420914fa75088b97e72fe087e263a41fb2367fc8e8f7f63ebf4a949e6 |
29 |
|
30 |
diff --git a/net-libs/nodejs/nodejs-10.16.0.ebuild b/net-libs/nodejs/nodejs-10.16.0.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..c55a7a4b975 |
33 |
--- /dev/null |
34 |
+++ b/net-libs/nodejs/nodejs-10.16.0.ebuild |
35 |
@@ -0,0 +1,205 @@ |
36 |
+# Copyright 1999-2019 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=6 |
40 |
+ |
41 |
+PYTHON_COMPAT=( python2_7 ) |
42 |
+PYTHON_REQ_USE="threads" |
43 |
+ |
44 |
+inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs |
45 |
+ |
46 |
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
47 |
+HOMEPAGE="https://nodejs.org/" |
48 |
+SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
49 |
+ |
50 |
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
51 |
+SLOT="0" |
52 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
53 |
+IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" |
54 |
+REQUIRED_USE=" |
55 |
+ ${PYTHON_REQUIRED_USE} |
56 |
+ inspector? ( icu ssl ) |
57 |
+ npm? ( ssl ) |
58 |
+" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ >=dev-libs/libuv-1.28.0:= |
62 |
+ >=net-dns/c-ares-1.15.0 |
63 |
+ >=net-libs/http-parser-2.9.0:= |
64 |
+ >=net-libs/nghttp2-1.34.0 |
65 |
+ sys-libs/zlib |
66 |
+ icu? ( >=dev-libs/icu-64.2:= ) |
67 |
+ ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
68 |
+" |
69 |
+DEPEND=" |
70 |
+ ${RDEPEND} |
71 |
+ ${PYTHON_DEPS} |
72 |
+ systemtap? ( dev-util/systemtap ) |
73 |
+ test? ( net-misc/curl ) |
74 |
+" |
75 |
+PATCHES=( |
76 |
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
77 |
+) |
78 |
+S="${WORKDIR}/node-v${PV}" |
79 |
+ |
80 |
+pkg_pretend() { |
81 |
+ (use x86 && ! use cpu_flags_x86_sse2) && \ |
82 |
+ die "Your CPU doesn't support the required SSE2 instruction." |
83 |
+ |
84 |
+ ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
85 |
+ die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
86 |
+} |
87 |
+ |
88 |
+src_prepare() { |
89 |
+ tc-export CC CXX PKG_CONFIG |
90 |
+ export V=1 |
91 |
+ export BUILDTYPE=Release |
92 |
+ |
93 |
+ # fix compilation on Darwin |
94 |
+ # https://code.google.com/p/gyp/issues/detail?id=260 |
95 |
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
96 |
+ |
97 |
+ # make sure we use python2.* while using gyp |
98 |
+ sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
99 |
+ sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die |
100 |
+ |
101 |
+ # less verbose install output (stating the same as portage, basically) |
102 |
+ sed -i -e "/print/d" tools/install.py || die |
103 |
+ |
104 |
+ # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
105 |
+ local LIBDIR=$(get_libdir) |
106 |
+ sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
107 |
+ sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
108 |
+ |
109 |
+ # Avoid writing a depfile, not useful |
110 |
+ sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
111 |
+ |
112 |
+ sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die |
113 |
+ |
114 |
+ # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
115 |
+ # seem sandbox related either (invoking it from a sandbox works fine). |
116 |
+ # The issue is that no stdin handle is openened when asked for one. |
117 |
+ # It doesn't really belong upstream , so it'll just be removed until someone |
118 |
+ # with more gentoo-knowledge than me (jbergstroem) figures it out. |
119 |
+ rm test/parallel/test-stdout-close-unref.js || die |
120 |
+ |
121 |
+ # debug builds. change install path, remove optimisations and override buildtype |
122 |
+ if use debug; then |
123 |
+ sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
124 |
+ BUILDTYPE=Debug |
125 |
+ fi |
126 |
+ |
127 |
+ default |
128 |
+} |
129 |
+ |
130 |
+src_configure() { |
131 |
+ local myconf=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib ) |
132 |
+ use debug && myconf+=( --debug ) |
133 |
+ use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
134 |
+ use inspector || myconf+=( --without-inspector ) |
135 |
+ use npm || myconf+=( --without-npm ) |
136 |
+ use snapshot && myconf+=( --with-snapshot ) |
137 |
+ use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl ) |
138 |
+ |
139 |
+ local myarch="" |
140 |
+ case ${ABI} in |
141 |
+ amd64) myarch="x64";; |
142 |
+ arm) myarch="arm";; |
143 |
+ arm64) myarch="arm64";; |
144 |
+ ppc64) myarch="ppc64";; |
145 |
+ x32) myarch="x32";; |
146 |
+ x86) myarch="ia32";; |
147 |
+ *) myarch="${ABI}";; |
148 |
+ esac |
149 |
+ |
150 |
+ GYP_DEFINES="linux_use_gold_flags=0 |
151 |
+ linux_use_bundled_binutils=0 |
152 |
+ linux_use_bundled_gold=0" \ |
153 |
+ "${PYTHON}" configure \ |
154 |
+ --prefix="${EPREFIX}"/usr \ |
155 |
+ --dest-cpu=${myarch} \ |
156 |
+ $(use_with systemtap dtrace) \ |
157 |
+ "${myconf[@]}" || die |
158 |
+} |
159 |
+ |
160 |
+src_compile() { |
161 |
+ emake -C out mksnapshot |
162 |
+ pax-mark m "out/${BUILDTYPE}/mksnapshot" |
163 |
+ emake -C out |
164 |
+} |
165 |
+ |
166 |
+src_install() { |
167 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
168 |
+ emake install DESTDIR="${D}" |
169 |
+ pax-mark -m "${ED}"usr/bin/node |
170 |
+ |
171 |
+ # set up a symlink structure that node-gyp expects.. |
172 |
+ dodir /usr/include/node/deps/{v8,uv} |
173 |
+ dosym . /usr/include/node/src |
174 |
+ for var in deps/{uv,v8}/include; do |
175 |
+ dosym ../.. /usr/include/node/${var} |
176 |
+ done |
177 |
+ |
178 |
+ if use doc; then |
179 |
+ # Patch docs to make them offline readable |
180 |
+ for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do |
181 |
+ sed -i '/fonts.googleapis.com/ d' $i; |
182 |
+ done |
183 |
+ # Install docs |
184 |
+ docinto html |
185 |
+ dodoc -r "${S}"/doc/* |
186 |
+ fi |
187 |
+ |
188 |
+ if use npm; then |
189 |
+ dodir /etc/npm |
190 |
+ |
191 |
+ # Install bash completion for `npm` |
192 |
+ # We need to temporarily replace default config path since |
193 |
+ # npm otherwise tries to write outside of the sandbox |
194 |
+ local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
195 |
+ sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
196 |
+ local tmp_npm_completion_file="$(emktemp)" |
197 |
+ "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
198 |
+ newbashcomp "${tmp_npm_completion_file}" npm |
199 |
+ sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
200 |
+ |
201 |
+ # Move man pages |
202 |
+ doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
203 |
+ |
204 |
+ # Clean up |
205 |
+ rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
206 |
+ rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
207 |
+ |
208 |
+ local find_exp="-or -name" |
209 |
+ local find_name=() |
210 |
+ for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
211 |
+ ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
212 |
+ "*.md" "*.markdown" "*.bat" "*.cmd"; do |
213 |
+ find_name+=( ${find_exp} "${match}" ) |
214 |
+ done |
215 |
+ |
216 |
+ # Remove various development and/or inappropriate files and |
217 |
+ # useless docs of dependend packages. |
218 |
+ find "${LIBDIR}"/node_modules \ |
219 |
+ \( -type d -name examples \) -or \( -type f \( \ |
220 |
+ -iname "LICEN?E*" \ |
221 |
+ "${find_name[@]}" \ |
222 |
+ \) \) -exec rm -rf "{}" \; |
223 |
+ fi |
224 |
+ |
225 |
+ mv "${D}"/usr/share/doc/node "${D}"/usr/share/doc/${PF} || die |
226 |
+} |
227 |
+ |
228 |
+src_test() { |
229 |
+ out/${BUILDTYPE}/cctest || die |
230 |
+ "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
231 |
+} |
232 |
+ |
233 |
+pkg_postinst() { |
234 |
+ einfo "The global npm config lives in /etc/npm. This deviates slightly" |
235 |
+ einfo "from upstream which otherwise would have it live in /usr/etc/." |
236 |
+ einfo "" |
237 |
+ einfo "Protip: When using node-gyp to install native modules, you can" |
238 |
+ einfo "avoid having to download extras by doing the following:" |
239 |
+ einfo "$ node-gyp --nodedir /usr/include/node <command>" |
240 |
+} |
241 |
|
242 |
diff --git a/profiles/package.mask b/profiles/package.mask |
243 |
index 476091c6f18..2fdf65f17bf 100644 |
244 |
--- a/profiles/package.mask |
245 |
+++ b/profiles/package.mask |
246 |
@@ -323,6 +323,7 @@ mail-filter/mimedefang |
247 |
# Jeroen Roovers <jer@g.o> (24 Apr 2019) |
248 |
# Depends on =dev-libs/openssl-1.1.1* due to newly introduced |
249 |
# support for EVP_PKEY_ED25519 and EVP_PKEY_ED448 (bug #670574). |
250 |
+=net-libs/nodejs-10.16.0 |
251 |
=net-libs/nodejs-11.15.0 |
252 |
=net-libs/nodejs-12* |