1 |
commit: 92a496ca1adc458e720f2eda061b70a1efc53817 |
2 |
Author: Stefan Strogin <steils <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 9 17:39:53 2020 +0000 |
4 |
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 9 17:44:04 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=92a496ca |
7 |
|
8 |
net-libs/nodejs: version bump to 13.6.0 |
9 |
|
10 |
Reported-by: Dennis Gaebler <dennis.gaebler <AT> uni-ulm.de> |
11 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
12 |
Closes: https://github.com/gentoo/libressl/pull/315 |
13 |
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org> |
14 |
|
15 |
net-libs/nodejs/Manifest | 1 + |
16 |
net-libs/nodejs/nodejs-13.6.0.ebuild | 208 +++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 209 insertions(+) |
18 |
|
19 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
20 |
index f9a5252..aa3c452 100644 |
21 |
--- a/net-libs/nodejs/Manifest |
22 |
+++ b/net-libs/nodejs/Manifest |
23 |
@@ -4,6 +4,7 @@ DIST node-v12.12.0.tar.xz 22836688 BLAKE2B 81ff202fb807c557a30eeb08a76a8e95e2fae |
24 |
DIST node-v12.13.0.tar.xz 22862096 BLAKE2B b0121f45b535bac7baa0103db538070b4beb4b40a6c871c217eebfb1abb5a7821d83d46946047b3385af182f901c0390eb85134c9201be2d03b5745b297271f8 SHA512 a7aa8b1f010ea1df122d9d7b88ee0a9d10e0d79ae2f3d18c706ac6ce36e2e2039c21ea6f3dba3a22a79ed3f6069850a8a3c463dbd64e1e8f4a9dbe8901a89cc8 |
25 |
DIST node-v13.4.0.tar.xz 32685788 BLAKE2B 4dfa1a6279ad26c0226a8bcdbf5e64c4fce686cacca805302f1a4dc113b60f96340fdb9968bdcd10db71a2c80007f5e0b94fe2cf78590aa9d62e5de61901ce81 SHA512 25da5a8561b6d811c78f23bd9bffa3789c4bca35270c350ed028ca6c72b59cf6e71997873d7fee024b6abc9cc1a000b0dc9bc6b6963128e198e36c8379bb2b8f |
26 |
DIST node-v13.5.0.tar.xz 32706024 BLAKE2B 570b2d676919cb333e2f36529e886039f7abfc4f7cd705cabbb2a1115918aa9ffc9d1e54a90e8deac09488f248c007721c090ed0500f113af81b2cda2e8248be SHA512 85bad55334e6ef63be0dbf90cef856c0a0835aa1b32e6ffc418b6a52f88f7ee266505f769f4204c000c766869cd85f7d914c9a3592dd52bcabdb6cb906f433e3 |
27 |
+DIST node-v13.6.0.tar.xz 32706824 BLAKE2B 69e66354570e057fe215830a2d5bd157e5decfd1e58e4ead4304e0dfcf64e5adfe48503f3bf54afe2cc27df581a0f2ae79e9b730257ceb70c412bd2a47fa5603 SHA512 e7dc8356ac1b167cc32055e209f13cee82c9251440b6a6cc99b26c91f9625e11bd025cfc1c22b6ece95ea178640209a7c8700d678678b3e8bad26080aa2762c6 |
28 |
DIST node-v8.12.0.tar.xz 18310452 BLAKE2B 79634fc57cd76a97e72bab4be37da91d5eff4d13cdaa2b48e83f013885fa3590ba4a28378baf036ed26b7304bf234753d1d4014f72571496f5bb6cd5b221e5f0 SHA512 665d2dba287d78bcd723d7b4d00a6897fb996f4aa69a541e010a3dfeb2614257892117fcce7123966b1ecaddc9269a6667e0e262df693baea1f476c96de55c42 |
29 |
DIST node-v8.16.2.tar.xz 18531368 BLAKE2B aec2f6257ab9237097e590b70b2e8615b664576b3af2f176260f26460f4f50bb1e00c2aff477a32cdb9ebf83f8b4eadc3ccdc2df431e359904fe4375513fb6c1 SHA512 8b0d4a089a5c80869971ceeffbef3ca03f4de4f53452a9fd16cbd189e5d76c7fdef475c144848c8d657256b41e342c020e11f6acd1880dde92ed0d0e8cf9e600 |
30 |
DIST node-v8.17.0.tar.xz 19013844 BLAKE2B 2f35f61ccc2d67132441dace8b59df6565e5df9e14e6798ab0cb0a024493182881708368248964db30e1213fa7b66301bd73b5146944129d7b14cd2b5b1a9583 SHA512 9f7b0b5695e882b4f727802ad855d398da596f908e64263902781e01f6222a4044be48c104eb76182ddb525dedfc4b28ccd07d64dfa126c462a248d9e8b49fca |
31 |
|
32 |
diff --git a/net-libs/nodejs/nodejs-13.6.0.ebuild b/net-libs/nodejs/nodejs-13.6.0.ebuild |
33 |
new file mode 100644 |
34 |
index 0000000..0ebb17d |
35 |
--- /dev/null |
36 |
+++ b/net-libs/nodejs/nodejs-13.6.0.ebuild |
37 |
@@ -0,0 +1,208 @@ |
38 |
+# Copyright 1999-2020 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+PYTHON_COMPAT=( python{2_7,3_{6,7}} ) |
43 |
+PYTHON_REQ_USE="threads(+)" |
44 |
+inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils |
45 |
+ |
46 |
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
47 |
+HOMEPAGE="https://nodejs.org/" |
48 |
+SRC_URI=" |
49 |
+ https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz |
50 |
+" |
51 |
+ |
52 |
+LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" |
53 |
+SLOT="0" |
54 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" |
55 |
+IUSE="bundled-ssl cpu_flags_x86_sse2 debug doc icu inspector libressl +npm pax_kernel +snapshot +ssl systemtap test" |
56 |
+REQUIRED_USE=" |
57 |
+ bundled-ssl? ( ssl ) |
58 |
+ inspector? ( icu ssl ) |
59 |
+ libressl? ( bundled-ssl ) |
60 |
+ npm? ( ssl ) |
61 |
+" |
62 |
+ |
63 |
+RDEPEND=" |
64 |
+ >=dev-libs/libuv-1.34.0:= |
65 |
+ >=net-dns/c-ares-1.15.0 |
66 |
+ >=net-libs/nghttp2-1.40.0 |
67 |
+ sys-libs/zlib |
68 |
+ icu? ( >=dev-libs/icu-64.2:= ) |
69 |
+ ssl? ( |
70 |
+ !bundled-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
71 |
+ ) |
72 |
+" |
73 |
+BDEPEND=" |
74 |
+ ${PYTHON_DEPS} |
75 |
+ systemtap? ( dev-util/systemtap ) |
76 |
+ test? ( net-misc/curl ) |
77 |
+ pax_kernel? ( sys-apps/elfix ) |
78 |
+" |
79 |
+DEPEND=" |
80 |
+ ${RDEPEND} |
81 |
+" |
82 |
+PATCHES=( |
83 |
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
84 |
+) |
85 |
+RESTRICT="test" |
86 |
+S="${WORKDIR}/node-v${PV}" |
87 |
+ |
88 |
+pkg_pretend() { |
89 |
+ (use x86 && ! use cpu_flags_x86_sse2) && \ |
90 |
+ die "Your CPU doesn't support the required SSE2 instruction." |
91 |
+ |
92 |
+ ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
93 |
+ die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
94 |
+} |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ tc-export CC CXX PKG_CONFIG |
98 |
+ export V=1 |
99 |
+ export BUILDTYPE=Release |
100 |
+ |
101 |
+ # fix compilation on Darwin |
102 |
+ # https://code.google.com/p/gyp/issues/detail?id=260 |
103 |
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
104 |
+ |
105 |
+ # less verbose install output (stating the same as portage, basically) |
106 |
+ sed -i -e "/print/d" tools/install.py || die |
107 |
+ |
108 |
+ # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
109 |
+ local LIBDIR=$(get_libdir) |
110 |
+ sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
111 |
+ sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die |
112 |
+ |
113 |
+ # Avoid writing a depfile, not useful |
114 |
+ sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
115 |
+ |
116 |
+ sed -i -e "/'-O3'/d" common.gypi node.gypi || die |
117 |
+ |
118 |
+ # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
119 |
+ # seem sandbox related either (invoking it from a sandbox works fine). |
120 |
+ # The issue is that no stdin handle is openened when asked for one. |
121 |
+ # It doesn't really belong upstream , so it'll just be removed until someone |
122 |
+ # with more gentoo-knowledge than me (jbergstroem) figures it out. |
123 |
+ rm test/parallel/test-stdout-close-unref.js || die |
124 |
+ |
125 |
+ # debug builds. change install path, remove optimisations and override buildtype |
126 |
+ if use debug; then |
127 |
+ sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
128 |
+ BUILDTYPE=Debug |
129 |
+ fi |
130 |
+ |
131 |
+ # We need to disable mprotect on two files when it builds Bug 694100. |
132 |
+ use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.2.0-paxmarking.patch ) |
133 |
+ |
134 |
+ default |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ xdg_environment_reset |
139 |
+ |
140 |
+ local myconf=( |
141 |
+ --shared-cares --shared-libuv --shared-nghttp2 --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 |
+ "${EPYTHON}" configure.py \ |
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 |
173 |
+} |
174 |
+ |
175 |
+src_install() { |
176 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
177 |
+ default |
178 |
+ |
179 |
+ pax-mark -m "${ED}"/usr/bin/node |
180 |
+ |
181 |
+ # set up a symlink structure that node-gyp expects.. |
182 |
+ dodir /usr/include/node/deps/{v8,uv} |
183 |
+ dosym . /usr/include/node/src |
184 |
+ for var in deps/{uv,v8}/include; do |
185 |
+ dosym ../.. /usr/include/node/${var} |
186 |
+ done |
187 |
+ |
188 |
+ if use doc; then |
189 |
+ docinto html |
190 |
+ dodoc -r "${S}"/doc/* |
191 |
+ fi |
192 |
+ |
193 |
+ if use npm; then |
194 |
+ dodir /etc/npm |
195 |
+ |
196 |
+ # Install bash completion for `npm` |
197 |
+ # We need to temporarily replace default config path since |
198 |
+ # npm otherwise tries to write outside of the sandbox |
199 |
+ local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
200 |
+ sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
201 |
+ local tmp_npm_completion_file="$(emktemp)" |
202 |
+ "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
203 |
+ newbashcomp "${tmp_npm_completion_file}" npm |
204 |
+ sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
205 |
+ |
206 |
+ # Move man pages |
207 |
+ doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
208 |
+ |
209 |
+ # Clean up |
210 |
+ rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
211 |
+ rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
212 |
+ |
213 |
+ local find_exp="-or -name" |
214 |
+ local find_name=() |
215 |
+ for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
216 |
+ ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
217 |
+ "*.md" "*.markdown" "*.bat" "*.cmd"; do |
218 |
+ find_name+=( ${find_exp} "${match}" ) |
219 |
+ done |
220 |
+ |
221 |
+ # Remove various development and/or inappropriate files and |
222 |
+ # useless docs of dependend packages. |
223 |
+ find "${LIBDIR}"/node_modules \ |
224 |
+ \( -type d -name examples \) -or \( -type f \( \ |
225 |
+ -iname "LICEN?E*" \ |
226 |
+ "${find_name[@]}" \ |
227 |
+ \) \) -exec rm -rf "{}" \; |
228 |
+ fi |
229 |
+ |
230 |
+ mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
231 |
+} |
232 |
+ |
233 |
+src_test() { |
234 |
+ out/${BUILDTYPE}/cctest || die |
235 |
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
236 |
+} |
237 |
+ |
238 |
+pkg_postinst() { |
239 |
+ elog "The global npm config lives in /etc/npm. This deviates slightly" |
240 |
+ elog "from upstream which otherwise would have it live in /usr/etc/." |
241 |
+ elog "" |
242 |
+ elog "Protip: When using node-gyp to install native modules, you can" |
243 |
+ elog "avoid having to download extras by doing the following:" |
244 |
+ elog "$ node-gyp --nodedir /usr/include/node <command>" |
245 |
+} |