1 |
commit: 09bb6e5a78dcc24648accd1f60c8ff8e66c827b3 |
2 |
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Jun 26 18:12:33 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 26 22:59:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09bb6e5a |
7 |
|
8 |
net-libs/nodejs: bump to 10.21.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/729096 |
11 |
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com> |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
net-libs/nodejs/Manifest | 1 + |
15 |
net-libs/nodejs/nodejs-10.21.0.ebuild | 205 ++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 206 insertions(+) |
17 |
|
18 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
19 |
index 8d981ed4a3d..b03065d8cac 100644 |
20 |
--- a/net-libs/nodejs/Manifest |
21 |
+++ b/net-libs/nodejs/Manifest |
22 |
@@ -1,5 +1,6 @@ |
23 |
DIST node-v10.19.0.tar.xz 21906168 BLAKE2B 395504ef3befa47d8b967114e019e6a76c799871e7eb21e2c6c0453655ffa07f17f42209daddeb5417342cfbad71ba1a35ae15a2d210b692bc60be270c2fc415 SHA512 512efc58415ed789938c434af131d76bdd51772cac9f7e380afaa79d83cc9c433a979068fc7272adba6ba6551d195267978e1fc819236926b0d1fd6cf91c5eee |
24 |
DIST node-v10.20.1.tar.xz 21947588 BLAKE2B 6078e29a125fc1020de7b62c97174d82273af5f6def1dbd2be7968227400735d62f8427811cced69f6365f3232d8800cad388853c34dc6620dfbbc5a27d7f716 SHA512 be2f87e1089be37caa87f5c109121f3f054ffc5a66c4d468f631fa718e461425fbb2dc397459e252eb66c11a06b60659a449dcdcd9d44506732f3703660b597b |
25 |
+DIST node-v10.21.0.tar.xz 21953796 BLAKE2B 6bdbeafb0f4ceb5c02df96ea74e8796680706756d3cadf48b813c46bdf91e3e1d5c49616ff827f01c17ed3bce1af303a5f7219c1995adb482b11203091d614f4 SHA512 613d3c1bca79ea5f127dc6793de2b5cfdfa056c01ec092e3b7ee79205894b21ca5ec4a367265122641dd1d360c675cfb36a4f7892894194ddd18abd1b2206544 |
26 |
DIST node-v12.16.1.tar.xz 23481768 BLAKE2B 29371b952c14907778c064269108f1da5e3818c32773e73090c61edcd07190c418189db6a505987ca71f99bb868880e297de5d2181b9a880774eaaf515985f26 SHA512 fe1e9fabb6fe52e3bc4275b33e6c5e4a761550b04964c0ae7dbef7172f5d415207bb2985751d068e357ce45a0ba414b07c0abd1531ef839b9463e98eeae8f9a4 |
27 |
DIST node-v12.16.2.tar.xz 23654020 BLAKE2B aa4bb764a8731e32ce07d03d96d573632bbf9af79b127c2acec48fcf335c01ea0ea99532670a46befac42e2e1ce5a4dbd2e4cf0d068bac05749d87af59bb80fa SHA512 81688468bc6e20d83f7f58f0c15f9291a801eb2acc8ba7279e65d81f3eb4ea95e3b6cee0d09738c0d0fa35226ae3d52f2bad5da63a20a3edc9129197d42d000d |
28 |
DIST node-v12.16.3.tar.xz 23682432 BLAKE2B 91b97c0de9c76f33d080f3f12a42a15140be6e3f4d42022a55305dc2afc04de6a2b8364b9fc5df0dd71c9ec249eb9e4da8ff23f53be43a1f306d2a6fbc6d6bce SHA512 e5d2d1960972f19ef5acc667efb702d534eb436212dea9e0bfd817328c927b55734406f232b32bba366f05c2691e5085e3a6f8c1e2d959398745e60719e731b3 |
29 |
|
30 |
diff --git a/net-libs/nodejs/nodejs-10.21.0.ebuild b/net-libs/nodejs/nodejs-10.21.0.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..f7ab581674c |
33 |
--- /dev/null |
34 |
+++ b/net-libs/nodejs/nodejs-10.21.0.ebuild |
35 |
@@ -0,0 +1,205 @@ |
36 |
+# Copyright 1999-2020 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+PYTHON_COMPAT=( python2_7 ) |
41 |
+PYTHON_REQ_USE="threads" |
42 |
+inherit bash-completion-r1 eutils flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
43 |
+ |
44 |
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
45 |
+HOMEPAGE="https://nodejs.org/" |
46 |
+SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
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 +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.34.2:= |
60 |
+ >=net-dns/c-ares-1.15.0 |
61 |
+ >=net-libs/http-parser-2.9.3:= |
62 |
+ >=net-libs/nghttp2-1.41.0 |
63 |
+ sys-libs/zlib |
64 |
+ icu? ( >=dev-libs/icu-64.2:= ) |
65 |
+ system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
66 |
+" |
67 |
+DEPEND=" |
68 |
+ ${RDEPEND} |
69 |
+ ${PYTHON_DEPS} |
70 |
+ systemtap? ( dev-util/systemtap ) |
71 |
+ test? ( net-misc/curl ) |
72 |
+" |
73 |
+PATCHES=( |
74 |
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
75 |
+) |
76 |
+RESTRICT="test" |
77 |
+S="${WORKDIR}/node-v${PV}" |
78 |
+ |
79 |
+pkg_pretend() { |
80 |
+ (use x86 && ! use cpu_flags_x86_sse2) && \ |
81 |
+ die "Your CPU doesn't support the required SSE2 instruction." |
82 |
+ |
83 |
+ ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
84 |
+ die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
85 |
+} |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ tc-export CC CXX PKG_CONFIG |
89 |
+ export V=1 |
90 |
+ export BUILDTYPE=Release |
91 |
+ |
92 |
+ # fix compilation on Darwin |
93 |
+ # https://code.google.com/p/gyp/issues/detail?id=260 |
94 |
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
95 |
+ |
96 |
+ # make sure we use python2.* while using gyp |
97 |
+ sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
98 |
+ sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die |
99 |
+ |
100 |
+ # less verbose install output (stating the same as portage, basically) |
101 |
+ sed -i -e "/print/d" tools/install.py || die |
102 |
+ |
103 |
+ # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
104 |
+ local LIBDIR=$(get_libdir) |
105 |
+ sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
106 |
+ sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
107 |
+ |
108 |
+ # Avoid writing a depfile, not useful |
109 |
+ sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
110 |
+ |
111 |
+ sed -i -e "/'-O3'/d" common.gypi deps/v8/gypfiles/toolchain.gypi || die |
112 |
+ |
113 |
+ # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
114 |
+ # seem sandbox related either (invoking it from a sandbox works fine). |
115 |
+ # The issue is that no stdin handle is openened when asked for one. |
116 |
+ # It doesn't really belong upstream , so it'll just be removed until someone |
117 |
+ # with more gentoo-knowledge than me (jbergstroem) figures it out. |
118 |
+ rm test/parallel/test-stdout-close-unref.js || die |
119 |
+ |
120 |
+ # debug builds. change install path, remove optimisations and override buildtype |
121 |
+ if use debug; then |
122 |
+ sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
123 |
+ BUILDTYPE=Debug |
124 |
+ fi |
125 |
+ |
126 |
+ default |
127 |
+} |
128 |
+ |
129 |
+src_configure() { |
130 |
+ xdg_environment_reset |
131 |
+ |
132 |
+ local myconf=( --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 --shared-zlib ) |
133 |
+ use debug && myconf+=( --debug ) |
134 |
+ use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
135 |
+ use inspector || myconf+=( --without-inspector ) |
136 |
+ use npm || myconf+=( --without-npm ) |
137 |
+ use snapshot && myconf+=( --with-snapshot ) |
138 |
+ if use ssl; then |
139 |
+ use system-ssl && myconf+=( --shared-openssl ) |
140 |
+ else |
141 |
+ myconf+=( --without-ssl ) |
142 |
+ fi |
143 |
+ |
144 |
+ local myarch="" |
145 |
+ case ${ABI} in |
146 |
+ amd64) myarch="x64";; |
147 |
+ arm) myarch="arm";; |
148 |
+ arm64) myarch="arm64";; |
149 |
+ ppc64) myarch="ppc64";; |
150 |
+ x32) myarch="x32";; |
151 |
+ x86) myarch="ia32";; |
152 |
+ *) myarch="${ABI}";; |
153 |
+ esac |
154 |
+ |
155 |
+ GYP_DEFINES="linux_use_gold_flags=0 |
156 |
+ linux_use_bundled_binutils=0 |
157 |
+ linux_use_bundled_gold=0" \ |
158 |
+ "${PYTHON}" configure \ |
159 |
+ --prefix="${EPREFIX}"/usr \ |
160 |
+ --dest-cpu=${myarch} \ |
161 |
+ $(use_with systemtap dtrace) \ |
162 |
+ "${myconf[@]}" || die |
163 |
+} |
164 |
+ |
165 |
+src_compile() { |
166 |
+ emake -C out mksnapshot |
167 |
+ pax-mark m "out/${BUILDTYPE}/mksnapshot" |
168 |
+ emake -C out |
169 |
+} |
170 |
+ |
171 |
+src_install() { |
172 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
173 |
+ emake install DESTDIR="${D}" |
174 |
+ pax-mark -m "${ED}"/usr/bin/node |
175 |
+ |
176 |
+ # set up a symlink structure that node-gyp expects.. |
177 |
+ dodir /usr/include/node/deps/{v8,uv} |
178 |
+ dosym . /usr/include/node/src |
179 |
+ for var in deps/{uv,v8}/include; do |
180 |
+ dosym ../.. /usr/include/node/${var} |
181 |
+ done |
182 |
+ |
183 |
+ if use doc; then |
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 |
+} |