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: Mon, 20 Nov 2017 08:14:26
Message-Id: 1511165661.943a84273ef36b3a14c3b23062e789d295ea6182.jer@gentoo
1 commit: 943a84273ef36b3a14c3b23062e789d295ea6182
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 20 07:55:30 2017 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 20 08:14:21 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=943a8427
7
8 net-libs/nodejs: Old.
9
10 Package-Manager: Portage-2.3.14, Repoman-2.3.6
11
12 net-libs/nodejs/Manifest | 1 -
13 net-libs/nodejs/nodejs-9.1.0.ebuild | 197 ------------------------------------
14 2 files changed, 198 deletions(-)
15
16 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
17 index d6d171d04ad..54d58159ace 100644
18 --- a/net-libs/nodejs/Manifest
19 +++ b/net-libs/nodejs/Manifest
20 @@ -3,5 +3,4 @@ DIST node-v4.8.5.tar.xz 13316060 SHA256 a48aeefc2b4fae0ea6410a8045ca106af2442230
21 DIST node-v6.11.5.tar.xz 15699404 SHA256 1c6de415216799fbaeca82304b3fef87accc7101ebf2ead7d5c545e0779e8aaf SHA512 62490725ef7957294c1bddf21ef0626c7472876791210168116501255ecee58457e9de9b044e10033706243299bbfd1495efeca169596fbf26f5eeba6d8fa4c9 WHIRLPOOL 6e572e34d473544624734a54243dc41101e91d045f2b9cedc0c1a65c90584deb163efb422a0c992689ef9878cc5b882758795ae4d902c1c5b20468d8fa2151da
22 DIST node-v6.9.4.tar.xz 15519264 SHA256 c51d7c61db40455d57428abcadc7eb0f0a08a8878cb1d8ea3c1e211c54532c35 SHA512 86d3e2889031c2b50c021bd3fd63194c2c22c44291d51dff1b5e1652b01853c09d2880c2f58fdad062e3e2a3f637a3f0d78dac66b835b676790cf272e64f8dce WHIRLPOOL d1bcf488ed1aae7959303b988c9467fc5d0930166c7bfe0e441392763e19f788496971c07560a9f62586bbb2be7ce741ece8346140d665d29593b9b8f649b002
23 DIST node-v8.9.1.tar.xz 18290848 SHA256 ef160c21f60f8aca64145985e01b4044435e381dc16e8f0640ed0223e84f17e0 SHA512 e1d93def34c1b91de90b807031e2f313661658cd045d44d290950190b10512770df05cb92e9657bab7ad6654d3359364193567cf693ddb2b3574d2a48e4ee256 WHIRLPOOL f1e47a0d078e0c1c29c993c8266337ae1fa0ee18ac81e053c4deabe85a94a5de0681ea9ed7f81119d108235055b849bc30557eb0d86345675580d76bd7c05f4d
24 -DIST node-v9.1.0.tar.xz 18256556 SHA256 7e34d581332aedc85306859e613a81cce2531bdd30eef358cb54db8a4f5c3c49 SHA512 3e99c8c93cb05194e572a1fcf25032da2d94e5dffec1ec3044945d70c02a07f31d872501c0614dd9e8142ddb60e1c20cf13b59859be9c4e9e6beb3f7b8fc3aae WHIRLPOOL 70864c2bbb1e69f5e30a41098dd68ab399cc2e78e9d90237bdc08e425d7f1d06c6a8b74557f44e1b73f021d18096e60eaee00e5a0c51b58408ac11a13f0cc53a
25 DIST node-v9.2.0.tar.xz 18347108 SHA256 64caf263eadc1aea072ce5d30ded7f4534aa7f59c8c6993eee4accad96e3bbc2 SHA512 3335a2ec17f4698bda58f2a2c9548546912b9a4109c0bff0ffc57bca14d40101bcc00356231c95c08733860286ac340e227ca79debac581835f84ae3967cdb4b WHIRLPOOL f14cd3f537d2f1f41ee299f2492f2dc275587846dc231f668ccb3c2d31720020b982474130ae7ce4b8ca709e2f67c510d3e65b7641fbc3fff0e3f9be3321ca2a
26
27 diff --git a/net-libs/nodejs/nodejs-9.1.0.ebuild b/net-libs/nodejs/nodejs-9.1.0.ebuild
28 deleted file mode 100644
29 index 2c89bcd6621..00000000000
30 --- a/net-libs/nodejs/nodejs-9.1.0.ebuild
31 +++ /dev/null
32 @@ -1,197 +0,0 @@
33 -# Copyright 1999-2017 Gentoo Foundation
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=6
37 -RESTRICT="test"
38 -
39 -PYTHON_COMPAT=( python2_7 )
40 -PYTHON_REQ_USE="threads"
41 -
42 -inherit bash-completion-r1 eutils flag-o-matic pax-utils python-single-r1 toolchain-funcs
43 -
44 -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
45 -HOMEPAGE="https://nodejs.org/"
46 -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz"
47 -
48 -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT"
49 -SLOT="0"
50 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
51 -IUSE="cpu_flags_x86_sse2 debug doc icu +npm +snapshot +ssl systemtap test"
52 -
53 -RDEPEND="icu? ( >=dev-libs/icu-59:= )
54 - npm? ( ${PYTHON_DEPS} )
55 - >=net-libs/http-parser-2.7.0:=
56 - >=dev-libs/libuv-1.15.0:=
57 - >=net-libs/nghttp2-1.25.0
58 - >=dev-libs/openssl-1.0.2g:0=[-bindist]
59 - sys-libs/zlib"
60 -DEPEND="${RDEPEND}
61 - ${PYTHON_DEPS}
62 - systemtap? ( dev-util/systemtap )
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 - "${FILESDIR}"/nodejs-8.9.0-shared-nghttp2.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/|| 'python2'/|| '${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 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 - sed -i -e "/'-O3'/d" common.gypi || die
106 -
107 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
108 - # seem sandbox related either (invoking it from a sandbox works fine).
109 - # The issue is that no stdin handle is openened when asked for one.
110 - # It doesn't really belong upstream , so it'll just be removed until someone
111 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
112 - rm test/parallel/test-stdout-close-unref.js || die
113 -
114 - # debug builds. change install path, remove optimisations and override buildtype
115 - if use debug; then
116 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
117 - BUILDTYPE=Debug
118 - fi
119 -
120 - default
121 -}
122 -
123 -src_configure() {
124 - local myarch=""
125 - local myconf=( --shared-http-parser --shared-libuv --shared-nghttp2 --shared-openssl --shared-zlib )
126 - use npm || myconf+=( --without-npm )
127 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
128 - use snapshot && myconf+=( --with-snapshot )
129 - use ssl || myconf+=( --without-ssl )
130 - use debug && myconf+=( --debug )
131 -
132 - case ${ABI} in
133 - amd64) myarch="x64";;
134 - arm) myarch="arm";;
135 - arm64) myarch="arm64";;
136 - ppc64) myarch="ppc64";;
137 - x32) myarch="x32";;
138 - x86) myarch="ia32";;
139 - *) myarch="${ABI}";;
140 - esac
141 -
142 - GYP_DEFINES="linux_use_gold_flags=0
143 - linux_use_bundled_binutils=0
144 - linux_use_bundled_gold=0" \
145 - "${PYTHON}" configure \
146 - --prefix="${EPREFIX}"/usr \
147 - --dest-cpu=${myarch} \
148 - $(use_with systemtap dtrace) \
149 - "${myconf[@]}" || die
150 -}
151 -
152 -src_compile() {
153 - emake -C out mksnapshot
154 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
155 - emake -C out
156 -}
157 -
158 -src_install() {
159 - local LIBDIR="${ED}/usr/$(get_libdir)"
160 - emake install DESTDIR="${D}"
161 - pax-mark -m "${ED}"usr/bin/node
162 -
163 - # set up a symlink structure that node-gyp expects..
164 - dodir /usr/include/node/deps/{v8,uv}
165 - dosym . /usr/include/node/src
166 - for var in deps/{uv,v8}/include; do
167 - dosym ../.. /usr/include/node/${var}
168 - done
169 -
170 - if use doc; then
171 - # Patch docs to make them offline readable
172 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
173 - sed -i '/fonts.googleapis.com/ d' $i;
174 - done
175 - # Install docs!
176 - dohtml -r "${S}"/doc/*
177 - fi
178 -
179 - if use npm; then
180 - dodir /etc/npm
181 -
182 - # Install bash completion for `npm`
183 - # We need to temporarily replace default config path since
184 - # npm otherwise tries to write outside of the sandbox
185 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
186 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
187 - local tmp_npm_completion_file="$(emktemp)"
188 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
189 - newbashcomp "${tmp_npm_completion_file}" npm
190 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
191 -
192 - # Move man pages
193 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
194 -
195 - # Clean up
196 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
197 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
198 -
199 - local find_exp="-or -name"
200 - local find_name=()
201 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
202 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
203 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
204 - find_name+=( ${find_exp} "${match}" )
205 - done
206 -
207 - # Remove various development and/or inappropriate files and
208 - # useless docs of dependend packages.
209 - find "${LIBDIR}"/node_modules \
210 - \( -type d -name examples \) -or \( -type f \( \
211 - -iname "LICEN?E*" \
212 - "${find_name[@]}" \
213 - \) \) -exec rm -rf "{}" \;
214 - fi
215 -}
216 -
217 -src_test() {
218 - out/${BUILDTYPE}/cctest || die
219 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
220 -}
221 -
222 -pkg_postinst() {
223 - einfo "The global npm config lives in /etc/npm. This deviates slightly"
224 - einfo "from upstream which otherwise would have it live in /usr/etc/."
225 - einfo ""
226 - einfo "Protip: When using node-gyp to install native modules, you can"
227 - einfo "avoid having to download extras by doing the following:"
228 - einfo "$ node-gyp --nodedir /usr/include/node <command>"
229 -}