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