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: Wed, 25 Oct 2017 06:58:29
Message-Id: 1508914702.6c2cbc8a7e89c1861f65b6cf8475475a7a58e4c0.jer@gentoo
1 commit: 6c2cbc8a7e89c1861f65b6cf8475475a7a58e4c0
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 25 06:57:56 2017 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 25 06:58:22 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c2cbc8a
7
8 net-libs/nodejs: Old.
9
10 Package-Manager: Portage-2.3.12, Repoman-2.3.3
11
12 net-libs/nodejs/Manifest | 3 -
13 net-libs/nodejs/nodejs-6.11.4.ebuild | 193 ----------------------------------
14 net-libs/nodejs/nodejs-8.5.0.ebuild | 196 -----------------------------------
15 net-libs/nodejs/nodejs-8.7.0.ebuild | 196 -----------------------------------
16 4 files changed, 588 deletions(-)
17
18 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
19 index f68e0668b3f..dd0a112b727 100644
20 --- a/net-libs/nodejs/Manifest
21 +++ b/net-libs/nodejs/Manifest
22 @@ -1,9 +1,6 @@
23 DIST node-v0.12.17.tar.gz 19938029 SHA256 ddea5e253812f167608fbdda6ff29ffc30dc6f669cf2f6e4249938d28b9cd44d SHA512 86c22b17f57018083b07096beeca10e6dfa7569b3d1a25a3b12dd82796db3c9536e6136e0dd0ff62b4de116413f3722b36ce396faa46d8640f80ab09ccfcbca7 WHIRLPOOL 5fba1f95de0a7dbda7e7649bc0f8553cd8595eb87cd27062efbdc59a54673e7e1e6f80191abede683a686043a81d82b76e141aa765b98e3dc39e015aca98e41f
24 DIST node-v4.6.1.tar.xz 13295568 SHA256 fe2a85df8758001878abb5bbaf17a6b6cdc12b3e465b1d3bace83b37fdf0345a SHA512 4eb2acbe13ee2373922420e3238be63d2108dacba640438bddbdea12ec2de9c655f33db611e4c0654b66bf4fdb844a7b6554a823aac73171b17599096856abdb WHIRLPOOL a6d21cce7ab8c430528682f78a6e6492f753c87949b7b1bdc15dc02911559cd89deb45329c2ba32da57b776dd4feaabec8a3e7a59a78094cfb079261b6475c76
25 DIST node-v4.8.5.tar.xz 13316060 SHA256 a48aeefc2b4fae0ea6410a8045ca106af244223012eab003bd5cb00aa3b50d53 SHA512 64d936ca14648b5648dedb41f2ee8d39466788762d335fbfc9ce4cb7484d05b6c24ad912fb4b1579a08f466be50b129a96be700fd89cbca5e1de84baa63ddd12 WHIRLPOOL 8d74323f38b4f55bf2e95a628005cbb65c0f4ea0e5dd55699408e26b724ff65fd0a7f674399ed92ac3a56592064133daffcbb37d7076b8da33d28b4d17d61410
26 -DIST node-v6.11.4.tar.xz 15699188 SHA256 4c2f0435e3088136ac4bc75236a7717f189d590a13f490065e7b3b8e5aacd450 SHA512 e495db0e1fe44a50c445424df6e9ea2e28245db485361e9ac928e4e6abbe0866f75b7948f70732f23218d4e93cf1b793613eba9d2551466fa56ac97c6c97de5e WHIRLPOOL dbb0cbeb6fe69da815e408dbbd16f40eb40f88b3493a9bad0d004294da738dbc1c0cde538cfddd10616ff1dc27f59dbd39f2818636575cb5cac2414de1d7ebe1
27 DIST node-v6.11.5.tar.xz 15699404 SHA256 1c6de415216799fbaeca82304b3fef87accc7101ebf2ead7d5c545e0779e8aaf SHA512 62490725ef7957294c1bddf21ef0626c7472876791210168116501255ecee58457e9de9b044e10033706243299bbfd1495efeca169596fbf26f5eeba6d8fa4c9 WHIRLPOOL 6e572e34d473544624734a54243dc41101e91d045f2b9cedc0c1a65c90584deb163efb422a0c992689ef9878cc5b882758795ae4d902c1c5b20468d8fa2151da
28 DIST node-v6.9.4.tar.xz 15519264 SHA256 c51d7c61db40455d57428abcadc7eb0f0a08a8878cb1d8ea3c1e211c54532c35 SHA512 86d3e2889031c2b50c021bd3fd63194c2c22c44291d51dff1b5e1652b01853c09d2880c2f58fdad062e3e2a3f637a3f0d78dac66b835b676790cf272e64f8dce WHIRLPOOL d1bcf488ed1aae7959303b988c9467fc5d0930166c7bfe0e441392763e19f788496971c07560a9f62586bbb2be7ce741ece8346140d665d29593b9b8f649b002
29 -DIST node-v8.5.0.tar.xz 18326412 SHA256 e1cde5d8e5049e7e1b61aef128f26162059d885dc8cab5014bf5cbf693f75c3c SHA512 7ef83a6da7ba9d61c19df0530dfee7b769c0bc7ab066fc29fdb54c9b09085a3536699c7c92889cea8fbf3d6241cc66c383cd351451da8019fea4e0d25d043f3d WHIRLPOOL 63576159748e9423a0b1df7d032d4f5edc23d33f22fd76d3dc0f0b4804606abf57011097dcf4fd2d3707b22babe69bcd976133b7450558925b5d679872abd382
30 -DIST node-v8.7.0.tar.xz 18186384 SHA256 5a17d08c68ee7c1e748fd32534edda766cb57c13ed98e693f3075bc9d9a0b59a SHA512 5ce41d2d7f1c07330c4d9acc8129840d03fb820dac2f87be3f277a372ed6d84d6e1516e1d804e2277d500f32f9838d4307122b26962029d4f811904523f72530 WHIRLPOOL f4541efef681204684d491c9a2539560602c017087fa895e41b3ee9616ce6860a22634179bb904e816eee45b5f5ebc06bada5bb55be05e6e1418cac45cc55966
31 DIST node-v8.8.0.tar.xz 18209392 SHA256 854f32d27cd62895a13a6af43b87e0542f512f40af960244d15cf16da0914ecf SHA512 7089d0040e4c669f4923770894ec6d11ada3653dfbfe550480056401b1e095226f7d3edf7fee036ce81d8f379cc9fe41f8ac243f714bf3f8f12bd8c13e0a4d1b WHIRLPOOL 5191611f2d8582cc8dec75a955afac4366189e55de20662513ade7077d949aacee2ed93e670348523b4f8136b6ad7ea4aef44b26c7746a096fdcf34decd5f46d
32
33 diff --git a/net-libs/nodejs/nodejs-6.11.4.ebuild b/net-libs/nodejs/nodejs-6.11.4.ebuild
34 deleted file mode 100644
35 index 67c45191733..00000000000
36 --- a/net-libs/nodejs/nodejs-6.11.4.ebuild
37 +++ /dev/null
38 @@ -1,193 +0,0 @@
39 -# Copyright 1999-2017 Gentoo Foundation
40 -# Distributed under the terms of the GNU General Public License v2
41 -
42 -EAPI=6
43 -RESTRICT="test"
44 -
45 -PYTHON_COMPAT=( python2_7 )
46 -PYTHON_REQ_USE="threads"
47 -
48 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
49 -
50 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
51 -HOMEPAGE="https://nodejs.org/"
52 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
53 -
54 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
55 -SLOT="0"
56 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
57 -IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl test"
58 -
59 -RDEPEND="icu? ( >=dev-libs/icu-56:= )
60 - npm? ( ${PYTHON_DEPS} )
61 - >=net-libs/http-parser-2.6.2:=
62 - >=dev-libs/libuv-1.9.0:=
63 - >=dev-libs/openssl-1.0.2g:0=[-bindist]
64 - sys-libs/zlib"
65 -DEPEND="${RDEPEND}
66 - ${PYTHON_DEPS}
67 - test? ( net-misc/curl )"
68 -
69 -S="${WORKDIR}/node-v${PV}"
70 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
71 -
72 -PATCHES=(
73 - "${FILESDIR}"/gentoo-global-npm-config.patch
74 -)
75 -
76 -pkg_pretend() {
77 - (use x86 && ! use cpu_flags_x86_sse2) && \
78 - die "Your CPU doesn't support the required SSE2 instruction."
79 -
80 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
81 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
82 -}
83 -
84 -src_prepare() {
85 - tc-export CC CXX PKG_CONFIG
86 - export V=1
87 - export BUILDTYPE=Release
88 -
89 - # fix compilation on Darwin
90 - # https://code.google.com/p/gyp/issues/detail?id=260
91 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
92 -
93 - # make sure we use python2.* while using gyp
94 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
95 - sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
96 -
97 - # less verbose install output (stating the same as portage, basically)
98 - sed -i -e "/print/d" tools/install.py || die
99 -
100 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
101 - local LIBDIR=$(get_libdir)
102 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
103 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
104 - sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
105 -
106 - # Avoid writing a depfile, not useful
107 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
108 -
109 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
110 - # seem sandbox related either (invoking it from a sandbox works fine).
111 - # The issue is that no stdin handle is openened when asked for one.
112 - # It doesn't really belong upstream , so it'll just be removed until someone
113 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
114 - rm test/parallel/test-stdout-close-unref.js || die
115 -
116 - # debug builds. change install path, remove optimisations and override buildtype
117 - if use debug; then
118 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
119 - BUILDTYPE=Debug
120 - fi
121 -
122 - default
123 -}
124 -
125 -src_configure() {
126 - local myarch=""
127 - local myconf=( --shared-openssl --shared-libuv --shared-http-parser --shared-zlib )
128 - use npm || myconf+=( --without-npm )
129 - use icu && myconf+=( --with-intl=system-icu )
130 - use snapshot && myconf+=( --with-snapshot )
131 - use ssl || myconf+=( --without-ssl )
132 - use debug && myconf+=( --debug )
133 -
134 - case ${ABI} in
135 - amd64) myarch="x64";;
136 - arm) myarch="arm";;
137 - arm64) myarch="arm64";;
138 - ppc64) myarch="ppc64";;
139 - x32) myarch="x32";;
140 - x86) myarch="ia32";;
141 - *) myarch="${ABI}";;
142 - esac
143 -
144 - GYP_DEFINES="linux_use_gold_flags=0
145 - linux_use_bundled_binutils=0
146 - linux_use_bundled_gold=0" \
147 - "${PYTHON}" configure \
148 - --prefix="${EPREFIX}"/usr \
149 - --dest-cpu=${myarch} \
150 - --without-dtrace \
151 - "${myconf[@]}" || die
152 -}
153 -
154 -src_compile() {
155 - emake -C out mksnapshot
156 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
157 - emake -C out
158 -}
159 -
160 -src_install() {
161 - local LIBDIR="${ED}/usr/$(get_libdir)"
162 - emake install DESTDIR="${D}"
163 - pax-mark -m "${ED}"usr/bin/node
164 -
165 - # set up a symlink structure that node-gyp expects..
166 - dodir /usr/include/node/deps/{v8,uv}
167 - dosym . /usr/include/node/src
168 - for var in deps/{uv,v8}/include; do
169 - dosym ../.. /usr/include/node/${var}
170 - done
171 -
172 - if use doc; then
173 - # Patch docs to make them offline readable
174 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
175 - sed -i '/fonts.googleapis.com/ d' $i;
176 - done
177 - # Install docs!
178 - dohtml -r "${S}"/doc/*
179 - fi
180 -
181 - if use npm; then
182 - dodir /etc/npm
183 -
184 - # Install bash completion for `npm`
185 - # We need to temporarily replace default config path since
186 - # npm otherwise tries to write outside of the sandbox
187 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
188 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
189 - local tmp_npm_completion_file="$(emktemp)"
190 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
191 - newbashcomp "${tmp_npm_completion_file}" npm
192 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
193 -
194 - # Move man pages
195 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
196 -
197 - # Clean up
198 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
199 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
200 -
201 - local find_exp="-or -name"
202 - local find_name=()
203 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
204 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
205 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
206 - find_name+=( ${find_exp} "${match}" )
207 - done
208 -
209 - # Remove various development and/or inappropriate files and
210 - # useless docs of dependend packages.
211 - find "${LIBDIR}"/node_modules \
212 - \( -type d -name examples \) -or \( -type f \( \
213 - -iname "LICEN?E*" \
214 - "${find_name[@]}" \
215 - \) \) -exec rm -rf "{}" \;
216 - fi
217 -}
218 -
219 -src_test() {
220 - out/${BUILDTYPE}/cctest || die
221 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
222 -}
223 -
224 -pkg_postinst() {
225 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
226 - einfo "from upstream which otherwise would have it live in /usr/etc/."
227 - einfo ""
228 - einfo "Protip: When using node-gyp to install native modules, you can"
229 - einfo "avoid having to download extras by doing the following:"
230 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
231 -}
232
233 diff --git a/net-libs/nodejs/nodejs-8.5.0.ebuild b/net-libs/nodejs/nodejs-8.5.0.ebuild
234 deleted file mode 100644
235 index 337dc33d32c..00000000000
236 --- a/net-libs/nodejs/nodejs-8.5.0.ebuild
237 +++ /dev/null
238 @@ -1,196 +0,0 @@
239 -# Copyright 1999-2017 Gentoo Foundation
240 -# Distributed under the terms of the GNU General Public License v2
241 -
242 -EAPI=6
243 -RESTRICT="test"
244 -
245 -PYTHON_COMPAT=( python2_7 )
246 -PYTHON_REQ_USE="threads"
247 -
248 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
249 -
250 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
251 -HOMEPAGE="https://nodejs.org/"
252 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
253 -
254 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
255 -SLOT="0"
256 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
257 -IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl systemtap test"
258 -
259 -RDEPEND="icu? ( >=dev-libs/icu-56:= )
260 - npm? ( ${PYTHON_DEPS} )
261 - >=net-libs/http-parser-2.6.2:=
262 - >=dev-libs/libuv-1.14.1:=
263 - >=net-libs/nghttp2-1.25.0
264 - >=dev-libs/openssl-1.0.2g:0=[-bindist]
265 - sys-libs/zlib"
266 -DEPEND="${RDEPEND}
267 - ${PYTHON_DEPS}
268 - systemtap? ( dev-util/systemtap )
269 - test? ( net-misc/curl )"
270 -
271 -S="${WORKDIR}/node-v${PV}"
272 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
273 -
274 -PATCHES=(
275 - "${FILESDIR}"/gentoo-global-npm-config.patch
276 - "${FILESDIR}"/nodejs-8.4.0-shared-nghttp2.patch
277 -)
278 -
279 -pkg_pretend() {
280 - (use x86 && ! use cpu_flags_x86_sse2) && \
281 - die "Your CPU doesn't support the required SSE2 instruction."
282 -
283 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
284 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
285 -}
286 -
287 -src_prepare() {
288 - tc-export CC CXX PKG_CONFIG
289 - export V=1
290 - export BUILDTYPE=Release
291 -
292 - # fix compilation on Darwin
293 - # https://code.google.com/p/gyp/issues/detail?id=260
294 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
295 -
296 - # make sure we use python2.* while using gyp
297 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
298 - sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
299 -
300 - # less verbose install output (stating the same as portage, basically)
301 - sed -i -e "/print/d" tools/install.py || die
302 -
303 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
304 - local LIBDIR=$(get_libdir)
305 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
306 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
307 - sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
308 -
309 - # Avoid writing a depfile, not useful
310 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
311 -
312 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
313 - # seem sandbox related either (invoking it from a sandbox works fine).
314 - # The issue is that no stdin handle is openened when asked for one.
315 - # It doesn't really belong upstream , so it'll just be removed until someone
316 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
317 - rm test/parallel/test-stdout-close-unref.js || die
318 -
319 - # debug builds. change install path, remove optimisations and override buildtype
320 - if use debug; then
321 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
322 - BUILDTYPE=Debug
323 - fi
324 -
325 - default
326 -}
327 -
328 -src_configure() {
329 - local myarch=""
330 - local myconf=( --shared-http-parser --shared-libuv --shared-nghttp2 --shared-openssl --shared-zlib )
331 - use npm || myconf+=( --without-npm )
332 - use icu && myconf+=( --with-intl=system-icu )
333 - use snapshot && myconf+=( --with-snapshot )
334 - use ssl || myconf+=( --without-ssl )
335 - use debug && myconf+=( --debug )
336 -
337 - case ${ABI} in
338 - amd64) myarch="x64";;
339 - arm) myarch="arm";;
340 - arm64) myarch="arm64";;
341 - ppc64) myarch="ppc64";;
342 - x32) myarch="x32";;
343 - x86) myarch="ia32";;
344 - *) myarch="${ABI}";;
345 - esac
346 -
347 - GYP_DEFINES="linux_use_gold_flags=0
348 - linux_use_bundled_binutils=0
349 - linux_use_bundled_gold=0" \
350 - "${PYTHON}" configure \
351 - --prefix="${EPREFIX}"/usr \
352 - --dest-cpu=${myarch} \
353 - $(use_with systemtap dtrace) \
354 - "${myconf[@]}" || die
355 -}
356 -
357 -src_compile() {
358 - emake -C out mksnapshot
359 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
360 - emake -C out
361 -}
362 -
363 -src_install() {
364 - local LIBDIR="${ED}/usr/$(get_libdir)"
365 - emake install DESTDIR="${D}"
366 - pax-mark -m "${ED}"usr/bin/node
367 -
368 - # set up a symlink structure that node-gyp expects..
369 - dodir /usr/include/node/deps/{v8,uv}
370 - dosym . /usr/include/node/src
371 - for var in deps/{uv,v8}/include; do
372 - dosym ../.. /usr/include/node/${var}
373 - done
374 -
375 - if use doc; then
376 - # Patch docs to make them offline readable
377 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
378 - sed -i '/fonts.googleapis.com/ d' $i;
379 - done
380 - # Install docs!
381 - dohtml -r "${S}"/doc/*
382 - fi
383 -
384 - if use npm; then
385 - dodir /etc/npm
386 -
387 - # Install bash completion for `npm`
388 - # We need to temporarily replace default config path since
389 - # npm otherwise tries to write outside of the sandbox
390 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
391 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
392 - local tmp_npm_completion_file="$(emktemp)"
393 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
394 - newbashcomp "${tmp_npm_completion_file}" npm
395 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
396 -
397 - # Move man pages
398 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
399 -
400 - # Clean up
401 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
402 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
403 -
404 - local find_exp="-or -name"
405 - local find_name=()
406 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
407 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
408 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
409 - find_name+=( ${find_exp} "${match}" )
410 - done
411 -
412 - # Remove various development and/or inappropriate files and
413 - # useless docs of dependend packages.
414 - find "${LIBDIR}"/node_modules \
415 - \( -type d -name examples \) -or \( -type f \( \
416 - -iname "LICEN?E*" \
417 - "${find_name[@]}" \
418 - \) \) -exec rm -rf "{}" \;
419 - fi
420 -}
421 -
422 -src_test() {
423 - out/${BUILDTYPE}/cctest || die
424 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
425 -}
426 -
427 -pkg_postinst() {
428 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
429 - einfo "from upstream which otherwise would have it live in /usr/etc/."
430 - einfo ""
431 - einfo "Protip: When using node-gyp to install native modules, you can"
432 - einfo "avoid having to download extras by doing the following:"
433 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
434 -}
435
436 diff --git a/net-libs/nodejs/nodejs-8.7.0.ebuild b/net-libs/nodejs/nodejs-8.7.0.ebuild
437 deleted file mode 100644
438 index 2739d2a8cd9..00000000000
439 --- a/net-libs/nodejs/nodejs-8.7.0.ebuild
440 +++ /dev/null
441 @@ -1,196 +0,0 @@
442 -# Copyright 1999-2017 Gentoo Foundation
443 -# Distributed under the terms of the GNU General Public License v2
444 -
445 -EAPI=6
446 -RESTRICT="test"
447 -
448 -PYTHON_COMPAT=( python2_7 )
449 -PYTHON_REQ_USE="threads"
450 -
451 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
452 -
453 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
454 -HOMEPAGE="https://nodejs.org/"
455 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
456 -
457 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
458 -SLOT="0"
459 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
460 -IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl systemtap test"
461 -
462 -RDEPEND="icu? ( >=dev-libs/icu-56:= )
463 - npm? ( ${PYTHON_DEPS} )
464 - >=net-libs/http-parser-2.7.0:=
465 - >=dev-libs/libuv-1.15.0:=
466 - >=net-libs/nghttp2-1.25.0
467 - >=dev-libs/openssl-1.0.2g:0=[-bindist]
468 - sys-libs/zlib"
469 -DEPEND="${RDEPEND}
470 - ${PYTHON_DEPS}
471 - systemtap? ( dev-util/systemtap )
472 - test? ( net-misc/curl )"
473 -
474 -S="${WORKDIR}/node-v${PV}"
475 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
476 -
477 -PATCHES=(
478 - "${FILESDIR}"/gentoo-global-npm-config.patch
479 - "${FILESDIR}"/nodejs-8.7.0-shared-nghttp2.patch
480 -)
481 -
482 -pkg_pretend() {
483 - (use x86 && ! use cpu_flags_x86_sse2) && \
484 - die "Your CPU doesn't support the required SSE2 instruction."
485 -
486 - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \
487 - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer."
488 -}
489 -
490 -src_prepare() {
491 - tc-export CC CXX PKG_CONFIG
492 - export V=1
493 - export BUILDTYPE=Release
494 -
495 - # fix compilation on Darwin
496 - # https://code.google.com/p/gyp/issues/detail?id=260
497 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die
498 -
499 - # make sure we use python2.* while using gyp
500 - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
501 - sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
502 -
503 - # less verbose install output (stating the same as portage, basically)
504 - sed -i -e "/print/d" tools/install.py || die
505 -
506 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
507 - local LIBDIR=$(get_libdir)
508 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
509 - sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
510 - sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
511 -
512 - # Avoid writing a depfile, not useful
513 - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die
514 -
515 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
516 - # seem sandbox related either (invoking it from a sandbox works fine).
517 - # The issue is that no stdin handle is openened when asked for one.
518 - # It doesn't really belong upstream , so it'll just be removed until someone
519 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
520 - rm test/parallel/test-stdout-close-unref.js || die
521 -
522 - # debug builds. change install path, remove optimisations and override buildtype
523 - if use debug; then
524 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
525 - BUILDTYPE=Debug
526 - fi
527 -
528 - default
529 -}
530 -
531 -src_configure() {
532 - local myarch=""
533 - local myconf=( --shared-http-parser --shared-libuv --shared-nghttp2 --shared-openssl --shared-zlib )
534 - use npm || myconf+=( --without-npm )
535 - use icu && myconf+=( --with-intl=system-icu )
536 - use snapshot && myconf+=( --with-snapshot )
537 - use ssl || myconf+=( --without-ssl )
538 - use debug && myconf+=( --debug )
539 -
540 - case ${ABI} in
541 - amd64) myarch="x64";;
542 - arm) myarch="arm";;
543 - arm64) myarch="arm64";;
544 - ppc64) myarch="ppc64";;
545 - x32) myarch="x32";;
546 - x86) myarch="ia32";;
547 - *) myarch="${ABI}";;
548 - esac
549 -
550 - GYP_DEFINES="linux_use_gold_flags=0
551 - linux_use_bundled_binutils=0
552 - linux_use_bundled_gold=0" \
553 - "${PYTHON}" configure \
554 - --prefix="${EPREFIX}"/usr \
555 - --dest-cpu=${myarch} \
556 - $(use_with systemtap dtrace) \
557 - "${myconf[@]}" || die
558 -}
559 -
560 -src_compile() {
561 - emake -C out mksnapshot
562 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
563 - emake -C out
564 -}
565 -
566 -src_install() {
567 - local LIBDIR="${ED}/usr/$(get_libdir)"
568 - emake install DESTDIR="${D}"
569 - pax-mark -m "${ED}"usr/bin/node
570 -
571 - # set up a symlink structure that node-gyp expects..
572 - dodir /usr/include/node/deps/{v8,uv}
573 - dosym . /usr/include/node/src
574 - for var in deps/{uv,v8}/include; do
575 - dosym ../.. /usr/include/node/${var}
576 - done
577 -
578 - if use doc; then
579 - # Patch docs to make them offline readable
580 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
581 - sed -i '/fonts.googleapis.com/ d' $i;
582 - done
583 - # Install docs!
584 - dohtml -r "${S}"/doc/*
585 - fi
586 -
587 - if use npm; then
588 - dodir /etc/npm
589 -
590 - # Install bash completion for `npm`
591 - # We need to temporarily replace default config path since
592 - # npm otherwise tries to write outside of the sandbox
593 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
594 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
595 - local tmp_npm_completion_file="$(emktemp)"
596 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
597 - newbashcomp "${tmp_npm_completion_file}" npm
598 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
599 -
600 - # Move man pages
601 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
602 -
603 - # Clean up
604 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
605 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
606 -
607 - local find_exp="-or -name"
608 - local find_name=()
609 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
610 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
611 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
612 - find_name+=( ${find_exp} "${match}" )
613 - done
614 -
615 - # Remove various development and/or inappropriate files and
616 - # useless docs of dependend packages.
617 - find "${LIBDIR}"/node_modules \
618 - \( -type d -name examples \) -or \( -type f \( \
619 - -iname "LICEN?E*" \
620 - "${find_name[@]}" \
621 - \) \) -exec rm -rf "{}" \;
622 - fi
623 -}
624 -
625 -src_test() {
626 - out/${BUILDTYPE}/cctest || die
627 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
628 -}
629 -
630 -pkg_postinst() {
631 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
632 - einfo "from upstream which otherwise would have it live in /usr/etc/."
633 - einfo ""
634 - einfo "Protip: When using node-gyp to install native modules, you can"
635 - einfo "avoid having to download extras by doing the following:"
636 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
637 -}