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