From 51af5f0eb4cddbe6aa7953717873691d77aae9ff Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 10 Jul 2019 23:40:16 +0100 Subject: gentoo resync : 11.07.2019 --- net-libs/nodejs/Manifest | 4 +- net-libs/nodejs/nodejs-12.4.0.ebuild | 208 ----------------------------------- net-libs/nodejs/nodejs-12.6.0.ebuild | 208 +++++++++++++++++++++++++++++++++++ 3 files changed, 210 insertions(+), 210 deletions(-) delete mode 100644 net-libs/nodejs/nodejs-12.4.0.ebuild create mode 100644 net-libs/nodejs/nodejs-12.6.0.ebuild (limited to 'net-libs/nodejs') diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest index 4f7ee9a83aa5..4b9c1a759b2d 100644 --- a/net-libs/nodejs/Manifest +++ b/net-libs/nodejs/Manifest @@ -6,8 +6,8 @@ DIST node-v10.15.3.tar.xz 20262632 BLAKE2B d65d4e274fa829be5cda1970b0ebe7081e847 DIST node-v10.16.0.tar.xz 21480088 BLAKE2B de91e718893aa0bb87b75225a484281370ca1054fed919d6177911ca8e57228a0925c077a02397efd05594f72438d47b264d6f4b91623173e3a577a58a5d86db SHA512 df197c7b929fe1e0acf0334dbeb45be4c0cfa3266f9ddb513eafffcd6405bc02cba2fcbd34a7a5bef2e45a1d61ef3734ca0afe7295904ed563744fe06751cc62 DIST node-v11.14.0.tar.xz 22106812 BLAKE2B 3a8dd9feb5916f235bf69d0610e32c1861e64f427b6de5ec27b3634268f273826f271cf5ea821042420d3b3f348124be2ce2fda13d0addea092db1338c9f95f7 SHA512 4e8033ea0f326fe5a8372c81771cd58242881ac7db905f697ce79ef9cb3ba2dfe2b94fb24a36775761c72ac531096c5e18a8574f933d76c1b652b18419b25446 DIST node-v11.15.0.tar.xz 22115480 BLAKE2B ed1f621e46d24051f8d84255875e7cb2c1bc0f9432a12fcc35dc5e336a71bb3e7f511146d112d1f236f9f978a68987d80331c22699479ce63b7bf30e50643219 SHA512 48270620fab3eef86c21387b316ce9054e2b0aac60a36f7fc08d18ad4a11c8d2082886ca20a455fb4a74a561d7e97c77403227ec9a83a13c47fa230b47a5af2e -DIST node-v12.4.0.tar.xz 22479676 BLAKE2B 86abd574843a8aa8a17fed378e3041288eea1f41c51f0613150129be9bd38ce83e88dde884cef81fe84f746f47f027ffe37bc07773112c4a9b1a3b12ffd40ee2 SHA512 04a9eeedaef2c151e993d9ca3d43d56d85e24b5f5d04fbee1b4556d192badb3e4f3c735dee58abf0a43775d2de335f054e23aedae48140148e2466245311d306 DIST node-v12.5.0.tar.xz 22565576 BLAKE2B dadda02d43d63f69b387c81784d76d756f0c132abef7746c9a36f5fe3fcdd3d74d9ef3fd5d8d3afd7983f28f9514cc981bfc48dff9fcd155ad002e4ef012aea3 SHA512 ae1133b6cb0856c10a081dee1f8b21f279b366f99efd6dcd24b9768b0928088ef89c3cd34ed5dd683459d30cbb54015e20616d8dfeda4a522f457d23f80a2f8f +DIST node-v12.6.0.tar.xz 22609832 BLAKE2B cc304e0b41bd7c455d4a014b612259c5f91d897432bd1f02bd6088fcb5c7acf0c11d323b44e842bb699003b760425b0c9fd3c9a3587abba9ba25652ca1f2decb SHA512 cd6c1b9c0d1f9db6d3a413f1b437cfaff51a67e66033d2235eaacb49650fe9789cd8994cb374cc8aeccfc82f1dd6e6cc5aed1f39a751d7044a5af45c74d6013f DIST node-v4.9.1.tar.xz 13250164 BLAKE2B 7a689b99bb4bf507f7f21dd2c096a5766d023a8174c0f468cab37365af1920b8700da04157e1a406917790524255ef32c243a74662fd50ef7d3567d189dac9cf SHA512 690c9fdf608e5194069a10955bdd94ec87cb1c308f13bc4d2cae92fa01436ace10fadf58f2e51d477dde6c570b23edc1c71fafea79bfc9cab2903eb2fa5f87aa DIST node-v6.14.4.tar.xz 15842824 BLAKE2B fc56364be64fe5824e2bb50d861ebf8f58f9895f2c9c108b8df3315b127ffb2755eac85c28165ac9779adab4611ce8f5ea1a5745f43ebaa1389e82b8215c6396 SHA512 1ead0c097ec125230dd631f19a5c3ec06a1371f9ca3b392b5ad08fcc227dd0142f33ad52f96890c2c17448a4951a635b9099dfff00d7d8b3ffb59b07904d1bfa DIST node-v6.17.1.tar.xz 15858444 BLAKE2B ad050f71452f0ddf989e66a4eb02e88e4e5001faa2bcb0eae6b57784da87ba1d8251201e3a3d15245bb4d846f31f39854ddfae47aa1212c0526ec717438ba778 SHA512 6938c4864a96f5698ebc4e9a1228644820789d5402f42348eb1ff9ccd64f31bb91309a1f3301636b1117424c88b0b41b42baae51a1070d5c532604e5d7d7b868 @@ -18,8 +18,8 @@ EBUILD nodejs-10.15.3.ebuild 6442 BLAKE2B 8ae691a1aa9e3a2eeec5096c5890fa6ae2d877 EBUILD nodejs-10.16.0.ebuild 6444 BLAKE2B b2b9b7389dc48866543b7bbba9745587e954309160d6158df1339116a67e0cd7a74c0ff4cdbc024d90f4b26f731b3b4ad42c294f792550c110ac32e7df832169 SHA512 ae9b06ec1e04fd41044a8f0dad681df222e7384ca9fd01b461e475d0b60b88b9b9481303a6801c085d1ee31d1a9bede849dd35927fe99b3d96a2aef321e8a997 EBUILD nodejs-11.14.0.ebuild 6486 BLAKE2B 9098ad26511d8d268fb0e1073f126570374aa3c6b81d0a69944e21da7d2cf6340a9df14eb30296f192dbac31c3c8574128f500055e2370f3ee5f5c3e3e0022c8 SHA512 006b48fce401ec454df6a41fe050a865d5f7372448d778a775ec67c10960341812f39f8411e67f7b6797b0362f23d6fce870cda6ba682a687adf87e3d069723a EBUILD nodejs-11.15.0.ebuild 6458 BLAKE2B f5eb4de9847e708dcc43d8917671592459ff9357c7a26128ba9b9ed1e0fbfba19c419a234dda9c7fa528ff75590793cab2ea66abbb6929766289be87272f741d SHA512 9aaa1c5b5cd446f7f11896ab53ddf19c1552d5b635dcb5cc50745e9e3e886d6539becffb9f9568a39bca6930ee32485f82f4e426ef1da3a44ec7ac414ad5f442 -EBUILD nodejs-12.4.0.ebuild 6464 BLAKE2B 5b0b3a2d086f787e38f782ac17f608208bac066a38b293d51fe9f2cd1a93fba2749338600a14037d6c1193b336baa0703b3cc4c38c356084787edcd4ebd6ee7e SHA512 fbde4d8d4017cad90c9bee6b5c3dd92cea4d066b09230e9dba9ac2cd029e4fcf937104e7e624dada880f9a3f1a8042a9e074088412f2d46d2c3d39f1d378597e EBUILD nodejs-12.5.0.ebuild 6464 BLAKE2B 5b0b3a2d086f787e38f782ac17f608208bac066a38b293d51fe9f2cd1a93fba2749338600a14037d6c1193b336baa0703b3cc4c38c356084787edcd4ebd6ee7e SHA512 fbde4d8d4017cad90c9bee6b5c3dd92cea4d066b09230e9dba9ac2cd029e4fcf937104e7e624dada880f9a3f1a8042a9e074088412f2d46d2c3d39f1d378597e +EBUILD nodejs-12.6.0.ebuild 6464 BLAKE2B ba07f72d1e8920e627f6a995fe4ff42ba345401d411159868c451925d4c7e4652f9d118b32f84dcd5f4dadac937c7196bbf04cab5bff18435de9783a62b2facc SHA512 bf1e34211ea705ec63047af213a67e8efd53ea09443aa11def5f1882e9c9dbcb99b774bab67502e8322308e8bab2a9b220723f811868db40e370bd800783fb1a EBUILD nodejs-4.9.1.ebuild 4425 BLAKE2B c5167cf5f59209054cac22f49fd60803001d39949caf1be2f1c49356726884ec5e853be95eee3173548c1d6668aadc0b1f470c44b95150d959fcd33638614f63 SHA512 23280279876f8e8fa37e764bac0f9049b2fc32d1c405a5d5dc8136e92dac1b896c82944b713fdc99daa35806f814ef15f2b63debeb8bc5a2bccf6b8099c8c31e EBUILD nodejs-6.14.4.ebuild 6153 BLAKE2B 6b358c6e4361f34761a577c10f0bcdf9273ee75dbbbafb652df8a374db376257c968ba9bc40142920266cf58b857f055ee46f161f31e756ba6f7124414976380 SHA512 0513974058c7c878f1104ab95b14d6788e293e4850b0d2d72979f3a3f9538854564eb6bb55b788f3616a4a0cd18d9f8b20e407c5aa221195a185ffbea5d9ccb7 EBUILD nodejs-6.17.1.ebuild 6202 BLAKE2B f0bc03d031211502a09878f0177729f00c1625a91ec89b6971cd1329d4f05bee838e04ae066f84bf7555f844fc0fff6d33cf15c80fdb800ee0bfb40a1c1ef79f SHA512 9ec3f757e9bd5dbb375bf03820ea277315f974b76029422d12c9fcef5e86c1b704203a21079384e5375968d1654d325d583cd09e89fa9bf1e8e62fe65c7b770a diff --git a/net-libs/nodejs/nodejs-12.4.0.ebuild b/net-libs/nodejs/nodejs-12.4.0.ebuild deleted file mode 100644 index 1d6bf82084f3..000000000000 --- a/net-libs/nodejs/nodejs-12.4.0.ebuild +++ /dev/null @@ -1,208 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="threads" -inherit bash-completion-r1 flag-o-matic pax-utils python-single-r1 toolchain-funcs - -DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" -HOMEPAGE="https://nodejs.org/" -SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" - -LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" -IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" -REQUIRED_USE=" - ${PYTHON_REQUIRED_USE} - inspector? ( icu ssl ) - npm? ( ssl ) -" - -RDEPEND=" - >=dev-libs/libuv-1.29.1:= - >=net-dns/c-ares-1.15.0 - >=net-libs/http-parser-2.8.0:= - >=net-libs/nghttp2-1.38.0 - sys-libs/zlib - icu? ( >=dev-libs/icu-64.2:= ) - ssl? ( >=dev-libs/openssl-1.1.1:0= ) -" -DEPEND=" - ${RDEPEND} - ${PYTHON_DEPS} - systemtap? ( dev-util/systemtap ) - test? ( net-misc/curl ) -" -PATCHES=( - "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch - "${FILESDIR}"/${PN}-99999999-llhttp.patch -) -S="${WORKDIR}/node-v${PV}" - -pkg_pretend() { - (use x86 && ! use cpu_flags_x86_sse2) && \ - die "Your CPU doesn't support the required SSE2 instruction." - - ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ - die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." -} - -src_prepare() { - tc-export CC CXX PKG_CONFIG - export V=1 - export BUILDTYPE=Release - - # fix compilation on Darwin - # https://code.google.com/p/gyp/issues/detail?id=260 - sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die - - # make sure we use python2.* while using gyp - sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die - sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die - - # less verbose install output (stating the same as portage, basically) - sed -i -e "/print/d" tools/install.py || die - - # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 - local LIBDIR=$(get_libdir) - sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die - sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die - - # Avoid writing a depfile, not useful - sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die - - sed -i -e "/'-O3'/d" common.gypi node.gypi || die - - # Avoid a test that I've only been able to reproduce from emerge. It doesnt - # seem sandbox related either (invoking it from a sandbox works fine). - # The issue is that no stdin handle is openened when asked for one. - # It doesn't really belong upstream , so it'll just be removed until someone - # with more gentoo-knowledge than me (jbergstroem) figures it out. - rm test/parallel/test-stdout-close-unref.js || die - - # debug builds. change install path, remove optimisations and override buildtype - if use debug; then - sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die - BUILDTYPE=Debug - fi - - default -} - -src_configure() { - local myconf=( - --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 - --shared-zlib - ) - use debug && myconf+=( --debug ) - use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) - use inspector || myconf+=( --without-inspector ) - use npm || myconf+=( --without-npm ) - use snapshot && myconf+=( --with-snapshot ) - use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl ) - - local myarch="" - case ${ABI} in - amd64) myarch="x64";; - arm) myarch="arm";; - arm64) myarch="arm64";; - ppc64) myarch="ppc64";; - x32) myarch="x32";; - x86) myarch="ia32";; - *) myarch="${ABI}";; - esac - - GYP_DEFINES="linux_use_gold_flags=0 - linux_use_bundled_binutils=0 - linux_use_bundled_gold=0" \ - "${PYTHON}" configure \ - --prefix="${EPREFIX}"/usr \ - --dest-cpu=${myarch} \ - $(use_with systemtap dtrace) \ - "${myconf[@]}" || die -} - -src_compile() { - emake -C out mksnapshot - pax-mark m "out/${BUILDTYPE}/mksnapshot" - emake -C out -} - -src_install() { - local LIBDIR="${ED}/usr/$(get_libdir)" - default - - pax-mark -m "${ED}"usr/bin/node - - # set up a symlink structure that node-gyp expects.. - dodir /usr/include/node/deps/{v8,uv} - dosym . /usr/include/node/src - for var in deps/{uv,v8}/include; do - dosym ../.. /usr/include/node/${var} - done - - if use doc; then - # Patch docs to make them offline readable - for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do - sed -i '/fonts.googleapis.com/ d' $i; - done - # Install docs - docinto html - dodoc -r "${S}"/doc/* - fi - - if use npm; then - dodir /etc/npm - - # Install bash completion for `npm` - # We need to temporarily replace default config path since - # npm otherwise tries to write outside of the sandbox - local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" - sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die - local tmp_npm_completion_file="$(emktemp)" - "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" - newbashcomp "${tmp_npm_completion_file}" npm - sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die - - # Move man pages - doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* - - # Clean up - rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die - rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die - - local find_exp="-or -name" - local find_name=() - for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ - ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ - "*.md" "*.markdown" "*.bat" "*.cmd"; do - find_name+=( ${find_exp} "${match}" ) - done - - # Remove various development and/or inappropriate files and - # useless docs of dependend packages. - find "${LIBDIR}"/node_modules \ - \( -type d -name examples \) -or \( -type f \( \ - -iname "LICEN?E*" \ - "${find_name[@]}" \ - \) \) -exec rm -rf "{}" \; - fi - - mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die -} - -src_test() { - out/${BUILDTYPE}/cctest || die - "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die -} - -pkg_postinst() { - elog "The global npm config lives in /etc/npm. This deviates slightly" - elog "from upstream which otherwise would have it live in /usr/etc/." - elog "" - elog "Protip: When using node-gyp to install native modules, you can" - elog "avoid having to download extras by doing the following:" - elog "$ node-gyp --nodedir /usr/include/node " -} diff --git a/net-libs/nodejs/nodejs-12.6.0.ebuild b/net-libs/nodejs/nodejs-12.6.0.ebuild new file mode 100644 index 000000000000..456799802d77 --- /dev/null +++ b/net-libs/nodejs/nodejs-12.6.0.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="threads" +inherit bash-completion-r1 flag-o-matic pax-utils python-single-r1 toolchain-funcs + +DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine" +HOMEPAGE="https://nodejs.org/" +SRC_URI="https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz" + +LICENSE="Apache-1.1 Apache-2.0 BSD BSD-2 MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos" +IUSE="cpu_flags_x86_sse2 debug doc icu inspector +npm +snapshot +ssl systemtap test" +REQUIRED_USE=" + ${PYTHON_REQUIRED_USE} + inspector? ( icu ssl ) + npm? ( ssl ) +" + +RDEPEND=" + >=dev-libs/libuv-1.30.1:= + >=net-dns/c-ares-1.15.0 + >=net-libs/http-parser-2.8.0:= + >=net-libs/nghttp2-1.38.0 + sys-libs/zlib + icu? ( >=dev-libs/icu-64.2:= ) + ssl? ( >=dev-libs/openssl-1.1.1:0= ) +" +DEPEND=" + ${RDEPEND} + ${PYTHON_DEPS} + systemtap? ( dev-util/systemtap ) + test? ( net-misc/curl ) +" +PATCHES=( + "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch + "${FILESDIR}"/${PN}-99999999-llhttp.patch +) +S="${WORKDIR}/node-v${PV}" + +pkg_pretend() { + (use x86 && ! use cpu_flags_x86_sse2) && \ + die "Your CPU doesn't support the required SSE2 instruction." + + ( [[ ${MERGE_TYPE} != "binary" ]] && ! test-flag-CXX -std=c++11 ) && \ + die "Your compiler doesn't support C++11. Use GCC 4.8, Clang 3.3 or newer." +} + +src_prepare() { + tc-export CC CXX PKG_CONFIG + export V=1 + export BUILDTYPE=Release + + # fix compilation on Darwin + # https://code.google.com/p/gyp/issues/detail?id=260 + sed -i -e "/append('-arch/d" tools/gyp/pylib/gyp/xcode_emulation.py || die + + # make sure we use python2.* while using gyp + sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die + sed -i -e "s/|| 'python2'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die + + # less verbose install output (stating the same as portage, basically) + sed -i -e "/print/d" tools/install.py || die + + # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504 + local LIBDIR=$(get_libdir) + sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die + sed -i -e "s/'lib'/'${LIBDIR}'/" deps/npm/lib/npm.js || die + + # Avoid writing a depfile, not useful + sed -i -e "/DEPFLAGS =/d" tools/gyp/pylib/gyp/generator/make.py || die + + sed -i -e "/'-O3'/d" common.gypi node.gypi || die + + # Avoid a test that I've only been able to reproduce from emerge. It doesnt + # seem sandbox related either (invoking it from a sandbox works fine). + # The issue is that no stdin handle is openened when asked for one. + # It doesn't really belong upstream , so it'll just be removed until someone + # with more gentoo-knowledge than me (jbergstroem) figures it out. + rm test/parallel/test-stdout-close-unref.js || die + + # debug builds. change install path, remove optimisations and override buildtype + if use debug; then + sed -i -e "s|out/Release/|out/Debug/|g" tools/install.py || die + BUILDTYPE=Debug + fi + + default +} + +src_configure() { + local myconf=( + --shared-cares --shared-http-parser --shared-libuv --shared-nghttp2 + --shared-zlib + ) + use debug && myconf+=( --debug ) + use icu && myconf+=( --with-intl=system-icu ) || myconf+=( --with-intl=none ) + use inspector || myconf+=( --without-inspector ) + use npm || myconf+=( --without-npm ) + use snapshot && myconf+=( --with-snapshot ) + use ssl && myconf+=( --shared-openssl --openssl-use-def-ca-store ) || myconf+=( --without-ssl ) + + local myarch="" + case ${ABI} in + amd64) myarch="x64";; + arm) myarch="arm";; + arm64) myarch="arm64";; + ppc64) myarch="ppc64";; + x32) myarch="x32";; + x86) myarch="ia32";; + *) myarch="${ABI}";; + esac + + GYP_DEFINES="linux_use_gold_flags=0 + linux_use_bundled_binutils=0 + linux_use_bundled_gold=0" \ + "${PYTHON}" configure \ + --prefix="${EPREFIX}"/usr \ + --dest-cpu=${myarch} \ + $(use_with systemtap dtrace) \ + "${myconf[@]}" || die +} + +src_compile() { + emake -C out mksnapshot + pax-mark m "out/${BUILDTYPE}/mksnapshot" + emake -C out +} + +src_install() { + local LIBDIR="${ED}/usr/$(get_libdir)" + default + + pax-mark -m "${ED}"usr/bin/node + + # set up a symlink structure that node-gyp expects.. + dodir /usr/include/node/deps/{v8,uv} + dosym . /usr/include/node/src + for var in deps/{uv,v8}/include; do + dosym ../.. /usr/include/node/${var} + done + + if use doc; then + # Patch docs to make them offline readable + for i in `grep -rl 'fonts.googleapis.com' "${S}"/out/doc/api/*`; do + sed -i '/fonts.googleapis.com/ d' $i; + done + # Install docs + docinto html + dodoc -r "${S}"/doc/* + fi + + if use npm; then + dodir /etc/npm + + # Install bash completion for `npm` + # We need to temporarily replace default config path since + # npm otherwise tries to write outside of the sandbox + local npm_config="usr/$(get_libdir)/node_modules/npm/lib/config/core.js" + sed -i -e "s|'/etc'|'${ED}/etc'|g" "${ED}/${npm_config}" || die + local tmp_npm_completion_file="$(emktemp)" + "${ED}/usr/bin/npm" completion > "${tmp_npm_completion_file}" + newbashcomp "${tmp_npm_completion_file}" npm + sed -i -e "s|'${ED}/etc'|'/etc'|g" "${ED}/${npm_config}" || die + + # Move man pages + doman "${LIBDIR}"/node_modules/npm/man/man{1,5,7}/* + + # Clean up + rm "${LIBDIR}"/node_modules/npm/{.mailmap,.npmignore,Makefile} || die + rm -rf "${LIBDIR}"/node_modules/npm/{doc,html,man} || die + + local find_exp="-or -name" + local find_name=() + for match in "AUTHORS*" "CHANGELOG*" "CONTRIBUT*" "README*" \ + ".travis.yml" ".eslint*" ".wercker.yml" ".npmignore" \ + "*.md" "*.markdown" "*.bat" "*.cmd"; do + find_name+=( ${find_exp} "${match}" ) + done + + # Remove various development and/or inappropriate files and + # useless docs of dependend packages. + find "${LIBDIR}"/node_modules \ + \( -type d -name examples \) -or \( -type f \( \ + -iname "LICEN?E*" \ + "${find_name[@]}" \ + \) \) -exec rm -rf "{}" \; + fi + + mv "${ED}"/usr/share/doc/node "${ED}"/usr/share/doc/${PF} || die +} + +src_test() { + out/${BUILDTYPE}/cctest || die + "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die +} + +pkg_postinst() { + elog "The global npm config lives in /etc/npm. This deviates slightly" + elog "from upstream which otherwise would have it live in /usr/etc/." + elog "" + elog "Protip: When using node-gyp to install native modules, you can" + elog "avoid having to download extras by doing the following:" + elog "$ node-gyp --nodedir /usr/include/node " +} -- cgit v1.2.3