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