1 |
commit: 810ab65e484aab1bbbbe60e6163f7d81767bec08 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 1 08:19:10 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 1 08:19:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=810ab65e |
7 |
|
8 |
net-libs/nodejs: Version 11.15.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.66, Repoman-2.3.12 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-libs/nodejs/Manifest | 1 + |
14 |
net-libs/nodejs/nodejs-11.15.0.ebuild | 207 ++++++++++++++++++++++++++++++++++ |
15 |
profiles/package.mask | 1 + |
16 |
3 files changed, 209 insertions(+) |
17 |
|
18 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
19 |
index eb0ccd7989e..634f66e662d 100644 |
20 |
--- a/net-libs/nodejs/Manifest |
21 |
+++ b/net-libs/nodejs/Manifest |
22 |
@@ -2,6 +2,7 @@ DIST node-v0.12.18.tar.gz 19842591 BLAKE2B f94f4de6e2875267be194580c645087a262b9 |
23 |
DIST node-v10.15.3.tar.xz 20262632 BLAKE2B d65d4e274fa829be5cda1970b0ebe7081e8476334cb825e5727324c3202bc015f4ba39589608284d0f8c0b722079c06d1587de5299a3c81ccb7b0eacbdaccf84 SHA512 cf741f733af7a7e1fbd37b0f98110078494b4771dbdfccacfda95a5ea4cda6cdcea4f8d31dddcf27477213614e4ab6cf7d1a1f900cb92936333730737ac4f9e8 |
24 |
DIST node-v11.13.0.tar.xz 22085284 BLAKE2B e771c6109b4ca60b3037ec6a4f8138af75b505f35584a239f30d2a349d6de68db2f2183b89a7d5a4bbe2aef1e29fbbea54bc93697362f56c12e2e0b54fcadcd3 SHA512 89411c9b9cbf1df09cbf2b5e3a910d7ef2e4046a27a5af858c53a20f51b9ab2f9aad4e4c7c41936520e1feed249118fc46e4e4458e7980a878f364082c24fd35 |
25 |
DIST node-v11.14.0.tar.xz 22106812 BLAKE2B 3a8dd9feb5916f235bf69d0610e32c1861e64f427b6de5ec27b3634268f273826f271cf5ea821042420d3b3f348124be2ce2fda13d0addea092db1338c9f95f7 SHA512 4e8033ea0f326fe5a8372c81771cd58242881ac7db905f697ce79ef9cb3ba2dfe2b94fb24a36775761c72ac531096c5e18a8574f933d76c1b652b18419b25446 |
26 |
+DIST node-v11.15.0.tar.xz 22115480 BLAKE2B ed1f621e46d24051f8d84255875e7cb2c1bc0f9432a12fcc35dc5e336a71bb3e7f511146d112d1f236f9f978a68987d80331c22699479ce63b7bf30e50643219 SHA512 48270620fab3eef86c21387b316ce9054e2b0aac60a36f7fc08d18ad4a11c8d2082886ca20a455fb4a74a561d7e97c77403227ec9a83a13c47fa230b47a5af2e |
27 |
DIST node-v12.0.0.tar.xz 22387124 BLAKE2B 7d596a5e7597c358c6b81b7ac1efaf27c2c3202a107c2ea76e55f6d2acced6e1271fe1ceb090df3c2377c73f501c11330f73f60f2f06c3459d7d9f19e9ab11ed SHA512 ca2f40c05e963ec54a8fffac2da1bf61c6f4026c96a4ce688e72d36932d750ecf9ca83c33d5688e565ee7609afc49ea385b4396f2082ff885226d307689299ae |
28 |
DIST node-v12.1.0.tar.xz 22463256 BLAKE2B ed66ac34acb3e27974f1da192776223104862d00410bc3f77ddafa49fd3e5a1a9921acf472990a8cc953522f2953135ad1af80ac9c83f8d796dce343a086d419 SHA512 bef5b8f85f772fbce474991952cd36cb83f8bfb9cf59d34e0bc4b0b60fb1a5b8547eaaca8c796e865ad6b7e54dc76e0fbb2c0d692ab35c1cb7d3fd4d39add4e5 |
29 |
DIST node-v4.9.1.tar.xz 13250164 BLAKE2B 7a689b99bb4bf507f7f21dd2c096a5766d023a8174c0f468cab37365af1920b8700da04157e1a406917790524255ef32c243a74662fd50ef7d3567d189dac9cf SHA512 690c9fdf608e5194069a10955bdd94ec87cb1c308f13bc4d2cae92fa01436ace10fadf58f2e51d477dde6c570b23edc1c71fafea79bfc9cab2903eb2fa5f87aa |
30 |
|
31 |
diff --git a/net-libs/nodejs/nodejs-11.15.0.ebuild b/net-libs/nodejs/nodejs-11.15.0.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..5e6377a7e55 |
34 |
--- /dev/null |
35 |
+++ b/net-libs/nodejs/nodejs-11.15.0.ebuild |
36 |
@@ -0,0 +1,207 @@ |
37 |
+# Copyright 1999-2019 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+PYTHON_COMPAT=( python2_7 ) |
42 |
+PYTHON_REQ_USE="threads" |
43 |
+inherit bash-completion-r1 flag-o-matic pax-utils python-single-r1 toolchain-funcs |
44 |
+ |
45 |
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
46 |
+HOMEPAGE="https://nodejs.org/" |
47 |
+SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
48 |
+ |
49 |
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
52 |
+IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" |
53 |
+REQUIRED_USE=" |
54 |
+ ${PYTHON_REQUIRED_USE} |
55 |
+ inspector? ( icu ssl ) |
56 |
+ npm? ( ssl ) |
57 |
+" |
58 |
+ |
59 |
+RDEPEND=" |
60 |
+ >=dev-libs/libuv-1.27.0:= |
61 |
+ >=net-dns/c-ares-1.15.0 |
62 |
+ >=net-libs/http-parser-2.8.0:= |
63 |
+ >=net-libs/nghttp2-1.37.0 |
64 |
+ sys-libs/zlib |
65 |
+ icu? ( >=dev-libs/icu-63.1:= ) |
66 |
+ ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
67 |
+" |
68 |
+DEPEND=" |
69 |
+ ${RDEPEND} |
70 |
+ ${PYTHON_DEPS} |
71 |
+ systemtap? ( dev-util/systemtap ) |
72 |
+ test? ( net-misc/curl ) |
73 |
+" |
74 |
+PATCHES=( |
75 |
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
76 |
+ "${FILESDIR}"/${PN}-99999999-llhttp.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=( |
132 |
+ --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 |
133 |
+ --shared-zlib |
134 |
+ ) |
135 |
+ use debug && myconf+=( --debug ) |
136 |
+ use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
137 |
+ use inspector || myconf+=( --without-inspector ) |
138 |
+ use npm || myconf+=( --without-npm ) |
139 |
+ use snapshot && myconf+=( --with-snapshot ) |
140 |
+ use ssl && myconf+=( --shared-openssl ) || myconf+=( --without-ssl ) |
141 |
+ |
142 |
+ local myarch="" |
143 |
+ case ${ABI} in |
144 |
+ amd64) myarch="x64";; |
145 |
+ arm) myarch="arm";; |
146 |
+ arm64) myarch="arm64";; |
147 |
+ ppc64) myarch="ppc64";; |
148 |
+ x32) myarch="x32";; |
149 |
+ x86) myarch="ia32";; |
150 |
+ *) myarch="${ABI}";; |
151 |
+ esac |
152 |
+ |
153 |
+ GYP_DEFINES="linux_use_gold_flags=0 |
154 |
+ linux_use_bundled_binutils=0 |
155 |
+ linux_use_bundled_gold=0" \ |
156 |
+ "${PYTHON}" configure \ |
157 |
+ --prefix="${EPREFIX}"/usr \ |
158 |
+ --dest-cpu=${myarch} \ |
159 |
+ $(use_with systemtap dtrace) \ |
160 |
+ "${myconf[@]}" || die |
161 |
+} |
162 |
+ |
163 |
+src_compile() { |
164 |
+ emake -C out mksnapshot |
165 |
+ pax-mark m "out/${BUILDTYPE}/mksnapshot" |
166 |
+ emake -C out |
167 |
+} |
168 |
+ |
169 |
+src_install() { |
170 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
171 |
+ default |
172 |
+ pax-mark -m "${ED}"usr/bin/node |
173 |
+ |
174 |
+ # set up a symlink structure that node-gyp expects.. |
175 |
+ dodir /usr/include/node/deps/{v8,uv} |
176 |
+ dosym . /usr/include/node/src |
177 |
+ for var in deps/{uv,v8}/include; do |
178 |
+ dosym ../.. /usr/include/node/${var} |
179 |
+ done |
180 |
+ |
181 |
+ if use doc; then |
182 |
+ # Patch docs to make them offline readable |
183 |
+ for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do |
184 |
+ sed -i '/fonts.googleapis.com/ d' $i; |
185 |
+ done |
186 |
+ # Install docs |
187 |
+ docinto html |
188 |
+ dodoc -r "${S}"/doc/* |
189 |
+ fi |
190 |
+ |
191 |
+ if use npm; then |
192 |
+ dodir /etc/npm |
193 |
+ |
194 |
+ # Install bash completion for `npm` |
195 |
+ # We need to temporarily replace default config path since |
196 |
+ # npm otherwise tries to write outside of the sandbox |
197 |
+ local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
198 |
+ sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
199 |
+ local tmp_npm_completion_file="$(emktemp)" |
200 |
+ "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
201 |
+ newbashcomp "${tmp_npm_completion_file}" npm |
202 |
+ sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
203 |
+ |
204 |
+ # Move man pages |
205 |
+ doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
206 |
+ |
207 |
+ # Clean up |
208 |
+ rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
209 |
+ rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
210 |
+ |
211 |
+ local find_exp="-or -name" |
212 |
+ local find_name=() |
213 |
+ for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
214 |
+ ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
215 |
+ "*.md" "*.markdown" "*.bat" "*.cmd"; do |
216 |
+ find_name+=( ${find_exp} "${match}" ) |
217 |
+ done |
218 |
+ |
219 |
+ # Remove various development and/or inappropriate files and |
220 |
+ # useless docs of dependend packages. |
221 |
+ find "${LIBDIR}"/node_modules \ |
222 |
+ \( -type d -name examples \) -or \( -type f \( \ |
223 |
+ -iname "LICEN?E*" \ |
224 |
+ "${find_name[@]}" \ |
225 |
+ \) \) -exec rm -rf "{}" \; |
226 |
+ fi |
227 |
+ |
228 |
+ mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
229 |
+} |
230 |
+ |
231 |
+src_test() { |
232 |
+ out/${BUILDTYPE}/cctest || die |
233 |
+ "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
234 |
+} |
235 |
+ |
236 |
+pkg_postinst() { |
237 |
+ elog "The global npm config lives in /etc/npm. This deviates slightly" |
238 |
+ elog "from upstream which otherwise would have it live in /usr/etc/." |
239 |
+ elog "" |
240 |
+ elog "Protip: When using node-gyp to install native modules, you can" |
241 |
+ elog "avoid having to download extras by doing the following:" |
242 |
+ elog "$ node-gyp --nodedir /usr/include/node <command>" |
243 |
+} |
244 |
|
245 |
diff --git a/profiles/package.mask b/profiles/package.mask |
246 |
index c95fea28a86..4144ea67aa4 100644 |
247 |
--- a/profiles/package.mask |
248 |
+++ b/profiles/package.mask |
249 |
@@ -193,6 +193,7 @@ mail-filter/zdkimfilter |
250 |
# Jeroen Roovers <jer@g.o> (24 Apr 2019) |
251 |
# Depends on =dev-libs/openssl-1.1.1* due to newly introduced |
252 |
# support for EVP_PKEY_ED25519 and EVP_PKEY_ED448 (bug #670574). |
253 |
+=net-libs/nodejs-11.15.0 |
254 |
=net-libs/nodejs-12* |
255 |
|
256 |
# David Seifert <soap@g.o> (21 Apr 2019) |