1 |
commit: 7699732ed90cbe0127e5397280ef7be521bf78b4 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 24 04:48:59 2017 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 24 04:49:22 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7699732e |
7 |
|
8 |
net-libs/nodejs: Version bump. |
9 |
|
10 |
Package-Manager: Portage-2.3.12, Repoman-2.3.3 |
11 |
|
12 |
net-libs/nodejs/Manifest | 1 + |
13 |
net-libs/nodejs/nodejs-6.11.4.ebuild | 193 +++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 194 insertions(+) |
15 |
|
16 |
diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest |
17 |
index 45405dc88fc..010272146e0 100644 |
18 |
--- a/net-libs/nodejs/Manifest |
19 |
+++ b/net-libs/nodejs/Manifest |
20 |
@@ -2,6 +2,7 @@ DIST node-v0.12.17.tar.gz 19938029 SHA256 ddea5e253812f167608fbdda6ff29ffc30dc6f |
21 |
DIST node-v4.6.1.tar.xz 13295568 SHA256 fe2a85df8758001878abb5bbaf17a6b6cdc12b3e465b1d3bace83b37fdf0345a SHA512 4eb2acbe13ee2373922420e3238be63d2108dacba640438bddbdea12ec2de9c655f33db611e4c0654b66bf4fdb844a7b6554a823aac73171b17599096856abdb WHIRLPOOL a6d21cce7ab8c430528682f78a6e6492f753c87949b7b1bdc15dc02911559cd89deb45329c2ba32da57b776dd4feaabec8a3e7a59a78094cfb079261b6475c76 |
22 |
DIST node-v6.11.2.tar.xz 15665456 SHA256 04af4992238b19124ea56f1bcfda36827613a24eb3b00fc3b50f261a415a26e4 SHA512 9ea203e402b5d57fb5d30cc4e9e59e9dac5303134d687888ee5e7e004388054086d82dd9097408bb3cfb25826dcefe720b75052542f8c88867de382efe91b3b8 WHIRLPOOL af8467f21b812fa2f6e723dbd7be2579257175cc7a826a1863044b69f8384a74bd9da2a7096cf29b6f1e7cfbb439ce179a66c45e063edd60f456dad0410aa42a |
23 |
DIST node-v6.11.3.tar.xz 15684012 SHA256 5f09b77010cb3ec4e321ecdc30beb6b49d8a2843155b7f0ad97202ec308ab6bc SHA512 4afad49499d05f97ba45a27ea64d5ab514b276af5cf3b362a9c418dda8619dbf22baa1c958c2ee48ca576ec350f45f2fe02bf18aee91d82d44126c92e9ba547d WHIRLPOOL 65f1478794ad4f183cc7937987a9add24271c1641d6ab00d337c4415da606bde8378b557d2ac923f1d50b87b4aa06ba3b79488ed49a6f40e54f6c5852d41eb75 |
24 |
+DIST node-v6.11.4.tar.xz 15699188 SHA256 4c2f0435e3088136ac4bc75236a7717f189d590a13f490065e7b3b8e5aacd450 SHA512 e495db0e1fe44a50c445424df6e9ea2e28245db485361e9ac928e4e6abbe0866f75b7948f70732f23218d4e93cf1b793613eba9d2551466fa56ac97c6c97de5e WHIRLPOOL dbb0cbeb6fe69da815e408dbbd16f40eb40f88b3493a9bad0d004294da738dbc1c0cde538cfddd10616ff1dc27f59dbd39f2818636575cb5cac2414de1d7ebe1 |
25 |
DIST node-v6.9.4.tar.xz 15519264 SHA256 c51d7c61db40455d57428abcadc7eb0f0a08a8878cb1d8ea3c1e211c54532c35 SHA512 86d3e2889031c2b50c021bd3fd63194c2c22c44291d51dff1b5e1652b01853c09d2880c2f58fdad062e3e2a3f637a3f0d78dac66b835b676790cf272e64f8dce WHIRLPOOL d1bcf488ed1aae7959303b988c9467fc5d0930166c7bfe0e441392763e19f788496971c07560a9f62586bbb2be7ce741ece8346140d665d29593b9b8f649b002 |
26 |
DIST node-v8.5.0.tar.xz 18326412 SHA256 e1cde5d8e5049e7e1b61aef128f26162059d885dc8cab5014bf5cbf693f75c3c SHA512 7ef83a6da7ba9d61c19df0530dfee7b769c0bc7ab066fc29fdb54c9b09085a3536699c7c92889cea8fbf3d6241cc66c383cd351451da8019fea4e0d25d043f3d WHIRLPOOL 63576159748e9423a0b1df7d032d4f5edc23d33f22fd76d3dc0f0b4804606abf57011097dcf4fd2d3707b22babe69bcd976133b7450558925b5d679872abd382 |
27 |
DIST node-v8.7.0.tar.xz 18186384 SHA256 5a17d08c68ee7c1e748fd32534edda766cb57c13ed98e693f3075bc9d9a0b59a SHA512 5ce41d2d7f1c07330c4d9acc8129840d03fb820dac2f87be3f277a372ed6d84d6e1516e1d804e2277d500f32f9838d4307122b26962029d4f811904523f72530 WHIRLPOOL f4541efef681204684d491c9a2539560602c017087fa895e41b3ee9616ce6860a22634179bb904e816eee45b5f5ebc06bada5bb55be05e6e1418cac45cc55966 |
28 |
|
29 |
diff --git a/net-libs/nodejs/nodejs-6.11.4.ebuild b/net-libs/nodejs/nodejs-6.11.4.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..67c45191733 |
32 |
--- /dev/null |
33 |
+++ b/net-libs/nodejs/nodejs-6.11.4.ebuild |
34 |
@@ -0,0 +1,193 @@ |
35 |
+# Copyright 1999-2017 Gentoo Foundation |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=6 |
39 |
+RESTRICT="test" |
40 |
+ |
41 |
+PYTHON_COMPAT=( python2_7 ) |
42 |
+PYTHON_REQ_USE="threads" |
43 |
+ |
44 |
+inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs |
45 |
+ |
46 |
+DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" |
47 |
+HOMEPAGE="https://nodejs.org/" |
48 |
+SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" |
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 +npm +snapshot +ssl test" |
54 |
+ |
55 |
+RDEPEND="icu? ( >=dev-libs/icu-56:= ) |
56 |
+ npm? ( ${PYTHON_DEPS} ) |
57 |
+ >=net-libs/http-parser-2.6.2:= |
58 |
+ >=dev-libs/libuv-1.9.0:= |
59 |
+ >=dev-libs/openssl-1.0.2g:0=[-bindist] |
60 |
+ sys-libs/zlib" |
61 |
+DEPEND="${RDEPEND} |
62 |
+ ${PYTHON_DEPS} |
63 |
+ test? ( net-misc/curl )" |
64 |
+ |
65 |
+S="${WORKDIR}/node-v${PV}" |
66 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
67 |
+ |
68 |
+PATCHES=( |
69 |
+ "${FILESDIR}"/gentoo-global-npm-config.patch |
70 |
+) |
71 |
+ |
72 |
+pkg_pretend() { |
73 |
+ (use x86 && ! use cpu_flags_x86_sse2) && \ |
74 |
+ die "Your CPU doesn't support the required SSE2 instruction." |
75 |
+ |
76 |
+ ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ |
77 |
+ die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." |
78 |
+} |
79 |
+ |
80 |
+src_prepare() { |
81 |
+ tc-export CC CXX PKG_CONFIG |
82 |
+ export V=1 |
83 |
+ export BUILDTYPE=Release |
84 |
+ |
85 |
+ # fix compilation on Darwin |
86 |
+ # https://code.google.com/p/gyp/issues/detail?id=260 |
87 |
+ sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die |
88 |
+ |
89 |
+ # make sure we use python2.* while using gyp |
90 |
+ sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die |
91 |
+ sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die |
92 |
+ |
93 |
+ # less verbose install output (stating the same as portage, basically) |
94 |
+ sed -i -e "/print/d" tools/install.py || die |
95 |
+ |
96 |
+ # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 |
97 |
+ local LIBDIR=$(get_libdir) |
98 |
+ sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
99 |
+ sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die |
100 |
+ sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die |
101 |
+ |
102 |
+ # Avoid writing a depfile, not useful |
103 |
+ sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die |
104 |
+ |
105 |
+ # Avoid a test that I've only been able to reproduce from emerge. It doesnt |
106 |
+ # seem sandbox related either (invoking it from a sandbox works fine). |
107 |
+ # The issue is that no stdin handle is openened when asked for one. |
108 |
+ # It doesn't really belong upstream , so it'll just be removed until someone |
109 |
+ # with more gentoo-knowledge than me (jbergstroem) figures it out. |
110 |
+ rm test/parallel/test-stdout-close-unref.js || die |
111 |
+ |
112 |
+ # debug builds. change install path, remove optimisations and override buildtype |
113 |
+ if use debug; then |
114 |
+ sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die |
115 |
+ BUILDTYPE=Debug |
116 |
+ fi |
117 |
+ |
118 |
+ default |
119 |
+} |
120 |
+ |
121 |
+src_configure() { |
122 |
+ local myarch="" |
123 |
+ local myconf=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib ) |
124 |
+ use npm || myconf+=( --without-npm ) |
125 |
+ use icu && myconf+=( --with-intl=system-icu ) |
126 |
+ use snapshot && myconf+=( --with-snapshot ) |
127 |
+ use ssl || myconf+=( --without-ssl ) |
128 |
+ use debug && myconf+=( --debug ) |
129 |
+ |
130 |
+ case ${ABI} in |
131 |
+ amd64) myarch="x64";; |
132 |
+ arm) myarch="arm";; |
133 |
+ arm64) myarch="arm64";; |
134 |
+ ppc64) myarch="ppc64";; |
135 |
+ x32) myarch="x32";; |
136 |
+ x86) myarch="ia32";; |
137 |
+ *) myarch="${ABI}";; |
138 |
+ esac |
139 |
+ |
140 |
+ GYP_DEFINES="linux_use_gold_flags=0 |
141 |
+ linux_use_bundled_binutils=0 |
142 |
+ linux_use_bundled_gold=0" \ |
143 |
+ "${PYTHON}" configure \ |
144 |
+ --prefix="${EPREFIX}"/usr \ |
145 |
+ --dest-cpu=${myarch} \ |
146 |
+ --without-dtrace \ |
147 |
+ "${myconf[@]}" || die |
148 |
+} |
149 |
+ |
150 |
+src_compile() { |
151 |
+ emake -C out mksnapshot |
152 |
+ pax-mark m "out/${BUILDTYPE}/mksnapshot" |
153 |
+ emake -C out |
154 |
+} |
155 |
+ |
156 |
+src_install() { |
157 |
+ local LIBDIR="${ED}/usr/$(get_libdir)" |
158 |
+ emake install DESTDIR="${D}" |
159 |
+ pax-mark -m "${ED}"usr/bin/node |
160 |
+ |
161 |
+ # set up a symlink structure that node-gyp expects.. |
162 |
+ dodir /usr/include/node/deps/{v8,uv} |
163 |
+ dosym . /usr/include/node/src |
164 |
+ for var in deps/{uv,v8}/include; do |
165 |
+ dosym ../.. /usr/include/node/${var} |
166 |
+ done |
167 |
+ |
168 |
+ if use doc; then |
169 |
+ # Patch docs to make them offline readable |
170 |
+ for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do |
171 |
+ sed -i '/fonts.googleapis.com/ d' $i; |
172 |
+ done |
173 |
+ # Install docs! |
174 |
+ dohtml -r "${S}"/doc/* |
175 |
+ fi |
176 |
+ |
177 |
+ if use npm; then |
178 |
+ dodir /etc/npm |
179 |
+ |
180 |
+ # Install bash completion for `npm` |
181 |
+ # We need to temporarily replace default config path since |
182 |
+ # npm otherwise tries to write outside of the sandbox |
183 |
+ local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" |
184 |
+ sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die |
185 |
+ local tmp_npm_completion_file="$(emktemp)" |
186 |
+ "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" |
187 |
+ newbashcomp "${tmp_npm_completion_file}" npm |
188 |
+ sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die |
189 |
+ |
190 |
+ # Move man pages |
191 |
+ doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* |
192 |
+ |
193 |
+ # Clean up |
194 |
+ rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die |
195 |
+ rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die |
196 |
+ |
197 |
+ local find_exp="-or -name" |
198 |
+ local find_name=() |
199 |
+ for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ |
200 |
+ ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ |
201 |
+ "*.md" "*.markdown" "*.bat" "*.cmd"; do |
202 |
+ find_name+=( ${find_exp} "${match}" ) |
203 |
+ done |
204 |
+ |
205 |
+ # Remove various development and/or inappropriate files and |
206 |
+ # useless docs of dependend packages. |
207 |
+ find "${LIBDIR}"/node_modules \ |
208 |
+ \( -type d -name examples \) -or \( -type f \( \ |
209 |
+ -iname "LICEN?E*" \ |
210 |
+ "${find_name[@]}" \ |
211 |
+ \) \) -exec rm -rf "{}" \; |
212 |
+ fi |
213 |
+} |
214 |
+ |
215 |
+src_test() { |
216 |
+ out/${BUILDTYPE}/cctest || die |
217 |
+ "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die |
218 |
+} |
219 |
+ |
220 |
+pkg_postinst() { |
221 |
+ einfo "The global npm config lives in /etc/npm. This deviates slightly" |
222 |
+ einfo "from upstream which otherwise would have it live in /usr/etc/." |
223 |
+ einfo "" |
224 |
+ einfo "Protip: When using node-gyp to install native modules, you can" |
225 |
+ einfo "avoid having to download extras by doing the following:" |
226 |
+ einfo "$ node-gyp --nodedir /usr/include/node <command>" |
227 |
+} |