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: Sat, 28 Sep 2019 11:01:37
Message-Id: 1569668490.03c151dcb3be8ededf9fce9d55a969f8b8fa8363.jer@gentoo
1 commit: 03c151dcb3be8ededf9fce9d55a969f8b8fa8363
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 28 07:46:33 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 28 11:01:30 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03c151dc
7
8 net-libs/nodejs: Old
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.17
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-libs/nodejs/Manifest | 1 -
14 net-libs/nodejs/nodejs-12.9.1.ebuild | 206 -----------------------------------
15 2 files changed, 207 deletions(-)
16
17 diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest
18 index 723a0e99a68..100ee11d28e 100644
19 --- a/net-libs/nodejs/Manifest
20 +++ b/net-libs/nodejs/Manifest
21 @@ -2,7 +2,6 @@ DIST node-v0.12.18.tar.gz 19842591 BLAKE2B f94f4de6e2875267be194580c645087a262b9
22 DIST node-v10.16.3.tar.xz 21505540 BLAKE2B 2ae6c3ce96a42cb72a388ca7727affb1e2eae06b997098bd8cad2b339b888f1f188c868d39631c51e10ef7b3a5a9173a3b016afe9fa7a4fb74c24a584781c329 SHA512 5d5457adaae87e41699cdf5bd62d32e9590248f7dadd583614cca9078a1749a4ee477433ebbe4278ec872fdfc377d99097c1e06073e0fd47c8c6597256ccdeb7
23 DIST node-v12.10.0.tar.xz 22726116 BLAKE2B deb6ecaec54233050eaeb335d58020b8a82009bbab51c41c00784cab3003e57dbc96f3c25715deefbb5b3aee704b3db920cbb650af33cbcb1a62c1bb654f48f8 SHA512 7eb57b40effa9627b93c74ddc01ce1c044e878c669969c506ed40f72a7946c7c6951931c4fe4fbef456386ad459f7f4f1d0f04177e38343375aa463974ca1dba
24 DIST node-v12.11.0.tar.xz 22817256 BLAKE2B 4e568a50002c436bd76fc851b231ddc52ef25703f13b633eb3e6634b20d78d3462802274a9df777d93ee05b49dc4771012ef1a466012d0de90ca34327d42f4ae SHA512 4d94f1c9a4fd0cc2ea21aea8ea41c595d18fa44e53d0ed35693c3d547a31bee3bcb7842dd5011cbd9c610919c1ac03d98c38ca85bdddd5555608268f2b47b1f4
25 -DIST node-v12.9.1.tar.xz 22714668 BLAKE2B c2ab1d67d1f9cf9dee4a1fcb0f1f8f23e2536f526290baf9d5dd05867695f763d8cd8e501b044cb42b383a897f5e016c7a57aecc2d5a4ca58ab3d50020db1f07 SHA512 efe5fbf0545a3e9c37c7598abd89841073cfafefc04a9b5f9f95c8c51357bf3d5384701fd5524ff8fcaef833bca87c72cbf1f8755ee406e9437ad8ad875af18e
26 DIST node-v4.9.1.tar.xz 13250164 BLAKE2B 7a689b99bb4bf507f7f21dd2c096a5766d023a8174c0f468cab37365af1920b8700da04157e1a406917790524255ef32c243a74662fd50ef7d3567d189dac9cf SHA512 690c9fdf608e5194069a10955bdd94ec87cb1c308f13bc4d2cae92fa01436ace10fadf58f2e51d477dde6c570b23edc1c71fafea79bfc9cab2903eb2fa5f87aa
27 DIST node-v6.14.4.tar.xz 15842824 BLAKE2B fc56364be64fe5824e2bb50d861ebf8f58f9895f2c9c108b8df3315b127ffb2755eac85c28165ac9779adab4611ce8f5ea1a5745f43ebaa1389e82b8215c6396 SHA512 1ead0c097ec125230dd631f19a5c3ec06a1371f9ca3b392b5ad08fcc227dd0142f33ad52f96890c2c17448a4951a635b9099dfff00d7d8b3ffb59b07904d1bfa
28 DIST node-v6.17.1.tar.xz 15858444 BLAKE2B ad050f71452f0ddf989e66a4eb02e88e4e5001faa2bcb0eae6b57784da87ba1d8251201e3a3d15245bb4d846f31f39854ddfae47aa1212c0526ec717438ba778 SHA512 6938c4864a96f5698ebc4e9a1228644820789d5402f42348eb1ff9ccd64f31bb91309a1f3301636b1117424c88b0b41b42baae51a1070d5c532604e5d7d7b868
29
30 diff --git a/net-libs/nodejs/nodejs-12.9.1.ebuild b/net-libs/nodejs/nodejs-12.9.1.ebuild
31 deleted file mode 100644
32 index c6d70169aef..00000000000
33 --- a/net-libs/nodejs/nodejs-12.9.1.ebuild
34 +++ /dev/null
35 @@ -1,206 +0,0 @@
36 -# Copyright 1999-2019 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=7
40 -PYTHON_COMPAT=( python2_7 )
41 -PYTHON_REQ_USE="threads"
42 -inherit bash-completion-r1 flag-o-matic pax-utils python-any-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 inspector +npm +snapshot +ssl systemtap test"
52 -REQUIRED_USE="
53 - inspector? ( icu ssl )
54 - npm? ( ssl )
55 -"
56 -
57 -RDEPEND="
58 - >=dev-libs/libuv-1.31.0:=
59 - >=net-dns/c-ares-1.15.0
60 - >=net-libs/http-parser-2.8.0:=
61 - >=net-libs/nghttp2-1.39.2
62 - sys-libs/zlib
63 - icu? ( >=dev-libs/icu-64.2:= )
64 - ssl? ( >=dev-libs/openssl-1.1.1:0= )
65 -"
66 -DEPEND="
67 - ${RDEPEND}
68 - ${PYTHON_DEPS}
69 - systemtap? ( dev-util/systemtap )
70 - test? ( net-misc/curl )
71 -"
72 -PATCHES=(
73 - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch
74 - "${FILESDIR}"/${PN}-99999999-llhttp.patch
75 -)
76 -S="${WORKDIR}/node-v${PV}"
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 -
98 - # less verbose install output (stating the same as portage, basically)
99 - sed -i -e "/print/d" tools/install.py || die
100 -
101 - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
102 - local LIBDIR=$(get_libdir)
103 - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || 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 - sed -i -e "/'-O3'/d" common.gypi node.gypi || die
110 -
111 - # Avoid a test that I've only been able to reproduce from emerge. It doesnt
112 - # seem sandbox related either (invoking it from a sandbox works fine).
113 - # The issue is that no stdin handle is openened when asked for one.
114 - # It doesn't really belong upstream , so it'll just be removed until someone
115 - # with more gentoo-knowledge than me (jbergstroem) figures it out.
116 - rm test/parallel/test-stdout-close-unref.js || die
117 -
118 - # debug builds. change install path, remove optimisations and override buildtype
119 - if use debug; then
120 - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die
121 - BUILDTYPE=Debug
122 - fi
123 -
124 - default
125 -}
126 -
127 -src_configure() {
128 - local myconf=(
129 - --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2
130 - --shared-zlib
131 - )
132 - use debug && myconf+=( --debug )
133 - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none )
134 - use inspector || myconf+=( --without-inspector )
135 - use npm || myconf+=( --without-npm )
136 - use snapshot && myconf+=( --with-snapshot )
137 - use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl )
138 -
139 - local myarch=""
140 - case ${ABI} in
141 - amd64) myarch="x64";;
142 - arm) myarch="arm";;
143 - arm64) myarch="arm64";;
144 - ppc64) myarch="ppc64";;
145 - x32) myarch="x32";;
146 - x86) myarch="ia32";;
147 - *) myarch="${ABI}";;
148 - esac
149 -
150 - GYP_DEFINES="linux_use_gold_flags=0
151 - linux_use_bundled_binutils=0
152 - linux_use_bundled_gold=0" \
153 - "${PYTHON}" configure \
154 - --prefix="${EPREFIX}"/usr \
155 - --dest-cpu=${myarch} \
156 - $(use_with systemtap dtrace) \
157 - "${myconf[@]}" || die
158 -}
159 -
160 -src_compile() {
161 - emake -C out mksnapshot
162 - pax-mark m "out/${BUILDTYPE}/mksnapshot"
163 - emake -C out
164 -}
165 -
166 -src_install() {
167 - local LIBDIR="${ED}/usr/$(get_libdir)"
168 - default
169 -
170 - pax-mark -m "${ED}"/usr/bin/node
171 -
172 - # set up a symlink structure that node-gyp expects..
173 - dodir /usr/include/node/deps/{v8,uv}
174 - dosym . /usr/include/node/src
175 - for var in deps/{uv,v8}/include; do
176 - dosym ../.. /usr/include/node/${var}
177 - done
178 -
179 - if use doc; then
180 - # Patch docs to make them offline readable
181 - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do
182 - sed -i '/fonts.googleapis.com/ d' $i;
183 - done
184 - # Install docs
185 - docinto html
186 - dodoc -r "${S}"/doc/*
187 - fi
188 -
189 - if use npm; then
190 - dodir /etc/npm
191 -
192 - # Install bash completion for `npm`
193 - # We need to temporarily replace default config path since
194 - # npm otherwise tries to write outside of the sandbox
195 - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js"
196 - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die
197 - local tmp_npm_completion_file="$(emktemp)"
198 - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}"
199 - newbashcomp "${tmp_npm_completion_file}" npm
200 - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die
201 -
202 - # Move man pages
203 - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/*
204 -
205 - # Clean up
206 - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die
207 - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die
208 -
209 - local find_exp="-or -name"
210 - local find_name=()
211 - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \
212 - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \
213 - "*.md" "*.markdown" "*.bat" "*.cmd"; do
214 - find_name+=( ${find_exp} "${match}" )
215 - done
216 -
217 - # Remove various development and/or inappropriate files and
218 - # useless docs of dependend packages.
219 - find "${LIBDIR}"/node_modules \
220 - \( -type d -name examples \) -or \( -type f \( \
221 - -iname "LICEN?E*" \
222 - "${find_name[@]}" \
223 - \) \) -exec rm -rf "{}" \;
224 - fi
225 -
226 - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die
227 -}
228 -
229 -src_test() {
230 - out/${BUILDTYPE}/cctest || die
231 - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die
232 -}
233 -
234 -pkg_postinst() {
235 - elog "The global npm config lives in /etc/npm. This deviates slightly"
236 - elog "from upstream which otherwise would have it live in /usr/etc/."
237 - elog ""
238 - elog "Protip: When using node-gyp to install native modules, you can"
239 - elog "avoid having to download extras by doing the following:"
240 - elog "$ node-gyp --nodedir /usr/include/node <command>"
241 -}