1 |
commit: b9bc93b24a96e8d5e2a11ac4f1fe370428fb43b6 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 10 20:23:08 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 10 20:24:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9bc93b2 |
7 |
|
8 |
net-libs/nodejs: Version 14.10.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.6, Repoman-3.0.1 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-libs/nodejs/Manifest | 1 + |
14 |
net-libs/nodejs/nodejs-14.10.1.ebuild | 200 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 201 insertions(+) |
16 |
|
17 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
18 |
index 1df30825e6e..3a686a1a61b 100644 |
19 |
--- a/net-libs/nodejs/Manifest |
20 |
+++ b/net-libs/nodejs/Manifest |
21 |
@@ -1,6 +1,7 @@ |
22 |
DIST node-v12.16.1.tar.xz 23481768 BLAKE2B 29371b952c14907778c064269108f1da5e3818c32773e73090c61edcd07190c418189db6a505987ca71f99bb868880e297de5d2181b9a880774eaaf515985f26 SHA512 fe1e9fabb6fe52e3bc4275b33e6c5e4a761550b04964c0ae7dbef7172f5d415207bb2985751d068e357ce45a0ba414b07c0abd1531ef839b9463e98eeae8f9a4 |
23 |
DIST node-v12.18.3.tar.xz 23679596 BLAKE2B 496a8fa0f0368634a900c5961b442cb9ef9e0cf7cb0fc974a9e29624fc40077a61bd6371851d5487b9eeeb50ebf6a238e5db5c801fef000c7cb15bd990cadae2 SHA512 a1c72d4664fbead4e63736abe46417b13dcd0581c7c9f8a94ca5c5b2bd782fefabac63e63f824dda6a771c3b5e647749e3156a611dcb100aad11c3f23e17ed5d |
24 |
DIST node-v14.10.0.tar.xz 33377228 BLAKE2B fc2e0b38c0cd56fa524cc01dd262003ba0dbb4f755b9b95079a4aedea75c75b1e588de8cee4503a9699b1fed9983db8827828fe622c1ea32f9d3ee21aeabc3e4 SHA512 902bfe3b142f11ef48076c4af6f3107fb20f617ef1f12a564fc3ea1870e6304458dd30fb9af67c3431b850caa496bbb55cb1d760e46c882603543685d316c733 |
25 |
+DIST node-v14.10.1.tar.xz 33383116 BLAKE2B 68959ad1ed576af327b53080099d8f1e520658f9c7aeb342ba4182f6f058e48d93b1c443e2a91348a221224bfa430a16cbe13b33f339b41eff4a6e41fc1e85db SHA512 fd094fb3ff1f94e913ee876de4365ba1f6d26abd33b60e964fbdf8a205ab8a44885bd69576ec997aee7b36b91a342daf3654bec41377d0ec66e752292aab4319 |
26 |
DIST node-v14.2.0.tar.xz 32884616 BLAKE2B 7bcb07cb7623c5e08c20267c320cdf23ad110f124c5ad1f2447ef8b76ab8dc44ed50dab7c5651424d9d3a36f7eeecdf3292b07c02cb2e22c3fbe4ed633c4b842 SHA512 47e5ec0b7a207082d43419a7e0a6ea9242ec43b4d7c2217eb66d0b45e2f4d5cb561b3f6fe35fdc41a8be95c182dc122ba262f696ebd12833596d71b372ec85d2 |
27 |
DIST node-v14.4.0.tar.xz 33005312 BLAKE2B bc1462d897e24a6b842e6f8146971866c73b54ff5383d76cfc5728a73e2c135d28ced068744174b3fb5af4a6ec05ef1f115ea51c2d65517cbe18e1d733460d04 SHA512 f1a7c788a8a149b942ec2b90a4314baaa5355c381029eda45002728ce7209925c016323b0ec1e0dfe2359fddb24f494df125805d0d266b738a333dcddb3f59c3 |
28 |
DIST node-v14.8.0.tar.xz 33342288 BLAKE2B 4f8129beb16ece09f14c234395b29bc53e84896fdd9877821a27c80d88a0740d42ea4dcf65a0a5c52a98129262be236207f4c07d81f76cc5e4471f21227083e9 SHA512 ebb20f7163e20e8074dd9cc5d3ee7f3cbc536c55a7753d39c482ea90e9314d8fdfe1a88203be7f250f6d77b9f13da04d32d99770d300c2ab0dfdee3d7582f068 |
29 |
|
30 |
diff --git a/net-libs/nodejs/nodejs-14.10.1.ebuild b/net-libs/nodejs/nodejs-14.10.1.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..43b93416662 |
33 |
--- /dev/null |
34 |
+++ b/net-libs/nodejs/nodejs-14.10.1.ebuild |
35 |
@@ -0,0 +1,200 @@ |
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=( python3_{6,7,8} ) |
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=" |
47 |
+ https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz |
48 |
+" |
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 pax_kernel +snapshot +ssl +system-ssl systemtap test" |
54 |
+REQUIRED_USE=" |
55 |
+ inspector? ( icu ssl ) |
56 |
+ npm? ( ssl ) |
57 |
+ system-ssl? ( ssl ) |
58 |
+" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ >=dev-libs/libuv-1.39.0:= |
62 |
+ >=net-dns/c-ares-1.16.0 |
63 |
+ >=net-libs/nghttp2-1.41.0 |
64 |
+ sys-libs/zlib |
65 |
+ icu? ( >=dev-libs/icu-67:= ) |
66 |
+ system-ssl? ( >=dev-libs/openssl-1.1.1:0= ) |
67 |
+" |
68 |
+BDEPEND=" |
69 |
+ ${PYTHON_DEPS} |
70 |
+ systemtap? ( dev-util/systemtap ) |
71 |
+ test? ( net-misc/curl ) |
72 |
+ pax_kernel? ( sys-apps/elfix ) |
73 |
+" |
74 |
+DEPEND=" |
75 |
+ ${RDEPEND} |
76 |
+" |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch |
79 |
+) |
80 |
+RESTRICT="test" |
81 |
+S="${WORKDIR}/node-v${PV}" |
82 |
+ |
83 |
+pkg_pretend() { |
84 |
+ (use x86 && ! use cpu_flags_x86_sse2) && \ |
85 |
+ die "Your CPU doesn't support the required SSE2 instruction." |
86 |
+ |
87 |
+ ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
88 |
+ die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
89 |
+} |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ tc-export AR CC CXX PKG_CONFIG |
93 |
+ export V=1 |
94 |
+ export BUILDTYPE=Release |
95 |
+ |
96 |
+ # fix compilation on Darwin |
97 |
+ # https://code.google.com/p/gyp/issues/detail?id=260 |
98 |
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || 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 node.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 |
+ # We need to disable mprotect on two files when it builds Bug 694100. |
127 |
+ use pax_kernel && PATCHES+=( "${FILESDIR}"/${PN}-13.8.0-paxmarking.patch ) |
128 |
+ |
129 |
+ default |
130 |
+} |
131 |
+ |
132 |
+src_configure() { |
133 |
+ xdg_environment_reset |
134 |
+ |
135 |
+ local myconf=( |
136 |
+ --shared-cares --shared-libuv --shared-nghttp2 --shared-zlib |
137 |
+ ) |
138 |
+ use debug && myconf+=( --debug ) |
139 |
+ use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) |
140 |
+ use inspector || myconf+=( --without-inspector ) |
141 |
+ use npm || myconf+=( --without-npm ) |
142 |
+ use snapshot || myconf+=( --without-node-snapshot ) |
143 |
+ if use ssl; then |
144 |
+ use system-ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) |
145 |
+ else |
146 |
+ myconf+=( --without-ssl ) |
147 |
+ fi |
148 |
+ |
149 |
+ local myarch="" |
150 |
+ case ${ABI} in |
151 |
+ amd64) myarch="x64";; |
152 |
+ arm) myarch="arm";; |
153 |
+ arm64) myarch="arm64";; |
154 |
+ ppc64) myarch="ppc64";; |
155 |
+ x32) myarch="x32";; |
156 |
+ x86) myarch="ia32";; |
157 |
+ *) myarch="${ABI}";; |
158 |
+ esac |
159 |
+ |
160 |
+ GYP_DEFINES="linux_use_gold_flags=0 |
161 |
+ linux_use_bundled_binutils=0 |
162 |
+ linux_use_bundled_gold=0" \ |
163 |
+ "${EPYTHON}" configure.py \ |
164 |
+ --prefix="${EPREFIX}"/usr \ |
165 |
+ --dest-cpu=${myarch} \ |
166 |
+ $(use_with systemtap dtrace) \ |
167 |
+ "${myconf[@]}" || die |
168 |
+} |
169 |
+ |
170 |
+src_compile() { |
171 |
+ emake -C out |
172 |
+} |
173 |
+ |
174 |
+src_install() { |
175 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
176 |
+ default |
177 |
+ |
178 |
+ pax-mark -m "${ED}"/usr/bin/node |
179 |
+ |
180 |
+ # set up a symlink structure that node-gyp expects.. |
181 |
+ dodir /usr/include/node/deps/{v8,uv} |
182 |
+ dosym . /usr/include/node/src |
183 |
+ for var in deps/{uv,v8}/include; do |
184 |
+ dosym ../.. /usr/include/node/${var} |
185 |
+ done |
186 |
+ |
187 |
+ if use doc; then |
188 |
+ docinto html |
189 |
+ dodoc -r "${S}"/doc/* |
190 |
+ fi |
191 |
+ |
192 |
+ if use npm; then |
193 |
+ dodir /etc/npm |
194 |
+ |
195 |
+ # Install bash completion for `npm` |
196 |
+ # We need to temporarily replace default config path since |
197 |
+ # npm otherwise tries to write outside of the sandbox |
198 |
+ local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
199 |
+ sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
200 |
+ local tmp_npm_completion_file="$(emktemp)" |
201 |
+ "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
202 |
+ newbashcomp "${tmp_npm_completion_file}" npm |
203 |
+ sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
204 |
+ |
205 |
+ # Move man pages |
206 |
+ doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
207 |
+ |
208 |
+ # Clean up |
209 |
+ rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
210 |
+ rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
211 |
+ |
212 |
+ local find_exp="-or -name" |
213 |
+ local find_name=() |
214 |
+ for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
215 |
+ ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
216 |
+ "*.md" "*.markdown" "*.bat" "*.cmd"; do |
217 |
+ find_name+=( ${find_exp} "${match}" ) |
218 |
+ done |
219 |
+ |
220 |
+ # Remove various development and/or inappropriate files and |
221 |
+ # useless docs of dependend packages. |
222 |
+ find "${LIBDIR}"/node_modules \ |
223 |
+ \( -type d -name examples \) -or \( -type f \( \ |
224 |
+ -iname "LICEN?E*" \ |
225 |
+ "${find_name[@]}" \ |
226 |
+ \) \) -exec rm -rf "{}" \; |
227 |
+ fi |
228 |
+ |
229 |
+ mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die |
230 |
+} |
231 |
+ |
232 |
+src_test() { |
233 |
+ out/${BUILDTYPE}/cctest || die |
234 |
+ "${EPYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
235 |
+} |