From 70b82ae359a5538711e103b0e8dfb92654296644 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 27 Oct 2018 12:48:57 +0100 Subject: gentoo resync : 27.10.2018 --- net-libs/nodejs/Manifest | 2 + net-libs/nodejs/nodejs-11.0.0.ebuild | 204 +++++++++++++++++++++++++++++++++++ 2 files changed, 206 insertions(+) create mode 100644 net-libs/nodejs/nodejs-11.0.0.ebuild (limited to 'net-libs/nodejs') diff --git a/net-libs/nodejs/Manifest b/net-libs/nodejs/Manifest index 69d7fcbe36d1..78bcb9512c4b 100644 --- a/net-libs/nodejs/Manifest +++ b/net-libs/nodejs/Manifest @@ -5,6 +5,7 @@ DIST node-v10.10.0.tar.xz 19960760 BLAKE2B dc16e2afba4be727c5169ac5cd77324e0e8d7 DIST node-v10.11.0.tar.xz 20144576 BLAKE2B 956d940554748f420589adab0f14bd6fcc6a4781cdecd537abd6eb9aa43e9cf754ef009b20d416f1ef4c9a01ef91a27a59a8c080c1c0a49a59388f75713d6286 SHA512 00a678a829de9b836e77dd0806799029b657cf000369ca653540d7e1b82c3895da43dbbfe4d3c2b3b2b1e711bf55b3835a351fad18affdd0c25dcceea8e3406c DIST node-v10.12.0.tar.xz 20185168 BLAKE2B 1a827ed08222900ef196921a57d64466fc558412bb27a26759553686c69d59d8e6686394a484156d254a01030077b09c9abfec87a7716aee06dbe9937a861efd SHA512 3b59bbe7b795e7a85520f6b4691806d8939d26cc2a5e5d22e6406d3d373ee7758da225bd25b6f6b71b105e3d7ef4c58220bfa5e558afd0cd873fbd7d6ba9efc4 DIST node-v10.9.0.tar.xz 19987812 BLAKE2B 4a5bd257cd527500b691b15d177bde53158b5e46e710ffeaa45224bae821cfaffdf59f24ad6bdc822cf468b90c1a4422a2f82d29e1d4b2dc0f838e3e0ab5b4ac SHA512 19c7366b4c9d1e255b5ac56e974ff86b9ca87c363534b467ecc3c59e170b891e86c479a2bcda6647c6df686b018caaedea84270e848b93a4f1c80ff04af12461 +DIST node-v11.0.0.tar.xz 20142548 BLAKE2B 97fc14392c449abde0c2b4ef27f020ac215747a5cca327b07ed735dd9867a01f1a64bfa19a62758111b0fbdca92b5536c15d7946bf968b5c3eab9c0b55f7dd26 SHA512 232243f37a8344775b2e0302601ec23310a8915e0913dc0cb0133df75cb7aad315ca0a6d039f8f9e6ae0d9f98aa8049532d80d470cf9ea0e309f8183be870000 DIST node-v4.8.7.tar.xz 13370828 BLAKE2B b1ee93a586b66f8582783b1be50667547afe4bf48038ebc0b8148db55542cbc0520ac84ef88e4a7f453cabc245f484c32dbc238c1932bbc708791ceeb5c9d2ab SHA512 25837a31023747723b146c45984a5b2096b61c0aa43cbf45fc8ff50b4bd5079bd0bc9f1dfd3fb076817448dc5537eb93ffb2f345280b7756ba93b67ad757c696 DIST node-v4.9.1.tar.xz 13250164 BLAKE2B 7a689b99bb4bf507f7f21dd2c096a5766d023a8174c0f468cab37365af1920b8700da04157e1a406917790524255ef32c243a74662fd50ef7d3567d189dac9cf SHA512 690c9fdf608e5194069a10955bdd94ec87cb1c308f13bc4d2cae92fa01436ace10fadf58f2e51d477dde6c570b23edc1c71fafea79bfc9cab2903eb2fa5f87aa DIST node-v6.11.5.tar.xz 15699404 BLAKE2B ba2df91bf5ef38cedb60b42919cf56f16807e619a81876fc92a5741e49da7ec91c4239d00f549c5e80d0bb8282bb9b396dd984507916cd18d61b403a3a7cef94 SHA512 62490725ef7957294c1bddf21ef0626c7472876791210168116501255ecee58457e9de9b044e10033706243299bbfd1495efeca169596fbf26f5eeba6d8fa4c9 @@ -16,6 +17,7 @@ EBUILD nodejs-10.10.0.ebuild 6353 BLAKE2B fdb46cd02319dff1cce1b3c19523998da5b7d6 EBUILD nodejs-10.11.0.ebuild 6353 BLAKE2B 844b108d90a89a4fc70e1294b3e1efc4181a3555787a3446806ed62b79685a07544184da74face287074af67d2ec8abb9b1a91f3d0370b0d48d7185d1b7015ed SHA512 606e610f800ce9792d689fc813fdc09270ced425b4e76e07e8767853c33041f69d5cfa117976cf583c2bb811cfabf9ab2f86a287ed25b8bff9af4618bcd92660 EBUILD nodejs-10.12.0.ebuild 6414 BLAKE2B 8f684f966fbc4e4a01a11dfae5bdd8ffd67ddbf896c229cc885e08e7b6360d07e3f3bc4eeee7086bde006d1098714c7077b777fc01d67383edfa37ffefebf147 SHA512 4e5782138680633590896771b5f548952a8b2f7665d0040d00bb37779616c44e3740bc808ed5a51114bcdd7b51d70a35183a1febf78eeaf53680137ecccd84b7 EBUILD nodejs-10.9.0.ebuild 6353 BLAKE2B 7eb578378be767b686b216346f8f138dc26fe1e50308dc39d6a7add18fe2d8e51f7020b38b70b9aca0844d3523c08b052f513b22adb73bd0a2663893ae596380 SHA512 b09ab8e4c6248dc7512a5ad06bc53f551c71c3ba32ccd4cbca58e451aac432d6000f9686d7e45ffcb9363c5e49d16412c38b9508d12546b8cea626d39f20bc97 +EBUILD nodejs-11.0.0.ebuild 6414 BLAKE2B 61fc56531db35943990d97f4accc37f8b469ab6948de7e4759d90e0fc875148769853d1d2dc2935f5538cd7c45f3576f9d274232552821b34bbe845d3ec19c01 SHA512 2b4c09b4c2961bc4803fa673a0a03fee0e6225fd81ef552061f75de9b8d142b0f3fd1df24da61c526fc1ec81e7873cb282a535e8d6fd83fc2d7b4f6eb9a692eb EBUILD nodejs-4.8.7.ebuild 4424 BLAKE2B fa72291c5b44ce0ba1a592b329be2cd9afa3539bf8419be567c457ef223d4ef3db32ae612795da32345c69bb8b141c350b312989df2869fea37e5ecd5afe44bd SHA512 461f777fac4899b55829edc55961ac021cbe6569fcec87bdb842c8a8b3db117ef74b0ec1e1ff01264f74ee71153e6a771d94d9bbea8fee753c1ea53b8c26dc9e EBUILD nodejs-4.9.1.ebuild 4425 BLAKE2B c5167cf5f59209054cac22f49fd60803001d39949caf1be2f1c49356726884ec5e853be95eee3173548c1d6668aadc0b1f470c44b95150d959fcd33638614f63 SHA512 23280279876f8e8fa37e764bac0f9049b2fc32d1c405a5d5dc8136e92dac1b896c82944b713fdc99daa35806f814ef15f2b63debeb8bc5a2bccf6b8099c8c31e EBUILD nodejs-6.11.5.ebuild 6079 BLAKE2B cae909f4065caf36f168acee12b6fd5a9a2c6fc1c612ae78d8ae2470043a75fbe4be1c0c7975c9d5e3546d334b55ea6d3644320eee952eb17b852e8417db5cbf SHA512 2a78ae710fe19eefc05f47b98ed7a3fd0d0ab84430ffbfd30e3134f0dc9ca80d811f9caa47e61fc99a840b589d05f3b7393e7495b70f36b982637504abf984d5 diff --git a/net-libs/nodejs/nodejs-11.0.0.ebuild b/net-libs/nodejs/nodejs-11.0.0.ebuild new file mode 100644 index 000000000000..e032286ea2d7 --- /dev/null +++ b/net-libs/nodejs/nodejs-11.0.0.ebuild @@ -0,0 +1,204 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="threads" + +inherit bash-completion-r1 eutils 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.23.2:= + >=net-libs/http-parser-2.8.0:= + >=net-libs/nghttp2-1.34.0 + sys-libs/zlib + icu? ( >=dev-libs/icu-62.1:= ) + ssl? ( =dev-libs/openssl-1.1.0*:0=[-bindist] ) +" +DEPEND=" + ${RDEPEND} + ${PYTHON_DEPS} + systemtap? ( dev-util/systemtap ) + test? ( net-misc/curl ) +" +S="${WORKDIR}/node-v${PV}" +PATCHES=( + "${FILESDIR}"/${PN}-10.3.0-global-npm-config.patch +) + +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 deps/v8/gypfiles/toolchain.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-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 ) || 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)" + emake install DESTDIR="${D}" + 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 "${D}"/usr/share/doc/node "${D}"/usr/share/doc/${PF} || die +} + +src_test() { + out/${BUILDTYPE}/cctest || die + "${PYTHON}" tools/test.py --mode=${BUILDTYPE,,} -J message parallel sequential || die +} + +pkg_postinst() { + einfo "The global npm config lives in /etc/npm. This deviates slightly" + einfo "from upstream which otherwise would have it live in /usr/etc/." + einfo "" + einfo "Protip: When using node-gyp to install native modules, you can" + einfo "avoid having to download extras by doing the following:" + einfo "$ node-gyp --nodedir /usr/include/node " +} -- cgit v1.2.3