Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/nodejs/
Date: Tue, 24 Oct 2017 04:50:54
Message-Id: 1508820648.357ca93da5950e49461e62fc18c1fd67dc84e373.jer@gentoo
1 commit: 357ca93da5950e49461e62fc18c1fd67dc84e373
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 24 04:50:32 2017 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 24 04:50:48 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=357ca93d
7
8 net-libs/nodejs: Old.
9
10 Package-Manager: Portage-2.3.12, Repoman-2.3.3
11
12 net-libs/nodejs/Manifest | 2 -
13 net-libs/nodejs/nodejs-6.11.2.ebuild | 193 -----------------------------------
14 net-libs/nodejs/nodejs-6.11.3.ebuild | 193 -----------------------------------
15 3 files changed, 388 deletions(-)
16
17 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
18 index 010272146e0..450b49817f7 100644
19 --- a/net-libs/nodejs/Manifest
20 +++ b/net-libs/nodejs/Manifest
21 @@ -1,7 +1,5 @@
22 DIST node-v0.12.17.tar.gz 19938029 SHA256 ddea5e253812f167608fbdda6ff29ffc30dc6f669cf2f6e4249938d28b9cd44d SHA512 86c22b17f57018083b07096beeca10e6dfa7569b3d1a25a3b12dd82796db3c9536e6136e0dd0ff62b4de116413f3722b36ce396faa46d8640f80ab09ccfcbca7 WHIRLPOOL 5fba1f95de0a7dbda7e7649bc0f8553cd8595eb87cd27062efbdc59a54673e7e1e6f80191abede683a686043a81d82b76e141aa765b98e3dc39e015aca98e41f
23 DIST node-v4.6.1.tar.xz 13295568 SHA256 fe2a85df8758001878abb5bbaf17a6b6cdc12b3e465b1d3bace83b37fdf0345a SHA512 4eb2acbe13ee2373922420e3238be63d2108dacba640438bddbdea12ec2de9c655f33db611e4c0654b66bf4fdb844a7b6554a823aac73171b17599096856abdb WHIRLPOOL a6d21cce7ab8c430528682f78a6e6492f753c87949b7b1bdc15dc02911559cd89deb45329c2ba32da57b776dd4feaabec8a3e7a59a78094cfb079261b6475c76
24 -DIST node-v6.11.2.tar.xz 15665456 SHA256 04af4992238b19124ea56f1bcfda36827613a24eb3b00fc3b50f261a415a26e4 SHA512 9ea203e402b5d57fb5d30cc4e9e59e9dac5303134d687888ee5e7e004388054086d82dd9097408bb3cfb25826dcefe720b75052542f8c88867de382efe91b3b8 WHIRLPOOL af8467f21b812fa2f6e723dbd7be2579257175cc7a826a1863044b69f8384a74bd9da2a7096cf29b6f1e7cfbb439ce179a66c45e063edd60f456dad0410aa42a
25 -DIST node-v6.11.3.tar.xz 15684012 SHA256 5f09b77010cb3ec4e321ecdc30beb6b49d8a2843155b7f0ad97202ec308ab6bc SHA512 4afad49499d05f97ba45a27ea64d5ab514b276af5cf3b362a9c418dda8619dbf22baa1c958c2ee48ca576ec350f45f2fe02bf18aee91d82d44126c92e9ba547d WHIRLPOOL 65f1478794ad4f183cc7937987a9add24271c1641d6ab00d337c4415da606bde8378b557d2ac923f1d50b87b4aa06ba3b79488ed49a6f40e54f6c5852d41eb75
26 DIST node-v6.11.4.tar.xz 15699188 SHA256 4c2f0435e3088136ac4bc75236a7717f189d590a13f490065e7b3b8e5aacd450 SHA512 e495db0e1fe44a50c445424df6e9ea2e28245db485361e9ac928e4e6abbe0866f75b7948f70732f23218d4e93cf1b793613eba9d2551466fa56ac97c6c97de5e WHIRLPOOL dbb0cbeb6fe69da815e408dbbd16f40eb40f88b3493a9bad0d004294da738dbc1c0cde538cfddd10616ff1dc27f59dbd39f2818636575cb5cac2414de1d7ebe1
27 DIST node-v6.9.4.tar.xz 15519264 SHA256 c51d7c61db40455d57428abcadc7eb0f0a08a8878cb1d8ea3c1e211c54532c35 SHA512 86d3e2889031c2b50c021bd3fd63194c2c22c44291d51dff1b5e1652b01853c09d2880c2f58fdad062e3e2a3f637a3f0d78dac66b835b676790cf272e64f8dce WHIRLPOOL d1bcf488ed1aae7959303b988c9467fc5d0930166c7bfe0e441392763e19f788496971c07560a9f62586bbb2be7ce741ece8346140d665d29593b9b8f649b002
28 DIST node-v8.5.0.tar.xz 18326412 SHA256 e1cde5d8e5049e7e1b61aef128f26162059d885dc8cab5014bf5cbf693f75c3c SHA512 7ef83a6da7ba9d61c19df0530dfee7b769c0bc7ab066fc29fdb54c9b09085a3536699c7c92889cea8fbf3d6241cc66c383cd351451da8019fea4e0d25d043f3d WHIRLPOOL 63576159748e9423a0b1df7d032d4f5edc23d33f22fd76d3dc0f0b4804606abf57011097dcf4fd2d3707b22babe69bcd976133b7450558925b5d679872abd382
29
30 diff --git a/net-libs/nodejs/nodejs-6.11.2.ebuild b/net-libs/nodejs/nodejs-6.11.2.ebuild
31 deleted file mode 100644
32 index 67c45191733..00000000000
33 --- a/net-libs/nodejs/nodejs-6.11.2.ebuild
34 +++ /dev/null
35 @@ -1,193 +0,0 @@
36 -# Copyright 1999-2017 Gentoo Foundation
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=6
40 -RESTRICT="test"
41 -
42 -PYTHON_COMPAT=( python2_7 )
43 -PYTHON_REQ_USE="threads"
44 -
45 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
46 -
47 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
48 -HOMEPAGE="https://nodejs.org/"
49 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
50 -
51 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
52 -SLOT="0"
53 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
54 -IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl test"
55 -
56 -RDEPEND="icu? ( >=dev-libs/icu-56:= )
57 - npm? ( ${PYTHON_DEPS} )
58 - >=net-libs/http-parser-2.6.2:=
59 - >=dev-libs/libuv-1.9.0:=
60 - >=dev-libs/openssl-1.0.2g:0=[-bindist]
61 - sys-libs/zlib"
62 -DEPEND="${RDEPEND}
63 - ${PYTHON_DEPS}
64 - test? ( net-misc/curl )"
65 -
66 -S="${WORKDIR}/node-v${PV}"
67 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
68 -
69 -PATCHES=(
70 - "${FILESDIR}"/gentoo-global-npm-config.patch
71 -)
72 -
73 -pkg_pretend() {
74 - (use x86 && ! use cpu_flags_x86_sse2) && \
75 - die "Your CPU doesn't support the required SSE2 instruction."
76 -
77 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
78 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
79 -}
80 -
81 -src_prepare() {
82 - tc-export CC CXX PKG_CONFIG
83 - export V=1
84 - export BUILDTYPE=Release
85 -
86 - # fix compilation on Darwin
87 - # https://code.google.com/p/gyp/issues/detail?id=260
88 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
89 -
90 - # make sure we use python2.* while using gyp
91 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
92 - sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
93 -
94 - # less verbose install output (stating the same as portage, basically)
95 - sed -i -e "/print/d" tools/install.py || die
96 -
97 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
98 - local LIBDIR=$(get_libdir)
99 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
100 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
101 - sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
102 -
103 - # Avoid writing a depfile, not useful
104 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
105 -
106 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
107 - # seem sandbox related either (invoking it from a sandbox works fine).
108 - # The issue is that no stdin handle is openened when asked for one.
109 - # It doesn't really belong upstream , so it'll just be removed until someone
110 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
111 - rm test/parallel/test-stdout-close-unref.js || die
112 -
113 - # debug builds. change install path, remove optimisations and override buildtype
114 - if use debug; then
115 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
116 - BUILDTYPE=Debug
117 - fi
118 -
119 - default
120 -}
121 -
122 -src_configure() {
123 - local myarch=""
124 - local myconf=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
125 - use npm || myconf+=( --without-npm )
126 - use icu && myconf+=( --with-intl=system-icu )
127 - use snapshot && myconf+=( --with-snapshot )
128 - use ssl || myconf+=( --without-ssl )
129 - use debug && myconf+=( --debug )
130 -
131 - case ${ABI} in
132 - amd64) myarch="x64";;
133 - arm) myarch="arm";;
134 - arm64) myarch="arm64";;
135 - ppc64) myarch="ppc64";;
136 - x32) myarch="x32";;
137 - x86) myarch="ia32";;
138 - *) myarch="${ABI}";;
139 - esac
140 -
141 - GYP_DEFINES="linux_use_gold_flags=0
142 - linux_use_bundled_binutils=0
143 - linux_use_bundled_gold=0" \
144 - "${PYTHON}" configure \
145 - --prefix="${EPREFIX}"/usr \
146 - --dest-cpu=${myarch} \
147 - --without-dtrace \
148 - "${myconf[@]}" || die
149 -}
150 -
151 -src_compile() {
152 - emake -C out mksnapshot
153 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
154 - emake -C out
155 -}
156 -
157 -src_install() {
158 - local LIBDIR="${ED}/usr/$(get_libdir)"
159 - emake install DESTDIR="${D}"
160 - pax-mark -m "${ED}"usr/bin/node
161 -
162 - # set up a symlink structure that node-gyp expects..
163 - dodir /usr/include/node/deps/{v8,uv}
164 - dosym . /usr/include/node/src
165 - for var in deps/{uv,v8}/include; do
166 - dosym ../.. /usr/include/node/${var}
167 - done
168 -
169 - if use doc; then
170 - # Patch docs to make them offline readable
171 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
172 - sed -i '/fonts.googleapis.com/ d' $i;
173 - done
174 - # Install docs!
175 - dohtml -r "${S}"/doc/*
176 - fi
177 -
178 - if use npm; then
179 - dodir /etc/npm
180 -
181 - # Install bash completion for `npm`
182 - # We need to temporarily replace default config path since
183 - # npm otherwise tries to write outside of the sandbox
184 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
185 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
186 - local tmp_npm_completion_file="$(emktemp)"
187 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
188 - newbashcomp "${tmp_npm_completion_file}" npm
189 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
190 -
191 - # Move man pages
192 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
193 -
194 - # Clean up
195 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
196 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
197 -
198 - local find_exp="-or -name"
199 - local find_name=()
200 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
201 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
202 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
203 - find_name+=( ${find_exp} "${match}" )
204 - done
205 -
206 - # Remove various development and/or inappropriate files and
207 - # useless docs of dependend packages.
208 - find "${LIBDIR}"/node_modules \
209 - \( -type d -name examples \) -or \( -type f \( \
210 - -iname "LICEN?E*" \
211 - "${find_name[@]}" \
212 - \) \) -exec rm -rf "{}" \;
213 - fi
214 -}
215 -
216 -src_test() {
217 - out/${BUILDTYPE}/cctest || die
218 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
219 -}
220 -
221 -pkg_postinst() {
222 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
223 - einfo "from upstream which otherwise would have it live in /usr/etc/."
224 - einfo ""
225 - einfo "Protip: When using node-gyp to install native modules, you can"
226 - einfo "avoid having to download extras by doing the following:"
227 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
228 -}
229
230 diff --git a/net-libs/nodejs/nodejs-6.11.3.ebuild b/net-libs/nodejs/nodejs-6.11.3.ebuild
231 deleted file mode 100644
232 index 67c45191733..00000000000
233 --- a/net-libs/nodejs/nodejs-6.11.3.ebuild
234 +++ /dev/null
235 @@ -1,193 +0,0 @@
236 -# Copyright 1999-2017 Gentoo Foundation
237 -# Distributed under the terms of the GNU General Public License v2
238 -
239 -EAPI=6
240 -RESTRICT="test"
241 -
242 -PYTHON_COMPAT=( python2_7 )
243 -PYTHON_REQ_USE="threads"
244 -
245 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
246 -
247 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
248 -HOMEPAGE="https://nodejs.org/"
249 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
250 -
251 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
252 -SLOT="0"
253 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
254 -IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl test"
255 -
256 -RDEPEND="icu? ( >=dev-libs/icu-56:= )
257 - npm? ( ${PYTHON_DEPS} )
258 - >=net-libs/http-parser-2.6.2:=
259 - >=dev-libs/libuv-1.9.0:=
260 - >=dev-libs/openssl-1.0.2g:0=[-bindist]
261 - sys-libs/zlib"
262 -DEPEND="${RDEPEND}
263 - ${PYTHON_DEPS}
264 - test? ( net-misc/curl )"
265 -
266 -S="${WORKDIR}/node-v${PV}"
267 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
268 -
269 -PATCHES=(
270 - "${FILESDIR}"/gentoo-global-npm-config.patch
271 -)
272 -
273 -pkg_pretend() {
274 - (use x86 && ! use cpu_flags_x86_sse2) && \
275 - die "Your CPU doesn't support the required SSE2 instruction."
276 -
277 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
278 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
279 -}
280 -
281 -src_prepare() {
282 - tc-export CC CXX PKG_CONFIG
283 - export V=1
284 - export BUILDTYPE=Release
285 -
286 - # fix compilation on Darwin
287 - # https://code.google.com/p/gyp/issues/detail?id=260
288 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
289 -
290 - # make sure we use python2.* while using gyp
291 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
292 - sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
293 -
294 - # less verbose install output (stating the same as portage, basically)
295 - sed -i -e "/print/d" tools/install.py || die
296 -
297 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
298 - local LIBDIR=$(get_libdir)
299 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
300 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
301 - sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
302 -
303 - # Avoid writing a depfile, not useful
304 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
305 -
306 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
307 - # seem sandbox related either (invoking it from a sandbox works fine).
308 - # The issue is that no stdin handle is openened when asked for one.
309 - # It doesn't really belong upstream , so it'll just be removed until someone
310 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
311 - rm test/parallel/test-stdout-close-unref.js || die
312 -
313 - # debug builds. change install path, remove optimisations and override buildtype
314 - if use debug; then
315 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
316 - BUILDTYPE=Debug
317 - fi
318 -
319 - default
320 -}
321 -
322 -src_configure() {
323 - local myarch=""
324 - local myconf=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
325 - use npm || myconf+=( --without-npm )
326 - use icu && myconf+=( --with-intl=system-icu )
327 - use snapshot && myconf+=( --with-snapshot )
328 - use ssl || myconf+=( --without-ssl )
329 - use debug && myconf+=( --debug )
330 -
331 - case ${ABI} in
332 - amd64) myarch="x64";;
333 - arm) myarch="arm";;
334 - arm64) myarch="arm64";;
335 - ppc64) myarch="ppc64";;
336 - x32) myarch="x32";;
337 - x86) myarch="ia32";;
338 - *) myarch="${ABI}";;
339 - esac
340 -
341 - GYP_DEFINES="linux_use_gold_flags=0
342 - linux_use_bundled_binutils=0
343 - linux_use_bundled_gold=0" \
344 - "${PYTHON}" configure \
345 - --prefix="${EPREFIX}"/usr \
346 - --dest-cpu=${myarch} \
347 - --without-dtrace \
348 - "${myconf[@]}" || die
349 -}
350 -
351 -src_compile() {
352 - emake -C out mksnapshot
353 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
354 - emake -C out
355 -}
356 -
357 -src_install() {
358 - local LIBDIR="${ED}/usr/$(get_libdir)"
359 - emake install DESTDIR="${D}"
360 - pax-mark -m "${ED}"usr/bin/node
361 -
362 - # set up a symlink structure that node-gyp expects..
363 - dodir /usr/include/node/deps/{v8,uv}
364 - dosym . /usr/include/node/src
365 - for var in deps/{uv,v8}/include; do
366 - dosym ../.. /usr/include/node/${var}
367 - done
368 -
369 - if use doc; then
370 - # Patch docs to make them offline readable
371 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
372 - sed -i '/fonts.googleapis.com/ d' $i;
373 - done
374 - # Install docs!
375 - dohtml -r "${S}"/doc/*
376 - fi
377 -
378 - if use npm; then
379 - dodir /etc/npm
380 -
381 - # Install bash completion for `npm`
382 - # We need to temporarily replace default config path since
383 - # npm otherwise tries to write outside of the sandbox
384 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
385 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
386 - local tmp_npm_completion_file="$(emktemp)"
387 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
388 - newbashcomp "${tmp_npm_completion_file}" npm
389 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
390 -
391 - # Move man pages
392 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
393 -
394 - # Clean up
395 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
396 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
397 -
398 - local find_exp="-or -name"
399 - local find_name=()
400 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
401 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
402 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
403 - find_name+=( ${find_exp} "${match}" )
404 - done
405 -
406 - # Remove various development and/or inappropriate files and
407 - # useless docs of dependend packages.
408 - find "${LIBDIR}"/node_modules \
409 - \( -type d -name examples \) -or \( -type f \( \
410 - -iname "LICEN?E*" \
411 - "${find_name[@]}" \
412 - \) \) -exec rm -rf "{}" \;
413 - fi
414 -}
415 -
416 -src_test() {
417 - out/${BUILDTYPE}/cctest || die
418 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
419 -}
420 -
421 -pkg_postinst() {
422 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
423 - einfo "from upstream which otherwise would have it live in /usr/etc/."
424 - einfo ""
425 - einfo "Protip: When using node-gyp to install native modules, you can"
426 - einfo "avoid having to download extras by doing the following:"
427 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
428 -}